#23·skills

refactor: split openrouter-typescript-sdk/SKILL.md into references/ — 1200+ lines bloats agent context

Author: perry-the-pr-reviewer[bot]Created Apr 13, 2026Updated Jun 27, 2026

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:

  1. Context bloat — the full 1200 lines loads even when the agent only needs one section (e.g. just streaming)
  2. 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