Claude Code の構築から学んだこと:スキル活用方法について
Anthropic は Claude Code の開発経験から、エージェントのスキルを「ライブラリ参照」「製品検証」など9つのカテゴリに分類するフレームワークを公開し、実用性を高めるための具体的な設計指針を示した。
キーポイント
スキルのカテゴリ化フレームワーク
Anthropic は内部スキルを分析し、9 つのカテゴリに分類することで、機能が多岐にわたる曖昧なスキルを排除し、エージェントの認識精度を高めるアプローチを示した。
ライブラリと API 参照スキルの重要性
内部ライブラリや CLI の正しい使い方、よくあるエラー(gotchas)を定義するスキルは、エージェントがスクリプトを書く際の失敗を防ぐために不可欠である。
製品検証スキルの質的向上
Playwright や tmux を活用した自動テストや、出力の動画記録、ステートアサーションを実装する検証スキルが、Claude の出力品質に最も劇的な改善をもたらす。
データ取得と分析スキルの統合
監視スタックへの接続や認証情報の管理、特定ダッシュボードの ID 指定など、外部システムとの連携を安全かつ正確に行うためのスキル設計が重要視される。
影響分析・編集コメントを表示
影響分析
この記事は、LLM エージェントの実用化において「何ができるか」だけでなく「どのように信頼性を担保するか」という設計思想の転換点を示しています。特に、検証プロセスを自動化するスキルの重要性を強調しており、企業が開発現場で AI を導入する際のベストプラクティスとして即座に参照されるべき知見です。
編集コメント
AI エージェントの実装において、単なる機能追加ではなく「検証プロセス」の設計が品質を分けるという洞察は非常に示唆に富んでいます。開発チームは、このフレームワークを自社のツールチェーンに合わせてカスタマイズすることで、より堅牢な AI 活用を実現できるでしょう。
スキルの種類
Anthropic 内のすべての内部スキルをカタログ化した後、それらが9つのカテゴリに分類されることに気づきました。最も優れたスキルは明確に1つのカテゴリに収まりますが、あまりにも多くのことを試みるスキルは複数のカテゴリにまたがり、エージェントを混乱させます。これは決定版のリストではありませんが、ご自身のスキルライブラリのギャップを特定するための有用なフレームワークです。

