init
Set up docflow in a repo with no docs yet: scaffold the docs tree, write docflow.json, add agent guidance. Use when asked to "set up docflow", "initialize docs", "scaffold docs", or "make this repo use docflow".
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 1.6k
- Forks
- 491
01 前言 Front Matter
- name
- init
- description
- Set up docflow in a repo with no docs yet: scaffold the docs tree, write docflow.json, add agent guidance. Use when asked to "set up docflow", "initialize docs", "scaffold docs", or "make this repo use docflow".
03 SKILL.md 正文
init
Goal: initialize docflow only when doctor says this repo has no meaningful docs yet. Keep existing user-authored files; generated maintenance files may be refreshed.
Steps
- Run doctor first.
bash scripts/docflow-doctor.sh --target <REPO ROOT>
-
Route by recommendation.
docflow-init: continue.docflow-adopt: stop and run/docflow:adoptinstead (preserves existing docs).docflow-repair: stop and run/docflow:repairinstead.
-
Pick docs root.
- Use
docs/unless the user explicitly chooses another root.
- Use
-
Pick project name.
- Prefer repo folder name.
- If root
README.mdhas clear project title, use that.
-
Run scaffold from plugin root (idempotent; skips existing user content, refreshes generated files):
bash scripts/scaffold.sh --docs-root <DOCS_ROOT> --project "<PROJECT NAME>" --target "<REPO ROOT>"
This creates the category tree, drops templates, writes docflow.json, and scaffolds AGENTS.md + GEMINI.md + .cursorrules.
-
Add root README link if missing:
## Documentation- link to
<DOCS_ROOT>/README.md
-
Seed the first changelog. Create
<DOCS_ROOT>/changelog/(mmm-yy).mdfor the current month from the template, summarizing recent history (git log --no-merges --pretty='%h %ad %s' --date=short -20). Use thechangelogskill for the format. -
Regenerate the map and validate:
bash scripts/docflow-map.sh "<REPO ROOT>/<DOCS_ROOT>" bash scripts/docflow-validate.sh --target "<REPO ROOT>"Fresh template placeholders are warnings; validation errors are blockers.
-
Report what was created (docs root,
docflow.json,AGENTS.md,GEMINI.md,.cursorrules, validation status) and point the user at/docflow:author(writing),/docflow:router(reading),/docflow:validate(readiness),/docflow:repair(maintenance).
Rules
- Never overwrite existing user-authored docs files.
- If docs already exist, prefer
/docflow:adoptover/docflow:init. - Keep
AGENTS.mdanddocflow.jsonaligned on docs root. - Follow the naming rules in
<DOCS_ROOT>/NAMING.mdfor every file you create after.
04 同仓库更多 Skills
worktable-review-with-annotations
Create, inspect, reply to, update, or resolve situated Worktable annotations. Use when feedback belongs to a Doc section, block, text range, or HTML Doc, or when the user asks to address existing review feedback and coordinate a requested artifact edit.
worktable-find-and-synthesize-context
Find, assess, and synthesize context from Worktable Docs and Records. Use when the user asks what a workspace contains, wants workspace-backed research, needs current facts reconciled across artifacts, or requests a cited synthesis without changing workspace state.
worktable-create-or-update-docs
Create, edit, rename, or maintain narrative Worktable Docs. Use for plans, decisions, briefs, notes, research syntheses, and other durable prose when the user requests a new artifact or a safe update to an existing one.
worktable-create-or-manage-records
Organize repeated structured information as durable Worktable Records. Use for research datasets, inventories, directories, pipelines, trackers, and other collections whose items need identity, fields, filtering, links, validation, or individual updates.
worktable-create-or-manage-interactive-html
Create or improve durable visual and interactive artifacts in Worktable. Use for dashboards, trackers, calculators, mini apps, slide presentations, and other requests that benefit from a polished HTML Doc.
worktable-collaborate-threads
Read, answer, and hand off messages through durable Worktable threads with users or other authenticated participants. Use when the user asks to check addressed messages, reply to a participant, continue a thread, request another agent's help, wait briefly for a response, or watch for comments and messages sent to the agent.