メインコンテンツへスキップ

Documentation Index

Fetch the complete documentation index at: https://docs.devinenterprise.com/llms.txt

Use this file to discover all available pages before exploring further.

スキルは、名前付きディレクトリ内の SKILL.md ファイルとして定義します。このページでは、効果的なスキルを記述するために必要な情報をすべて説明します。

ファイル構成

スコープに応じて、スキルを適切なディレクトリに配置します。
# プロジェクト固有(gitにコミット済み)
.devin/skills/
└── my-skill/
    └── SKILL.md

# グローバル — 全プロジェクトで利用可能(コミットされない)
# Linux/macOS:
~/.config/devin/skills/
└── my-skill/
    └── SKILL.md

# Windows:
%APPDATA%\devin\skills\
└── my-skill\
    └── SKILL.md
ディレクトリ名は スキル の識別子です (/my-skill の呼び出しで利用されます) 。SKILL.md ファイルには、省略可能な YAML フロントマター と、スキル のプロンプト内容が含まれます。
Windows では、%APPDATA% は通常 C:\Users\<YourUser>\AppData\Roaming に展開されます。

フロントマター リファレンス

---
name: my-skill
description: What this skill does (shown in completions)
argument-hint: "[file] [options]"
model: sonnet
subagent: true
allowed-tools:
  - read
  - grep
  - glob
  - exec
