Been experimenting with what I am calling "skill-agents". Was wondering if anyone else is using a similar technique.
TLDR: Explore agents for large skills.
Skills are a great way to load static documentation about something into the context window, for things like: libraries, internal services, apis, code examples, etc.. However, for really complex use-cases the amount of context in the skill will end up being a significant portion of your available context window. Conventional advice says "ok, do progressive disclosure", in which you may end up with a skill like this:
But in practice this doesn't actually reduce context bloat by very much because: 1) your agent will read any reference file it thinks may be helpful, even if the file ends up not being helpful. It doesn't remove the file from your context window. 2) your agent reads the entirety of each file, regardless of what subset of contents in that file is actually relevant to the task at hand
So, I am starting to do this instead: 1) make my Skills large. I do not worry about keeping things concise, any possible relevant info is added. 2) provide external URLs from the skill 3) use a haiku sub-agent which A) accepts a prompt that the sub-agent will try to answer B) activates the skill C) reads files in the skill, reads files from your codebase, and uses WebSearch/Fetch to supplement context with information from the internet D) ends up returning a hyper-optimized guide to your main agent
Before Example: U: "Please use the claude-agent-sdk skill to create and run an agent that reads all files in ~/Downloads/ and reorders them into organized folders" A: "Okay! Activating the claude-agent-sdk skill T: Loaded skill (+10,000 tokens) A: "Reading the types.md file" T: Read file (+2000 tokens) A: "Reading the common_troubleshooting.md file" T: Read file (+3500 tokens) A: "Okay, starting to code" [Coding begins at 15500 tokens]
After Example: U: "Please use the claude-agent-sdk skill to create and run an agent that reads all files in ~/Downloads/ and reorders them into organized folders" A: "Okay! Activating the claude-agent-sdk-skill-agent" A: Task(model=haiku prompt="Run the claude-agent-sdk skill and return a guide on how to complete the task <same task from above>") [Sub-agent runs a bunch of commands, irrelevant to our main context window though] T: Sub-agent returns optimized guide related to the user request (+2,000 tokens) [Coding begins at 2000 tokens]
Similar Threads
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community