MCPInstall

indexion-readme

README construction — initialize template structure, generate per-package READMEs from doc comments, plan writing tasks, assemble root README from docs/ and package READMEs via doc.json config, and verify edits with plan drift.

Installs
5.1K
Last 24h
—
Trending rank
—
Security
Pass

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/trkbt10/indexion-skills --skill indexion-readme
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads indexion-readme automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

Security audits

Independent scans of the skill's instructions and bundled files.

Gen Agent Trust Hub PassSAFE ·The skill provides instructions for managing project documentation using the `indexion` tool. It involves reading project files, configuration, and doc comments to generate READMEs, which introduces a surface for indirect prompt injection. No malicious patterns were identified.
Socket PassNo alerts
Snyk PassLOW ·Risk: LOW · No issues

SKILL.md

The instructions your agent reads when the skill is triggered.

indexion readme — README Construction

Build project READMEs from templates, doc comments, hand-written prose, and per-package READMEs. This skill covers the construction side: scaffolding, generating, planning, assembling, and verifying. For evaluating existing documentation, see indexion-documentation.

Where things live

The conventions vary by project; check what actually exists before editing:

AssetLocation patterns seen
Configdoc.json (repo root) or .indexion/readme/doc.json
Per-package templatedocs/templates/readme.md (no SoT constant; declared via --template)
Static prosedocs/intro.md, docs/installation.md, docs/license.md, …
Per-package READMEscmd/<name>/README.md, src/<name>/README.md
Assembled root READMEusually README.md. Some projects use a .mbt.md suffix so the file is also a MoonBit doctest module — when so, README.md is a symlink to README.mbt.md.
.indexion.toml[doc] config_path / per_package auto-load doc.json

The first thing to check is git diff / ls -la for: a symlink on README.md, a doc.json (at root or under .indexion/readme/), and .indexion.toml. The presence of these tells you whether the README is hand-maintained, build-assembled, or a hybrid.

Workflow overview