permissions:
  allow:
    - Read(src/**)
  deny:
    - exec
  ask:
    - Write(**)
triggers:
  - user
  - model
---

Your prompt content goes here...

すべてのフロントマター項目

フィールドデフォルト説明
namestringディレクトリ名スキルの表示名
descriptionstringなしスラッシュコマンドの補完候補に表示されます
argument-hintstringなしコマンド名の後に表示されるヒント (例: [filename])
modelstring現在のモデルこのスキルの実行時に利用するモデルをオーバーライドします
subagentbooleanfalseインラインではなく、サブエージェントとしてスキルを実行します
agentstringなし特定のcustom subagentプロファイルを利用して、スキルをサブエージェントとして実行します
allowed-toolslistすべてのツールスキルが利用できるツールを制限します
permissionsobject継承このスキルの権限のオーバーライド
triggerslist[user, model]スキルを呼び出す方法

モデルのオーバーライド

model フィールドを利用すると、現在のセッションでアクティブなモデルとは別のモデルでスキルを実行できます。単純なタスクにはより高速なモデルを、複雑なタスクにはより高性能なモデルを使い分けたい場合に便利です。
---
name: quick-fix
description: Fast lint fix using a lightweight model
model: swe
---

Fix the lint errors in the current file.
モデル名には、--model CLI フラグと同じ値 (例: opussonnetswecodex) を使用します。完全な一覧については、Modelsを参照してください。スキル の完了後、セッションはそれまでアクティブだったモデルに戻ります。

サブエージェントとしてスキルを実行する

スキルをサブエージェントとして実行する機能は実験的です。subagent フィールドと agent フィールドは、今後のリリースで変更される可能性があります。
デフォルトでは、スキルのプロンプトは現在の会話に挿入され、エージェントがインラインで処理します。代わりに、スキルをサブエージェントとして実行することもできます。これにより、独自のコンテキストウィンドウを持つ独立したワーカーが起動します。これは、出力でメインの会話を煩雑にしたくない、集中的で単独で完結するタスクを実行するスキルに便利です。 スキルをサブエージェントとして実行する方法は 2 つあります。

subagent: true

subagent: true を設定すると、デフォルトの subagent_general プロファイルを使用して、スキル をサブエージェントとして実行します。
---
name: deep-research
description: Thorough codebase research on a topic
subagent: true
model: sonnet
allowed-tools:
  - read
  - grep
  - glob
---

Research the following topic thoroughly: $ARGUMENTS

Search broadly, follow references, and trace call chains.
Report all findings with specific file paths and line numbers.
呼び出されると、このスキルはフォアグラウンドでサブエージェントを起動し、そのスキルのプロンプトをタスクとして実行させます。親エージェントはサブエージェントが完了するまで待機し、その後、結果を読み取って要約します。

agent: <profile>

特定のカスタム サブエージェント プロファイルを指定してスキルをサブエージェントとして実行するには、agent フィールドを利用します。
---
name: review-pr
description: Review the current PR using the reviewer subagent
agent: reviewer
---

Review the staged changes for correctness, security, and style issues.
agent の値は、登録済みのサブエージェントプロファイル名と一致している必要があります (subagent_explore / subagent_general などの組み込みプロファイル、またはユーザー定義のカスタムプロファイル) 。サブエージェントはそのプロファイルのシステムプロンプト、ツールの制限、モデルを継承し、スキル の内容がタスクになります。
agentsubagent の両方が設定されている場合は、agent が優先されます。両方が指定されている場合、スキル の model フィールドがサブエージェントプロファイルのモデルを上書きします。
サブエージェントとして実行される スキル では、ネストされたサブエージェントは生成されません。無限再帰を防ぐため、スキル がすでにサブエージェント内で実行されている場合は、代わりにインラインで実行されます。

スキルを利用したサブエージェントのオーケストレーション

スキルはサブエージェントとして実行できるため、複数のステップにまたがる作業のオーケストレーションに利用できます。まず、それぞれが特定のタスクを担当するサブエージェント用スキルを定義し、次にそれらを呼び出す通常のスキルを作成します。外側のスキルはオーケストレーターとなり、各サブエージェントを呼び出して結果を収集し、次に何をするかを判断します。 たとえば、以下に 2 つのサブエージェント用スキルと、それらを連携させるオーケストレーターを示します。
---
name: research-changes
description: 最近のコード変更とその影響を調査する
subagent: true
allowed-tools:
  - read
  - grep
  - glob
  - exec
---

このリポジトリの最近の変更を分析する:

1. `git log --oneline -20` を実行して最近のコミットを確認する
2. 重要なコミットごとに、何がなぜ変更されたかを調べる
3. パターン、リスク、または注意が必要な箇所を特定する

具体的なファイルパスとコミット参照を含めて調査結果を報告する。
---
name: validate-tests
description: Run tests and validate coverage for recent changes
subagent: true
allowed-tools:
  - read
  - grep
  - glob
  - exec
---

Validate the test suite for the project:

1. Identify the test framework and run command
2. Run the full test suite
3. Check for any failing tests
4. Review test coverage for recently changed files

Report which tests pass, which fail, and any coverage gaps.
---
name: health-check
description: Full project health check — research changes then validate tests
---

Perform a full health check on this project:

1. First, use the /research-changes skill to understand recent changes
2. Then, use the /validate-tests skill to verify the test suite
3. Finally, synthesize the findings from both into a summary:
   - What changed recently and why
   - Whether tests are passing
   - Any risks or recommended actions
/health-check を呼び出すと、メインエージェントでオーケストレーターが実行されます。次に /research-changes が呼び出され、repo を調査するためのサブエージェントが起動されます。それが完了すると、/validate-tests が呼び出され、テストを実行する別のサブエージェントが起動されます。最後に、オーケストレーターが両方の結果を統合して最終サマリーを作成します。 サブエージェントのスキルは、ほかのスキルを呼び出すとき、そのスキルに subagent: true が設定されていても、決して サブエージェントを利用しません。代わりに、インラインで実行されます。つまり、ネストが際限なく深くなることを心配する必要はありません。オーケストレーションのパターンは常に 1 階層だけです。オーケストレーターがサブエージェントを起動し、それらのサブエージェントがそれ以外のすべてをインラインで実行します。

プロンプトの内容

SKILL.md ファイルの本文 (フロントマターの後の部分) は、そのスキルが呼び出されたときに挿入されるプロンプトです。

動的コンテンツ

スキルは、プロンプト本文で 3 種類の動的コンテンツをサポートしています。
ユーザーが指定した引数を埋め込みます。
---
name: explain
argument-hint: "[file]"
---

Please explain the code in $1 in detail.
All arguments: $ARGUMENTS
  • $1, $2 など — 個々の位置引数
  • $ARGUMENTS — すべての引数を 1 つの文字列としてまとめたもの

権限

スキルごとに、メインの権限設定と同じ構文で独自の権限スコープを定義できます。
permissions:
  allow:
    - Read(src/**)
    - Exec(npm run test)
  deny:
    - Write(/etc/**)
    - exec
  ask:
    - Write(src/**)
スキル権限の仕組み:
  • allow — これらのスコープはスキルの実行中に自動承認されます
  • deny — これらのスコープはスキルの実行中にブロックされます
  • ask — これらのスコープでは常にuserに確認を求めます
Skill permissions はセッションの基本権限を置き換えるのではなく、その上に追加されます。スキルは、より上位のレベル (project または組織の設定) で拒否されている権限を付与することはできません。

許可するツール

スキル が利用できるツールを制限します:
allowed-tools:
  - read
  - grep
  - glob
使用可能なツール名: read, edit, grep, glob, exec MCP ツールも許可できます:
allowed-tools:
  - read
  - mcp__github__list_issues
  - mcp__github__create_issue
allowed-tools が指定されていない場合、スキルはすべてのツールにアクセスできます。安全性が重視されるスキルでは、必ず必要最小限のツールのみに制限してください。

使用例

コードレビュースキル

---
name: review
description: Review staged changes for issues
allowed-tools:
  - read
  - grep
  - glob
  - exec
permissions:
  allow:
    - Exec(git diff)
    - Exec(git log)
---

Review the current changes for quality issues:

!`git diff --staged`

Evaluate:
1. **Correctness** — Any logic errors or edge cases?
2. **Security** — Any vulnerabilities introduced?
3. **Performance** — Any obvious inefficiencies?
4. **Style** — Consistent with the codebase?

Provide a summary with specific line references.

コンポーネントジェネレーター

---
name: component
description: Generate a React component from a description
argument-hint: "<ComponentName>"
allowed-tools:
  - read
  - edit
  - grep
  - glob
model: sonnet
permissions:
  allow:
    - Write(src/components/**)
---

`$1` という名前の新しい React コンポーネントを作成します:

1. src/components/ 内の既存コンポーネントでスタイル規約を確認する
2. src/components/$1/$1.tsx にコンポーネントファイルを作成する
3. src/components/$1/index.ts にバレルエクスポートを作成する
4. src/components/$1/$1.test.tsx に基本テストを追加する
5. 既存コンポーネントで見つけたパターンに従う

デプロイチェックリスト

---
name: deploy
description: Run through the deployment checklist
triggers:
  - user
allowed-tools:
  - read
  - exec
  - grep
permissions:
  allow:
    - Exec(npm run)
    - Exec(git)
---

Run through the deployment checklist:

1. Run the test suite: `npm run test`
2. Run the linter: `npm run lint`
3. Check for uncommitted changes: `git status`
4. Verify the build: `npm run build`
5. Show the current branch and last commit

Report the status of each step. If anything fails, stop and explain the issue.

検索エキスパート

---
name: find
description: Find relevant code across the project
argument-hint: "<what to find>"
allowed-tools:
  - read
  - grep
  - glob
triggers:
  - user
  - model
---

Search the codebase thoroughly for: $ARGUMENTS

Use grep for content search and glob for file discovery.
Provide relevant file paths and code snippets.
Explain how the pieces connect.

ヒント

プロンプトは焦点を絞る

スキルは1つのことを確実にこなせるようにしましょう。1つの巨大なスキルを作るのではなく、複数のスキルに分けて作成してください。

使用例を含める

プロンプト内で、望ましい出力の例をエージェントに示しましょう。

allowed-tools を利用する

利用できるツールを制限すると、スキルの安全性と予測しやすさが向上します。

/skill-name でテストする

スキルを呼び出して、出力が意図どおりになるまでプロンプトを調整しましょう。