Claude Code チームは内部スキルを分類し、それらを9つの明確なカテゴリに分類できることを発見しました。
1. ライブラリおよび API リファレンス
これらは、ライブラリ、CLI(コマンドラインインターフェース)、または SDK を正しく使用方法を説明するスキルです。内部ライブラリ向けである場合もあれば、Claude Code が時々扱いに苦労する一般的なライブラリ向けである場合もあります。これらのスキルには、参照用のコードスニペットが収められたフォルダと、スクリプト作成時に Claude が避けるべき注意点のリストが含まれることがよくあります。
例としては以下があります:
- billing-lib — 内部請求処理ライブラリ:エッジケース、落とし穴など
- internal-platform-cli — 内部 CLI ラッパーのすべてのサブコマンドと、それらを使用すべきタイミングの例
- sandbox-proxy — 開発作業のための組織のエグレスゲートウェイの設定:到達可能なホスト、"connection refused"エラーのデバッグ方法、許可リストへのエントリ追加方法
2. プロダクト検証
これらは、コードが正しく動作しているかどうかをテストまたは検証する方法を説明するスキルです。これらは、検証のために Playwright、tmux、または他の外部ツールと組み合わせて使用されることがよくあります。
検証スキルは、社内で Claude の出力品質に最も測定可能な影響を与えてきました。エンジニアに 1 週間を費やして検証スキルを完璧にする価値がある場合もあります。
Claude に出力の動画を記録させてテスト内容を正確に確認できるようにする、あるいは各ステップの状態に対してプログラムによるアサーション(assertion)を強制するといった手法も検討してください。これらは通常、スキル内に多様なスクリプトを含めることで実現されます。
具体例としては以下の通りです:
- signup-flow-driver — ヘッドレスブラウザでサインアップ→メール検証→オンボーディングのフローを実行し、各ステップで状態をアサーションするためのフックを提供する
- checkout-verifier — Stripe のテストカードを使用してチェックアウト UI を操作し、請求書が正しい状態に到達したことを検証する
- tmux-cli-driver — 検証対象が TTY(端末)を必要とするインタラクティブな CLI テスト用
3. データ取得と分析
これらはデータや監視スタックに接続するスキルです。これらのスキルには、認証情報を用いてデータを取得するためのライブラリ、特定のダッシュボード ID、一般的なワークフローやデータ取得方法に関する指示などが含まれる場合があります。
具体例としては以下の通りです:
- funnel-query — 「サインアップ→アクティベーション→有料化」のイベントをどのテーブルで結合するか、および実際に正規の user_id を持つテーブルは何かを問う
- cohort-compare — 2 つのコホートの維持率または転換率を比較し、統計的に有意な差分をフラグ付け、セグメント定義へのリンクを提供する
- grafana — データソース UID、クラスター名、問題→ダッシュボードの照会テーブル
- datadog — フィールド参照 (@request_id と trace_id の違い)、サービス一覧、メトリックプレフィックスの命名規則
4. ビジネスプロセスとチーム自動化
これらは、反復的なワークフローを単一のコマンドに統合するスキルです。これらのスキルは通常、比較的単純な指示ですが、他のスキルや MCP (Model Context Protocol) に依存する複雑なロジックを含む場合があります。こうしたスキルでは、ログファイルに過去の結果を保存することで、モデルが一貫性を保ち、ワークフローの過去の実行結果を振り返ることが可能になります。
具体例は以下の通りです:
- standup-post — チケットトラッカー、GitHub の活動状況、および以前の Slack 投稿を集約し、差分のみを含むフォーマットされたスタンドアップレポートを生成する
- create-<ticket-system>-ticket — スキーマの強制(有効な列挙値と必須フィールド)に加え、作成後のワークフロー(レビュアーへの通知、Slack でのリンク貼り付け)を実行する
- weekly-recap — マージされた PR、クローズされたチケット、デプロイ情報を統合し、フォーマットされた週次リキャップ投稿を生成する
5. コードのスケフォールディングとテンプレート
これらは、コードベース内の特定の機能に対してフレームワークのボイラープレートを生成するスキルです。これらのスキルは、組み合わせ可能なスクリプトと併用することがあります。特に、スケフォールディングに自然言語での要件があり、それが純粋なコードだけでは完全にカバーできない場合に、非常に有用です。
例としては以下のようなものがあります:
- new-<framework>-workflow — アノテーションを指定して新しいサービス/ワークフロー/ハンドラーの骨組みを作成します
- new-migration — マイグレーションファイルのテンプレートと一般的な落とし穴を提供します
- create-app — 認証、ログ記録、デプロイ設定が事前に接続された新しい内部アプリケーションを作成します
6. コード品質とレビュー
これらは組織内でコード品質を確保し、コードレビューを支援するスキルです。これには、最大限の堅牢性を実現するための決定論的なスクリプトやツールが含まれる場合があります。これらのスキルは、フックの一部としてまたは GitHub Action の内部で自動的に実行したい場合もあるでしょう。
- adversarial-review — 新鮮な視点を持つサブエージェントを起動して批判し、修正を実装し、指摘が細かい点にまで減るまで反復します
- code-style — コードスタイルを強制します。特に Claude がデフォルトでは苦手とするスタイルに対して有効です
- testing-practices — テストの書き方と何をテストすべきかに関する指示を提供します
7. CI/CD とデプロイメント
これらはコードベース内でコードを取得、プッシュ、デプロイするのを支援するスキルです。これらのスキルは、データを収集するために他のスキルを参照する場合もあります。
例としては以下のようなものがあります:
- babysit-pr — プルリクエスト (PR) を監視し、不安定な CI の再試行を行い、マージ競合を解決し、自動マージを有効化します
- deploy-<service> — ビルド → スモークテスト → エラー率比較による段階的なトラフィック展開 → 回帰発生時の自動ロールバック
- cherry-pick-prod — 独立したワークツリー → チェリーピック → 競合解決 → テンプレート付きのプルリクエスト
8. Runbooks
これらは、症状(Slack のスレッド、アラート、エラーのシグネチャなど)を受け取り、複数のツールを用いた調査プロセスを経て、構造化されたレポートを生成するスキルです。
具体例は以下の通りです:
- <service>-debugging — 最もトラフィックの多いサービスに対する症状からツール、クエリパターンへのマッピング
- oncall-runner — アラートの取得 → 疑わしい箇所の確認 → 発見結果のフォーマット化
- log-correlator — リクエスト ID を指定すると、関連する可能性のあるすべてのシステムから該当ログを抽出
9. インフラストラクチャ運用
これらは、定期的なメンテナンスや運用手順を実行するスキルで、一部にはガードレール(安全装置)の恩恵を受ける破壊的な操作も含まれます。これにより、エンジニアが重要な運用においてベストプラクティスに従いやすくなります。
具体例は以下の通りです:
- <resource>-orphans — 孤児化されたポッド/ボリュームの発見 → Slack への投稿 → ソーク期間(待機期間)→ ユーザーの確認 → カスケード型クリーンアップ
- dependency-management — 組織内の依存関係承認ワークフロー
- cost-investigation — 「なぜストレージ/エグレス請求額が急増したのか」を、特定のバケットとクエリパターンを特定して調査
スキル作成のヒント
どのスキルを作成するか決めた後、どのように記述すればよいのでしょうか?以下は、Claude Code チームによるスキル作成のためのベストプラクティス、ヒント、テクニックの一部です。
自明なことは書かない

