bruno-api
Brunoの.bruファイルから、Django REST FrameworkやDjango Ninjaを使ったAPIエンドポイントのドキュメントを、認証・権限、マルチテナント対応、リクエスト/レスポンススキーマ、コード参照付きで自動生成し、API仕様書作成を効率化するSkill。
📜 元の英語説明(参考)
Generate comprehensive API endpoint documentation from Bruno (.bru) files by mapping requests to a Django4Lyfe/Diversio-style backend implementation (Django REST Framework or Django Ninja), including auth/permissions, multi-tenant filtering, request/response schemas, and line-numbered code references. Use for single endpoints, directory scans of .bru files, or when writing docs to a specific output path.
🇯🇵 日本人クリエイター向け解説
Brunoの.bruファイルから、Django REST FrameworkやDjango Ninjaを使ったAPIエンドポイントのドキュメントを、認証・権限、マルチテナント対応、リクエスト/レスポンススキーマ、コード参照付きで自動生成し、API仕様書作成を効率化するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o bruno-api.zip https://jpskill.com/download/18704.zip && unzip -o bruno-api.zip && rm bruno-api.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/18704.zip -OutFile "$d\bruno-api.zip"; Expand-Archive "$d\bruno-api.zip" -DestinationPath $d -Force; ri "$d\bruno-api.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
bruno-api.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
bruno-apiフォルダができる - 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-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Bruno API ドキュメンテーションジェネレータースキル
入力とモード
このスキルは、以下のいずれかを想定しています。
- 単一の Bruno ファイルへのパス (通常は
*.bru)、または - ディレクトリ下のすべての
.bruファイルを分析するための--scan <dir>。
オプションのフラグ:
--dry-run– 分析計画のみを作成します (詳細なコードベース検索は行いません)。--output <path>– 生成された Markdown ドキュメントをファイルに書き込みます。
入力が不足しているか曖昧な場合は、ユーザーに確認を求めます。
- 分析する
.bruファイル。 --dry-runを実行するか、完全なドキュメントを作成するか。- 出力ファイルを書き込むかどうか。
出力形式と重要度タグ
Dry-run 出力
以下を含む短い計画を返します。
- エンドポイントの概要: メソッド、URL、認証、および検出されたパラメータ/ボディ。
- Django コードベースのどこを検索するか (特定のファイルパス/ディレクトリ)。
- 生成されるドキュメントのセクション。
- 複雑さに関する注記 (例: "DRF ViewSet + serializer" vs "Ninja router + schema")。
完全なドキュメント出力
次の構造を使用して、各エンドポイントに対して単一の Markdown ドキュメントを生成します。
# <Endpoint Name><METHOD> <URL Pattern>- Authentication, Permissions, Multi-tenant
## Overview## Request(ヘッダー + 型/バリデーションを含むパラメータ/ボディ)## Response(成功例 + 一般的なエラーケース)## Implementation Details(URL 設定 + ビュー + serializer/schema; 常にfile.py:lineを含む)## Business Logic(ステップバイステップ、タスク/外部呼び出しなどの副作用を含む)## Frontend Integration(TypeScript 型 + 呼び出し例 + React Query フックの例)## Testing(Bruno テスト + エッジケース + 必要なフィクスチャ/データ)## Notes(パフォーマンスに関する考慮事項、関連するエンドポイント、ロールアウトに関する注記)
重要度タグは、何かが正確性/完全性を妨げる場合にのみ使用します。
[BLOCKING]– エンドポイントの実装または重要な認証/許可ロジックを見つけることができません。[SHOULD_FIX]– ソースの詳細が不足/不完全なためにドキュメントにギャップがあります (例: レスポンスの形状が不明確)。[NOTE]– オプションの改善、関連するエンドポイント、リファクタリング、またはパフォーマンスの観察。
ワークフロー
ステップ 1 — Bruno ファイルの解析
各 .bru ファイルに対して:
- 以下を抽出します。
- HTTP メソッド
- URL / パスパターン
- ヘッダー
- クエリパラメータ
- パスパラメータ (URL パターンから)
- リクエストボディ (可能な場合はスキーマを推測)
- 認証の意図を検出します。
- JWT / トークンヘッダー
- セッション/ Cookie の使用
- 明示的な "no auth" シグナル
- Bruno テスト/アサートブロックをテストのヒントとしてキャプチャします。
ステップ 2 — Django ルートと実装の特定
以下のリポジトリの慣例を、存在する場合は最優先で扱います。
- URL が
/api/v2/で始まる場合:dashboardapp/v2_urls.pyを確認します。- ビュー/ビューセットについて
dashboardapp/views/v2/を確認します。
- URL が
/api/v2/pulse/で始まる場合:- Django Ninja ルーター/エンドポイントについて
pulse_iq/api/を確認します。
- Django Ninja ルーター/エンドポイントについて
- それ以外の場合:
- アプリレベルの
urls.pyモジュールでパスプレフィックスを検索します。 - 必要に応じて、Bruno URL から特徴的なパスセグメントを
Grepします。
- アプリレベルの
ルートが見つかったら、実装タイプを特定します。
- DRF
- ビュー/ViewSet クラスとハンドラーメソッド (
list、retrieve、create、カスタムアクション)。 - 使用される Serializer (ネストされた Serializer を含む) とバリデーションルール。
- パーミッション/認証クラス。
- Queryset とフィルタリング (特に会社/組織のスコープ)。
- ビュー/ViewSet クラスとハンドラーメソッド (
- Ninja
- ルーターとエンドポイント関数。
- Pydantic スキーマとバリデーション。
- 認証設定/デコレーター。
- マルチテナントのスコープとアクセス制御。
常に、行番号付きのコード参照を記録します (path/to/file.py:123)。
ステップ 3 — 動作とコントラクトの抽出
特定されたエンドポイントについて:
- ビジネス上の目的と主要な不変条件を要約します。
- バリデーションとエラーの動作をドキュメント化します。
- 一般的な 400 の理由 (スキーマ/シリアライザのバリデーション)。
- 認証の失敗 (401) とパーミッションの失敗 (403)。
- Not-found ケース (404) とドメイン固有のエラーケース。
- マルチテナントの制約を特定します。
- 会社/組織がどのように推測されるか (JWT クレーム、リクエストコンテキスト、URL パラメータ)。
- どの Queryset フィルタがスコープを強制するか。
- 副作用に注意してください。
- バックグラウンドタスク (Celery)、メール、Webhook、外部サービス呼び出し。
- 重要なモデルへの書き込みとトランザクション境界。
ステップ 4 — ドキュメントの生成
「完全なドキュメント出力」に従って Markdown ドキュメントを書き込みます。
ルール:
- 推論できる場合は、「string/number」よりも正確な型を優先します。
- 少なくとも 1 つの現実的なリクエストと成功レスポンスの例を含めます。
- レスポンスの形状が動的または大きい場合は、安定したコントラクトをドキュメント化し、フィールドの全範囲ではなく、代表的なサンプルを含めます。
- 不確かな場合は、仮定について明示的に記述し、
[SHOULD_FIX]でマークします。
ステップ 5 — --output と --scan の処理
--scan <dir>の場合:- そのディレクトリの下にあるすべての
.bruファイルを再帰的に検索します。 - ファイルごとに 1 つの Markdown ドキュメントを生成します。
--outputが指定されていない場合は、ドキュメントをレスポンスで返します (ファイルごとにグループ化)。
- そのディレクトリの下にあるすべての
--output <path>が指定されている場合:- 出力をそのパスに書き込みます。
- 複数のファイルをスキャンする場合は、次のいずれかを行います。
- 単一の結合されたドキュメントを書き込む (明確な目次付き)、または
- 出力ディレクトリの下に複数のファイルを書き込む (ユーザーにどちらが必要か尋ねます)。
互換性に関する注記
このスキルは、Claude Code と OpenAI Codex の両方で動作するように設計されています。
Codex ユーザーの場合:
--repo DiversioTeam/agent-skills-marketplace --path plugins/bruno-api/skills/bruno-apiを指定して skill-installer 経由でインストールします。$skill bruno-apiを使用して呼び出します。
Claude Code ユーザーの場合:
/plugin install bruno-api@diversiotechを使用してインストールします。/bruno-api:docsを使用して呼び出します。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Bruno API Documentation Generator Skill
Inputs & Modes
This Skill expects one of:
- A path to a single Bruno file (usually
*.bru), OR --scan <dir>to analyze all.brufiles under a directory.
Optional flags:
--dry-run– produce an analysis plan only (no deep codebase search).--output <path>– write the generated markdown documentation to a file.
If inputs are missing or ambiguous, ask the user to confirm:
- Which
.brufile(s) to analyze. - Whether they want
--dry-runor full documentation. - Whether an output file should be written.
Output Shape & Severity Tags
Dry-run output
Return a short plan containing:
- Endpoint summary: method, URL, auth, and any detected params/body.
- Where you will look in the Django codebase (specific file paths/directories).
- Which documentation sections will be generated.
- Complexity notes (e.g., “DRF ViewSet + serializer” vs “Ninja router + schema”).
Full documentation output
Generate a single markdown document for each endpoint using this structure:
# <Endpoint Name><METHOD> <URL Pattern>- Authentication, Permissions, Multi-tenant
## Overview## Request(headers + params/body with types/validation)## Response(success example + common error cases)## Implementation Details(URL config + view + serializer/schema; always withfile.py:line)## Business Logic(step-by-step, include side effects like tasks/external calls)## Frontend Integration(TypeScript types + call example + React Query hook example)## Testing(Bruno tests + edge cases + required fixtures/data)## Notes(perf considerations, related endpoints, rollout notes)
Use severity tags only when something prevents correctness/completeness:
[BLOCKING]– cannot locate the endpoint implementation or critical auth/permission logic.[SHOULD_FIX]– documentation gaps due to missing/incomplete source details (e.g., response shape unclear).[NOTE]– optional improvements, related endpoints, refactors, or performance observations.
Workflow
Step 1 — Parse the Bruno file(s)
For each .bru file:
- Extract:
- HTTP method
- URL / path pattern
- Headers
- Query parameters
- Path parameters (from the URL pattern)
- Request body (and infer a schema where possible)
- Detect authentication intent:
- JWT / token headers
- Session/cookie usage
- Explicit “no auth” signals
- Capture any Bruno test/assert blocks as testing hints.
Step 2 — Locate the Django route & implementation
Treat these repo conventions as first-class when present:
- If the URL starts with
/api/v2/:- Check
dashboardapp/v2_urls.py. - Check
dashboardapp/views/v2/for the view/viewset.
- Check
- If the URL starts with
/api/v2/pulse/:- Check
pulse_iq/api/for Django Ninja routers/endpoints.
- Check
- Otherwise:
- Search app-level
urls.pymodules for the path prefix. - If needed,
Grepfor a distinctive path segment from the Bruno URL.
- Search app-level
Once the route is found, identify the implementation type:
- DRF
- View / ViewSet class and handler method (
list,retrieve,create, custom actions). - Serializer(s) used (including nested serializers) and validation rules.
- Permissions / authentication classes.
- Queryset and filtering (especially company/org scoping).
- View / ViewSet class and handler method (
- Ninja
- Router and endpoint function.
- Pydantic schema(s) and validation.
- Auth configuration/decorators.
- Multi-tenant scoping and access control.
Always record code references with line numbers (path/to/file.py:123).
Step 3 — Extract behavior and contracts
For the located endpoint:
- Summarize the business purpose and any key invariants.
- Document validation and error behavior:
- Common 400 reasons (schema/serializer validation).
- Auth failures (401) and permission failures (403).
- Not-found cases (404) and domain-specific error cases.
- Identify multi-tenant constraints:
- How company/org is inferred (JWT claims, request context, URL param).
- Which queryset filters enforce scoping.
- Note side effects:
- Background tasks (Celery), emails, webhooks, external service calls.
- Writes to critical models and any transactional boundaries.
Step 4 — Generate documentation
Write the markdown doc per “Full documentation output”.
Rules:
- Prefer precise types over “string/number” when you can infer them.
- Include at least one realistic example request and success response.
- If response shape is dynamic or large, document the stable contract and include a representative sample, not the entire universe of fields.
- When you’re unsure, be explicit about assumptions and mark with
[SHOULD_FIX].
Step 5 — Handle --output and --scan
- If
--scan <dir>:- Find all
.brufiles recursively under that directory. - Generate one markdown doc per file.
- If no
--outputis provided, return docs in the response (grouped by file).
- Find all
- If
--output <path>is provided:- Write output to that path.
- If scanning multiple files, either:
- Write a single combined doc (with a clear table of contents), OR
- Write multiple files under an output directory (ask the user which they want).
Compatibility Notes
This skill is designed to work with both Claude Code and OpenAI Codex.
For Codex users:
- Install via skill-installer with
--repo DiversioTeam/agent-skills-marketplace --path plugins/bruno-api/skills/bruno-api. - Use
$skill bruno-apito invoke.
For Claude Code users:
- Install via
/plugin install bruno-api@diversiotech. - Use
/bruno-api:docsto invoke.