Skip to content

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

@perry-the-pr-reviewer

Description

@perry-the-pr-reviewer

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions