skill について
skillは、CLI風のコマンドでローカルスキルを管理するoh-my-claudecodeのメタスキルです。ユーザーとプロジェクトの各スコープで、検索、作成、編集、削除、インポート、同期を行えます。
主な機能
- 01スキルの一覧表示と詳細確認
- 02スキルの作成・編集・削除
- 03名前や内容による検索
- 04ユーザーとプロジェクト間の同期
- 05ローカルスキルのセットアップとインポート
活用シーン
- 01スコープごとのスキルを棚卸し
- 02プロジェクト専用スキルの作成
- 03トリガーや内容からスキルを検索
- 04スコープ間でスキルを比較・コピー
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ yeachan-heo/ oh-my-claudecode --skill skillインストール後、Claude Code で/skillを入力して読み込まれたか確認します。
詳細
スキル管理 CLI
CLI のようなコマンドを使って oh-my-claudecode のスキルを管理するためのメタスキルです。
サブコマンド
/skill list
スコープごとに整理して、利用可能なすべてのスキルを表示します。
動作:
- プラグインの
skills/ディレクトリにあるバンドル済みの組み込みスキルをスキャンします(読み取り専用)。 ${CLAUDE_CONFIG_DIR:-~/.claude}/skills/omc-learned/にあるユーザースキルをスキャンします。.omc/skills/にあるプロジェクトスキルをスキャンします。- YAML フロントマターからメタデータを解析します。
- 整理された表形式で表示します。
BUILT-IN SKILLS (bundled with oh-my-claudecode):
| Name | Description | Scope |
|-------------------|--------------------------------|----------|
| visual-verdict | Structured visual QA verdicts | built-in |
| ralph | Persistence loop | built-in |
USER SKILLS (~/.claude/skills/omc-learned/):
| Name | Triggers | Quality | Usage | Scope |
|-------------------|--------------------|---------|-------|-------|
| error-handler | fix, error | 95% | 42 | user |
| api-builder | api, endpoint | 88% | 23 | user |
PROJECT SKILLS (.omc/skills/):
| Name | Triggers | Quality | Usage | Scope |
|-------------------|--------------------|---------|-------|---------|
| test-runner | test, run | 92% | 15 | project |
フォールバック: 品質や使用状況の統計情報がない場合は、「N/A」と表示します。
組み込みスキルに関する注意: 組み込みスキルは oh-my-claudecode にバンドルされており、検出および読み取りが可能ですが、/skill remove や /skill edit では削除も編集もできません。
/skill add [name]
新しいスキルを作成するための対話型ウィザードです。
動作:
- スキル名を尋ねます(コマンドで指定されていない場合)。
- 検証条件:小文字、ハイフンのみ、スペースなし。
- 説明を尋ねます。
- 明確で簡潔な一文にします。
- トリガーを尋ねます(カンマ区切りのキーワード)。
- 例:「error, fix, debug」
- 引数のヒントを尋ねます(任意)。
- 例:「 [options]」
- スコープを尋ねます。
user→${CLAUDE_CONFIG_DIR:-~/.claude}/skills/omc-learned/<name>/SKILL.mdproject→.omc/skills/<name>/SKILL.md
- テンプレートを使ってスキルファイルを作成します。
---
name: <name>
description: <description>
triggers:
- <trigger1>
- <trigger2>
argument-hint: "<args>"
---
# <Name> Skill
## Purpose
[Describe what this skill does]
## When to Activate
[Describe triggers and conditions]
## Workflow
1. [Step 1]
2. [Step 2]
3. [Step 3]
## Examples
/oh-my-claudecode: example-arg
## Notes
[Additional context, edge cases, gotchas]
- ファイルパスとともに成功を報告します。
- 次のように提案します: 「内容をカスタマイズするには、
/skill edit <name>で編集してください」
例:
User: /skill add custom-logger
Assistant: Creating new skill 'custom-logger'...
Description: Enhanced logging with structured output
Triggers (comma-separated): log, logger, logging
Argument hint (optional): <level> [message]
Scope (user/project): user
✓ Created skill at ~/.claude/skills/omc-learned/custom-logger/SKILL.md
→ Edit with: /skill edit custom-logger
/skill remove
名前を指定してスキルを削除します。
動作:
- 両方のスコープでスキルを検索します。
${CLAUDE_CONFIG_DIR:-~/.claude}/skills/omc-learned/<name>/SKILL.md.omc/skills/<name>/SKILL.md
- 見つかった場合:
- スキル情報(名前、説明、スコープ)を表示します。
- 確認を求めます: 「'' スキルを から削除しますか?(yes/no)」
- 確認された場合:
- スキルディレクトリ全体を削除します(例:
${CLAUDE_CONFIG_DIR:-~/.claude}/skills/omc-learned/<name>/)。 - 次のように報告します: 「✓ からスキル '' を削除しました」
- スキルディレクトリ全体を削除します(例:
- 見つからない場合:
- 次のように報告します: 「✗ ユーザーまたはプロジェクトのスコープにスキル '' が見つかりません」
安全性: ユーザーの明示的な確認なしに削除してはいけません。
例:
User: /skill remove old-logger
Assistant: Found skill 'old-logger' in user scope:
Description: Legacy logging utility
Scope: user (~/.claude/skills/omc-learned/)
Delete 'old-logger' skill? (yes/no)
User: yes
Assistant: ✓ Removed skill 'old-logger' from user scope
/skill edit
既存のスキルを対話形式で編集します。
動作:
-
両方のスコープを検索して、名前からスキルを探します。
-
Read ツールを使って現在の内容を読み取ります。
-
現在の値を表示します。
Current skill 'custom-logger': - Description: Enhanced logging with structured output - Triggers: log, logger, logging - Argument hint: <level> [message] - Scope: user -
変更する項目を尋ねます。
description- 説明を更新しますtriggers- トリガーキーワードを更新しますargument-hint- 引数のヒントを更新しますcontent- Markdown の全内容を編集しますrename- スキル名を変更します(ファイルを移動します)cancel- 変更せずに終了します
-
選択した項目について:
- 現在の値を表示します。
- 新しい値を尋ねます。
- YAML フロントマターまたは内容を更新します。
- ファイルに書き戻します。
-
変更内容の概要とともに成功を報告します。
例:
User: /skill edit custom-logger
Assistant: Current skill 'custom-logger':
- Description: Enhanced logging with structured output
- Triggers: log, logger, logging
- Argument hint: <level> [message]
What would you like to edit? (description/triggers/argument-hint/content/rename/cancel)
User: triggers
Assistant: Current triggers: log, logger, logging
New triggers (comma-separated): log, logger, logging, trace
✓ Updated triggers for 'custom-logger'
/skill search
内容、トリガー、名前、説明からスキルを検索します。
動作:
- 両方のスコープにあるすべてのスキルをスキャンします。
- 次の項目に対してクエリを照合します(大文字と小文字を区別しません)。
- スキル名
- 説明
- トリガー
- Markdown の全内容
- 一致した箇所を前後の文脈とともに表示します。
Found 3 skills matching "typescript error":
1. typescript-fixer (user)
Description: Fix common TypeScript errors
Match: "typescript error handling patterns"
2. error-handler (user)
Description: Generic error handling utilities
Match: "Supports TypeScript and JavaScript errors"
3. lint-fix (project)
Description: Auto-fix linting errors
Match: "TypeScript ESLint error resolution"
ランキング: 内容の一致よりも、名前やトリガーの一致を優先します。
例:
User: /skill search api endpoint
Assistant: Found 2 skills matching "api endpoint":
1. api-builder (user)
Description: Generate REST API endpoints
Triggers: api, endpoint, rest
2. backend-scaffold (project)
Description: Scaffold backend services
Match: "Creates API endpoint boilerplate"
/skill info
スキルの詳細情報を表示します。
動作:
- 両方のスコープを検索して、名前からスキルを探します。
- YAML フロントマターと内容を解析します。
- 詳細情報をすべて表示します。
Skill: custom-logger
Scope: user (~/.claude/skills/omc-learned/custom-logger/)
Description: Enhanced logging with structured output
Triggers: log, logger, logging
Argument Hint: <level> [message]
Quality: 95% (if available)
Usage Count: 42 times (if available)
File Path: /home/user/.claude/skills/omc-learned/custom-logger/SKILL.md
--- FULL CONTENT ---
[entire markdown content]
見つからない場合: エラーを報告し、/skill search の使用を提案します。
例:
User: /skill info custom-logger
Assistant: Skill: custom-logger
Scope: user
Description: Enhanced logging with structured output
Triggers: log, logger, logging
File: ~/.claude/skills/omc-learned/custom-logger/SKILL.md
--- CONTENT ---
# Custom Logger Skill
## Purpose
Enhanced logging with structured JSON output...
[rest of content]
/skill sync
ユーザーとプロジェクトのスコープ間でスキルを同期します。
動作:
- 両方のスコープをスキャンします:
- ユーザースキル:
${CLAUDE_CONFIG_DIR:-~/.claude}/skills/omc-learned/ - プロジェクトスキル:
.omc/skills/
- ユーザースキル:
- 比較して分類します:
- ユーザーにのみ存在するスキル(プロジェクトには存在しない)
- プロジェクトにのみ存在するスキル(ユーザーには存在しない)
- 共通のスキル(両方に存在する)
- 同期候補を表示します:
SYNC REPORT:
User-only skills (5):
- error-handler
- api-builder
- custom-logger
- test-generator
- deploy-helper
Project-only skills (2):
- test-runner
- backend-scaffold
Common skills (3):
- frontend-ui-ux
- git-master
- planner
Options:
[1] Copy user skill to project
[2] Copy project skill to user
[3] View differences
[4] Cancel
- ユーザーの選択に対応します:
- オプション 1: プロジェクトにコピーするスキルを選択します
- オプション 2: ユーザーにコピーするスキルを選択します
- オプション 3: 共通のスキルの差分を並べて表示します
- オプション 4: 終了します
安全性: 確認なしに上書きしないでください
例:
User: /skill sync
Assistant: Found 5 user-only skills and 2 project-only skills.
Copy 'error-handler' from user to project? (yes/no/skip)
User: yes
Assistant: ✓ Copied 'error-handler' to .omc/skills/
Copy 'api-builder' from user to project? (yes/no/skip)
User: skip
...
/skill setup
ローカルスキルをセットアップして管理するための対話型ウィザードです(旧称 local-skills-setup)。
動作:
ステップ 1: ディレクトリの確認とセットアップ
まず、スキルディレクトリが存在するか確認し、必要に応じて作成します。
# Check and create user-level skills directory
USER_SKILLS_DIR="${CLAUDE_CONFIG_DIR:-$HOME/.claude}/skills/omc-learned"
if [ -d "$USER_SKILLS_DIR" ]; then
echo "User skills directory exists: $USER_SKILLS_DIR"
else
mkdir -p "$USER_SKILLS_DIR"
echo "Created user skills directory: $USER_SKILLS_DIR"
fi
# Check and create project-level skills directory
PROJECT_SKILLS_DIR=".omc/skills"
if [ -d "$PROJECT_SKILLS_DIR" ]; then
echo "Project skills directory exists: $PROJECT_SKILLS_DIR"
else
mkdir -p "$PROJECT_SKILLS_DIR"
echo "Created project skills directory: $PROJECT_SKILLS_DIR"
fi
ステップ 2: スキルのスキャンと一覧表示
両方のディレクトリをスキャンし、包括的な一覧を表示します。
# Scan user-level skills
echo "=== USER-LEVEL SKILLS (~/.claude/skills/omc-learned/) ==="
if [ -d "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/skills/omc-learned" ]; then
USER_COUNT=$(find "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/skills/omc-learned" -name "*.md" 2>/dev/null | wc -l)
echo "Total skills: $USER_COUNT"
if [ $USER_COUNT -gt 0 ]; then
echo ""
echo "Skills found:"
find "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/skills/omc-learned" -name "*.md" -type f -exec sh -c '
FILE="$1"
NAME=$(grep -m1 "^name:" "$FILE" 2>/dev/null | sed "s/name: //")
DESC=$(grep -m1 "^description:" "$FILE" 2>/dev/null | sed "s/description: //")
MODIFIED=$(stat -c "%y" "$FILE" 2>/dev/null || stat -f "%Sm" "$FILE" 2>/dev/null)
echo " - $NAME"
[ -n "$DESC" ] && echo " Description: $DESC"
echo " Modified: $MODIFIED"
echo ""
' sh {} \;
fi
else
echo "Directory not found"
fi
echo ""
echo "=== PROJECT-LEVEL SKILLS (.omc/skills/) ==="
if [ -d ".omc/skills" ]; then
PROJECT_COUNT=$(find ".omc/skills" -name "*.md" 2>/dev/null | wc -l)
echo "Total skills: $PROJECT_COUNT"
if [ $PROJECT_COUNT -gt 0 ]; then
echo ""
echo "Skills found:"
find ".omc/skills" -name "*.md" -type f -exec sh -c '
FILE="$1"
NAME=$(grep -m1 "^name:" "$FILE" 2>/dev/null | sed "s/name: //")
DESC=$(grep -m1 "^description:" "$FILE" 2>/dev/null | sed "s/description: //")
MODIFIED=$(stat -c "%y" "$FILE" 2>/dev/null || stat -f "%Sm" "$FILE" 2>/dev/null)
echo " - $NAME"
[ -n "$DESC" ] && echo " Description: $DESC"
echo " Modified: $MODIFIED"
echo ""
' sh {} \;
fi
else
echo "Directory not found"
fi
# Summary
TOTAL=$((USER_COUNT + PROJECT_COUNT))
echo "=== SUMMARY ==="
echo "Total skills across all directories: $TOTAL"
ステップ 3: クイックアクションメニュー
スキャン後、AskUserQuestion ツールを使用して、次のオプションを提示します。
質問: 「ローカルスキルで何をしますか?」
オプション:
- 新しいスキルを追加 - スキル作成ウィザードを開始します(
/skill addを呼び出します) - すべてのスキルを詳細とともに一覧表示 - スキルの包括的な一覧を表示します(
/skill listを呼び出します) - 会話からパターンをスキャン - 現在の会話から、スキルに適したパターンを分析します
- スキルをインポート - URL または貼り付けたコンテンツからスキルをインポートします
- 完了 - ウィザードを終了します
オプション 3: 会話からパターンをスキャン
現在の会話のコンテキストを分析し、スキルに適した可能性のあるパターンを特定します。次の項目を探します。
- 最近のデバッグセッションで見つかった、すぐには分からない解決策
- 調査が必要だった厄介なバグ
- コードベース固有の回避策
- 解決に時間がかかったエラーパターン
見つかった内容を報告し、スキルとして抽出するかどうかをユーザーに尋ねます(/skillify を呼び出します。/learner は互換性維持のための非推奨コマンドです)。
オプション 4: スキルをインポート
次のいずれかを指定するようユーザーに依頼します。
- URL: URL(例: GitHub gist)からスキルをダウンロードします
- コンテンツを貼り付け: スキルの Markdown コンテンツを直接貼り付けます
次に、スコープを尋ねます。
- ユーザーレベル(~/.claude/skills/omc-learned/)- すべてのプロジェクトで利用可能です
- プロジェクトレベル(.omc/skills/)- このプロジェクトでのみ利用可能です
スキルの形式を検証し、選択した場所に保存します。
/skill scan
両方のスキルディレクトリをスキャンするクイックコマンドです(/skill setup のサブセット)。
動作:
対話型ウィザードを実行せずに、/skill setup のステップ 2 でのスキャンを実行します。
スキルテンプレート
/skill add または /skill setup でスキルを作成する際、一般的なスキルタイプ向けのクイックテンプレートを提示します。
エラー解決テンプレート
---
id: error-[unique-id]
name: [Error Name]
description: Solution for [specific error in specific context]
source: conversation
triggers: ["error message fragment", "file path", "symptom"]
quality: high
---
# [Error Name]
## The Insight
What is the underlying cause of this error? What principle did you discover?
## Why This Matters
What goes wrong if you don't know this? What symptom led here?
## Recognition Pattern
How do you know when this applies? What are the signs?
- Error message: "[exact error]"
- File: [specific file path]
- Context: [when does this occur]
## The Approach
Step-by-step solution:
1. [Specific action with file/line reference]
2. [Specific action with file/line reference]
3. [Verification step]
## Example
\`\`\`typescript
// Before (broken)
[problematic code]
// After (fixed)
[corrected code]
\`\`\`
ワークフロースキルテンプレート
---
id: workflow-[unique-id]
name: [Workflow Name]
description: Process for [specific task in this codebase]
source: conversation
triggers: ["task description", "file pattern", "goal keyword"]
quality: high
---
# [Workflow Name]
## The Insight
What makes this workflow different from the obvious approach?
## Why This Matters
What fails if you don't follow this process?
## Recognition Pattern
When should you use this workflow?
- Task type: [specific task]
- Files involved: [specific patterns]
- Indicators: [how to recognize]
## The Approach
1. [Step with specific commands/files]
2. [Step with specific commands/files]
3. [Verification]
## Gotchas
- [Common mistake and how to avoid it]
- [Edge case and how to handle it]
コードパターンテンプレート
---
id: pattern-[unique-id]
name: [Pattern Name]
description: Pattern for [specific use case in this codebase]
source: conversation
triggers: ["code pattern", "file type", "problem domain"]
quality: high
---
# [Pattern Name]
## The Insight
What's the key principle behind this pattern?
## Why This Matters
What problems does this pattern solve in THIS codebase?
## Recognition Pattern
When do you apply this pattern?
- File types: [specific files]
- Problem: [specific problem]
- Context: [codebase-specific context]
## The Approach
Decision-making heuristic, not just code:
1. [Principle-based step]
2. [Principle-based step]
## Example
\`\`\`typescript
[Illustrative example showing the principle]
\`\`\`
## Anti-Pattern
What NOT to do and why:
\`\`\`typescript
[Common mistake to avoid]
\`\`\`
インテグレーションスキルテンプレート
---
id: integration-[unique-id]
name: [Integration Name]
description: How [system A] integrates with [system B] in this codebase
source: conversation
triggers: ["system name", "integration point", "config file"]
quality: high
---
# [Integration Name]
## The Insight
What's non-obvious about how these systems connect?
## Why This Matters
What breaks if you don't understand this integration?
## Recognition Pattern
When are you working with this integration?
- Files: [specific integration files]
- Config: [specific config locations]
- Symptoms: [what indicates integration issues]
## The Approach
How to work with this integration correctly:
1. [Configuration step with file paths]
2. [Setup step with specific details]
3. [Verification step]
## Gotchas
- [Integration-specific pitfall #1]
- [Integration-specific pitfall #2]
エラー処理
すべてのコマンドで、次の状況に対応する必要があります。
- ファイルまたはディレクトリが存在しない
- 権限エラー
- YAML フロントマターが無効
- スキル名が重複している
- スキル名が無効(スペース、特殊文字)
エラー形式:
✗ Error: <clear message>
→ Suggestion: <helpful next step>
使用例
# List all skills
/skill list
# Create a new skill
/skill add my-custom-skill
# Remove a skill
/skill remove old-skill
# Edit existing skill
/skill edit error-handler
# Search for skills
/skill search typescript error
# Get detailed info
/skill info my-custom-skill
# Sync between scopes
/skill sync
# Run setup wizard
/skill setup
# Quick scan
/skill scan
使用モード
直接コマンドモード
引数を指定して呼び出した場合、対話型ウィザードをスキップします。
/oh-my-claudecode:skill list- スキルの詳細な一覧を表示します/oh-my-claudecode:skill add- スキルの作成を開始します(skillify を呼び出します)/oh-my-claudecode:skill scan- 両方のスキルディレクトリをスキャンします
対話型モード
引数なしで呼び出した場合、ガイド付きウィザード全体を実行します。
ローカルスキルのメリット
自動適用:Claude がトリガーを検出してスキルを自動的に適用するため、解決策を覚えたり検索したりする必要はありません。
バージョン管理:プロジェクトレベルのスキル(.omc/skills/)は、チーム全体が活用できるよう、コードとともにコミットすることを想定しています。リンクされたワークツリーでは、コミットされていないスキルはそのワークツリー内にのみ保持され、ワークツリーを削除すると失われます。
進化する知識:より良いアプローチを見つけ、トリガーを改善するにつれて、スキルも時間とともに向上します。
トークン使用量の削減:同じ問題を何度も解決する代わりに、Claude が既知のパターンを効率よく適用します。
コードベースの記憶:会話履歴から失われる可能性のある、組織に蓄積された知識を保持します。
スキルの品質ガイドライン
優れたスキルには、次の特徴があります。
-
検索しても見つからない - 検索しても簡単には見つかりません
- BAD:「TypeScript でファイルを読み込む方法」
- GOOD:「このコードベースでは、
fileURLToPathが必要なカスタムのパス解決を使用しています」
-
コンテキストに特化している - このコードベースの実際のファイルやエラーを参照します
- BAD:「エラー処理には try/catch を使う」
- GOOD:「
server.py:42の aiohttp プロキシはClientDisconnectedErrorでクラッシュします」
-
具体的で実行可能 - 何をどこで行うかを正確に示します
- BAD:「エッジケースに対処する」
- GOOD:「
dist/で「Cannot find module」と表示されたら、tsconfig.jsonのmoduleResolutionを確認します」
-
試行錯誤の末に得られた知見である - 解決に多大なデバッグ作業を要しています
- BAD:一般的なプログラミングパターン
- GOOD:「
worker.tsの競合状態:89 行目のPromise.allにawaitが必要です」
関連スキル
/oh-my-claudecode:skillify- 現在の会話からスキルを抽出します(/oh-my-claudecode:learnerは非推奨のエイリアスです)/oh-my-claudecode:note- 簡単なメモを保存します(スキルよりも形式的ではありません)/oh-my-claudecode:deepinit- AGENTS.md のコードベース階層を生成します
セッション例
> /oh-my-claudecode:skill list
Checking skill directories...
✓ User skills directory exists: ~/.claude/skills/omc-learned/
✓ Project skills directory exists: .omc/skills/
Scanning for skills...
=== USER-LEVEL SKILLS ===
Total skills: 3
- async-network-error-handling
Description: Pattern for handling independent I/O failures in async network code
Modified: 2026-01-20 14:32:15
- esm-path-resolution
Description: Custom path resolution in ESM requiring fileURLToPath
Modified: 2026-01-19 09:15:42
=== PROJECT-LEVEL SKILLS ===
Total skills: 5
- session-timeout-fix
Description: Fix for sessionId undefined after restart in session.ts
Modified: 2026-01-22 16:45:23
- build-cache-invalidation
Description: When to clear TypeScript build cache to fix phantom errors
Modified: 2026-01-21 11:28:37
=== SUMMARY ===
Total skills: 8
What would you like to do?
1. Add new skill
2. List all skills with details
3. Scan conversation for patterns
4. Import skill
5. Done
ユーザー向けのヒント
- 定期的に
/oh-my-claudecode:skill listを実行して、スキルライブラリを確認します - 難しいバグを解決したら、すぐに skillify を実行して記録します
- コードベース固有の知識にはプロジェクトレベルのスキルを使います
- どこでも応用できる一般的なパターンにはユーザーレベルのスキルを使います
- 一致精度を高めるため、時間をかけてトリガーを見直し、改善します
実装上の注意
- YAML の解析: メタデータの抽出には frontmatter を使います
- ファイル操作: Read/Write ツールを使い、新規ファイルには Edit を使いません
- ユーザーの確認: 破壊的な操作は必ず確認します
- 明確なフィードバック: 分かりやすさのため、チェックマーク(✓)、バツ印(✗)、矢印(→)を使います
- スコープの解決: ユーザースコープとプロジェクトスコープの両方を必ず確認します
- 検証: 命名規則(小文字、ハイフンのみ)を適用します
関連スキル
/oh-my-claudecode:skillify- 現在の会話からスキルを抽出します(/oh-my-claudecode:learnerは非推奨のエイリアスです)/oh-my-claudecode:note- 簡単なメモを保存します(スキルよりも形式的ではありません)/oh-my-claudecode:deepinit- AGENTS.md のコードベース階層を生成します
今後の拡張
/skill export <name>- 共有可能なファイルとしてスキルをエクスポートします/skill import <file>- ファイルからスキルをインポートします/skill stats- すべてのスキルの使用統計を表示します/skill validate- すべてのスキルの形式エラーを確認します/skill template <type>- 定義済みテンプレートから作成します