Claude Code Progressive Disclosure Optimization

Claude Code skill optimization via gotcha lists and progressive disclosure
95% ai_automation · Maven · 47s · tfww
Do this: Refactor context-handoff skill to folder structure with SKILL.md, GOTCHAS.md, and subdirectories to reduce token usage from ~19k toward ~10k, keeping sessions running longer before handoff triggers.

Comparison to Current State

Skill structure and context management BETTER

Current: The existing plan implicitly assumes skills are single-unit entities, focusing on the content and prioritization of different skill types (Security, Frontend, etc.).

New: The new analysis proposes structuring Claude Code skills as folders utilizing progressive disclosure to decrease context window usage from 80% to 35%.

The new analysis introduces a practical, detailed method for optimizing skill implementation for Claude, directly addressing context window efficiency which is a core constraint.

Error handling and reliability improvement BETTER

Current: The existing plan mentions 'Security skill is S-tier: mandatory for protection' but doesn't detail how to prevent recurring AI errors.

New: The new analysis suggests adding a 'Gotchas' section to document Claude's recurring mistakes and ensure skills are iterative with versioning to compound reliability.

The new analysis provides a concrete, actionable strategy for improving AI reliability by documenting and learning from past mistakes, which is absent in the existing plan.

Instruction style for Claude DIFFERENT ANGLE

Current: The existing plan emphasizes the *what* of skills (e.g., 'documenting AIAS RLS policies' for Security skill, 'standardize development patterns' for Frontend skill).

New: The new analysis cautions against 'railroading' Claude with rigid instructions, advocating for context and constraints over step-by-step micromanagement to allow Claude to adapt.

While the existing plan focuses on skill content, the new analysis provides meta-guidance on the *how* to instruct Claude more effectively, offering a complementary perspective on interaction patterns.

Summary DIFFERENT ANGLE

Current: Migrate broken OpenClaw cron jobs to a persistent Claude Code architecture with JSON state checkpointing, then extend the embedding technique to ReelBot's knowledge base.

New: Anthropic engineers structure Claude Code skills as folders (not single files) using progressive disclosure to reduce context usage from 80% to 35%.

The existing summary focuses on system replacement, while the new analysis focuses on optimizing Claude Code skill design within an existing system.

Claude Code Skill Architecture BETTER

Current: Replicate OpenClaw scheduled tasks using Claude Code's native loops/cron, circumventing 3-day expiration by storing loop metadata in config files that restart with the launch script.

New: Convert single-file skills to folder-based structures (~/.claude/skills/{skill-name}/) with separate files for prompts, gotchas, examples, and reference scripts to leverage progressive disclosure.

The new analysis provides a more detailed and optimized architectural approach for Claude Code skills, focusing on modularity and progressive disclosure.

Claude Instruction Methodology BETTER

Current: The existing plan details specific steps for replicating OpenClaw's features, implying a direct instruction approach.

New: They maintain a 'Gotchas' section documenting Claude's recurring mistakes to prevent repetition, and avoid rigid instructions in favor of context + constraints that let Claude adapt.

The new analysis introduces a more sophisticated approach to guiding Claude, emphasizing 'gotcha' lists and context-driven instructions over rigid step-by-step commands, leading to potentially more robust agents.

Summary of Focus DIFFERENT ANGLE

Current: The existing plan focuses on eliminating thumbnail editor costs by building a structured photo asset library and implementing a Claude Code workflow.

New: The new analysis summarizes that Anthropic engineers structure Claude Code skills as folders using progressive disclosure to reduce context usage and maintain a 'Gotchas' section to prevent recurring mistakes.

The existing plan is about an applied workflow for DDB, while the new analysis is about optimizing Claude Code's internal skill structure and usage.

Claude Code Skill Structure BETTER

Current: The existing plan implicitly uses Claude Code as a tool for a specific task without detailing its internal structure.

New: The new analysis introduces the concept of structuring Claude Code skills as folders with separate files for prompts, gotchas, examples, and reference scripts to leverage progressive disclosure.

The new analysis provides valuable insight into optimizing Claude Code's internal structure for efficiency and reliability, which was not present in the original plan.

Error Prevention/Optimization BETTER

Current: The existing plan focuses on successful generation of thumbnails.

