跳到主要内容
知仓学习社ZHICANG

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", "init…

不碰外部(只输出文字)无严重或高危命中hashgraph-online/awesome-codex-plugins

它会碰到什么

扫了多少1 个文本文件,2 KB
它会碰到什么不碰外部(只输出文字)
命中总数0 处
命中统计严重 0 · 高 0 · 中 0 · 低 0

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

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

  1. Run doctor first.
bash scripts/docflow-doctor.sh --target <REPO ROOT>
  1. Route by recommendation.
  • docflow-init: continue.
  • docflow-adopt: stop and run /docflow:adopt instead (preserves existing docs).
  • docflow-repair: stop and run /docflow:repair instead.
  1. Pick docs root.
  • Use docs/ unless the user explicitly chooses another root.
  1. Pick project name.
  • Prefer repo folder name.
  • If root README.md has clear project title, use that.
  1. 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.

  1. Add root README link if missing:
  • ## Documentation
  • link to <DOCS_ROOT>/README.md
  1. Seed the first changelog. Create <DOCS_ROOT>/changelog/(mmm-yy).md for the current month from the template, summarizing recent history (git log --no-merges --pretty='%h %ad %s' --date=short -20). Use the changelog skill for the format.
  1. 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.

  1. 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:adopt over /docflow:init.
  • Keep AGENTS.md and docflow.json aligned on docs root.
  • Follow the naming rules in <DOCS_ROOT>/NAMING.md for every file you create after.

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。

同名技能的其他版本

有 6 个不同仓库或目录里都有叫 init 的技能。它们内容并不相同,别混用: