Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

generate-user-docs

БесплатноБез исполняемых скриптовНе проверен

Synchronizes user-facing documentation with the current knowledge base through validate -> stale gate -> scan -> approval -> process orchestration.

rp1-runот rp1-run★ 38 звёзд на GitHub

Об этом скилле

Generate User Docs

§ROLE: User-doc sync orchestrator. Reconcile user-facing docs against {kbRoot}/ in one scan pass and one process pass.

§OBJ

  • Sync docs to current KB facts
  • Keep orchestration state under {workRoot}/
  • Delegate file-level scan/process only
  • Ask approval exactly once after scan
  • If the KB is stale but structurally valid, require one explicit pre-scan decision gate

§DO

  • Execute discovery + scan immediately
  • Use rp1-base:scribe only for file batches
  • Spawn scan/process batches in parallel with background dispatch
  • When the KB is stale, warn with a three-way gate: continue, rebuild first, or cancel
  • Keep user-visible output terse:
    1. KB validation status
    2. Scan summary + approval gate
    3. Final report
  • Preserve scan_results.json; do NOT delete it automatically

§DONT

  • Do NOT ask approval before scan
  • Do NOT edit docs directly in the parent
  • Do NOT iterate on scan or process more than once
  • Do NOT silently continue with a stale KB
  • Do NOT treat diffs inside the docs being reconciled as KB-staleness signals for this run

§PATHS

  • Use the RUN_ID from the generated Workflow Bootstrap section
  • Derive RUN_NAME as "Docs: sync user docs" (max 60 chars)
  • Set DATESTAMP to the current date in YYYY-MM-DD
  • Set SESSION_DIR=docs-sync/{DATESTAMP}-{RUN_ID}
  • Set SCAN_RESULTS_REL={SESSION_DIR}/scan_results.json
  • Set SCAN_RESULTS_PATH={workRoot}/{SCAN_RESULTS_REL}

References

File Purpose When to Load
references/kb-validation.md KB staleness gate, missing-file handling, format checks When the validate step runs
references/processing.md Per-doc update procedure, artifact registration, completion reporting After approval returns an approved change set

STATE-MACHINE

stateDiagram-v2
    [*] --> discover
    discover --> validate_kb : docs_ready
    discover --> failed : no_docs
    validate_kb --> scan : kb_current
    validate_kb --> stale_kb_gate : kb_stale
    validate_kb --> failed : kb_invalid
    stale_kb_gate --> scan : continue_with_stale
    stale_kb_gate --> cancelled : rebuild_requested
    stale_kb_gate --> cancelled : rejected
    scan --> approve : results_written
    scan --> failed : scan_failed
    approve --> process : approved
    approve --> cancelled : rejected
    process --> finalize : processing_done
    process --> failed : process_failed
    finalize --> [*] : done
    failed --> [*] : stopped
    cancelled --> [*] : stopped

First emit:

rp1 agent-tools emit \
  --workflow generate-user-docs \
  --type status_change \
  --run-id {RUN_ID} \
  --name "{RUN_NAME}" \
  --step discover \
  --data '{"status": "running"}'

State progression:

  • Enter discover, validate_kb, stale_kb_gate, scan, approve, process, and finalize with {"status": "running"}
  • Enter failed with {"status": "failed"}
  • Use emit end-run --run-id {RUN_ID} --outcome cancelled --reason "..." for intentional stops from stale_kb_gate or approve. Do not use skipped as the run-level cancellation status.
  • Finish finalize with {"status": "completed"}

{% plan_tool "Track workflow: discover, validate_kb, stale_kb_gate, scan, approve, process, finalize. Keep exactly one step in progress." %}

§PROC

1. Discover Docs + Style

Discover candidate user docs via Glob:

  • README.md
  • docs/**/*.md
  • docs/**/*.mdx
  • **/*.md
  • **/*.mdx

Dedupe by path. Keep project-relative paths only.

Exclude common generated, dependency, build, and internal metadata paths:

  • .rp1/**, node_modules/**, .git/**, vendor/**, .venv/**, venv/**
  • dist/**, **/dist/**, build/**, out/**, coverage/**, **/target/**, **/__pycache__/**
  • .cache/**, .next/**, .nuxt/**, .svelte-kit/**, .idea/**, .vscode/**, .github/**

Exclude non-user-doc basenames:

  • AGENTS.md
  • DEVELOPMENT.md
  • CHANGELOG.md
  • LICENSE
  • LICENSE.md
  • CODE_OF_CONDUCT.md
  • SECURITY.md

CONTRIBUTING.md:

  • Exclude only if it is a tiny stock template or placeholder
  • Keep it if it is clearly project-specific user documentation

Set DOC_FILES to the remaining paths.

If DOC_FILES is empty:

  • Output:
    ERROR: No user-facing documentation files discovered.
    
    Searched:
    - README.md
    - docs/**/*.md
    - docs/**/*.mdx
    - **/*.md
    - **/*.mdx
    
  • Transition to failed
  • STOP

Log:

Discovered {DOC_FILES.length} documentation files

Pick up to 3 sample files for style inference:

  • Prefer README.md if present
  • Prefer one docs/ file
  • Prefer one other remaining file

Read each sample and infer:

  • heading_style: atx | setext
  • list_marker: dash | asterisk | plus | numbered
  • code_fence: backtick | tilde | indent
  • link_style: inline | reference
  • max_line_length: p90 line length rounded to nearest 10 and clamped to 80..120

Build STYLE_CONFIG:

{
  "heading_style": "atx",
  "list_marker": "dash",
  "lis
Полный SKILL.md на GitHub

Установить generate-user-docs в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Bash(echo *)
Bash(rp1 *)
Bash(git *)
Bash(mkdir *)
Read
Write
Glob

Вложенные файлы

references/kb-validation.mdreferences/processing.md

FAQ

Что делает скилл generate-user-docs?

Synchronizes user-facing documentation with the current knowledge base through validate -> stale gate -> scan -> approval -> process orchestration.

Как установить скилл generate-user-docs?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл generate-user-docs запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить generate-user-docs с