Claude はすでにコーディングの仕方を理解しており、あなたのコードベースも読み取ることができます。Claude がデフォルトで行うことを単に言い換えるスキルは、文脈を追加するだけで価値を生み出しません。もし知識が主目的のスキルを公開するのであれば、Claude の通常の思考パターンから外れるような情報に焦点を当ててください。
フロントエンドデザインスキル は素晴らしい例です。これは Anthropic のエンジニアが顧客と協力して Claude のデザインセンスを改善する過程で構築されたもので、Inter フォントや紫のグラデーションといった古典的なパターンを避けるように設計されています。
注意点セクションを構築する
あらゆるスキルにおいて最も信号強度の高いコンテンツは「注意点(Gotchas)」セクションです。これらのセクションは、そのスキルを使用する際に Claude が直面する一般的な失敗点から構築されるべきものです。理想的には、時間をかけてスキルを更新し、こうした注意点を捕捉していく必要があります。
例えば:
"購読テーブルは追加専用です。目的の行は最も新しい作成日時ではなく、バージョン番号が最大の行です。"
"このフィールドは API ゲートウェイでは @request_id と呼ばれ、請求サービスでは trace_id です。両者は同じ値です。"
"ステージング環境では、Stripe ウェブフックが実際に処理されなくても 200 を返すことがあります。実際のステータスは payment_events で確認してください。"
ファイルシステムと段階的開示を活用する

SKILL.md ファイルには、特定の状況において Claude が参照すべき他の複数のファイルへのリンクが含まれています。例えば、ジョブが保留中の場合は、stuck-jobs.md を参照するべきです。前述の通り、スキルは単なる Markdown ファイルではなく、フォルダそのものです。ファイルシステム全体を、コンテキストエンジニアリングと段階的な情報開示(progressive disclosure)の一形態として捉えてください。Claude にスキル内にどのようなファイルがあるかを伝えれば、適切なタイミングでそれらを読み込みます。
段階的な情報開示の最もシンプルな形式は、Claude が使用する他の Markdown ファイルへのリンクを設けることです。例えば、詳細な関数シグネチャや使用例を references/api.md などに分割して記述できます。
別の例として、最終出力が Markdown ファイルになる場合、assets/ フォルダ内にコピーして使用するテンプレートファイルを含めることも可能です。
Claude がより効果的に作業できるよう、参照用フォルダ、スクリプト、サンプルなどを含むフォルダを複数用意することもできます。
Claude を線路に縛り付けないこと(Avoid railroading Claude)
Claude は通常、指示に従おうとしますが、スキルは非常に再利用性が高いため、指示が過度に具体的になりすぎないよう注意が必要です。Claude に必要な情報を提供しつつも、状況に応じて柔軟に適応できる余地を残してください。
例えば:

設定を十分に検討する(Think through the setup)

