Agent Skills › AjayIrkal23/agentic-mercy-10x › ensure-repo-docs

ensure-repo-docs

GitHub

只读检查仓库文档是否存在及是否过时,对比代码与文档的提交时间。若发现缺失或陈旧,路由至 update-docs 或 dox-doc-tree 修复,不执行写入操作。

skills/ensure-repo-docs/SKILL.md AjayIrkal23/agentic-mercy-10x

Trigger Scenarios

准备接触代码前检查文档状态 验证 README 和目录文档是否及时更新

Install

npx skills add AjayIrkal23/agentic-mercy-10x --skill ensure-repo-docs -g -y
More Options

Use without installing

npx skills use AjayIrkal23/agentic-mercy-10x@ensure-repo-docs

指定 Agent (Claude Code)

npx skills add AjayIrkal23/agentic-mercy-10x --skill ensure-repo-docs -a claude-code -g -y

安装 repo 全部 skill

npx skills add AjayIrkal23/agentic-mercy-10x --all -g -y

预览 repo 内 skill

npx skills add AjayIrkal23/agentic-mercy-10x --list

SKILL.md

Frontmatter
{
    "name": "ensure-repo-docs",
    "metadata": {
        "schema": 1,
        "category": "general",
        "surfaces": [
            "docs"
        ],
        "triggers": {
            "intents": [
                "DOCS"
            ],
            "keywords": [
                "ensure-repo-docs",
                "ensure repo docs",
                "docs missing",
                "missing docs",
                "stale docs",
                "docs are stale",
                "docs exist",
                "repo docs",
                "doc packs",
                "server_docs",
                "frontend_docs",
                "documentation freshness"
            ]
        },
        "platforms": [
            "linux",
            "darwin",
            "windows"
        ]
    },
    "description": "Read-only check that a repo's documentation packs (README, frontend_docs\/, server_docs\/, the dox CLAUDE.md tree) exist and are not stale against the code they describe, with the edits routed to update-docs or dox-doc-tree.",
    "when_to_use": "Use when a repo's AGENTS.md or CLAUDE.md says \"use ensure-repo-docs\", before substantive work in a surface whose docs look missing or thin, and before claiming completion after a change that moved routes, contracts or folders."
}

Ensure Repo Docs

A gate, not an editor. It answers two questions for the surface you are about to touch: do the docs exist and are they fresh enough to trust. Fixing what it finds belongs to update-docs (README, *_docs/, changelogs) and dox-doc-tree (the per-directory CLAUDE.md tree). This skill never writes.

1. Inventory the packs

Read the repo's root CLAUDE.md / AGENTS.md first: they name the packs that count. Typical set:

Pack Exists when
README README.md at the root
Frontend docs frontend_docs/ with an index (README.md)
Backend docs server_docs/ (or docs/backend/) with an index
Extra surfaces whatever the root doc lists (mobile, infra, deploy)
dox tree CLAUDE.md + AGENTS.md in each significant directory
git ls-files 'README.md' '*_docs/*' 'docs/*' | head -50
git ls-files '*CLAUDE.md' | wc -l

A pack the root doc promises but git ls-files does not show is missing.

2. Freshness: docs vs the code they describe

Compare the last commit touching the code dir with the last commit touching its doc. Uncommitted edits count too, so check git status for the same paths.

for pair in "src:frontend_docs" "server/src:server_docs"; do
  code=${pair%%:*}; doc=${pair##*:}
  c=$(git log -1 --format=%cs -- "$code"); d=$(git log -1 --format=%cs -- "$doc")
  echo "$code=$c  $doc=$d"
done
git status --short -- src server/src frontend_docs server_docs | head

Mark a pack stale when any holds:

  • the code dir changed after the doc and the change moved a route, contract, model field, env var or folder (read git log --stat <doc-date>.. -- <code dir> to decide; a typo fix in code does not stale a doc);
  • the doc names a file, route or symbol that no longer exists (spot-check 3-5 names with jcodemunch search_symbols or git ls-files);
  • a directory with 3+ code files has no CLAUDE.md (dox rule).

Stay narrow: check the packs for the surface you will touch, not the whole repo.

3. Report and route

Write a short table in chat, one row per pack: pack | status (ok / missing / stale) | evidence (dates, dead names) | next step. Then:

  • missing or stale README / *_docs/ → update-docs (Phase A before coding, Phase B after);
  • missing or stub CLAUDE.md in a directory → dox-doc-tree;
  • everything ok → continue the task; say so in one line.

If the repo's docs say "stop" on a missing pack, stop and fix the pack before the feature work, unless the user scoped docs out.

Not this skill

  • Writing or rewriting docs (use update-docs, dox-doc-tree).
  • Repo-wide doc audits on request (update-docs plus jdocmunch get_doc_coverage).
  • Starting servers or building doc sites to "check" them: never.

Version History

  • 2315578 Current 2026-10-18 19:20

Same Skill Collection

skills/agentation-react/SKILL.md
skills/baseline-ui/SKILL.md
skills/brand/SKILL.md
skills/context7-mcp/SKILL.md
skills/create-design-md/SKILL.md
skills/debug-broken-ui/SKILL.md
skills/design-system-compliance/SKILL.md
skills/design-taste-frontend/SKILL.md
skills/design/SKILL.md
skills/docker-compose/SKILL.md
skills/expo-react-native/SKILL.md
skills/false-green-tests/SKILL.md
skills/fastify-patterns/SKILL.md
skills/fixing-accessibility/SKILL.md
skills/fixing-metadata/SKILL.md
skills/fixing-motion-performance/SKILL.md
skills/grill-with-docs/SKILL.md
skills/higgsfield-brandkit/SKILL.md
skills/higgsfield-video-explainer/SKILL.md
skills/higgsfield-youtube-thumbnail/SKILL.md
skills/idea-refine/SKILL.md
skills/img2threejs/SKILL.md
skills/improve-ui/SKILL.md
skills/invoke-audit/SKILL.md
skills/invoke-clean/SKILL.md
skills/invoke-debug/SKILL.md
skills/invoke-design/SKILL.md
skills/invoke-docs/SKILL.md
skills/invoke-impl/SKILL.md
skills/invoke-plan/SKILL.md
skills/invoke-refactor/SKILL.md
skills/invoke-review/SKILL.md
skills/invoke-security/SKILL.md
skills/invoke-session/SKILL.md
skills/invoke-spec/SKILL.md
skills/invoke-status/SKILL.md
skills/invoke-test/SKILL.md
skills/invoke-update/SKILL.md
skills/invoke-verify/SKILL.md
skills/invoke/SKILL.md
skills/kokonutui/SKILL.md
skills/mmx-cli/h3-video/SKILL.md
skills/modern-web-guidance/SKILL.md
skills/mongoose-patterns/SKILL.md
skills/no-ai-slop/SKILL.md
skills/slides/SKILL.md
skills/test-error-states/SKILL.md
skills/threejs-r3f/SKILL.md
skills/to-issues/SKILL.md

Metadata

Files
0
Version
2315578
Hash
00493703
Indexed
2026-10-18 19:20

Home - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-19 00:44
浙ICP备14020137号-1