agent-md-refactor
Refactor bloated AGENTS.md, CLAUDE.md, or similar agent instruction files to follow progressive disclosure principles. Splits…
Use when working with *.excalidraw or *.excalidraw.json files, user mentions diagrams/flowcharts, or requests architecture visualization - delegates all Excalidraw operations to subagents to prevent context exhaustion from verbose JSON (single files: 4k-22k tokens, can exceed
Claude Code
$ npx -y skills add softaworks/agent-toolkit --skill excalidraw --agent claude-code
Codex
$ npx skills add softaworks/agent-toolkit --skill excalidraw -a codex -y
Cursor
$ npx skills add softaworks/agent-toolkit --skill excalidraw -a cursor -y
Gemini CLI
$ npx skills add softaworks/agent-toolkit --skill excalidraw -a gemini-cli -y
GitHub Copilot
$ npx skills add softaworks/agent-toolkit --skill excalidraw -a github-copilot -y
OpenCode
$ npx skills add softaworks/agent-toolkit --skill excalidraw -a opencode -y
Windsurf
$ npx skills add softaworks/agent-toolkit --skill excalidraw -a windsurf -y
name: excalidraw description: "Use when working with *.excalidraw or *.excalidraw.json files, user mentions diagrams/flowcharts, or requests architecture visualization - delegates all Excalidraw operations to subagents to prevent context exhaustion from verbose JSON (single files: 4k-22k tokens, can exceed read limits)"
**Core principle:** Main agents NEVER read Excalidraw files directly. Always delegate to subagents to isolate context consumption.
Excalidraw files are JSON with high token cost but low information density. Single files range from 4k-22k tokens (largest can exceed read tool limits). Reading multiple diagrams quickly exhausts context budget (7 files = 67k tokens = 33% of budget).
Excalidraw JSON structure:
Example: 14-element diagram = 596 lines, 16K, ~4k tokens. 79-element diagram = 2,916 lines, 88K, ~22k tokens (exceeds read limit).
**Trigger on ANY of these:**
**Use delegation even for:**
**NEVER:**
**ALWAYS:**
Task: Extract and explain the components in [file.excalidraw.json] Approach: 1. Read the Excalidraw JSON 2. Extract only text elements (ignore positioning/styling) 3. Identify relationships between components 4. Summarize architecture/flow Return: - List of components/services with descriptions - Connection/dependency relationships - Key insights about the architecture - DO NOT return raw JSON or verbose element details
Task: Add [component] to [file.excalidraw.json], connected to [existing-component] Approach: 1. Read file to identify existing elements 2. Find [existing-component] and its position 3. Create new element JSON for [component] 4. Add arrow elements for connections 5. Write updated file Return: - Confirmation of changes made - Position of new element - IDs of created elements
Task: Create new Excalidraw diagram showing [description] Approach: 1. Design layout for [number] components 2. Create rectangle elements with text labels 3. Add arrows showing relationships 4. Use consistent styling (colors, fonts) 5. Write to [file.excalidraw.json] Return: - Confirmation of file created - Summary of components included - File location
Task: Compare architecture approaches in [file1] vs [file2] Approach: 1. Read both files 2. Extract text labels from each 3. Identify structural differences 4. Compare component relationships Return: - Key differences in architecture - Components unique to each approach - Relationship/flow differences - DO NOT return full element details from both files
| Excuse | Reality | What to Do | |--------|---------|------------| | "Direct reading is most efficient" | Consumes 4k-22k tokens unnecessarily | Delegate to subagent | | "It's token-efficient to read directly" | Baseline tests showed 9-45% budget used | Always delegate | | "This is optimal for one-time analysis" | "One-time" still pollutes main context | Subagent isolation | | "The JSON is straightforward" | Simplicity ≠ token efficiency | Delegate anyway | | "I need to understand the format" | Format understanding not needed in main agent | Subagent handles format | | "Within reasonable bounds" (18k tokens) | "Reasonable" is subjective rationalization | Hard rule: delegate | | "Just a quick check of components" | "Quick check" still loads full JSON | Extract text via subagent | | "File is small (16K)" | 4k tokens is NOT small | Size threshold doesn't matter |
Catch yourself about to:
**All of these mean: Use Task tool with subagent instead.**
| Operation | Main Agent Action | Subagent Returns | |-----------|-------------------|------------------| | **Understand diagram** | Delegate with "Extract and explain" template | Component list + relationships | | **Modify diagram** | Delegate with "Add [X] connected to [Y]" template | Confirmation + changes made | | **Create diagram** | Delegate with "Create showing [description]" template | File location + summary | | **Compare diagrams** | Delegate with "Compare [A] vs [B]" template | Key differences (not raw JSON) |
Real data from baseline testing:
| Scenario | Without Delegation | With Delegation | Savings | |----------|-------------------|-----------------|---------| | S
Opinionated skills shared by @leonardocouy for improving daily work efficiency with Claude Code. Skills are packaged instructions and scripts that extend agent capabilities across development, documentation, planning, and professional workflows.
Refactor bloated AGENTS.md, CLAUDE.md, or similar agent instruction files to follow progressive disclosure principles. Splits…
Create API handoff documentation for frontend developers. Use when backend work is complete and needs to be documented for…
Generate architecture documentation using C4 model Mermaid diagrams. Use when asked to create architecture diagrams, document…
Use when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or…
This skill should be used when creating a Claude Code slash command. Use when users ask to "create a command", "make a slash…
Create high-quality git commits: review/stage intended changes, split into logical commits, and write clear commit messages…
Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid…
Converts books and documents (PDF, EPUB, DOCX, HTML, Markdown, plain text, RTF, MOBI/AZW with Calibre) into structured agent…
Set up the owner profile so a personal agent knows who it works for (first-run setup, \"get to know me\"), or distill colleague,…