with one click
progressive-disclosure
// Template and guide for restructuring large documentation files into token-efficient directory structures. Reduces context bloat by 40-60% while maintaining accessibility.
// Template and guide for restructuring large documentation files into token-efficient directory structures. Reduces context bloat by 40-60% while maintaining accessibility.
| name | progressive-disclosure |
| description | Template and guide for restructuring large documentation files into token-efficient directory structures. Reduces context bloat by 40-60% while maintaining accessibility. |
| license | MIT |
| compatibility | Standalone, no special dependencies |
| metadata | {"author":"bob","version":"1.0.0","tags":["documentation","context-optimization","token-efficiency","restructuring"],"requires_tools":[],"requires_skills":[]} |
A pattern for restructuring large documentation files into slim indexes with on-demand subdirectories, reducing always-included context by 40-60%.
Large documentation files (500+ lines, 5k+ tokens) that are always included in context:
Split monolithic docs into:
Before:
TOOLS.md (~11k tokens always included)
├── Section 1 (rarely needed)
├── Section 2 (rarely needed)
├── ... (15+ sections)
└── Section N (rarely needed)
After:
tools/
├── README.md (~4k tokens always included) # Slim index
├── topic1/README.md # Detailed docs (~1k tokens each)
├── topic2/README.md # Loaded on-demand
└── .../README.md # etc.
Good candidates for progressive disclosure:
Keep as single file when:
Count tokens and identify sections:
# Count lines and estimate tokens
wc -l LARGE_FILE.md
# Rough: 1 line ≈ 8 tokens
# Identify sections (look for ## headers)
grep "^## " LARGE_FILE.md | head -20
# Create topic directories
mkdir -p topic_dir/{topic1,topic2,topic3}
The index should contain:
Example slim index structure:
# Topic Name
Brief overview of what this covers and core concepts.
## Quick Reference
| Command | Description |
|---------|-------------|
| cmd1 | Most common operation |
| cmd2 | Second most common |
| cmd3 | Third most common |
## Detailed Documentation
For specific topics, see:
- **Topic 1** (topic1/README.md) - When you need X
- **Topic 2** (topic2/README.md) - When you need Y
- **Topic 3** (topic3/README.md) - When you need Z
## Principles
1. Core principle 1
2. Core principle 2
3. Core principle 3
Each topic README should:
Update gptme.toml (or equivalent) to include the slim index:
[context]
# Before: included entire large file
# files = ["LARGE_FILE.md"]
# After: include only slim index
files = ["topic_dir/README.md"]
Before:
TOOLS.md: 1380 lines, ~11k tokens, always includedAfter:
tools/README.md: 200 lines, ~1.5k tokens (slim index)tools/{shell,git,github,context,...}/README.md: ~150 lines eachResult: 44% reduction in always-included context
Conduct a structured interview about a new project and generate a ready-to-use CLAUDE.md/AGENTS.md starter so the agent knows your conventions from session one.
Query a Home Assistant instance for presence, sensor data, calendar events, and cameras
Use when creating or revising an agent's SOUL.md, splitting runtime voice out of broader identity docs, or tightening a vague persona file into a short, opinionated, voice-only artifact without changing the agent's core identity.
Comprehensive framework for effective gptme agent onboarding that builds user trust, communicates capabilities clearly, and establishes productive working relationships from the first interaction.
Workflow for publishing HTML artifacts (demos, visualizations, interactive content) to the web. Enables agents to share work products publicly via GitHub Pages or similar hosting.
Systematic code review workflows with bundled utilities for analyzing code quality, detecting patterns, and providing structured feedback. Use this skill when reviewing pull requests or conducting code audits.