上記のスキルは、Slack チャンネルが設定に含まれていない場合にユーザーにプロンプトを表示するように記述されています。一部のスキルには、ユーザーからのコンテキストを付与してセットアップする必要がある場合があります。例えば、スタンドアップ情報を Slack に投稿するスキルを作成する場合、Claude に対してどの Slack チャンネルに投稿するかを尋ねさせるようにしたいかもしれません。
このための良いパターンは、上記の例のように、設定情報をスキルのディレクトリ内の config.json ファイルに保存することです。設定が完了していない場合、エージェントはユーザーから情報を問い合わせることができます。
エージェントに構造化された選択肢付きの質問を表示させたい場合は、Claude に対して AskUserQuestion ツールを使用するよう指示できます。
モデル向けに記述し、人間向けにはしない
Claude Code がセッションを開始すると、利用可能なすべてのスキルのリストとその説明を構築します。このリストが Claude によってスキャンされ、「このリクエストに対応するスキルはあるか?」という判断が行われます。つまり、説明フィールドは要約ではなく、そのスキルをトリガーすべき状況を記述したものです。

説明に「babysit」のようなスキルのトリガーを含めるのは有益です。
Claude の記憶を助ける

このテキストログファイルは、Sarah の認証 PR のレビューなどの過去の出来事を Claude が記憶するのに役立ちます。一部のスキルには、データ内に情報を保存することで記憶の機能を含めることができます。データを保存する方法としては、単なる追記形式のテキストログファイルや JSON ファイルのようなシンプルなものから、SQLite データベースのような複雑なものまで様々です。
例えば、「standup-post」スキルでは、投稿ごとに standups.log を保持し、次回実行時に Claude が自身の履歴を読み込み、昨日から何が変わったかを把握できるようにすることができます。
データを保存する安定したディレクトリを取得するには、環境変数 ${CLAUDE_PLUGIN_DATA} を使用します。スキルでのデータ永続化の詳細については、こちらをご覧ください:https://code.claude.com/docs/en/plugins-reference#persistent-data-directory。
スクリプトの保存とコード生成
Claude に提供できる最も強力なツールの一つがコードです。スクリプトやライブラリを Claude に与えることで、Claude は反復的な記述(boilerplate)の再構築に時間を割くのではなく、構成や次のアクションの決定といった作業に集中できます。
例えば、データサイエンス用のスキルでは、イベントソースからデータを取得するための関数群をライブラリとして用意しておくことができます。Claude が複雑な分析を行うためには、以下のようなヘルパー関数のセットを提供すると良いでしょう:

Claude はその後、"火曜日に何があったか?"といったプロンプトに対してより高度な分析を行うために、この機能を組み合わせてスクリプトをその場で生成できます。

オンデマンドフックの使用
スキルには、そのスキルが呼び出された時のみアクティブ化され、セッションの持続期間中のみ有効なフックを含めることができます。これは、常時実行したくないが、時には非常に有用であるような、より意見の強いフックに使用してください。
例えば:
- /careful — Bash 上の PreToolUse マッチャーを通じて、rm -rf、DROP TABLE、force-push、kubectl delete をブロックします。プロダクション環境に触れると分かっている時のみこれを必要とするものであり、常時オンにしておくと狂いそうになります。
- /freeze — 特定のディレクトリ内ではないすべての編集/書き込みをブロックします。デバッグ時に有用です:"ログを追加したいが、ついでに関連のないコードを誤って'修正'してしまう"といった場合。
スキルの配布
スキルの最大の利点の一つは、チームの他のメンバーと共有できることです。
スキルを他者と共有する方法として、主に 2 つのパターンがあります:
- スキルをリポジトリにチェックインする(./.claude/skills 配下)
- プラグインを作成し、ユーザーがアップロードしてインストールできる Claude Code プラグインマーケットプレースを設ける(詳細はドキュメントをご覧ください)
比較的小さなチームで比較的少数のリポジトリ間での作業であれば、スキルをリポジトリにチェックインする方式はよく機能します。ただし、チェックインされたすべてのスキルはモデルのコンテキスト(context)にわずかながらも追加されることになります。スケールしていくにつれて、内部のプラグインマーケットプレースを利用することでスキルを配布でき、チームメンバーがどのスキルをインストールするかを選択できるようになり、セットアップフローも含めることが可能になります。
スキルマーケットプレースの管理
どのようにして、どのスキルをマーケットプレースに置くかを決めますか?また、人々はどのようにして提出するのでしょうか?
Anthropic には、決定を下すための集中化されたチームはありません。代わりに、最も有用なスキルが有機的に見つけられるように努めています。誰かが試してほしいスキルを持っている場合、それを GitHub のサンドボックスフォルダにアップロードし、Slack やその他のフォーラムで人々にその場所を案内します。
あるスキルがある程度の支持を得た場合(どの程度が「支持を得た」とみなすかはスキル所有者の判断によります)、マーケットプレースへ移動するためのプルリクエスト(PR)を出すことができます。
スキルの組み合わせ
互いに依存し合うスキルを持ちたい場合もあるかもしれません。例えば、ファイルをアップロードするファイルアップロードスキルと、CSV を生成してそれをアップロードする CSV 生成スキルといった具合です。このような依存関係の管理は、現時点ではマーケットプレースやスキルのネイティブ機能には組み込まれていませんが、他のスキルを名前によって参照することで対応できます。インストールされている場合、モデルが自動的にそれらを呼び出します。
スキルの測定
スキルがどのように機能しているかを理解するために、社内でのスキル使用状況をログ出力できる PreToolUse フックを使用しています (例コードはこちら)。これにより、期待値に対して人気があるスキルや、過少トリガーされているスキルを特定できます。
始め方
スキルのベストプラクティスは現在も進化し続けています。当社の優れたスキルの多くは数行のコードと単一の落とし穴から始まり、Claude が新たなエッジケースに直面するたびに人々が追加機能を実装することで改善されていきました。
スキルを理解するための最善の方法は、実際に始めて実験し、自分に何が適しているかを確認することです。
- スキルのドキュメントをご覧ください
- カスタマイズできる例スキルのサンプルを探してください
*この記事は、Anthropic の技術スタッフであり Claude Code に携わっている Thariq Shihipar によって執筆されました。
原文を表示
Types of skills
After cataloging all of our internal skills at Anthropic, we noticed they cluster into nine categories. The best skills fit cleanly into one; the ones that try to do too much straddle several and confuse the agent. This isn't a definitive list, but it is a useful framework for identifying gaps in your own skills library.

