Skip to content

Restructure SKILL.md with progressive disclosure (390 → 154 lines)#13

Open
gdilla wants to merge 1 commit into
nidhinjs:mainfrom
gdilla:gautam/progressive-disclosure-restructure
Open

Restructure SKILL.md with progressive disclosure (390 → 154 lines)#13
gdilla wants to merge 1 commit into
nidhinjs:mainfrom
gdilla:gautam/progressive-disclosure-restructure

Conversation

@gdilla
Copy link
Copy Markdown

@gdilla gdilla commented Mar 20, 2026

Summary

  • Moves the tool routing matrix (~230 lines, 20+ tool profiles) from SKILL.md into references/tool-profiles.md
  • Adds a Gotchas section to SKILL.md (8 tool-specific pitfalls)
  • Reduces tokens loaded per invocation by 61%
  • Follows the Agent Skills spec and Anthropic's best practices

Why

When prompt-master activates, the entire 390-line SKILL.md loads into the agent's context window. But ~60% of that content is tool-specific routing profiles (Claude, GPT, Gemini, o1, Cursor, Midjourney, etc.) — and only one profile is relevant for any given invocation. The other 19+ profiles compete for attention while adding zero value.

Per Anthropic's best practices:

"Once a skill activates, its full SKILL.md body loads into the agent's context window alongside conversation history. Every token in your skill competes for the agent's attention with everything else in that window."

The spec recommends keeping SKILL.md under 500 lines / ~5000 tokens, with detailed reference material in separate files loaded on demand via progressive disclosure.

What changed

File Before After
SKILL.md 390 lines (everything inline) 154 lines (core instructions + conditional pointer to profiles)
references/tool-profiles.md (didn't exist) 157 lines (all 20+ tool profiles)
references/templates.md unchanged unchanged
references/patterns.md unchanged unchanged

What stayed in SKILL.md (always loaded)

  • Identity and hard rules
  • Output format
  • Intent extraction (9 dimensions)
  • Diagnostic checklist (task/context/format/scope/reasoning/agentic failures)
  • Memory block pattern
  • Safe techniques
  • Verification checklist
  • New: Gotchas section — 8 tool-specific pitfalls (Claude over-engineers, GPT is verbose, Gemini hallucinates citations, o1 degrades with long prompts, etc.)

What moved to references/tool-profiles.md (loaded on demand)

  • All 20+ tool profiles: Claude, GPT-4o, Gemini, o1/o3, Qwen 2.5, Qwen3, Ollama, Llama/Mistral, DeepSeek-R1, Claude Code, Antigravity, Cursor/Windsurf, GitHub Copilot, Bolt/v0/Lovable/Figma Make/Stitch, Devin, Perplexity/SearchGPT, Image AI (generation + editing), ComfyUI, Video AI, Voice AI, Workflow AI, Prompt Decompiler

The agent reads tool-profiles.md only after identifying the target tool — not on every activation.

How the flow works now

  1. User asks for a prompt → skill activates → 154-line SKILL.md loads
  2. Agent extracts intent, identifies target tool (e.g., "Claude Code")
  3. Agent reads references/tool-profiles.md → finds Claude Code section → applies those specific patterns
  4. Agent runs diagnostic checklist, generates prompt

Previously step 2 and 3 were merged — all profiles loaded upfront whether needed or not.

Test plan

  • Verify existing behavior: generate a prompt for Claude Code, GPT-4o, Midjourney — each should produce the same quality output as before
  • Verify progressive disclosure: tool-profiles.md is only read after target tool identification
  • Verify gotchas section catches common mistakes (e.g., CoT added to o1 prompt)
  • Verify templates.md and patterns.md references still work unchanged

🤖 Generated with Claude Code

Move the tool routing matrix (~230 lines, 20+ tool profiles) from
SKILL.md into references/tool-profiles.md, loaded on demand after
the target tool is identified.

Motivation:
- SKILL.md was 390 lines. The Agent Skills spec recommends <500 lines
  and <5000 tokens for the main SKILL.md (agentskills.io/specification).
  While technically under the limit, ~60% of the content was tool-specific
  routing profiles that are irrelevant for any given invocation — only 1
  profile is needed per prompt, but all 20+ were loaded every time.
- Per Anthropic's best practices (agentskills.io/skill-creation/best-practices):
  "Once a skill activates, its full SKILL.md body loads into the agent's
  context window alongside conversation history. Every token in your skill
  competes for the agent's attention."

What changed:
- SKILL.md: 390 → 154 lines (61% reduction in tokens loaded per invocation)
  - Kept: identity, hard rules, output format, intent extraction,
    diagnostic checklist, memory block, safe techniques, verification
  - Added: Gotchas section (8 tool-specific pitfalls — highest-value
    content per Anthropic's guidance)
  - Added: conditional pointer to tool-profiles.md
  - Moved: all 20+ tool profiles → references/tool-profiles.md
- references/tool-profiles.md: new file (157 lines)
  - All tool profiles (Claude, GPT, Gemini, o1/o3, Qwen, Ollama, Llama,
    DeepSeek, Claude Code, Antigravity, Cursor, Copilot, Bolt/v0/Lovable,
    Devin, Perplexity, Image AI, Video AI, Voice AI, Workflow AI)
  - Loaded only after the target tool is identified — not on every activation

The existing references/templates.md and references/patterns.md are unchanged.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@blorincz1
Copy link
Copy Markdown

@nidhinjs Can the conflicts be resolved and this merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants