doc

GitHub

用于生成和验证项目文档的技能,支持API/代码文档、README及开源文档包三种模式。强制基于仓库事实生成,严格区分模式边界与验证标准,确保文档准确性与合规性。

images/gemini/skills/doc/SKILL.md boshu2/agentops

Trigger Scenarios

doc generate and validate repo docs doc skill

Install

npx skills add boshu2/agentops --skill doc -g -y
More Options

Non-standard path

npx skills add https://github.com/boshu2/agentops/tree/main/images/gemini/skills/doc -g -y

Use without installing

npx skills use boshu2/agentops@doc

指定 Agent (Claude Code)

npx skills add boshu2/agentops --skill doc -a claude-code -g -y

安装 repo 全部 skill

npx skills add boshu2/agentops --all -g -y

预览 repo 内 skill

npx skills add boshu2/agentops --list

SKILL.md

Frontmatter
{
    "name": "doc",
    "context": {
        "intent": {
            "mode": "task"
        },
        "window": "fork",
        "sections": {
            "exclude": [
                "HISTORY"
            ]
        },
        "intel_scope": "topic"
    },
    "consumes": [
        "repo-context"
    ],
    "metadata": {
        "tier": "product",
        "effects": [
            "write_documentation"
        ],
        "disposition": "keep_specialist",
        "capabilities": [
            "doc"
        ],
        "dependencies": [],
        "canonical_status": "canonical"
    },
    "produces": [
        "documentation"
    ],
    "practices": [
        "wiki-knowledge-surface",
        "code-complete",
        "pragmatic-programmer"
    ],
    "context_rel": [],
    "description": "Generate and validate repo docs, READMEs, and OSS doc packs. Triggers: \"doc\", \"generate and validate repo docs\", \"doc skill\".",
    "hexagonal_role": "supporting",
    "output_contract": "documentation files",
    "skill_api_version": 1
}

Doc Skill

YOU MUST EXECUTE THIS WORKFLOW. Do not just describe it.

Generate and validate documentation for any project. --mode selects the artifact family — the default mode handles code/API docs and code-maps; --mode=readme generates a gold-standard README; --mode=oss scaffolds and audits the open-source doc pack.

Constraints

  • Ground every documentation claim in the current repository, because plausible but stale prose is a documentation defect.
  • When the subject is AgentOps itself, generated product and docs copy starts from the canonical category (docs/contracts/ubiquitous-language.md: the operations layer for agentic engineering) and preserves the ownership boundary; never describe AgentOps as an execution orchestrator, factory, corpus, or loop.
  • Research in bounded chunks against a coverage ledger, and hold finished docs to the conceptual-surprise floor (see Research and depth kernels).
  • In OSS scaffold mode, create missing docs only by default; never update or overwrite an existing doc unless the user explicitly confirms, because these files may contain operator-owned policy and project history. Treat refresh as a separate opt-in path and confirm its target writes with the user before proceeding.
  • Keep mode boundaries explicit and run the selected mode's validation, because default, README, and OSS outputs have different completion criteria.

Modes

--mode Artifact Read first
(default) API docs, code-maps, doc coverage/validate this file
readme Gold-standard README (interview → generate → de-slop → deterministic checks) references/readme-craft.md
oss OSS doc pack (CONTRIBUTING/CHANGELOG/AGENTS.md, audit + scaffold) references/oss-pack.md

Same skill, different shapes. Prefer modes and references over a pile of one-off doc skills. README generate/rewrite always runs the de-slopify docs-prose pass before checks.

Mode routing (absorbed skills):

You typed Runs
"readme", "rewrite the README", "validate the README" Doc in readme mode
"oss docs", "scaffold contributing", "audit OSS docs" Doc in oss mode

When invoked with --mode=readme or --mode=oss, read the corresponding reference above and follow its workflow verbatim. The default-mode steps below apply only when no mode (or the implied code-docs mode) is selected.

Execution Steps (default mode — code/API docs)

Default mode is deliberately thin. Given a Doc command and target:

  1. Detect project typels package.json pyproject.toml go.mod Cargo.toml + existing docs/; classify CODING / INFORMATIONAL / OPS.
  2. Run the commanddiscover (grep undocumented funcs), coverage (documented vs total), gen [feature] (read code → stamp function/class markdown), all, or validate.
  3. Write the report to .agents/scratch/doc/YYYY-MM-DD-<target>.md (coverage %, generated, gaps, validation issues), then report coverage + gaps to the user.

Full step-by-step detail — grep recipes, function/class + code-map templates, the report skeleton, key rules, worked examples, and the troubleshooting table — lives in references/default-mode.md (moved there in the generic-craft trim). Read it when you need the exact shapes; otherwise just do the three steps.

Research and depth kernels

Bounded-chunk research with a coverage ledger. Before writing about a surface larger than a handful of files, enumerate the chunks to read (modules, commands, config surfaces) as a ledger in the report, then research one bounded chunk at a time, marking each read, skimmed, or skipped with a reason. The document may only make claims about read chunks; skimmed and skipped chunks appear in the report as disclosed gaps. Writing from an unledgered wander through the codebase is the ambient research failure mode: coverage becomes whatever the walk happened to touch, and nobody — including you — can say what the doc silently omits. Stop condition: the ledger has no unmarked chunks before the doc is reported complete.