1. Library and API reference
These are skills that explain how to correctly use a library, CLI, or SDKs. They could be both for internal libraries or common libraries that Claude Code sometimes struggles to handle. These skills often included a folder of reference code snippets and a list of gotchas for Claude to avoid when writing a script.
Examples include:
- billing-lib — your internal billing library: edge cases, footguns, etc.
- internal-platform-cli — every subcommand of your internal CLI wrapper with examples on when to use them.
- sandbox-proxy — configuring your org's egress gateway for dev work: which hosts are reachable, how to debug "connection refused" errors, how to add an allowlist entry.
2. Product verification
These are skills that describe how to test or verify that your code is working. They are often paired with playwright, tmux, or other external tools for verification.
Verification skills have had the most measurable impact on Claude’s output quality internally. It can be worth having an engineer spend a week just making your verification skills excellent.
Consider techniques like having Claude record a video of its output so you can see exactly what it tested, or enforcing programmatic assertions on state at each step. These are often done by including a variety of scripts in the skill.
Examples include:
- signup-flow-driver — runs through signup → email verify → onboarding in a headless browser, with hooks for asserting state at each step
- checkout-verifier — drives the checkout UI with Stripe test cards, verifies the invoice actually lands in the right state
- tmux-cli-driver — for interactive CLI testing where the thing you're verifying needs a TTY
3. Data fetching and analysis
These are skills that connect to your data and monitoring stacks. These skills might include libraries to fetch your data with credentials, specific dashboard ids, etc., as well as instructions on common workflows or ways to get data.
Examples include:
- funnel-query — "which events do I join to see signup → activation → paid" plus the table that actually has the canonical user_id
- cohort-compare — compare two cohorts' retention or conversion, flag statistically significant deltas, link to the segment definitions
- grafana — datasource UIDs, cluster names, problem → dashboard lookup table
- datadog — field reference (@request_id vs trace_id), service list, metric prefix conventions
4. Business process and team automation
These are skills that automate repetitive workflows into one command. These skills are usually fairly simple instructions but might have more complicated dependencies on other skills or MCPs. For these skills, saving previous results in log files can help the model stay consistent and reflect on previous executions of the workflow.
Examples include:
- standup-post — aggregates your ticket tracker, GitHub activity, and prior Slack → formatted standup, delta-only
- create-<ticket-system>-ticket — enforces schema (valid enum values, required fields) plus post-creation workflow (ping reviewer, link in Slack)
- weekly-recap — merged PRs + closed tickets + deploys → formatted recap post
5. Code scaffolding and templates
These are skills that generate framework boilerplates for a specific function in a codebase. You might combine these skills with scripts that can be composed. They are especially useful when your scaffolding has natural language requirements that can’t be purely covered by code.
Examples include:
- new-<framework>-workflow — scaffolds a new service/workflow/handler with your annotations
- new-migration — your migration file template plus common gotchas
- create-app — new internal app with your auth, logging, and deploy config pre-wired
6. Code quality and review
These are skills that enforce code quality inside of your org and help review code. These can include deterministic scripts or tools for maximum robustness. You may want to run these skills automatically as part of hooks or inside of a GitHub Action.
- adversarial-review — spawns a fresh-eyes subagent to critique, implements fixes, iterates until findings degrade to nitpicks
- code-style — enforces code style, especially styles that Claude does not do well by default.
- testing-practices — instructions on how to write tests and what to test.
7. CI/CD and deployment
These are skills that help you fetch, push, and deploy code inside of your codebase. These skills may reference other skills to collect data.
Examples include:
- babysit-pr — monitors a PR → retries flaky CI → resolves merge conflicts → enables auto-merge
- deploy-<service> — build → smoke test → gradual traffic rollout with error-rate comparison → auto-rollback on regression
- cherry-pick-prod — isolated worktree → cherry-pick → conflict resolution → PR with template
8. Runbooks
These are skills that take a symptom (such as a Slack thread, alert, or error signature), walk through a multi-tool investigation, and produce a structured report.
Examples include:
- <service>-debugging — maps symptoms → tools → query patterns for your highest-traffic services
- oncall-runner — fetches the alert → checks the usual suspects → formats a finding
- log-correlator — given a request ID, pulls matching logs from every system that might have touched it
9. Infrastructure operations
These are skills that perform routine maintenance and operational procedures, some of which involve destructive actions that benefit from guardrails. These make it easier for engineers to follow best practices in critical operations.
Examples include:
- <resource>-orphans — finds orphaned pods/volumes → posts to Slack → soak period → user confirms → cascading cleanup
- dependency-management — your org's dependency approval workflow
- cost-investigation — "why did our storage/egress bill spike" with the specific buckets and query patterns
Tips for making skills
Once you've decided on the skill to make, how do you write it? These are some of the Claude Code team’s best practices, tips, and tricks for making skills
Don’t state the obvious

