Output フレームワーク(出力形式の統一的な仕組み)の遅延ロード式(必要になるまで読み込みを待つ)命令システム用の .md ファイルを作成します。 次のような場合に使用: - プロンプト(指示文)にスキルを追加する - スキルの読み込み設定を行う - スキルの呼び出しに問題がないか調べる
Create .md skill files for Output framework's lazy-loaded instruction system. Use when adding skills to prompts, configuring skill loading, or debugging skill resolution.
このスキルでは、Output フレームワークのスキルシステム用に .md 形式のスキルファイルを作成する方法を説明します。スキルは遅延読み込み(必要になるまで読み込まない)される命令パッケージで、プロンプトを軽量に保ちます。LLM はシステムメッセージでスキル名と説明の一覧を確認してから、必要に応じて load_skill ツールを呼び出して完全な命令を取得します。
重要: これらはフレームワークスキル(.md ファイルで実行時に LLM により読み込まれる)であり、Claude Code プラグインスキルではありません。命名は似ていますが、システムは別のものです。
load_skill ツールの問題をデバッグしたいスキルファイルはプロンプトファイルの隣にある skills/ フォルダに配置します。プロンプトのメタデータでそのフォルダ(または個別ファイル)を指定します。兄弟フォルダの skills/ ディレクトリはプロンプトで明示的に指定しない限り読み込まれません。
src/workflows/{workflow-name}/
├── workflow.ts
├── steps.ts
├── types.ts
└── prompts/
├── writing_assistant@v1.prompt
└── skills/
├── clarity_guidelines.md
├── response_format.md
└── structure_guide.md
skills/ フォルダはワークフローのルートではなく、プロンプトファイルの位置を基準に相対的に解決されます。
スキルファイルはマークダウンドキュメントで、オプションの YAML メタデータブロック付きです。
---
name: clarity_guidelines
description: 技術コンテンツを明確で読みやすく書くためのルール
---
# 明確性ガイドライン
技術コンテンツの明確性をレビューまたは執筆する場合:
1. **文の長さ**: 可能な限り 25 語以下の文を保つ。
複雑な考えは複数の文に分ける。
2. **能動態**: 受動態(「X は関数によって返される」)ではなく
能動態(「関数は X を返す」)を優先する。
3. **専門用語**: 技術用語は初出時に定義する。
説明のない不要な略語は避ける。
4. **具体例**: すべての抽象的な概念に
具体例を付ける必要がある。
このスキルを適用するときは、見つかった違反にフラグを立てて
改善案を提案する。
| フィールド | 必須 | デフォルト | 説明 |
|---|---|---|---|
name |
いいえ | .md を除いたファイル名 |
LLM が load_skill で使用する識別子 |
description |
いいえ | name と同じ |
システムメッセージに表示され、LLM がスキルを読み込むかどうかを判断する際に使用される |
| ボディ | はい | — | LLM が load_skill を呼び出したときに返される完全な命令 |
メタデータ全体を省略した場合、ファイル名(.md を除く)が name と description の両方として使用されます。メタデータなしで clarity_guidelines.md という名前のファイルは、name: "clarity_guidelines" と description: "clarity_guidelines" になります。
説明をよく書いてください。説明はシステムメッセージに表示され、LLM がスキルを読み込むかどうかを判断するために使用されます。「clarity_guidelines」より「技術コンテンツを明確で読みやすく書くためのルール」の方が優れています。
スキルパスをプロンプトの YAML メタデータに記載します。パスはプロンプトファイルからの相対位置で解決され、個別の .md ファイルまたは .md ファイルのディレクトリが可能です。(以下のモデル情報は 2026-05-04 時点でのものです。output-dev-model-selection で最新情報を確認してください。)
---
provider: anthropic
model: claude-sonnet-4-6
maxTokens: 2048
skills:
- ./skills
- ../shared_skills/tone_guide.md
---
<system>
あなたは技術ライティング分野のエキスパートです。
スキルを適用する前に load_skill を使用して完全な命令を取得してください。
</system>
<user>
以下の {{ content_type }} コンテンツをレビューし、{{ focus }} に焦点を当ててください。
コンテンツ:
{{ content }}
</user>
実行時に Output は記載されたパスを読み込み、以下を行います。
load_skill ツールを挿入スキルパスはプロンプトのメタデータに記載します。
プロンプトがスキルを読み込まないようにする場合は、skills を省略するか skills: [] に設定します。同じディレクトリ内の他のプロンプトで使用される兄弟フォルダの skills/ は継承されません。
---
name: response_format
description: すべてのレビュー応答の標準形式要件
---
# 応答形式
すべての応答は「OUTPUT_COMPLETE」という正確な文字列で終わる必要があります。その行は1行で単独である必要があります。
レビューを以下のように構成してください。
1. **概要**: コンテンツの品質に関する 2~3 文の概要
2. **問題**: 見つかった特定の問題の番号付きリスト
3. **提案**: 各問題の実行可能な改善
4. **スコア**: 0~100 の全体品質スコア
OUTPUT_COMPLETE
---
provider: anthropic
# 2026-05-04 時点 - 最新情報は output-dev-model-selection を実行してください
model: claude-sonnet-4-6
maxTokens: 2048
skills:
- ./skills
---
<system>
あなたは技術ライティング分野のエキスパートです。
スキルを適用する前に load_skill を使用して完全な命令を取得してください。
レビュー後は、特定の問題と提案を含む構造化されたフィードバックを提供してください。
</system>
<user>
以下の {{ content_type }} コンテンツをレビューし、{{ focus }} に焦点を当ててください。
コンテンツ:
{{ content }}
</user>
import { step, z } from '@outputai/core';
import { Agent, aiSdk } from '@outputai/llm';
export const reviewContent = step( {
name: 'reviewContent',
description: '専門的な知識のためのスキルを使用してコンテンツをレビュー',
inputSchema: z.object( {
content: z.string(),
content_type: z.string(),
focus: z.string()
} ),
outputSchema: z.object( {
summary: z.string(),
issues: z.array( z.string() ),
suggestions: z.array( z.string() ),
score: z.number()
} ),
fn: async input => {
const agent = new Agent( {
prompt: 'writing_assistant@v1',
variables: input,
output: aiSdk.Output.object( {
schema: z.object( {
summary: z.string().describe( '2~3 文の概要' ),
issues: z.array( z.string() ).describe( '見つかった特定の問題' ),
suggestions: z.array( z.string() ).describe( '実行可能な改善' ),
score: z.number().describe( 'スコア 0~100' )
} )
} )
} );
const { output } = await agent.generate();
return output;
}
} );
各スキルは 1 つの専門領域をカバーします。大きな 1 つのスキルより、複数の焦点を絞ったスキルを選びます。
skills/
├── clarity_guidelines.md # 執筆の明確性
├── structure_guide.md # ドキュメント構造
└── response_format.md # 出力形式
説明はシステムメッセージに表示されます。LLM がスキルを読み込むべき場合を明確にしてください。
---
name: clarity_guidelines
description: 技術コンテンツを明確で読みやすく書くためのルール
---
× よくない例:
---
name: clarity_guidelines
description: clarity_guidelines
---
スキャン可能な命令にはマークダウンヘッダーと箇条書きを使用します。
# 明確性ガイドライン
## ルール
1. 文を 25 語以下に保つ
2. 能動態を優先する
3. 専門用語は初出時に定義する
## フラグを立てるべき場合
- 30 語を超える文
- 指示における受動態
- 説明なしの略語
スキルの対象を説明するだけでなく、スキルで何をするかを LLM に伝えてください。
このスキルを適用するときは、見つかった違反にフラグを立てて改善案を提案してください。
skills: ./skills または明示的なファイル)description があるload_skill に言及しているskills を省略するか skills: [] に設定しているmaxSteps を設定しているoutput-dev-prompt-file - スキルを使用する .prompt ファイルの作成output-dev-agent-class - スキルを使用した Agent クラスの使用output-dev-step-function - ステップ関数でのスキルの使用output-dev-folder-structure - スキルファイルの場所を理解するThis skill documents how to create .md skill files for the Output framework's skills system. Skills are lazy-loaded instruction packages that keep prompts lightweight. The LLM sees a list of skill names and descriptions in the system message, then calls a load_skill tool to retrieve full instructions on demand.
Important: These are framework skills (.md files loaded by LLMs at runtime), not Claude Code plugin skills. The naming is similar but the systems are separate.
load_skill tool issuesSkill files live in a skills/ folder next to the prompt file. List that folder (or individual files) in the prompt frontmatter. A sibling skills/ directory is not loaded unless the prompt names it:
src/workflows/{workflow-name}/
├── workflow.ts
├── steps.ts
├── types.ts
└── prompts/
├── writing_assistant@v1.prompt
└── skills/
├── clarity_guidelines.md
├── response_format.md
└── structure_guide.md
The skills/ folder is relative to the prompt file location, not the workflow root.
Skill files are markdown documents with an optional YAML frontmatter block:
---
name: clarity_guidelines
description: Rules for writing clear, readable technical content
---
# Clarity Guidelines
When reviewing or writing technical content for clarity:
1. **Sentence length**: Keep sentences under 25 words when possible.
Break complex ideas into multiple sentences.
2. **Active voice**: Prefer active voice ("The function returns X")
over passive ("X is returned by the function").
3. **Jargon**: Define technical terms on first use.
Avoid unnecessary acronyms without explanation.
4. **Concrete examples**: Every abstract concept should have
a concrete example.
When applying this skill, flag any violations you find
and suggest improvements.
| Field | Required | Default | Description |
|---|---|---|---|
name |
No | Filename without .md |
Identifier the LLM uses with load_skill |
description |
No | Same as name |
Shown in system message, helps LLM decide when to load |
| Body | Yes | - | Full instructions returned when LLM calls load_skill |
If you omit the frontmatter entirely, the filename (without .md) is used as both the name and description. A file named clarity_guidelines.md with no frontmatter gets name: "clarity_guidelines" and description: "clarity_guidelines".
Write good descriptions. They appear in the system message and are what the LLM uses to decide whether to load a skill. "Rules for writing clear, readable technical content" is better than "clarity_guidelines".
List skill paths in the prompt YAML frontmatter. Paths resolve relative to the prompt file and can be individual .md files or directories of .md files. (Model lines below are current as of 2026-05-04 - refresh via output-dev-model-selection.)
---
provider: anthropic
model: claude-sonnet-4-6
maxTokens: 2048
skills:
- ./skills
- ../shared_skills/tone_guide.md
---
<system>
You are an expert technical writing assistant.
Use load_skill to get full instructions for any skill before applying it.
</system>
<user>
Review the following {{ content_type }} content focusing on {{ focus }}.
Content:
{{ content }}
</user>
At runtime, Output loads the listed paths and:
load_skill tool the LLM can callList skill paths in the prompt frontmatter.
Omit skills (or set skills: []) when a prompt should load none. A sibling skills/ folder used by other prompts in the same directory is not inherited.
---
name: response_format
description: Standard format requirements for all review responses
---
# Response Format
Every response MUST end with the exact string "OUTPUT_COMPLETE" on its own line.
Structure your review as follows:
1. **Summary**: 2-3 sentence overview of the content quality
2. **Issues**: Numbered list of specific problems found
3. **Suggestions**: Actionable improvements for each issue
4. **Score**: Overall quality score from 0-100
OUTPUT_COMPLETE
---
provider: anthropic
# current as of 2026-05-04 - run output-dev-model-selection for the latest
model: claude-sonnet-4-6
maxTokens: 2048
skills:
- ./skills
---
<system>
You are an expert technical writing assistant.
Use load_skill to get the full instructions for any skill before applying it.
After reviewing, provide structured feedback with specific issues and suggestions.
</system>
<user>
Review the following {{ content_type }} content focusing on {{ focus }}.
Content:
{{ content }}
</user>
import { step, z } from '@outputai/core';
import { Agent, aiSdk } from '@outputai/llm';
export const reviewContent = step( {
name: 'reviewContent',
description: 'Review content using skills for specialized expertise',
inputSchema: z.object( {
content: z.string(),
content_type: z.string(),
focus: z.string()
} ),
outputSchema: z.object( {
summary: z.string(),
issues: z.array( z.string() ),
suggestions: z.array( z.string() ),
score: z.number()
} ),
fn: async input => {
const agent = new Agent( {
prompt: 'writing_assistant@v1',
variables: input,
output: aiSdk.Output.object( {
schema: z.object( {
summary: z.string().describe( '2-3 sentence overview' ),
issues: z.array( z.string() ).describe( 'Specific problems found' ),
suggestions: z.array( z.string() ).describe( 'Actionable improvements' ),
score: z.number().describe( 'Quality score 0-100' )
} )
} )
} );
const { output } = await agent.generate();
return output;
}
} );
Each skill should cover one area of expertise. Prefer multiple focused skills over one large skill:
skills/
├── clarity_guidelines.md # Writing clarity
├── structure_guide.md # Document structure
└── response_format.md # Output formatting
The description appears in the system message. Make it clear when the LLM should load this skill:
---
name: clarity_guidelines
description: Rules for writing clear, readable technical content
---
Not:
---
name: clarity_guidelines
description: clarity_guidelines
---
Use markdown headers and lists for scannable instructions:
# Clarity Guidelines
## Rules
1. Keep sentences under 25 words
2. Prefer active voice
3. Define jargon on first use
## When to Flag
- Sentences over 30 words
- Passive voice in instructions
- Undefined acronyms
Tell the LLM what to do with the skill, not just what the skill is about:
When applying this skill, flag any violations you find and suggest improvements.
skills: ./skills or explicit files)description in frontmatterload_skill in the system messageskills (or set skills: [])maxSteps when the tool-loop ceiling should not be 10output-dev-prompt-file - Creating .prompt files that use skillsoutput-dev-agent-class - Using the Agent class with skillsoutput-dev-step-function - Using skills in step functionsoutput-dev-folder-structure - Understanding skill file locations原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。