jpskill.com
✍️ ライティング コミュニティ

docs

既存のコードを分析し、その内容を分かりやすく説明するドキュメントを自動で生成・更新するSkill。

📜 元の英語説明(参考)

Code documentation agent — write/update docs with /docs write, check status with /docs check. Minimal code blocks, reference pointer based.

🇯🇵 日本人クリエイター向け解説

一言でいうと

既存のコードを分析し、その内容を分かりやすく説明するドキュメントを自動で生成・更新するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-17
取得日時
2026-05-17
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

[Skill 名] ドキュメント [原文 Markdown ↓]

入力

$ARGUMENTS

手順

ドキュメントルート

このスキルで管理されるドキュメントは docs/generated/ 以下に保存されます。 これらはカテゴリのサブディレクトリごとに整理されます: docs/generated/<category>/<slug>.md

docs/generated/ 以外のドキュメントは手動で作成されたものと見なされ、決して変更してはなりません。

ツール使用ルール

ドキュメントの検索と管理には、常に以下のツールを使用してください。ファイルを一つずつ開くのではなく、パターンを使用してスマートに検索してください。

目的 ツール 使用方法
ドキュメントファイルを検索する Glob docs/generated/**/*.md パターンでドキュメントの全リストを取得する
フロントマターを検索する Grep title:, category: パターンでフィルタリングする
既存のドキュメントを読む Read フロントマター + 本文を読む (必要なドキュメントのみ)
コード参照を検証する Glob code_refs 内のファイルパスが存在するかどうかを確認する
ドキュメントを作成する Write 新しいドキュメントファイルを作成する
ドキュメントを更新する Edit 既存のドキュメントの特定の部分を更新する
INDEX をスキャンする Read docs/generated/INDEX.md を読んでカテゴリ構造とドキュメントリストを確認する

サブコマンドルーティング

$ARGUMENTS の最初の単語がサブコマンドを決定します。

最初の単語 アクション
write references/write-procedure.md を読み込み、実行する
check references/check-procedure.md を読み込み、実行する
(なし / help) 以下の使用方法を出力して停止する

サブコマンドなしで実行した場合:

## docs

コードドキュメンテーションエージェント — 開発知識を体系的に記録します。

### コマンド

| コマンド | 説明 |
|---------|-------------|
| write <topic> [code-path] | トピックに関するドキュメントを作成または更新します |
| check | すべてのドキュメントの状態 (古い、壊れた参照、孤立したドキュメント) を確認します |

### 機能

- コードブロックの代わりに `[symbol](file-path)` 参照ポインタを使用します
- `docs/generated/` 以下のカテゴリフォルダで整理されます
- INDEX.md に基づくドキュメントインデックス作成

引数解析

サブコマンドキーワード (write / check) を削除した後、残りの引数を解析します。

write 引数:

  • 最初の引数: topic (必須) — ドキュメントのタイトル/トピック
  • 2番目の引数: code-path (オプション) — 関連するコードへのパス (ファイルまたはディレクトリ)

例:

  • /docs write "auth flow design" → トピックのみ
  • /docs write "auth flow" src/auth/ → トピック + code-path

check 引数: なし。

ドキュメント作成原則

  1. コードブロックを最小限にする: ドキュメントにコードスニペットを直接含めないでください。代わりに、[symbol](project-root-relative/file-path) の形式の Markdown リンクを参照として使用してください。
  2. 設計意図に焦点を当てる: 「何がなされたか」ではなく、「なぜそのようにされたか」を記録してください。
  3. 手動ドキュメントを保護する: docs/generated/ 以外のドキュメントは決して変更しないでください。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Input

$ARGUMENTS

Instructions

Document Root

Documents managed by this skill are stored under docs/generated/. They are organized by category subdirectories: docs/generated/<category>/<slug>.md

Documents outside docs/generated/ are considered manually written and must never be modified.

Tool Usage Rules

Always use the tools below for document search and management. Do not open files one by one — search smartly using patterns.

Purpose Tool Usage
Find document files Glob docs/generated/**/*.md pattern to get full document list
Search frontmatter Grep Filter by title:, category: patterns
Read existing docs Read Read frontmatter + body (only necessary documents)
Verify code references Glob Check if file paths in code_refs exist
Create documents Write Create new document files
Update documents Edit Update specific parts of existing documents
Scan INDEX Read Read docs/generated/INDEX.md for category structure and document list

Subcommand Routing

The first word of $ARGUMENTS determines the subcommand.

First word Action
write Read and execute references/write-procedure.md
check Read and execute references/check-procedure.md
(none / help) Print usage below and stop

When run without a subcommand:

## docs

Code documentation agent — systematically records development knowledge.

### Commands

| Command | Description |
|---------|-------------|
| write <topic> [code-path] | Write or update a document on the topic |
| check | Check all document status (stale, broken refs, orphan docs) |

### Features

- Uses `[symbol](file-path)` reference pointers instead of code blocks
- Organized by category folders under `docs/generated/`
- INDEX.md based document indexing

Argument Parsing

Parse the remaining arguments after removing the subcommand keyword (write / check).

write arguments:

  • First argument: topic (required) — title/topic of the document
  • Second argument: code-path (optional) — path to related code (file or directory)

Examples:

  • /docs write "auth flow design" → topic only
  • /docs write "auth flow" src/auth/ → topic + code-path

check arguments: None.

Document Writing Principles

  1. Minimize code blocks: Do not include code snippets directly in documents. Instead, use markdown links in the form [symbol](project-root-relative/file-path) as references.
  2. Focus on design intent: Record "why it was done this way" rather than "what was done".
  3. Protect manual documents: Never modify documents outside docs/generated/.