Claude already knows how to code and can read your codebase. A skill that restates what Claude would do by default adds context without adding value. If you’re publishing a skill that is primarily about knowledge, focus on information that pushes Claude out of its normal way of thinking.
The frontend design skill is a great example; it was built by an engineer at Anthropic by iterating with customers on improving Claude’s design taste, avoiding classic patterns like the Inter font and purple gradients.
Build a gotchas section
The highest-signal content in any skill is the Gotchas section. These sections should be built up from common failure points that Claude runs into when using your skill. Ideally, you will update your skill over time to capture these gotchas.
For example:
"The subscriptions table is append-only. The row you want is the one with the highest version, not the most recent created_at." "This field is called @request_id in the API gateway and trace_id in the billing service. They're the same value." "Staging returns 200 even when the Stripe webhook didn't actually process. Check payment_events for the real state."
Use the file system and progressive disclosure

Like we said earlier, a skill is a folder, not just a markdown file. You should think of the entire file system as a form of context engineering and progressive disclosure. Tell Claude what files are in your skill, and it will read them at appropriate times.
The simplest form of progressive disclosure is to point to other markdown files for Claude to use. For example, you may split detailed function signatures and usage examples into references/api.md.
Another example: if your end output is a markdown file, you might include a template file for it in assets/ to copy and use.
You can have folders of references, scripts, examples, etc., which help Claude work more effectively.
Avoid railroading Claude
Claude will generally try to stick to your instructions, and because skills are so reusable you’ll want to be careful of being too specific in your instructions. Give Claude the information it needs, but give it the flexibility to adapt to the situation.
For example:

Think through the setup

Some skills may need to be set up with context from the user. For example, if you are making a skill that posts your standup to Slack, you may want Claude to ask which Slack channel to post it in.
A good pattern to do this is to store this setup information in a config.json file in the skill directory like the above example. If the config is not set up, the agent can then ask the user for information.
If you want the agent to present structured, multiple choice questions you can instruct Claude to use the AskUserQuestion tool.
Write descriptions for the model, not for humans
When Claude Code starts a session, it builds a listing of every available skill with its description. This listing is what Claude scans to decide "is there a skill for this request?" Which means the description field is not a summary, it's a description of when to trigger this skill.