doc init                      → .indexion/readme/template.md + doc.json (greenfield)
edit doc.json + docs/*.md     → declare sources of truth
doc readme --per-package      → cmd/<pkg>/README.md (API skeletons; non-overwriting)
hand-write each per-package README's Overview / Usage / Options / Examples
doc readme --config           → assembled root README
plan drift <prev> <new>       → verify the assembled output (or hand-edit) is purely additive

Step 1: Initialize (greenfield only)

indexion doc init <project-dir>

Creates .indexion/readme/template.md + .indexion/readme/doc.json. Skip this step on a project that already has doc.json or .indexion.toml pointing at one.

Step 2: Configure doc.json

{
  "$schema": "./schemas/doc-config.schema.json",
  "version": "1.0",
  "spec": "moonbit",
  "output": { "format": "markdown", "filename": "README.md" },
  "packages": [
    {
      "path": "cmd/<name>",
      "title": "<command name>",
      "include_in_root": true,
      "sections": ["overview", "usage"]
    }
    // …one entry per package that should appear in the assembled root README
  ],
  "root": {
    "output": "README.md",
    "sections": [
      { "type": "static",   "file": "docs/intro.md" },
      { "type": "toc",      "title": "Commands" },
      { "type": "packages", "filter": "cmd/**" },
      { "type": "static",   "file": "docs/installation.md" },
      { "type": "static",   "file": "docs/license.md" }
    ]
  }
}

Root section types:

  • static — include a markdown file verbatim
  • toc — insert a table-of-contents heading
  • packages — pull in entries from the packages array, filtered by glob

Package fields:

  • include_in_root — whether to include in the assembled root README
  • sections — README headings to extract; honored by per-package extraction flows. Note that { "type": "packages" } in the root currently emits a table of package links, not the rich Overview/Usage expansion implied by per-package sections. See "Known limitation" below.

Step 3: Generate per-package READMEs

indexion doc readme --per-package src/ cmd/

Generates README.md in each package directory that doesn't already have one. Non-overwriting — existing per-package READMEs are left alone.

The skeleton is API-only (extracted from /// doc comments via KGF). Treat it as a starting point and hand-write the prose sections (Overview, Usage, Options, Examples) afterwards.

# Single package to stdout
indexion doc readme src/kgf/lexer/

# Single package to a file
indexion doc readme -o=README.md src/kgf/lexer/

Note on side effects: doc readme --template=<t> <paths...> (the template-based mode below) walks the given paths and auto-creates per-package READMEs for any package that lacks one — even without --per-package. If you run it on a broad path (cmd/, src/), expect new files in unrelated packages. Run with a narrow path or grep git status afterwards to clean up unintended creations.

Step 4: Write static content

Create docs/intro.md, docs/installation.md, etc. — whatever your root.sections references. These are the hand-written prose; the assembler pulls them in verbatim.

Step 5: Generate writing plans (optional)

indexion plan readme --template=docs/templates/readme.md --plans-dir=.indexion/plans src/

Emits per-section writing tasks for manual or LLM-assisted authoring.

Step 6: Assemble the README

# Config-driven (preferred; doc.json controls layout and packages list)
indexion doc readme --config=doc.json

# Template-driven (alternative; {{include:…}} and {{packages}} placeholders)
indexion doc readme --template=docs/templates/readme.md -o=README.md cmd/

The config path can live at repo root or under .indexion/readme/. With .indexion.toml's [doc] config_path = "…", the --config= flag becomes optional.

Step 7: Verify with plan drift

After regeneration or any hand-edit of the root README, verify the change is purely additive (no silent deletions, no reflowing of unrelated sections):

# Snapshot the previous version
git show HEAD:README.md > /tmp/README.before.md

# Compare against the new version
indexion plan drift --top=20 /tmp/README.before.md README.md

What to look for in the output:

  • Drift terms in /tmp/README.before.md (missing on the other side): (none) — nothing was removed
  • Drift terms in README.md (missing on the other side): … — exactly the new vocabulary you intended to add (command names, new flags, new concepts)
  • Cosine similarity near 1.0 for a small additive change; substantially lower if you reshaped a section

For CI integration:

indexion plan drift --vocab-threshold=0.05 /tmp/README.before.md README.md
# exits 1 if cosine_distance > 0.05 — useful as a guard against accidental large rewrites

This same workflow applies to translated README pairs (README.md ↔ README-ja.md): cross-lingual drift detection works natively because vocab sub-tokenization delegates to the natural-language KGFs in kgfs/natural/.

Template syntax

The template file supports {{placeholder}} substitution:

PlaceholderExpansion
{{include:path}}Contents of the file (relative to project root)
{{packages}}All discovered packages (filtered by CLI --include / --exclude)
{{module_doc}}Module-level documentation only

.indexion.toml integration

[doc]
config_path = "doc.json"   # auto-loads doc.json without --config
per_package = true         # makes `doc readme <path>` default to --per-package

Explicit --config=… always takes priority.

Known limitation: packages root section produces a table, not rich expansion

The doc-config.schema.json permits sections: ["overview", "usage", …] on each packageEntry, but the current doc readme --config implementation does not expand those sections inline when emitting { "type": "packages" } in the root. The output is a markdown table of package links with empty descriptions.

Two practical consequences:

  1. If the project's checked-in root README has rich per-command Overview / Usage paragraphs, they were not produced by doc readme --config as it stands now. They are hand-maintained. Diff doc readme --config -o=/tmp/regen.md against the checked-in README to see how much of it is hand-curated; very large diffs mean the README is mostly hand-maintained.
  2. For new commands, you currently need to also hand-edit the rich section into the assembled README, in addition to adding the package entry to doc.json and writing the per-package README. Use the plan drift verification above to confirm the hand-edit only adds, never removes.

If you fix this limitation (so { "type": "packages" } honors per-entry sections), update this skill to remove this section.

Common pitfalls

"doc readme --per-package generated nothing"

  • All packages already have READMEs. The command only creates new files, never overwrites. Delete existing READMEs first to regenerate.

"doc readme --template … on cmd/ created READMEs in packages I didn't touch"

  • Template mode auto-generates missing per-package READMEs as a side effect. Either pass a narrow path, or revert unintended creations from git status.

"Auto-generated per-package READMEs are just API listings"

  • By design. Hand-write Overview, Usage, Options, Examples. For CLI commands, the authoritative behavior comes from indexion <command> --help.

"My hand-edit to README.md will be wiped out by doc readme --config"

  • It will if the assembler ever produces the rich shape (see "Known limitation"). Until then, the assembler produces a strict subset (the table) and your hand-edits to the rich sections survive. Always run the plan drift cross-check to be sure.

"README.md edit destroyed unrelated sections"

  • Run plan drift HEAD:README.md README.md and look at the "missing on the other side" output for the previous version. If it lists anything other than (none), you removed content.

FAQ

What does the indexion-readme skill do?

README construction — initialize template structure, generate per-package READMEs from doc comments, plan writing tasks, assemble root README from docs/ and package READMEs via doc.json config, and verify edits with plan drift.

How do I install indexion-readme?

Run npx skills add https://github.com/trkbt10/indexion-skills --skill indexion-readme in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/indexion-readme/ (personal) or .claude/skills/indexion-readme/ (project).

Which AI agents can use indexion-readme?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is indexion-readme safe to install?

Security partners have reviewed it: Gen Agent Trust Hub passed; Socket passed; Snyk passed. As with any skill, read the SKILL.md and bundled scripts before installing.

Who maintains indexion-readme?

It is published by trkbt10 in trkbt10/indexion-skills. It has 5,100 recorded installs.

More from trkbt10/indexion-skills

View all →

indexion-sdd

trkbt10/indexion-skills

Generate SDD requirements from RFCs/specs and quantitatively verify implementation conformance. spec draft → spec align → spec verify → automated validation loop with codex/claude. Operate spec-to-impl drift gates as CI checks.

indexion-documentation

trkbt10/indexion-skills

Documentation analysis — assess coverage, detect code-to-doc drift with plan reconcile, visualize dependencies with doc graph. Answers "what needs docs?" and "are docs still accurate?"

Docs & Writing5K installs

indexion-refactor

trkbt10/indexion-skills

After writing code, detect and clean up duplication at three levels — copy-paste blocks, cross-package shared code, unnecessary wrappers, and concept-level SoT violations. Detect with indexion, fix, and verify.

indexion-wiki

trkbt10/indexion-skills

Project wiki lifecycle — create pages, track source changes with ingest, update stale pages, lint structural integrity, detect code-to-doc drift with reconcile, and manage search indexes. A runbook for navigating and maintaining the wiki as an agent.

indexion-segment

trkbt10/indexion-skills

Split text into contextual chunks for RAG/embedding pipelines. Document segmentation and section extraction using window, tfidf, punctuation, or hybrid strategies chosen by intent.

AI & Agents4.9K installs

indexion-kgf

trkbt10/indexion-skills

Debug and inspect KGF specs — view tokenization results, parse trees, and extracted edges from source files. Use when adding/fixing language support or when indexion's analysis output looks wrong.

Popular docs & writing skills

View category →

grill-with-docs

mattpocock/skills

A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.

Docs & Writing1.2M installs

lark-markdown

open.feishu.cn

飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。

Docs & Writing778.7K installs

writing-beats

mattpocock/skills

Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.

Docs & Writing490.7K installs

writing-shape

mattpocock/skills

Writing, exploit: shape raw material into an article, paragraph by paragraph.

Docs & Writing490.2K installs

writing-fragments

mattpocock/skills

Writing, explore: mine raw fragments, no structure yet.

Docs & Writing489.6K installs

writing-for-agents

mattpocock/skills

Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.

Docs & Writing479.3K installs