claude-code について
claude-codeは、OpenClaw向けにClaude Codeのドキュメント参照とコーディングワークフローを提供するスキルです。コーディングサブエージェントのタスクや、Spec-Kitによる仕様駆動開発のガイダンスにも対応します。
主な機能
- 01Claude Codeドキュメントの検索
- 02コーディングサブエージェントタスクの作成と実行
- 03設定とサーバー状態の確認
- 04Spec-Kit仕様ワークフローのガイド
活用シーン
- 01Claude Codeの設定やトラブルシューティングの確認
- 02複雑なコーディングタスクの委任
- 03Spec-Kitによる機能の計画と実装
- 04コードやプルリクエストのレビュー手順の確認
MCP 対応
MCPを含むClaude Codeのトピックを検索でき、infoコマンドでは設定済みMCPサーバーの状態を確認できます。MCPサーバーをクライアントに公開する機能は記載されていません。
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ hw10181913/ openclaw-skill-claude-code --skill claude-codeインストール後、Claude Code で/claude-codeを入力して読み込まれたか確認します。
同梱ファイル
SKILL.md と一緒にインストールされる参考資料やスクリプト。
install.shREADME.mdclaude-code.py詳細
Claude Code の統合
このスキルは Claude Code の機能を OpenClaw に統合し、AI 支援コーディングのワークフロー、ドキュメント、ベストプラクティスを利用できるようにします。
できること
📚 ドキュメントに関する問い合わせ
- Claude Code のドキュメントに問い合わせる
- ベストプラクティスとワークフローを確認する
- 設定とカスタマイズについて学ぶ
- よくある問題をトラブルシューティングする
🤖 サブエージェントの管理
- コーディングサブエージェントを作成する
- エージェントチームを管理する
- 複雑な開発タスクを実行する
- コードレビューや PR のワークフローを自動化する
🛠️ 開発ワークフロー
- AI 支援コーディングのベストプラクティス
- よくあるワークフローとパターン
- 設定と構成
- トラブルシューティングのガイダンス
使用例
ドキュメントに問い合わせる
# Get documentation about a specific topic
claude-code query "subagents"
claude-code query "best practices"
claude-code query "settings"
コーディングタスクを実行する
# Create a coding subagent for a complex task
claude-code task --description "Fix the login bug" --priority high
claude-code task --description "Refactor the database layer" --model claude-3-5-sonnet
利用可能なコマンドを一覧表示する
# Show all available commands
claude-code --help
利用可能なコマンド
query
特定のトピックについて Claude Code のドキュメントに問い合わせます。
使用方法:
claude-code query <topic>
例:
claude-code query "subagents"
claude-code query "agent-teams"
claude-code query "best practices"
claude-code query "common workflows"
claude-code query "settings"
claude-code query "troubleshooting"
トピックには以下が含まれます:
- サブエージェントとエージェントチーム
- ベストプラクティスとワークフロー
- 設定とカスタマイズ
- トラブルシューティングガイド
- プラグインと拡張機能
- MCP(Model Context Protocol)
- ヘッドレス/プログラムによる使用
task
コーディングサブエージェントのタスクを作成し、実行します。
使用方法:
claude-code task --description "<task description>" [--priority <level>] [--model <model-name>]
オプション:
--description, -d: タスクの説明(必須)--priority, -p: タスクの優先度(low/medium/high、デフォルト:medium)--model, -m: 使用するモデル(任意、指定がない場合はデフォルトを使用)
例:
claude-code task --description "Implement user authentication module"
claude-code task --description "Refactor database queries" --priority high
claude-code task --description "Write unit tests for the API" --model claude-3-5-sonnet
docs
Claude Code のドキュメントの各セクションの概要を取得します。
使用方法:
claude-code docs [section]
セクション:
quickstart- 入門ガイドbest-practices- AI コーディングのベストプラクティスcommon-workflows- 一般的な開発ワークフローsettings- カスタマイズオプションtroubleshooting- よくある問題と解決策all- ドキュメント全体の概要(デフォルト)
例:
claude-code docs
claude-code docs quickstart
claude-code docs best-practices
claude-code docs troubleshooting
info
Claude Code の構成とステータスを表示します。
使用方法:
claude-code info
出力内容:
- バージョン情報
- 利用可能なサブエージェント
- 構成済みモデル
- MCP サーバーのステータス
OpenClaw との統合
このスキルは OpenClaw のネイティブ機能とシームレスに連携します。
- サブエージェント:Claude Code のサブエージェントは OpenClaw のサブエージェントシステムを補完します
- コード実行:OpenClaw の exec ツールと組み合わせて、開発ワークフロー全体を実行できます
- ファイル管理:OpenClaw の読み取り/書き込みツールと組み合わせて、コードベース全体を管理できます
- セッション:Claude Code のタスクは OpenClaw のセッション管理と連携します
ワークフローの例
複雑なバグ修正
# 1. Query best practices for debugging
claude-code query "debugging best practices"
# 2. Create a subagent to investigate and fix
claude-code task --description "Find and fix the null pointer exception in userService.js" --priority high
# 3. Review the changes
claude-code query "code review best practices"
新機能の開発
# 1. Get best practices for the feature type
claude-code query "API design best practices"
# 2. Create development task
claude-code task --description "Implement REST API for user management" --priority medium
# 3. Check settings for code style
claude-code query "code style settings"
コードレビューの自動化
# 1. Query PR review best practices
claude-code query "PR review workflows"
# 2. Set up automated review task
claude-code task --description "Review all PRs in the last week" --priority low
構成
環境変数
基本的な使用に必要ありません。Claude Code の統合では OpenClaw のネイティブ機能を使用します。
モデル
OpenClaw で設定されているデフォルトのモデルを使用します。--model オプションを指定すると、タスクごとに上書きできます。
サブエージェントの上限
OpenClaw のサブエージェント構成で管理されます(デフォルト:同時に 8 個のサブエージェント)。
注意事項
- このスキルは Claude Code のドキュメントとワークフローを利用するためのラッパーです
- 複雑なコーディングタスクは OpenClaw のネイティブなサブエージェントシステムを通じて実行されます
- Claude Code の CLI を直接使用する場合は、https://claude.com/code から Claude Code を別途インストールしてください
- すべてのタスクは OpenClaw の安全なエージェントインフラストラクチャを通じて実行されます
関連項目
- Claude Code 公式ドキュメント:https://code.claude.com/docs
- OpenClaw サブエージェント:OpenClaw のネイティブなサブエージェント機能を使用
- ベストプラクティス:Claude Code のガイドラインを統合
🚀 Spec-Kit による仕様駆動開発
仕様駆動開発とは?
仕様駆動開発は、従来のソフトウェア開発の進め方を一変させます。最初にコーディングし、仕様を足場として扱うのではなく、仕様を実行可能なものにし、単に実装を導くだけでなく、動作する実装を直接生成します。
Spec-Kit の中核となる理念
- 意図主導:仕様では「どのように」作るかの前に、「何を」作るかを定義します
- 充実した仕様:ガードレールと組織の原則を定めます
- 複数段階での洗練:一度きりのコード生成ではありません
- AI ネイティブ:高度な AI モデルの能力を活用します
Spec-Kit のワークフロー(7 ステップ)
ステップ 1:Spec-Kit CLI をインストールする
# Install via uv (recommended)
uv tool install specify-cli --from git+https://github.com/github/spec-kit.git
# Verify installation
specify check
# Initialize project with Claude Code
specify init <PROJECT_NAME> --ai claude
ステップ 2:プロジェクトの原則を定める
/speckit.constitution コマンドを使って、指針となる原則を作成します:
/speckit.constitution Create principles focused on:
- Code quality standards
- Testing requirements
- User experience consistency
- Performance requirements
- Design system guidelines
.specify/memory/constitution.md が作成されます。これはプロジェクトの基本的なガイドラインです。
ステップ 3:仕様を作成する
/speckit.specify を使って、何を作るかを記述します:
/speckit.specify Build an application that [describe your product vision]
Focus on:
- What the application does
- User stories and scenarios
- Core features and functionality
- User experience goals
NOT the tech stack!
ステップ 4:要件を明確にする(任意ですが推奨)
構造化された質問を行うには、/speckit.clarify を使います:
/speckit.clarify
順次、網羅性に基づいて質問し、回答を「Clarifications」セクションに記録します。
ステップ 5:技術計画を作成する
/speckit.plan を使って、技術スタックを定義します:
/speckit.plan The application uses:
- Frontend: [React/Vue/Vanilla HTML+CSS+JS]
- Backend: [Node.js/Python/Go]
- Database: [PostgreSQL/MongoDB/LocalStorage]
- Key libraries: [list dependencies]
ステップ 6:タスクを生成する
/speckit.tasks を使って、実装を分解します:
/speckit.tasks
次の内容を含む tasks.md が作成されます:
- ユーザーストーリーごとのタスク分解
- 依存関係の管理
- 並列実行マーカー([P])
- ファイルパスの指定
- TDD 構成
ステップ 7:実装を実行する
/speckit.implement を使って構築します:
/speckit.implement
正しい順序でタスクを実行し、TDD アプローチに従って、進捗状況を更新します。
利用可能なスラッシュコマンド
コアコマンド(必須)
| コマンド | 説明 |
|---|---|
/speckit.constitution | プロジェクトの原則を作成/更新します |
/speckit.specify | 作成するもの(要件)を定義します |
/speckit.plan | 技術的な実装計画を作成します |
/speckit.tasks | 実行可能なタスクリストを生成します |
/speckit.implement | すべてのタスクを実行します |
任意のコマンド(品質向上)
| コマンド | 説明 |
|---|---|
/speckit.clarify | 構造化された要件の明確化 |
/speckit.analyze | 成果物間の整合性を分析します |
/speckit.checklist | 品質検証チェックリスト |
プロジェクト構成(specify init の実行後)
PROJECT_NAME/
├── .specify/
│ ├── memory/
│ │ └── constitution.md # Project principles
│ ├── scripts/
│ │ ├── check-prerequisites.sh
│ │ ├── common.sh
│ │ ├── create-new-feature.sh
│ │ ├── setup-plan.sh
│ │ └── update-claude-md.sh
│ └── specs/
│ └── 001-feature-name/
│ ├── spec.md # Functional specs
│ ├── plan.md # Technical plan
│ ├── tasks.md # Implementation tasks
│ └── quickstart.md # Run instructions
├── CLAUDE.md # AI assistant guidance
└── templates/
├── CLAUDE-template.md
├── plan-template.md
├── spec-template.md
└── tasks-template.md
実例:スキューモーフィックな Todo アプリ
ステップ 1:プロジェクトを初期化する
specify init todo-app-spec-kit --ai claude
cd todo-app-spec-kit
ステップ 2:規約を作成する
/speckit.constitution Create principles:
- Design Excellence: Skeuomorphic first, tactile feedback
- Code Quality: Clean architecture, progressive enhancement
- Testing: Visual testing, interaction testing
- User Experience: Intuitive, rewarding, calm design
ステップ 3:要件を定義する
/speckit.specify Build a beautiful todo list app with:
- Tasks as index cards on a corkboard or notebook
- Add/edit/delete task functionality
- Mark complete with stamp animation
- Drag-and-drop reordering
- LocalStorage persistence
- Warm paper-like aesthetic with handwriting fonts
- Satisfying tactile interactions (crumpling, writing sounds)
ステップ 4:計画を作成する
/speckit.plan Use:
- Pure HTML5/CSS3/JavaScript (no frameworks)
- LocalStorage for data persistence
- Google Fonts (Caveat handwriting)
- CSS animations for tactile effects
- Mobile-responsive design
- Fully offline-capable
ステップ 5:タスクを生成して実行する
/speckit.tasks # Creates task breakdown
/speckit.implement # Executes all tasks
Spec-Kit のメリット
✅ 構造化されたプロセス:曖昧なプロンプトを使う必要がなくなります ✅ 品質保証:チェックリストと検証機能を標準で備えています ✅ 並行した検討:複数の実装方法を検討できます ✅ ドキュメント:仕様を自動生成します ✅ 再現可能:すべてのプロジェクトで同じワークフローを利用できます ✅ AI に最適化:Claude Code 向けに設計されたコマンドです
成功のためのヒント
- 具体的にする:仕様が詳細であるほど、出力の質が高まります
- 反復する:最初から完璧な結果を期待しないでください
- Clarify を使う:計画の前に曖昧な点を解消します
- 順序に従う:constitution → specify → plan → tasks → implement
- 検証する:完了を宣言する前に
/speckit.checklistを使います
Spec-Kit のドキュメント
- メインリポジトリ:https://github.com/github/spec-kit
- 詳細ガイド:https://github.com/github/spec-kit/blob/main/spec-driven.md
- 概要動画:https://www.youtube.com/watch?v=a9eR1xsfvHg
このスキルとの統合
この Claude Code スキルには Spec-Kit の知識が含まれています。次のことができます:
# Query Spec-Kit documentation
claude-code query "spec-kit"
claude-code query "spec-driven development"
claude-code query "specify CLI"
# Get workflow guidance
claude-code docs spec-workflow
例:新しいプロジェクトを開始する
# 1. Install spec-kit (one-time)
uv tool install specify-cli --from git+https://github.com/github/spec-kit.git
# 2. Initialize project
specify init my-new-app --ai claude
# 3. In Claude Code, use the commands:
/speckit.constitution # Set design principles
/speckit.specify # Define your app
/speckit.plan # Choose tech stack
/speckit.tasks # Get task list
/speckit.implement # Build it!
リソース:
- Spec-Kit の GitHub:https://github.com/github/spec-kit
- このスキルのリポジトリ:https://github.com/hw10181913/openclaw-skill-claude-code
- ドキュメント:https://code.claude.com/docs