arch-distributed
Distributed systems: CAP, Raft/Paxos, eventual consistency, distributed transactions 2PC/SAGA, CRDTs
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o arch-distributed.zip https://jpskill.com/download/22270.zip && unzip -o arch-distributed.zip && rm arch-distributed.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/22270.zip -OutFile "$d\arch-distributed.zip"; Expand-Archive "$d\arch-distributed.zip" -DestinationPath $d -Force; ri "$d\arch-distributed.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
arch-distributed.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
arch-distributedフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
arch-distributed
目的
このスキルは、CAP定理、RaftやPaxosのようなコンセンサスアルゴリズム、結果整合性、分散トランザクション(2PCとSAGA)、CRDTを含む分散システム概念をOpenClawが分析、設計、実装できるようにします。コードスニペットの生成、トレードオフの評価、分散アーキテクチャにおける動作のシミュレーションに利用してください。
使用する場面
マイクロサービス、クラウドデータベース、ブロックチェーンシステムなど、ネットワークパーティションに直面するスケーラブルなアプリケーションを構築する際に、このスキルを適用してください。CAP定理の決定(例:一貫性よりも可用性を優先する)、フォールトトレラントなクラスターにおけるコンセンサス、データレプリケーションにおける結果整合性の処理に利用してください。単一サーバーアプリケーションのような非分散タスクには使用しないでください。
主要な機能
- CAP定理の分析: 事前定義されたチェックを使用して、一貫性、可用性、パーティション耐性についてシステム設計を評価します。
- コンセンサスの実装: リーダー選出とログレプリケーションを含むRaftまたはPaxosロジックを生成します。
- 結果整合性の処理: アンチエントロピーやリード・リペアのような解決メカニズムをシミュレートします。
- トランザクションの管理: アトミックコミットのための2PC、または補償アクションを伴う長時間実行プロセス用のSAGAを生成します。
- CRDTの操作: 競合なしでマージできるカウンターまたはセットの実装を作成します。
使用パターン
OpenClawのCLIまたはAPIを介して、スキルIDとパラメータを指定してこのスキルを呼び出します。CLIの場合、openclaw run arch-distributed --input <JSON_FILE>を使用して設定ファイルを処理します。コードでは、OpenClawのSDKをインポートし、openclaw.skills.execute('arch-distributed', params={})を呼び出します。常に"topic"(例:"cap")や"action"(例:"analyze")のようなキーを持つJSON入力を提供してください。例えば、CAPのトレードオフをチェックするには、入力を{"topic": "cap", "system": {"consistency": "strong", "availability": "high"}}のように構成します。データベース設計スキルを実行した後、その出力をパイプで渡すなどして、スキルを連結します。
一般的なコマンド/API
OpenClawのCLIをクイックタスクに使用します: openclaw run arch-distributed --topic consensus --algorithm raft --output json(フラグ: CAP/Raftには--topic、Paxos/Raftには--algorithm、フォーマットには--output)。APIの場合、/api/v1/skills/arch-distributedにPOSTリクエストを送信し、ボディに{"apiKey": "$OPENCLAW_API_KEY", "params": {"action": "implement", "type": "2pc"}}を含めます。SDK統合のコードスニペット:
import openclaw
response = openclaw.execute_skill('arch-distributed', {'topic': 'crdts', 'type': 'counter'})
print(response['code']) # Outputs CRDT implementation code
設定形式: {"consensus": {"algorithm": "raft", "nodes": 5}}のようなJSONファイルをマルチノードシミュレーションに使用します。環境変数で認証を設定します: export OPENCLAW_API_KEY=$SERVICE_API_KEY。
統合に関する注意点
OpenClawの出力をアプリケーションのワークフローにラップすることで統合します。例えば、CI/CDパイプラインからこのスキルを呼び出して分散設計を検証します。外部ツールの場合、出力をKubernetesのようなシステムに渡します(例:Raftベースのステートフルセット用のYAMLを生成する)。データベースと併用する場合は、{"db": "cassandra", "consistency": "eventual"}のようにパラメータでドライバーを指定して互換性を確保してください。依存関係はpip install openclawでOpenClaw SDKをインストールし、認証済みリクエストのために$OPENCLAW_API_KEYを設定することで処理します。本番環境での問題を避けるため、サンドボックス環境で統合をテストしてください。
エラー処理
一般的なエラーには、無効なパラメータ(例:サポートされていないアルゴリズム)、シミュレーションにおけるネットワーク障害、認証の問題などがあります。レスポンスコードを確認してください: 不正な入力にはHTTP 400、$OPENCLAW_API_KEYの欠落には401。コードでは、呼び出しをtry-exceptブロックでラップします:
try:
result = openclaw.execute_skill('arch-distributed', {'topic': 'cap'})
except openclaw.SkillError as e:
if e.code == 'INVALID_TOPIC':
print("Use a valid topic like 'consensus'") # Handle specifically
CLIの場合、openclaw run arch-distributed --debugでエラーを解析し、詳細なログを取得します。一時的なエラー(例:コンセンサス障害)は、指数関数的バックオフを使用して最大3回まで再試行してください。
使用例
- CAP定理を使用してシステムを設計する場合:
openclaw run arch-distributed --topic cap --system '{"consistency": "weak", "availability": "high"}'を実行すると、{"recommendation": "Prioritize availability; use eventual consistency for reads."}のようなJSON形式の分析出力が得られます。これを使用して、単純なキーバリューストアのコードを生成します。 - Raftコンセンサスを実装する場合: API経由で実行します:
/api/v1/skills/arch-distributedに{"params": {"action": "implement", "algorithm": "raft"}}をPOSTすると、次のようなスニペットが返されます:type RaftNode struct { ID int State string // "follower", "candidate", "leader" }これをGoアプリケーションに統合して、分散ログを作成します。
グラフ関係
- クラスターに関連: se-architecture(例:arch-microservicesのようなスキルとタグを共有します)。
- タグによる接続: "distributed"はdata-processingのようなスキルにリンクします。"consensus"はsecurity-authに、"cap"はdatabase-designに、"architecture"はdeployment-toolsにリンクします。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
arch-distributed
Purpose
This skill equips OpenClaw to analyze, design, and implement distributed systems concepts, including CAP theorem, consensus algorithms like Raft and Paxos, eventual consistency, distributed transactions (2PC and SAGA), and CRDTs. Use it to generate code snippets, evaluate trade-offs, or simulate behaviors in distributed architectures.
When to Use
Apply this skill when building scalable applications facing network partitions, such as microservices, cloud databases, or blockchain systems. Use it for CAP theorem decisions (e.g., prioritizing availability over consistency), consensus in fault-tolerant clusters, or handling eventual consistency in data replication. Avoid it for non-distributed tasks like single-server apps.
Key Capabilities
- Analyze CAP theorem: Evaluate system designs for consistency, availability, and partition tolerance using predefined checks.
- Implement consensus: Generate Raft or Paxos logic, including leader election and log replication.
- Handle eventual consistency: Simulate resolution mechanisms like anti-entropy or read-repair.
- Manage transactions: Produce 2PC for atomic commits or SAGA for long-running processes with compensating actions.
- Work with CRDTs: Create implementations for counters or sets that merge without conflicts.
Usage Patterns
Invoke this skill via OpenClaw's CLI or API by specifying the skill ID and parameters. For CLI, use openclaw run arch-distributed --input <JSON_FILE> to process a configuration file. In code, import OpenClaw's SDK and call openclaw.skills.execute('arch-distributed', params={}). Always provide a JSON input with keys like "topic" (e.g., "cap") and "action" (e.g., "analyze"). For example, to check CAP trade-offs, structure input as: {"topic": "cap", "system": {"consistency": "strong", "availability": "high"}}. Chain skills by piping outputs, e.g., run this after a database design skill.
Common Commands/API
Use OpenClaw's CLI for quick tasks: openclaw run arch-distributed --topic consensus --algorithm raft --output json (flags: --topic for CAP/Raft, --algorithm for Paxos/Raft, --output for format). For API, send a POST to /api/v1/skills/arch-distributed with body: {"apiKey": "$OPENCLAW_API_KEY", "params": {"action": "implement", "type": "2pc"}}. Code snippet for SDK integration:
import openclaw
response = openclaw.execute_skill('arch-distributed', {'topic': 'crdts', 'type': 'counter'})
print(response['code']) # Outputs CRDT implementation code
Config formats: Use JSON files like {"consensus": {"algorithm": "raft", "nodes": 5}} for multi-node simulations. Set auth via environment variable: export OPENCLAW_API_KEY=$SERVICE_API_KEY.
Integration Notes
Integrate by wrapping OpenClaw outputs in your app's workflow, e.g., call this skill from a CI/CD pipeline to validate distributed designs. For external tools, pass outputs to systems like Kubernetes (e.g., generate YAML for Raft-based stateful sets). If using with databases, ensure compatibility by specifying drivers in params, like {"db": "cassandra", "consistency": "eventual"}. Handle dependencies by installing OpenClaw SDK via pip install openclaw and setting $OPENCLAW_API_KEY for authenticated requests. Test integrations in a sandbox environment to avoid production issues.
Error Handling
Common errors include invalid parameters (e.g., unsupported algorithm), network failures in simulations, or authentication issues. Check response codes: HTTP 400 for bad input, 401 for missing $OPENCLAW_API_KEY. In code, wrap calls in try-except blocks:
try:
result = openclaw.execute_skill('arch-distributed', {'topic': 'cap'})
except openclaw.SkillError as e:
if e.code == 'INVALID_TOPIC':
print("Use a valid topic like 'consensus'") # Handle specifically
For CLI, parse errors with openclaw run arch-distributed --debug to get detailed logs. Retry transient errors (e.g., consensus failures) up to 3 times with exponential backoff.
Usage Examples
- To design a system using CAP theorem: Run
openclaw run arch-distributed --topic cap --system '{"consistency": "weak", "availability": "high"}'to get an analysis output like JSON: {"recommendation": "Prioritize availability; use eventual consistency for reads."}. Use this to generate code for a simple key-value store. - For implementing Raft consensus: Execute via API: POST /api/v1/skills/arch-distributed with {"params": {"action": "implement", "algorithm": "raft"}}, which returns a snippet like:
type RaftNode struct { ID int State string // "follower", "candidate", "leader" }Integrate this into your Go application for a distributed log.
Graph Relationships
- Related to cluster: se-architecture (e.g., shares tags with skills like arch-microservices).
- Connected via tags: "distributed" links to skills like data-processing; "consensus" to security-auth; "cap" to database-design; "architecture" to deployment-tools.