Help Claude remember

Some skills can include a form of memory by storing data within them. You could store data in anything as simple as an append only text log file or JSON files, or as complicated as a SQLite database.
For example, a standup-post skill might keep a standups.log with every post it's written, which means the next time you run it, Claude reads its own history and can tell what's changed since yesterday.
You can use the env variable ${CLAUDE_PLUGIN_DATA} to get a stable directory where you can store data, read more persisting data in skills here: https://code.claude.com/docs/en/plugins-reference#persistent-data-directory.
Store scripts and generate code
One of the most powerful tools you can give Claude is code. Giving Claude scripts and libraries lets Claude spend its turns on composition, deciding what to do next rather than reconstructing boilerplate.
For example, in your data-science skill you might have a library of functions to fetch data from your event source. In order for Claude to do complex analysis, you could give it a set of helper functions like this:

Claude can then generate scripts on the fly to compose this functionality to do more advanced analysis for prompts like “What happened on Tuesday?”

Use on-demand hooks
Skills can include hooks that are only activated when the skill is called, and that only last for the duration of the session. Use this for more opinionated hooks that you don’t want to run all the time, but are extremely useful sometimes.
For example:
- /careful — blocks rm -rf, DROP TABLE, force-push, kubectl delete via PreToolUse matcher on Bash. You only want this when you know you're touching prod — having it always on would drive you insane.
- /freeze — blocks any Edit/Write that's not in a specific directory. Useful during debugging: "I want to add logs but I keep accidentally 'fixing' unrelated code.”
Distributing skills
One of the biggest benefits of skills is that you can share them with the rest of your team.
There are two ways you might want to share skills with others:
- check your skills into your repo (under ./.claude/skills)
- make a plugin and have a Claude Code Plugin marketplace where users can upload and install plugins (read more on the documentation here)
For smaller teams working across relatively few repos, checking your skills into repos works well. But every skill that is checked in also adds a little bit to the context of the model. As you scale, an internal plugin marketplace allows you to distribute skills and let your team decide which ones to install, as well as include a setup flow.
Managing a skills marketplace
How do you decide which skills go in a marketplace? How do people submit them?
At Anthropic, we don't have a centralized team that decides; instead we try to find the most useful skills organically. If someone has a skill that they want people to try out, they can upload it to a sandbox folder in GitHub and point people to it in Slack or other forums.
Once a skill has gotten traction (which is up to the skill owner to decide), they can put in a PR to move it into the marketplace.
Composing skills
You may want to have skills that depend on each other. For example, you may have a file upload skill that uploads a file, and a CSV generation skill that makes a CSV and uploads it. This sort of dependency management is not natively built into marketplaces or skills yet, but you can just reference other skills by name, and the model will invoke them if they are installed.
Measuring skills
To understand how a skill is doing, we use a PreToolUse hook that lets us log skill usage within the company (example code here). This means we can find skills that are popular or are undertriggering compared to our expectations.
Get started
Skills best practices are still evolving. Most of our best skills began as a few lines and a single gotcha, then got better because people kept adding to them as Claude hit new edge cases.
The best way to understand skills is to get started, experiment, and see what works for you.
- Check out our skills documentation
- Find example skills to customize
*This article was written by Thariq Shihipar, a member of technical staff at Anthropic, working on Claude Code.*
関連記事
Claude Code ガイド 2026:例付き 25 の機能とデモ
MarkTechPost は、メモリやサブエージェントなど多層構造を持つ Claude Code の 25 の機能と戦略を、AI エンジニア向けに解説している。
[AINews] ループクラフト:ループを積み重ねる芸術
Steipete氏、Boris氏、Andrej氏らは、コーディングエージェントへのプロンプト依存から脱却し、エージェントに作業を任せるための「ループ設計」の重要性を強調している。
AIの緊急停止スイッチ:Anthropicの輸出規制が引き起こしたグローバルなAI主権争奪戦
米国政府は2026年6月13日、同社の強力なAIモデルを全世界からオフラインにする指令を出し、欧州やカナダでAIの支配権を巡る懸念が高まっている。
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み