Problem
openrouter-typescript-sdk/SKILL.md is 1,200+ lines covering SDK setup, agent features, OAuth, streaming, tool use, stop conditions, format converters, and type reference — all loaded into agent context at once whenever the skill triggers.
This creates two problems:
- Context bloat — the full 1200 lines loads even when the agent only needs one section (e.g. just streaming)
- Crowding — a large skill competes with other narrower skills during auto-load, potentially displacing more relevant context
Solution
Adopt the open-responses pattern: a lean top-level SKILL.md with a references/ subdirectory of detail files loaded on demand.
openrouter-typescript-sdk/
SKILL.md # ~100 lines: install, callModel pattern, decision tree, which reference to load
references/
agent-features.md # callModel, tool(), stop conditions, streaming
sdk-features.md # models list, credits, API keys, OAuth
type-reference.md # full type table, subpath exports
format-converters.md
The main SKILL.md tells the agent: "for tool use, load references/agent-features.md". Only the needed reference is loaded, not the whole doc.
Reviewed by Perry
Problem
openrouter-typescript-sdk/SKILL.mdis 1,200+ lines covering SDK setup, agent features, OAuth, streaming, tool use, stop conditions, format converters, and type reference — all loaded into agent context at once whenever the skill triggers.This creates two problems:
Solution
Adopt the
open-responsespattern: a lean top-levelSKILL.mdwith areferences/subdirectory of detail files loaded on demand.The main SKILL.md tells the agent: "for tool use, load
references/agent-features.md". Only the needed reference is loaded, not the whole doc.Reviewed by Perry