skills/inline-doc-governance/SKILL.md
Govern inline documentation coverage and comment quality in repo-owned source files. Use when Codex needs to audit or fix file headers, type docs, function or method contract docs, non-obvious inline comments, generated-file exclusions, or repo documentation rules for TypeScript, JavaScript, and Swift projects, including setting up a reusable docs/rules policy in a project-agnostic way.
npx skillsauth add grepug/skills inline-doc-governanceInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill to keep documentation close to the code it explains without creating low-signal comment noise. It combines a deterministic audit for coverage checks with a judgment-based review for contracts, side effects, and "why" comments.
The default posture is repo-agnostic: discover local rules first, skip generated and vendor-owned files, and adapt strictness to the project instead of imposing a universal comment quota.
Prefer this baseline for new repos:
If a repo already has stronger rules, follow the repo. If the repo has no rules, propose the baseline and explain the strictness options before making broad edits.
Use this skill when any of these are true:
Skip this skill for prose-only docs work that does not affect code comments, or for one-line code changes where no public surface, boundary, or non-obvious behavior changes.
Before auditing or writing comments, inspect the repo for existing guidance:
AGENTS.md, CLAUDE.md, GEMINI.md, or similar agent instructionsdocs/rules/, CONTRIBUTING.md, README.md, package docs, and architecture docsState what you found and what rule set you will apply. If there are multiple valid strictness levels, recommend one explicitly.
Use one of these modes:
public - file headers plus docs for exported, public, package-visible, or cross-boundary types. This is the recommended default.all - file headers plus docs for every type declaration. Use only when the repo already prefers high inline-doc coverage.none - file headers only. Use for early adoption or when type-doc coverage would be too noisy.For new repo setup, use comment-doc-policy-template.md as the starting policy and adapt it to the repo's languages and validation commands.
Run the audit script from the target repo root or against selected paths:
python3 path/to/inline-doc-governance/scripts/audit_inline_docs.py --type-doc-policy public .
Strict mode:
python3 path/to/inline-doc-governance/scripts/audit_inline_docs.py --type-doc-policy all src packages/app/src
Use --fix only for mechanical cleanup, such as moving an existing doc above decorators or attributes. It does not invent missing documentation text:
python3 path/to/inline-doc-governance/scripts/audit_inline_docs.py --type-doc-policy public --fix src
The script enforces only deterministic checks:
If the script flags generated or third-party code, update the exclusion rules before editing that file.
Resolve deterministic failures before adding body comments:
Do not edit generated files or files with generated headers. If a generated file needs different output, change the source or generator.
Read only the relevant language reference when needed:
Look for missing docs the script cannot prove:
Skip comments that restate syntax. Prefer a better name or smaller helper over a comment when that fully explains the code.
When the user asks to govern documentation coverage or set rules for a repo:
Do not create repo docs just to satisfy this skill. Add durable policy only when it will guide future contributors.
When changing code, keep nearby comments in the same edit pass:
Never edit generated files or files with generated headers.
Treat these as generated or vendor-owned unless local repo rules say otherwise:
generated/, Generated/, __generated__/.d.ts*.graphql.swiftdist/, build/, .build/, .next/, DerivedData/, and Pods/node_modules/For audit or fix tasks, report:
For setup tasks, report:
scripts/audit_inline_docs.py - deterministic audit and mechanical doc-placement fixer for TypeScript, JavaScript, and Swift files.scripts/test_audit_inline_docs.py - smoke tests for the audit helper.references/audit-and-fix.md - focused audit loop for applying the script and semantic pass.references/typescript.md - TypeScript and JavaScript doc patterns.references/swift.md - Swift doc patterns.references/comment-doc-policy-template.md - repo policy template for durable docs/rules setup.development
Measure and safely clean reclaimable macOS developer storage, including Xcode, simulator, CoreDevice, rebuildable project artifacts, Docker or OrbStack, VS Code, app cache, WeChat media, and Time Machine local snapshots.
tools
产品无关的 Linear 工作流,用于创建、更新、检查和讨论产品 issue、元数据、状态、范围、确认事项和长期产品文档同步。
data-ai
One-sentence summary of what this skill helps an agent do and when it should be used.
development
Bump version/build number, archive an Xcode project, upload to App Store Connect, then tag and push the release in git. Use when a user wants to release an iOS or macOS app to the App Store — tasks like "archive and upload to ASC", "bump version and release", "release version 2.1.0 build 42", "release from git tag", or "retry a failed upload".