docs-init skill
✓ 検証済みコードベースを探索し、検証済みの情報でテンプレートを埋めることで、ドキュメント構造の初期構築を行います。
- GitHubスター
- 8
- ファイル
- 3
- 最終コミット
- 2026年10月28日
- ライセンス
- MIT
- 許可されたツール
- —
docs-init skillは何をしますか
コードベースを探索し、検証済みの情報でテンプレートを埋めることで、ドキュメント構造の初期構築を行います。
skillのSKILL.mdから生成された要約。
docs-init skill について
docs-initは、ドキュメントが存在しないコードベースに対して、包括的なドキュメントフォルダのセットアップを可能にします。これは、新しいプロジェクトを開始する開発者や、docs/ディレクトリがない既存のリポジトリを管理している開発者向けに設計されています。このツールは、パッケージマニフェスト、データベースモデル、インフラ構成などを検索してコードベースを探索し、プロジェクト固有の特性を特定します。
技術スタックが特定されると、このSKILLはassets/templates/からテンプレートを読み込み、architecture.md、onboarding.md、data-model.mdなどのファイルを作成します。厳格なアンチハルシネーション・ルールに従い、すべての記述が推測ではなく実際のコードの調査結果に基づいていることを保証します。また、Mermaid図が正しくレンダリングされるよう、mmdcツールを使用して検証を試みます。このプロセスは、既存のドキュメントの更新ではなく、初期のスキャフォールディングを目的としています。
エージェントができること
- 1新規プロジェクトのドキュメント作成新しいリポジトリに対して、完全なドキュメント構造をゼロから初期化します。
- 2デプロイおよびセキュリティドキュメントの自動生成Dockerfileなどのインフラファイルが存在する場合、デプロイおよびセキュリティに関するドキュメントを生成します。
- 3図の構文検証新しいドキュメントに含まれるMermaid図の構文が正しいことを確認します。
skill の SKILL.md から作成されています。すべてのユースケースは、その引用と照合されています。
docs-init skillのインストール方法
各コマンドはskillフォルダをクライアントのskillsディレクトリにコピーします。読み込むには、クライアントを再起動するか新しいセッションを開始してください。プラグインにdocs-init skillをインストールする
/plugin marketplace add mgiovani/cc-arsenal /plugin install cc-arsenal@cc-arsenal-marketplace
Claude Codeにdocs-init skillをインストールする
~/.claude/skills/docs-init/SKILL.md
$ npx degit mgiovani/cc-arsenal/skills/docs-init ~/.claude/skills/docs-initClaude Code (project)にdocs-init skillをインストールする
.claude/skills/docs-init/SKILL.md
$ npx degit mgiovani/cc-arsenal/skills/docs-init .claude/skills/docs-initCodexにdocs-init skillをインストールする
~/.agents/skills/docs-init/SKILL.md
$ npx degit mgiovani/cc-arsenal/skills/docs-init ~/.agents/skills/docs-initGemini CLIにdocs-init skillをインストールする
~/.gemini/skills/docs-init/SKILL.md
$ npx degit mgiovani/cc-arsenal/skills/docs-init ~/.gemini/skills/docs-initClaude.aiにdocs-init skillをインストールする
npx degit mgiovani/cc-arsenal/skills/docs-init docs-init && zip -r docs-init.zip docs-init # claude.ai → Customize → Skills → + → Create skill → Upload a skill → docs-init.zip
自動チェック
実行日 2026年11月15日完全なレポート →自動チェックに合格しました。これはセキュリティ監査ではありません。エージェントに実行させる前にスクリプトを読んでください。 チェックの仕組み · 点数を上げるための改善点
- ソースリポジトリがリンクされており、アクセス可能mgiovani/cc-arsenal/skills/docs-init is public and reachablegithub.com/mgiovani/cc-arsenal/tree/HEAD/skills/docs-init ↗合格
- オープンソースライセンス (OSI)MITspdx.org/licenses/MIT.html ↗合格
- 過去1年以内にコミットまたはリリースありLast commit 2026-10-28github.com/mgiovani/cc-arsenal/commits ↗合格
- スクリプトにダウンロード実行や認証情報の窃取がないNo scripts in the skill folder合格
- SKILL.md に隠れた指示がないNo override phrases, safeguard switches, credential requests or hidden charactersgithub.com/mgiovani/cc-arsenal/blob/HEAD/skills/docs-init/SK ↗合格
- 事前許可ツールが限定されているNo pre-approved tools; the agent asks before using onegithub.com/mgiovani/cc-arsenal/blob/HEAD/skills/docs-init/SK ↗合格
- SKILL.md が Agent Skills の形式に従っているthe description does not say when to use the skillgithub.com/mgiovani/cc-arsenal/blob/HEAD/skills/docs-init/SK ↗検出事項
SKILL.md
GitHubで表示Initialize Project Documentation
Bootstrap a docs/ structure for a project with little or no existing documentation. Only generate what the codebase actually evidences.
Anti-hallucination guidelines
Every claim in generated docs must trace to something read or grepped in this run:
- Verify a file/directory exists before referencing it.
- Get counts from
ls/find/grep, never estimate. - Quote real function/class/table names, not assumed ones.
- An empty directory is not a feature, don't document it.
- If a claim can't be verified, drop it rather than guess.
Workflow
1. Explore the codebase
Find: source directories with actual code, package manager files (package.json, pyproject.toml, go.mod, Cargo.toml, ...), database/ORM files, infrastructure configs (Docker, k8s, Terraform), and any existing docs/. See Detection Commands below for the exact patterns.
If a Task/subagent tool is available, delegate this to an Explore agent with that scope. Otherwise run the same grep/find commands inline and Read each hit: the result must be the same either way.
Verify every finding before using it: read the package manifest, read the model file, confirm a directory has real files inside it, not just an empty folder.
2. Detect project characteristics
From the exploration, determine: language/framework stack, project type (web app, CLI, library, service), whether a database/ORM is present, and whether infrastructure/deployment configs exist. These characteristics drive which doc types Phase 3 decides to generate.
3. Decide which docs to generate
- Always:
docs/architecture.md,docs/onboarding.md,docs/adr/0001-record-architecture-decisions.md(Nygard-format meta-ADR, generate inline, no template file) - If a database/ORM was found:
docs/data-model.md - If deployment configs were found (Dockerfile, k8s manifest, CI workflow, IaC):
docs/deployment.md,docs/security.md - If the project looks collaborative (multiple contributors in
git log, an open-source license, no existing CONTRIBUTING):docs/contributing.md,docs/rfc/directory
Don't generate a doc type with no supporting evidence: an empty data-model.md for a stateless CLI is worse than no file at all.
4. Check for existing docs
Scan docs/. For any target file that already exists, do not overwrite it: list it under "skipped" and ask the user before touching it. This skill is safe to rerun: by default it only fills gaps.
5. Populate templates
Templates live in assets/templates/ (see reference table below). For each one you're using:
- Grep it for its actual placeholder set:
grep -oE '\{\{[A-Z_0-9]+\}\}' assets/templates/<name>.md | sort -u - Map every placeholder to a value from step 1/2's verified findings. Never leave a placeholder as a literal
{{TOKEN}}in the output. - Templates mark some sections as conditional with an HTML comment ("delete if...", "only if evidenced"). Where the codebase gives no evidence for that section, delete the whole section (heading included, not just the placeholder text).
- After writing the file, grep it for
\{\{[A-Z_0-9]+\}\}again. Zero matches. If any remain, resolve or delete them before moving on.
Worked example (a FastAPI + PostgreSQL service):
$ grep -oE '\{\{[A-Z_0-9]+\}\}' assets/templates/architecture.md | sort -u
{{COMPONENT_DEPENDENCIES}}
{{COMPONENT_DESCRIPTION}}
{{COMPONENT_NAME}}
{{DATA_FLOW}}
{{DATE}}
{{DEPLOYMENT_SUMMARY}}
...
Map each to a verified finding: {{TECHNOLOGY_STACK}} becomes "Python 3.12, FastAPI 0.115, PostgreSQL 16 via SQLAlchemy", read from pyproject.toml and the model files, not assumed. If security.md's Compliance section has no GDPR/HIPAA evidence in the codebase (no consent flow, no PHI handling), delete that whole section rather than fill it with a guess.
6. Write the files
Create docs/ (and docs/adr/, docs/rfc/ if needed). Write each file that isn't being skipped.
7. Validate the diagrams render
Skip if none of the files you wrote has a ```mermaid block. Otherwise you need mmdc: install with npm i -g @mermaid-js/mermaid-cli, or run it ad hoc by defining mmdc() { npx -y -p @mermaid-js/mermaid-cli mmdc "$@"; } first. If Chromium refuses to launch in a sandbox, add -p with a puppeteer config of {"args":["--no-sandbox"]}.
Run this on the files you wrote; each FAIL <name>-N.mmd names the doc and the Nth mermaid block in it:
d=$(mktemp -d)
for md in <the docs/ files you wrote>; do
awk -v out="$d/${md//\//__}" '/^```mermaid/{f=out "-" ++n ".mmd"; next} /^```/{f=""} f{print > f}' "$md"
done
for f in "$d"/*.mmd; do mmdc -q -i "$f" -o "${f%.mmd}.svg" || echo "FAIL $f"; done
Fix each failing block using its parser error, then re-run until nothing prints FAIL. Cap at 3 rounds, then report the blocks that still fail. If mmdc can't be installed (no Node, offline), say so in the report and fall back to a careful syntax review of each diagram.
8. Report
List what was created, what was skipped (already existed), diagram validation result (rendered, or still failing, or unvalidated), and next steps.
Template Reference
| Document | Template | Generated when |
|---|---|---|
| Architecture | architecture.md |
always |
| Onboarding | onboarding.md |
always |
| First ADR | inline (Nygard format) | always |
| Data Model | data-model.md |
database/ORM detected |
| Deployment | deployment.md |
deployment config detected |
| Security | security.md |
deployment config detected |
| Contributing | contributing.md |
collaborative project |
Detection Commands
Run these directly (or hand them to the Explore agent from step 1):
# Language/framework
find . -name "package.json" -o -name "pyproject.toml" -o -name "go.mod" -o -name "Cargo.toml" | head -5
# Database/ORM
find . -name "*models.py" -o -name "*schema.prisma" -o -name "*entity.ts" | head -5
# Infrastructure
find . -name "Dockerfile" -o -name "docker-compose.yml" -o -name "*.k8s.yaml" | head -5
# Project name and description
basename "$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
head -20 README.md 2>/dev/null
Usage Examples
docs-init
docs-init for Python FastAPI microservice
docs-init for Next.js SaaS application
Example Output
Documentation Initialization Complete
Created:
docs/architecture.md - System architecture overview
docs/onboarding.md - Developer onboarding guide
docs/adr/0001-record-architecture-decisions.md - Meta-ADR
docs/data-model.md - Database schema (SQLAlchemy detected)
docs/deployment.md - Deployment guide (Docker detected)
Skipped (already exists):
docs/contributing.md
Next steps:
1. Review and customize the generated docs
2. docs-diagram er / docs-diagram arch for standalone diagrams
3. docs-adr "Decision Title" for future ADRs
Notes
- Safe to rerun: only fills gaps, asks before overwriting existing files.
- User-supplied context (e.g. "for a FastAPI microservice") steers detection but doesn't replace verification: still confirm the stack from the actual files.
このスキルのファイル
3docs-init skillに関する質問
Claude Codeにdocs-init skillをインストールするには
npx degit mgiovani/cc-arsenal/skills/docs-init ~/.claude/skills/docs-initを実行してください。Claude Codeは~/.claude/skills(すべてのプロジェクト)または.claude/skills(単一プロジェクト)からskillsを読み込み、説明がタスクに一致する場合にskillを使用します。
docs-init skillはどのクライアントで使用できますか
Agent Skills形式を読み込むすべてのクライアントで使用できます: Claude Code、Codex、Gemini CLI、claude.ai(ZIPとしてアップロード)。skill内のスクリプトは、クライアントがコード実行を許可した場合にのみ実行されます。
一部のドキュメントファイルが既に存在する場合はどうなりますか?
このSKILLはdocs/ディレクトリをスキャンし、既に存在するターゲットファイルはスキップします。それらは「skipped」としてリストアップされ、変更を加える前にユーザーに確認を求めます。
プロジェクトに関する情報を捏造(ハルシネーション)することはありませんか?
いいえ、このSKILLは厳格なアンチハルシネーション・ガイドラインに従います。すべての記述はコードベースから読み取った、またはgrepで検索した内容に基づいている必要があり、根拠が見つからないセクションは削除されます。
既存のドキュメントを更新するために使用できますか?
いいえ、このSKILLはdocs/フォルダを新規に初期化またはスキャフォールディングするためのものです。既存のドキュメントの更新や同期にはdocs-updateを使用してください。