New: The new analysis introduces adding a 'Gotchas' section to document specific recurring mistakes and avoid rigid instructions in favor of context + constraints for Claude.

The new analysis introduces a proactive mechanism for error prevention and continuous improvement of Claude Code's performance, which was absent from the original task-oriented plan.

Similar to: Formalize Claude Security + Frontend Skills (85% overlap)
Overlap: Claude Code skill optimization, Structuring Claude's skills (folder-based structure, progressive disclosure), Addressing Claude's recurring mistakes ('Gotchas' section), Optimizing context usage
Consider merging tasks rather than separate execution.
Further reduces Claude Code token overhead (currently at ~19k) below the 75% context monitor threshold, preventing handoff interrupts and maintaining session continuity for longer coding sessions

Restructure Claude Code skills using folder-based progressive disclosure and gotchas documentation to reduce context overhead and prevent recurring AI errors.

Business Applications

HIGH AI development efficiency (general)

Audit existing standards.md and context-handoff skill to add explicit 'Gotchas' section documenting previous Claude mistakes

MEDIUM Context window optimization (general)

Refactor context-handoff skill from single SKILL.md file to folder structure with SKILL.md, GOTCHAS.md, EXAMPLES/, and TEMPLATES/ subfiles

MEDIUM AI rule calibration (general)

Review ~/.claude/rules/standards.md for over-rigid language; rewrite as 'Context + Constraints' rather than 'Do this, then this'

Implementation Levels

Tasks

0 selected

Social Media Play

React Angle

Our take: We're already ahead on token reduction (19k vs their 35%), but the Gotcha section pattern is exactly what we need to lock in gains

Repurpose Ideas
Engagement Hook

Just added a 'Gotchas' section to our standards.md after seeing this. First entry: 'Stop wrapping everything in try/catch blocks' 😅

What This Video Covers

Maven (Thariq @trq212) - AI/tech content creator sharing insights from Anthropic's internal Claude Code engineering practices; screenshot shows actual Anthropic skill file with Gotchas section for billing library
Hook: Creator claims a Claude Code engineer shared the 'best tips I've ever seen for building skills'
“One of the most important parts of a skill is actually not the instructions. It's a list of things that Claude has repeatedly done wrong that you don't want it to do again”
“Give context + constraints. Let Claude decide how”
“Claude will reference these files and bring them in only as it needs them”

Key Insights

Analysis Notes

What it is: Advanced Claude Code configuration strategy using folder-based skills with progressive disclosure and negative examples (gotchas) to improve AI coding assistant reliability

How it helps us: Directly applicable to our Claude Upgrades project—we currently use ~/.claude/rules/standards.md and ~/.claude/skills/context-handoff/. This validates our direction but shows we should add explicit 'Gotchas' sections and potentially split skills into folders with progressive disclosure to further reduce our ~19k token overhead

Limitations: We may already be doing some progressive disclosure with our 'Everything Claude Code' plugin scoping, but the explicit 'Gotcha' pattern is new

Who should see this: Dylan/technical team working on Claude Upgrades—immediate action items for skill optimization

Reality Check

🤔 [PLAUSIBLE] "Adding gotchas automatically improves skills from 40% to 98% success rate" — The progression chart (v1→v4) appears illustrative rather than empirical. Comments show no actual validation (just repetitive 'Claude' mentions). However, negative examples are proven to improve LLM performance—just don't expect automatic 98% perfection.
Instead: Track actual error rates in our projects before/after adding gotchas to measure real improvement
🤔 [PLAUSIBLE] "Progressive disclosure reduces context usage from 80% to 35%" — The math makes technical sense—loading files on-demand vs upfront—but the specific percentages are likely simplified for the video. Our current ~19k overhead suggests we're already partially optimized.
Instead: Test by converting one skill to folder structure and measuring context window delta via Claude Code's token counter
✅ [SOLID] "Don't railroad Claude / avoid rigid instructions" — Consistent with established prompt engineering best practices. The 'Balanced' zone on the spectrum aligns with modern AI collaboration patterns—constraints guide, micromanagement backfires.
Instead: Consider implementing as stated

Cost Breakdown →

StepPromptCompletionCost
analysis11,4233,075$0.0119
similarity1,043333$0.0004
plan7,3244,778$0.0138
Total$0.0261