{
  "schemaVersion": "1.0",
  "item": {
    "slug": "auto-doc-index",
    "name": "Auto Doc Index",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/ERerGB/auto-doc-index",
    "canonicalUrl": "https://clawhub.ai/ERerGB/auto-doc-index",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/auto-doc-index",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=auto-doc-index",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "CLAUDE.md",
      "README.md",
      "SKILL.md",
      "skillkit.yaml",
      "template/generate-doc-index.ts"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/auto-doc-index"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/auto-doc-index",
    "agentPageUrl": "https://openagent3.xyz/skills/auto-doc-index/agent",
    "manifestUrl": "https://openagent3.xyz/skills/auto-doc-index/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/auto-doc-index/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Auto Doc Index — Derived Indexes from Frontmatter",
        "body": "Replaces hand-maintained index tables in README.md with auto-generated\ntables derived from structured frontmatter in individual doc files."
      },
      {
        "title": "Why This Matters — Real Evidence",
        "body": "In a real project with 13 ADR files, comparing hand-maintained index vs\nauto-generated index revealed 8 discrepancies (62% error rate):\n\nIssue TypeExampleCountTitle truncated\"activate none\" vs actual \"activate none by default\"2Status fabricatedIndex said \"Decided\" but file said \"Accepted\"3Date inventedIndex showed \"2026-01-28\" but file had no Date field1Metadata lost\"(revised 2026-01-28)\" stripped from status1Case \"normalized\"decided silently changed to Decided4\n\nThese aren't hypothetical risks — they were already present and invisible\nin a well-maintained project. Hand-editing creates a false sense of\ncorrectness while the index silently diverges from its source files."
      },
      {
        "title": "When to Use",
        "body": "Setting up a new documentation directory (ADR, RFC, Pitfall, Design Doc, etc.)\nAdding a new document to an existing indexed directory\nOnboarding a project that has hand-maintained doc indexes showing signs of drift\nResolving recurring merge conflicts in shared README.md index tables\nMigrating from hand-maintained indexes to auto-generated ones"
      },
      {
        "title": "Boundaries",
        "body": "This skill generates index tables only — it does not create or modify the content of individual documents.\nThe generator script replaces content only between <!-- INDEX:START --> and <!-- INDEX:END --> markers. All other README.md content is preserved verbatim.\nDo NOT use this for indexes that require editorial curation (e.g., \"recommended reading order\"). Auto-generation is for factual, exhaustive catalogs.\nDo NOT introduce YAML frontmatter parsing libraries — the regex-based approach is intentional to keep the script zero-dependency.\nThis skill targets file-system-based documentation. It does not apply to wiki-style or database-backed doc systems."
      },
      {
        "title": "Problem",
        "body": "A hand-maintained index in README.md is shared mutable state — every\nnew document requires editing the same file, same table, often the same diff\nhunk. In multi-agent or multi-contributor workflows this creates:\n\nSilent data loss: titles get shortened, statuses get \"corrected\"\nMerge conflicts: semantically independent changes collide in the same hunk\nStale indexes: contributors forget to update, nobody notices\nNormalization illusion: edits look \"cleaner\" but diverge from source"
      },
      {
        "title": "Solution",
        "body": "Each document is self-describing via frontmatter. A generator script scans\nthe directory, parses frontmatter, and injects the index table between\n<!-- INDEX:START --> / <!-- INDEX:END --> markers in README.md.\n\nWrite ops become N:N (each file independent). Index becomes a stateless pure function."
      },
      {
        "title": "1. Define frontmatter convention",
        "body": "Choose a frontmatter format for your doc type. Two common patterns:\n\nPattern A — Inline metadata (ADR/RFC style):\n\n# ADR-001: Title Here\n\nStatus: Decided\nDate: 2026-01-28\n\n## Context\n...\n\nPattern B — Bold-field metadata (Pitfall/Postmortem style):\n\n# PIT-001: Title Here\n\n**Date:** 2026-01-28\n**Area:** engine\n**Severity:** high\n**Status:** resolved"
      },
      {
        "title": "2. Add markers to README.md",
        "body": "Wrap the existing index table (or create a placeholder) with markers:\n\n## Index\n\n<!-- INDEX:START -->\n| ADR | Title | Status | Date |\n|-----|-------|--------|------|\n<!-- INDEX:END -->\n\n## Other Sections (preserved)\n...\n\nContent outside markers is never touched by the generator."
      },
      {
        "title": "3. Create the generator script",
        "body": "Copy template/generate-doc-index.ts from this skill's template directory,\nor generate a new one following the pattern below.\n\nCore architecture (zero external dependencies):\n\n// 1. Scan directory for matching files (e.g. /^\\d{3}-.*\\.md$/)\n// 2. Parse frontmatter from each file (regex-based, no YAML lib needed)\n// 3. Sort entries by ID/number\n// 4. Generate markdown table string\n// 5. Inject between <!-- INDEX:START --> and <!-- INDEX:END --> markers\n\nSee template/generate-doc-index.ts for a\nworking implementation that handles both Pattern A and Pattern B."
      },
      {
        "title": "4. Run the generator",
        "body": "npx tsx scripts/generate-doc-index.ts all"
      },
      {
        "title": "5. Update documentation governance",
        "body": "Add to your project's AGENTS.md or CONTRIBUTING.md:\n\nRule: Never hand-edit the index table between <!-- INDEX:START/END -->\nmarkers. To add a new document, create the .md file with proper\nfrontmatter, then run the generator."
      },
      {
        "title": "Workflow Comparison",
        "body": "OLD: Write doc → Hand-edit README.md index → Conflict risk\nNEW: Write doc → Run generator → Idempotent rebuild, zero conflicts"
      },
      {
        "title": "Adding a New Doc Type",
        "body": "To support a new document category (e.g. RFCs, Design Docs):\n\nDefine the frontmatter convention\nAdd a parser function (regex for title, status, date, etc.)\nAdd a table generator function (column layout)\nAdd <!-- INDEX:START/END --> markers to the README.md\nRegister in the script's main() dispatcher"
      },
      {
        "title": "Anti-patterns",
        "body": "Do NOT use YAML frontmatter libraries — regex is sufficient and avoids deps.\nDo NOT generate the entire README.md — only the index section. Preserve\nmanually-written intro, templates, and notes via the marker pattern.\nDo NOT require contributors to run the generator before committing.\nRun it in CI or as a pre-commit hook for enforcement."
      },
      {
        "title": "Checklist",
        "body": "- [ ] Frontmatter convention defined for each doc type\n- [ ] README.md has <!-- INDEX:START --> and <!-- INDEX:END --> markers\n- [ ] Generator script created and tested\n- [ ] Documentation governance updated (AGENTS.md / CONTRIBUTING.md)\n- [ ] (Optional) Pre-commit hook or CI step added"
      }
    ],
    "body": "Auto Doc Index — Derived Indexes from Frontmatter\n\nReplaces hand-maintained index tables in README.md with auto-generated tables derived from structured frontmatter in individual doc files.\n\nWhy This Matters — Real Evidence\n\nIn a real project with 13 ADR files, comparing hand-maintained index vs auto-generated index revealed 8 discrepancies (62% error rate):\n\nIssue Type\tExample\tCount\nTitle truncated\t\"activate none\" vs actual \"activate none by default\"\t2\nStatus fabricated\tIndex said \"Decided\" but file said \"Accepted\"\t3\nDate invented\tIndex showed \"2026-01-28\" but file had no Date field\t1\nMetadata lost\t\"(revised 2026-01-28)\" stripped from status\t1\nCase \"normalized\"\tdecided silently changed to Decided\t4\n\nThese aren't hypothetical risks — they were already present and invisible in a well-maintained project. Hand-editing creates a false sense of correctness while the index silently diverges from its source files.\n\nWhen to Use\nSetting up a new documentation directory (ADR, RFC, Pitfall, Design Doc, etc.)\nAdding a new document to an existing indexed directory\nOnboarding a project that has hand-maintained doc indexes showing signs of drift\nResolving recurring merge conflicts in shared README.md index tables\nMigrating from hand-maintained indexes to auto-generated ones\nBoundaries\nThis skill generates index tables only — it does not create or modify the content of individual documents.\nThe generator script replaces content only between <!-- INDEX:START --> and <!-- INDEX:END --> markers. All other README.md content is preserved verbatim.\nDo NOT use this for indexes that require editorial curation (e.g., \"recommended reading order\"). Auto-generation is for factual, exhaustive catalogs.\nDo NOT introduce YAML frontmatter parsing libraries — the regex-based approach is intentional to keep the script zero-dependency.\nThis skill targets file-system-based documentation. It does not apply to wiki-style or database-backed doc systems.\nProblem\n\nA hand-maintained index in README.md is shared mutable state — every new document requires editing the same file, same table, often the same diff hunk. In multi-agent or multi-contributor workflows this creates:\n\nSilent data loss: titles get shortened, statuses get \"corrected\"\nMerge conflicts: semantically independent changes collide in the same hunk\nStale indexes: contributors forget to update, nobody notices\nNormalization illusion: edits look \"cleaner\" but diverge from source\nSolution\n\nEach document is self-describing via frontmatter. A generator script scans the directory, parses frontmatter, and injects the index table between <!-- INDEX:START --> / <!-- INDEX:END --> markers in README.md.\n\nWrite ops become N:N (each file independent). Index becomes a stateless pure function.\n\nSetup Steps\n1. Define frontmatter convention\n\nChoose a frontmatter format for your doc type. Two common patterns:\n\nPattern A — Inline metadata (ADR/RFC style):\n\n# ADR-001: Title Here\n\nStatus: Decided\nDate: 2026-01-28\n\n## Context\n...\n\n\nPattern B — Bold-field metadata (Pitfall/Postmortem style):\n\n# PIT-001: Title Here\n\n**Date:** 2026-01-28\n**Area:** engine\n**Severity:** high\n**Status:** resolved\n\n2. Add markers to README.md\n\nWrap the existing index table (or create a placeholder) with markers:\n\n## Index\n\n<!-- INDEX:START -->\n| ADR | Title | Status | Date |\n|-----|-------|--------|------|\n<!-- INDEX:END -->\n\n## Other Sections (preserved)\n...\n\n\nContent outside markers is never touched by the generator.\n\n3. Create the generator script\n\nCopy template/generate-doc-index.ts from this skill's template directory, or generate a new one following the pattern below.\n\nCore architecture (zero external dependencies):\n\n// 1. Scan directory for matching files (e.g. /^\\d{3}-.*\\.md$/)\n// 2. Parse frontmatter from each file (regex-based, no YAML lib needed)\n// 3. Sort entries by ID/number\n// 4. Generate markdown table string\n// 5. Inject between <!-- INDEX:START --> and <!-- INDEX:END --> markers\n\n\nSee template/generate-doc-index.ts for a working implementation that handles both Pattern A and Pattern B.\n\n4. Run the generator\nnpx tsx scripts/generate-doc-index.ts all\n\n5. Update documentation governance\n\nAdd to your project's AGENTS.md or CONTRIBUTING.md:\n\nRule: Never hand-edit the index table between <!-- INDEX:START/END --> markers. To add a new document, create the .md file with proper frontmatter, then run the generator.\n\nWorkflow Comparison\nOLD: Write doc → Hand-edit README.md index → Conflict risk\nNEW: Write doc → Run generator → Idempotent rebuild, zero conflicts\n\nAdding a New Doc Type\n\nTo support a new document category (e.g. RFCs, Design Docs):\n\nDefine the frontmatter convention\nAdd a parser function (regex for title, status, date, etc.)\nAdd a table generator function (column layout)\nAdd <!-- INDEX:START/END --> markers to the README.md\nRegister in the script's main() dispatcher\nAnti-patterns\nDo NOT use YAML frontmatter libraries — regex is sufficient and avoids deps.\nDo NOT generate the entire README.md — only the index section. Preserve manually-written intro, templates, and notes via the marker pattern.\nDo NOT require contributors to run the generator before committing. Run it in CI or as a pre-commit hook for enforcement.\nChecklist\n- [ ] Frontmatter convention defined for each doc type\n- [ ] README.md has <!-- INDEX:START --> and <!-- INDEX:END --> markers\n- [ ] Generator script created and tested\n- [ ] Documentation governance updated (AGENTS.md / CONTRIBUTING.md)\n- [ ] (Optional) Pre-commit hook or CI step added"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/ERerGB/auto-doc-index",
    "publisherUrl": "https://clawhub.ai/ERerGB/auto-doc-index",
    "owner": "ERerGB",
    "version": "1.2.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/auto-doc-index",
    "downloadUrl": "https://openagent3.xyz/downloads/auto-doc-index",
    "agentUrl": "https://openagent3.xyz/skills/auto-doc-index/agent",
    "manifestUrl": "https://openagent3.xyz/skills/auto-doc-index/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/auto-doc-index/agent.md"
  }
}