Conceptual-surprise floor. A doc that surprises no one taught nothing. Before reporting completion, name at least one thing in the document that a reader who already skimmed the code would not have known — a non-obvious invariant, an ordering constraint, a why behind a structure, a trap. If no such item exists, the doc is restating the code's surface; either dig for the missing concept or report the doc as reference-only coverage, not teaching material. Prose that renarrates signatures and file names is the mirror doc failure mode — accurate, complete, and useless.

Output Specification

  • Path: default-mode reports go to the artifact directory .agents/scratch/doc/; README mode updates the repository README.md; OSS scaffold mode creates missing root documentation only by default. The separate OSS refresh path may update an existing doc only after explicit user confirmation.
  • Filename: default reports use the filename convention YYYY-MM-DD-<target>.md; README and OSS filenames follow their mode references.
  • Format: outputs are Markdown; the default report schema records coverage percentage, generated artifacts, gaps, and validation issues.
  • Validation command: validate the skill contract with bash skills/doc/scripts/validate.sh, then run the mode-specific validation required by its reference before reporting completion.
  • Downstream handoff: return changed paths, validation results, coverage or remaining gaps, and any blocked decision to the requesting caller or evidence consumer.

Quality Checklist

  • Every factual claim is traceable to inspected code, configuration, or existing documentation.
  • Generated documentation follows the selected mode's templates and preserves useful existing depth.
  • README generate/rewrite runs references/de-slopify.md before deterministic checks.
  • Completion reports name the validators run and disclose unresolved gaps rather than implying full coverage.

Reference Documents

Examples

  • Default mode documents the changed surface using references/default-mode.md.
  • readme mode creates or revises the repository README.
  • oss mode creates the explicitly requested open-source documentation pack.

Troubleshooting

Problem Fix
Default mode feels heavyweight Read references/default-mode.md — or just ask the model directly for simple docs
README evidence has gaps Report the concrete gaps; the caller decides whether to start a revision

Version History

  • 7b07a7d Current 2026-08-19 21:59

    新增AgentOps操作层身份对齐约束,明确禁止将其描述为执行编排器或工厂;重构默认模式步骤以增强项目类型检测与命令执行逻辑。

  • 3f402e5 2026-07-24 22:07

Same Skill Collection

images/gemini/skills/account-rotation/SKILL.md
images/gemini/skills/agent-mail/SKILL.md
images/gemini/skills/agent-native/SKILL.md
images/gemini/skills/agy-native/SKILL.md
images/gemini/skills/anti-ceremony/SKILL.md
images/gemini/skills/automation-shape-routing/SKILL.md
images/gemini/skills/bootstrap/SKILL.md
images/gemini/skills/cass/SKILL.md
images/gemini/skills/cc-hooks/SKILL.md
images/gemini/skills/codebase-recon/SKILL.md
images/gemini/skills/codex-exec/SKILL.md
images/gemini/skills/converter/SKILL.md
images/gemini/skills/council/SKILL.md
images/gemini/skills/craft-goal/SKILL.md
images/gemini/skills/dcg/SKILL.md
images/gemini/skills/domain/SKILL.md
images/gemini/skills/fitness/SKILL.md
images/gemini/skills/goals/SKILL.md
images/gemini/skills/handoff/SKILL.md
images/gemini/skills/idea-genie/SKILL.md
images/gemini/skills/implement/SKILL.md
images/gemini/skills/learn/SKILL.md
images/gemini/skills/ms/SKILL.md
images/gemini/skills/ntm/SKILL.md
images/gemini/skills/operationalize/SKILL.md
images/gemini/skills/pattern-mining/SKILL.md
images/gemini/skills/plan/SKILL.md
images/gemini/skills/postmortem/SKILL.md
images/gemini/skills/premortem/SKILL.md
images/gemini/skills/product/SKILL.md
images/gemini/skills/rch/SKILL.md
images/gemini/skills/reality-check/SKILL.md
images/gemini/skills/refactor/SKILL.md
images/gemini/skills/research/SKILL.md
images/gemini/skills/reverse-engineer/SKILL.md
images/gemini/skills/rpi/SKILL.md
images/gemini/skills/sbh/SKILL.md
images/gemini/skills/scaffold/SKILL.md
images/gemini/skills/scope/SKILL.md
images/gemini/skills/security/SKILL.md
images/gemini/skills/shared/SKILL.md
images/gemini/skills/skill-builder/SKILL.md
images/gemini/skills/standards/SKILL.md
images/gemini/skills/status/SKILL.md
images/gemini/skills/swarm/SKILL.md
images/gemini/skills/test/SKILL.md
images/gemini/skills/toil-mining/SKILL.md
images/gemini/skills/using-flywheel/SKILL.md
images/gemini/skills/using-gc/SKILL.md

Metadata

Files
0
Version
7b07a7d
Hash
8d2ddcc0
Indexed
2026-07-24 22:07

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-20 04:43
浙ICP备14020137号-1 $mapa de visitantes$