🛠️ Promote
Claudeが自動で学習した成功パターンを
📺 まず動画で見る(YouTube)
▶ 【衝撃】最強のAIエージェント「Claude Code」の最新機能・使い方・プログラミングをAIで効率化する超実践術を解説! ↗
※ jpskill.com 編集部が参考用に選んだ動画です。動画の内容と Skill の挙動は厳密には一致しないことがあります。
📜 元の英語説明(参考)
Graduate a proven pattern from auto-memory (MEMORY.md) to CLAUDE.md or .claude/rules/ for permanent enforcement.
🇯🇵 日本人クリエイター向け解説
Claudeが自動で学習した成功パターンを
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o promote.zip https://jpskill.com/download/4403.zip && unzip -o promote.zip && rm promote.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/4403.zip -OutFile "$d\promote.zip"; Expand-Archive "$d\promote.zip" -DestinationPath $d -Force; ri "$d\promote.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
promote.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
promoteフォルダができる - 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-17
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
💬 こう話しかけるだけ — サンプルプロンプト
- › Promote を使って、最小構成のサンプルコードを示して
- › Promote の主な使い方と注意点を教えて
- › Promote を既存プロジェクトに組み込む方法を教えて
これをClaude Code に貼るだけで、このSkillが自動発動します。
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
[スキル名] promote
/si:promote — 学習内容をルールに昇格させる
Claude の自動記憶から実証済みのパターンをプロジェクトのルールシステムに移動させ、背景にあるメモではなく、強制される指示として機能するようにします。
使用法
/si:promote <pattern description> # 最適なターゲットを自動検出
/si:promote <pattern> --target claude.md # CLAUDE.md に昇格
/si:promote <pattern> --target rules/testing.md # スコープ付きルールに昇格
/si:promote <pattern> --target rules/api.md --paths "src/api/**/*.ts" # パス付きスコープ
ワークフロー
ステップ 1: パターンを理解する
ユーザーの記述を解析します。曖昧な場合は、1つだけ明確にする質問をします。
- 「Claude はどのような特定の動作に従うべきですか?」
- 「これはすべてのファイルに適用されますか、それとも特定のパスに適用されますか?」
ステップ 2: 自動記憶からパターンを見つける
# MEMORY.md で関連するエントリを検索
MEMORY_DIR="$HOME/.claude/projects/$(pwd | sed 's|/|%2F|g; s|%2F|/|; s|^/||')/memory"
grep -ni "<keywords>" "$MEMORY_DIR/MEMORY.md"
一致するエントリを表示し、ユーザーが意図しているものであることを確認します。
ステップ 3: 適切なターゲットを決定する
| パターンのスコープ | ターゲット | 例 |
|---|---|---|
| プロジェクト全体に適用 | ./CLAUDE.md |
「npm ではなく pnpm を使用する」 |
| 特定のファイルタイプに適用 | .claude/rules/<topic>.md |
「API ハンドラーは検証が必要」 |
| すべてのプロジェクトに適用 | ~/.claude/CLAUDE.md |
「明示的なエラー処理を優先する」 |
ユーザーがターゲットを指定しなかった場合は、スコープに基づいて推奨します。
ステップ 4: 簡潔なルールに要約する
自動記憶のメモ形式から CLAUDE.md の指示形式に学習内容を変換します。
変換前 (MEMORY.md — 記述的):
プロジェクトは pnpm ワークスペースを使用しています。npm install を試したところ失敗しました。ロックファイルは pnpm-lock.yaml です。依存関係には pnpm install を使用する必要があります。
変換後 (CLAUDE.md — 指示的):
## ビルドと依存関係
- パッケージマネージャー: pnpm (npm ではない)。`pnpm install` を使用してください。
要約のルール:
- 可能な限りルールは1行で記述する
- 命令形を使用する(「X を使用する」、「常に Y する」、「決して Z しない」)
- 概念だけでなく、コマンドや例を含める
- 背景説明は不要 — 指示のみ
ステップ 5: ターゲットに書き込む
CLAUDE.md の場合:
- 既存の CLAUDE.md を読み込む
- 適切なセクションを見つける(または作成する)
- 適切な見出しの下に新しいルールを追加する
- ファイルが200行を超える場合は、代わりに
.claude/rules/の使用を提案する
.claude/rules/ の場合:
- ファイルが存在しない場合は作成する
- スコープが設定されている場合は
pathsを含む YAML フロントマターを追加する - ルールコンテンツを記述する
---
paths:
- "src/api/**/*.ts"
- "tests/api/**/*"
---
# API 開発ルール
- すべてのエンドポイントは Zod スキーマで入力を検証する必要があります
- エラー応答には `ApiError` クラスを使用してください(生の Error ではない)
- ハンドラー関数に OpenAPI JSDoc コメントを含めてください
ステップ 6: 自動記憶をクリーンアップする
昇格後、MEMORY.md の元のエントリを削除またはマークします。
# 削除される内容を表示
grep -n "<pattern>" "$MEMORY_DIR/MEMORY.md"
ユーザーに削除の確認を求めます。その後、MEMORY.md を編集して昇格されたエントリを削除します。これにより、新しい学習のためのスペースが確保されます。
ステップ 7: 確認
✅ {{target}} に昇格しました
ルール: "{{distilled rule}}"
ソース: MEMORY.md {{n}} 行目 (削除済み)
MEMORY.md: 残り {{lines}}/200 行
このパターンは強制される指示となりました。Claude は今後のすべてのセッションでこれに従います。
昇格の決定ガイド
昇格する場合:
- パターンが自動記憶に3回以上出現した場合
- Claude について2回以上修正した場合
- どの貢献者も知っておくべきプロジェクトの慣習である場合
- 繰り返される間違いを防ぐ場合
昇格しない場合:
- 一時的なデバッグメモである場合(自動記憶に残す)
- セッション固有のコンテキストである場合(セッション記憶がこれを処理する)
- 近いうちに変更される可能性がある場合(例:移行中)
- 既存のルールで既にカバーされている場合
CLAUDE.md と .claude/rules/ の使い分け
| CLAUDE.md を使用する場合 | .claude/rules/ を使用する場合 |
|---|---|
| グローバルなプロジェクトルール | ファイルタイプ固有のパターン |
| ビルドコマンド | テストの慣習 |
| アーキテクチャの決定 | API 設計ルール |
| チームの慣習 | フレームワーク固有の注意点 |
ヒント
- CLAUDE.md は200行未満に保つ — 超過分は rules/ を使用する
- 段落よりも1行1ルールの方が保守しやすい
- 概念だけでなく、具体的なコマンドを含める
- 昇格したルールは四半期ごとにレビューする — 不要になったものは削除する
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
/si:promote — Graduate Learnings to Rules
Moves a proven pattern from Claude's auto-memory into the project's rule system, where it becomes an enforced instruction rather than a background note.
Usage
/si:promote <pattern description> # Auto-detect best target
/si:promote <pattern> --target claude.md # Promote to CLAUDE.md
/si:promote <pattern> --target rules/testing.md # Promote to scoped rule
/si:promote <pattern> --target rules/api.md --paths "src/api/**/*.ts" # Scoped with paths
Workflow
Step 1: Understand the pattern
Parse the user's description. If vague, ask one clarifying question:
- "What specific behavior should Claude follow?"
- "Does this apply to all files or specific paths?"
Step 2: Find the pattern in auto-memory
# Search MEMORY.md for related entries
MEMORY_DIR="$HOME/.claude/projects/$(pwd | sed 's|/|%2F|g; s|%2F|/|; s|^/||')/memory"
grep -ni "<keywords>" "$MEMORY_DIR/MEMORY.md"
Show the matching entries and confirm they're what the user means.
Step 3: Determine the right target
| Pattern scope | Target | Example |
|---|---|---|
| Applies to entire project | ./CLAUDE.md |
"Use pnpm, not npm" |
| Applies to specific file types | .claude/rules/<topic>.md |
"API handlers need validation" |
| Applies to all your projects | ~/.claude/CLAUDE.md |
"Prefer explicit error handling" |
If the user didn't specify a target, recommend one based on scope.
Step 4: Distill into a concise rule
Transform the learning from auto-memory's note format into CLAUDE.md's instruction format:
Before (MEMORY.md — descriptive):
The project uses pnpm workspaces. When I tried npm install it failed. The lock file is pnpm-lock.yaml. Must use pnpm install for dependencies.
After (CLAUDE.md — prescriptive):
## Build & Dependencies
- Package manager: pnpm (not npm). Use `pnpm install`.
Rules for distillation:
- One line per rule when possible
- Imperative voice ("Use X", "Always Y", "Never Z")
- Include the command or example, not just the concept
- No backstory — just the instruction
Step 5: Write to target
For CLAUDE.md:
- Read existing CLAUDE.md
- Find the appropriate section (or create one)
- Append the new rule under the right heading
- If file would exceed 200 lines, suggest using
.claude/rules/instead
For .claude/rules/:
- Create the file if it doesn't exist
- Add YAML frontmatter with
pathsif scoped - Write the rule content
---
paths:
- "src/api/**/*.ts"
- "tests/api/**/*"
---
# API Development Rules
- All endpoints must validate input with Zod schemas
- Use `ApiError` class for error responses (not raw Error)
- Include OpenAPI JSDoc comments on handler functions
Step 6: Clean up auto-memory
After promoting, remove or mark the original entry in MEMORY.md:
# Show what will be removed
grep -n "<pattern>" "$MEMORY_DIR/MEMORY.md"
Ask the user to confirm removal. Then edit MEMORY.md to remove the promoted entry. This frees space for new learnings.
Step 7: Confirm
✅ Promoted to {{target}}
Rule: "{{distilled rule}}"
Source: MEMORY.md line {{n}} (removed)
MEMORY.md: {{lines}}/200 lines remaining
The pattern is now an enforced instruction. Claude will follow it in all future sessions.
Promotion Decision Guide
Promote when:
- Pattern appeared 3+ times in auto-memory
- You corrected Claude about it more than once
- It's a project convention that any contributor should know
- It prevents a recurring mistake
Don't promote when:
- It's a one-time debugging note (leave in auto-memory)
- It's session-specific context (session memory handles this)
- It might change soon (e.g., during a migration)
- It's already covered by existing rules
CLAUDE.md vs .claude/rules/
| Use CLAUDE.md for | Use .claude/rules/ for |
|---|---|
| Global project rules | File-type-specific patterns |
| Build commands | Testing conventions |
| Architecture decisions | API design rules |
| Team conventions | Framework-specific gotchas |
Tips
- Keep CLAUDE.md under 200 lines — use rules/ for overflow
- One rule per line is easier to maintain than paragraphs
- Include the concrete command, not just the concept
- Review promoted rules quarterly — remove what's no longer relevant