adaptive-docs-init
БесплатноБез исполняемых скриптовНе проверенUse when the user says 'set up adaptive docs', 'init docs', 'add agent docs to this project', or wants to bootstrap the three-layer docs/ai/ + AGENTS.md…
от divad12★ 26 звёзд на GitHubОб этом скилле
Adaptive Docs - Init
Set up the adaptive documentation system in a project. This is the mechanical bootstrap - it creates the structure but doesn't try to refactor existing sprawl. Use /adaptive-docs-extract for that after.
The system is agent-agnostic: AGENTS.md is the primary root file (universal standard, supported by Codex / Cursor / Windsurf / Aider, and read by Claude Code as a fallback). CLAUDE.md is optional and only created if the user wants Claude Code-specific additions.
The architecture being installed:
<project>/
├── AGENTS.md # always loaded, agent-agnostic root (primary)
├── docs/ai/ # on-demand reference docs (the source of truth)
│ ├── README.md
│ └── writing-docs.md # meta-rules for editing these
├── .agents/skills/ # auto-activated skills (shared between agents)
├── docs/learnings/ # optional project learning store
└── .claude/skills # symlink → ../.agents/skills
See ~/.claude/templates/adaptive-docs/ for the templates this skill uses.
Steps
1. Verify environment
Confirm we're in a git repository and at the project root:
git rev-parse --show-toplevel
If not in a git repo, ask the user whether to proceed anyway or git init first.
Detect project name from package.json, pyproject.toml, Cargo.toml, or the directory name as fallback.
2. Detect what already exists
Check for each piece of the system:
test -f AGENTS.md && echo "HAS_AGENTS_MD"
test -f CLAUDE.md && echo "HAS_CLAUDE_MD"
test -d docs/ai && echo "HAS_DOCS_AI"
test -d .agents/skills && echo "HAS_AGENTS_SKILLS"
test -L .claude/skills && echo "HAS_SKILLS_SYMLINK"
test -f docs/ai/writing-docs.md && echo "HAS_WRITING_DOCS"
test -d docs/learnings && echo "HAS_LEARNINGS"
For each missing piece, plan to create it. For each existing piece, do not overwrite - instead report and skip. The user can run /adaptive-docs-extract to refactor existing files.
3. Create directory structure
mkdir -p docs/ai
mkdir -p .agents/skills
mkdir -p .claude
4. Create the symlink
.claude/skills is a relative symlink to ../.agents/skills so both paths resolve to the same directory:
[ -L .claude/skills ] || ln -s ../.agents/skills .claude/skills
If .claude/skills exists as a real directory (not a symlink), stop and ask the user how to proceed - they may have skills they don't want to lose.
5. Update .gitignore
The .claude/ directory is often gitignored (it has worktrees, ports, settings). But .claude/skills (the symlink) and .claude/settings.json should usually be tracked.
Read .gitignore. If it has a bare .claude/ or .claude rule, replace with:
.claude/*
!.claude/skills
!.claude/settings.json
If .gitignore doesn't mention .claude/ at all, add the same block. If it already has the exception form, leave it alone.
6. Create docs/ai/writing-docs.md
Copy ~/.claude/templates/adaptive-docs/writing-docs.md.template to docs/ai/writing-docs.md. Replace template placeholders with empty strings (the inventory tables will be filled in as docs are added):
{{FILE_TABLE_ROWS}}→ empty (just the header row remains){{SKILL_TABLE_ROWS}}→ empty{{NESTED_AGENTS_ROWS}}→ empty
7. Create docs/ai/README.md
Copy ~/.claude/templates/adaptive-docs/README.md.template to docs/ai/README.md. Replace {{FILE_TABLE_ROWS}} with empty (the table will list new docs as they're added).
8. Create root AGENTS.md (if missing)
This is the primary root file. Copy ~/.claude/templates/adaptive-docs/AGENTS.md.template to AGENTS.md at the project root.
Replace placeholders:
{{PROJECT_NAME}}→ detected project name{{TECH_STACK_DESCRIPTION}}→ empty or one line if obvious frompackage.json{{REFERENCE_TABLE_ROWS}}→ empty (to be filled in as docs are added)
If AGENTS.md already exists, do not overwrite. Report it and tell the user that /adaptive-docs-extract can help align it with the structure.
8b. Optionally scaffold docs/ai/architecture.md with a mermaid placeholder
If the project has a clear architecture worth diagramming (multiple services, a meaningful request flow, or distinct layers), ask the user if they want a starter docs/ai/architecture.md scaffold. If yes (or if the user already opted in), create the file with:
- The banner header (standard
docs/ai/re-read banner) - An H1 title
- An empty mermaid fenced block as a placeholder, with a TODO comment
- A short prompt for the user describing next steps
Example starter content:
> **IMPORTANT: Before reading, check if you already read this file earlier in this session. If yes, skip the read and announce "Context already loaded: architecture.md (re-using from earlier)". If no, read it and announce "Context loaded: architecture.md".**
# Architecture
```mermaid
%% TODO:
Установить adaptive-docs-init в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл adaptive-docs-init?
Use when the user says 'set up adaptive docs', 'init docs', 'add agent docs to this project', or wants to bootstrap the three-layer docs/ai/ + AGENTS.md structure in a new project.
Как установить скилл adaptive-docs-init?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл adaptive-docs-init запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic