- Home
- Skills
- Petekp
- Agent Skills
- Optimize Agent Docs
optimize-agent-docs_skill
- Makefile
2
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill petekp/agent-skills --skill optimize-agent-docs- SKILL.md7.2 KB
Overview
This skill builds a retrieval-optimized knowledge layer over agent documentation stored in dotfiles (.claude, .codex, .cursor, .aider). It inventories source docs, breaks them into compact retrieval units, and generates a lightweight manifest plus compiled artifacts for fast agent consumption. The result is faster, smaller loads and clearer task→knowledge mappings for agents.
How this skill works
The tool scans agent doc locations, extracts discrete facts, instructions, and context triggers, then splits content into self-contained chunks scored by usefulness. It produces a KNOWLEDGE.md manifest mapping task contexts to the minimal files or chunks to load and compiles dense, grep-friendly documents in a compiled/ directory. Validation checks ensure coverage, smaller compiled size, and retrieval efficiency.
When to use it
- Documentation has grown messy and agents take too long to find info
- You want agents to load only the minimal context for a task
- Preparing a repo for automated agent workflows or CI-driven assistance
- Consolidating repeated rules and high-frequency facts into a single reference
- Onboarding new agents or agent versions that rely on compact knowledge
Best practices
- Extract facts as smallest self-contained chunks that an agent can act on
- Score chunks for self-containment, task-specificity, and information density
- Keep KNOWLEDGE.md under ~100 lines with Task→Knowledge mappings and quick facts
- Use grep-friendly markers (e.g., @task:@load:) in compiled docs for fast discovery
- Preserve original verbose sources for humans; generate compiled artifacts for agents
- Run coverage and retrieval tests after each compilation step
Example use cases
- Optimize a repo so a code-generation agent only loads routing and handler patterns when adding endpoints
- Create a compact auth reference so an assistant can fix login flows without loading full docs
- Generate a quick task→file map for triaging database migrations or schema changes
- Compress long design and UI instructions into patterns for iterative UI agent workflows
- Add grep-marked compiled docs to enable fast, scriptable retrieval in CI
FAQ
No. Original sources remain untouched; the skill generates separate compiled artifacts and a manifest for agent use.
How do agents find the right chunks for a task?
KNOWLEDGE.md maps task contexts to files, and compiled docs include grep-friendly @task/@load markers so agents can quickly locate relevant sections.