enhance-docs

A tool for reviewing and improving Markdown documentation, including user guides, agent instructions, and project memory files. It checks organization, clarity, accuracy, and suitability for search-based retrieval.

In plain words
What is it for?
Use it to discover Markdown files, inspect their structure, run documentation checks, generate a report, and improve files with the fix option.
Why use it?
It helps readers and AI systems find the right information without working through poorly structured documents. It can also apply supported automatic fixes.

Skill for Claude CodeCodex

Part of the agentsys plugin — 28 skills, 1 hook shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/agent-sh/agentsys/enhance-docs
Any agent
npx skills add agent-sh/agentsys --skill enhance-docs
Clone the repo
git clone --depth 1 https://github.com/agent-sh/agentsys

Made for: Claude Code, Codex.

Or install agentsys, the plugin that ships this one along with the rest of its 28 skills, 1 hook.

Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,767 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00018 $0.01767
Opus 5 $0.00009 $0.00883
Sonnet 5 $0.00004 $0.00353
Haiku 4.5 $0.00002 $0.00177

Measured 3d ago against content hash d5af4630cff1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

enhance-docs scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.kiro/skills/enhance-docs/SKILL.md · 299 lines

How it starts

The opening of the file, as written. The whole thing — 299 lines — stays where its author put it; the contents beside it link to each section on GitHub.

enhance-docs

Analyze documentation for readability, structure, and RAG optimization.

Parse Arguments

const args = '$ARGUMENTS'.split(' ').filter(Boolean);
const targetPath = args.find(a => !a.startsWith('--')) || '.';
const fix = args.includes('--fix');
const aiMode = args.includes('--ai');

Documentation Locations

Type Location Purpose
User docs docs/*.md, README.md Human-readable guides
Agent docs agent-docs/*.md AI reference material
Project memory CLAUDE.md, AGENTS.md AI context/instructions

Optimization Modes

AI-Only Mode (--ai)

For agent-docs and RAG-optimized documentation:

  • Aggressive token reduction
  • Dense information packing
  • Self-contained sections for retrieval
  • Optimal chunking boundaries

Both Mode (--both, default)

For user-facing documentation:

  • Balance readability with AI-friendliness
  • Clear structure for both humans and retrievers

Workflow

  1. Discover - Find all .md files
  2. Parse - Extract structure and content
  3. Check - Run pattern checks based on mode
  4. Report - Generate markdown output
  5. Fix - Apply auto-fixes if --fix

Detection Patterns

1. Link Validation (HIGH)

  • Broken anchor links ([text](#missing-anchor))
  • Links to non-existent files
  • Malformed link syntax

2. Structure Validation (HIGH)

Heading hierarchy:

  • No jumps (H1 → H3 without H2)
  • Single H1 per document
  • Code blocks with language tags

Position-aware content (based on "lost in the middle" research):

  • Critical info at START or END of document
  • Supporting details in MIDDLE
  • Flag important content buried in middle sections

Recommended structure:

1. Overview/Purpose (START - high attention)
2. Quick Start / TL;DR
3. Detailed Content
4. Reference / API
5. Summary / Key Points (END - high attention)

3. Token Efficiency (HIGH - AI Mode)

Token estimation: characters / 4 or words * 1.3

Read the full file on GitHub · 299 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 299 lines · 18 tokens per session scan A d5af4630cff1

Subscribe to this mod's changes

enhance-docs is a skill published in the GitHub repository agent-sh/agentsys (980 stars, last pushed 6d ago), licensed MIT. It adds 18 tokens to every session and 1,767 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories