Skip to content

docs(skill): move setup, HTTP and worked examples from SKILL.md into references/ (no text removed) - #484

Open
AmrDab wants to merge 2 commits into
mainfrom
docs/skill-references
Open

AmrDab wants to merge 2 commits into
mainfrom
docs/skill-references

Conversation

@AmrDab

@AmrDab AmrDab commented Nov 27, 2026

Copy link
Copy Markdown
Owner

Requested by Amr · project thread

Summary

Every time the skill triggers, the agent loads all of SKILL.md. About a quarter of it is only needed some of the time: connection config, the HTTP endpoint table, worked call sequences, the compound-to-granular map, per-OS setup, security notes and bug reporting. This PR moves those sections, unchanged, into references/*.md and links them from SKILL.md. This is 3 of 5 separate simplification PRs.

No text is removed. A script checked that every non-empty line of the old SKILL.md appears in the new SKILL.md or one of the reference files (0 missing). The only new text is two short pointer sections and a "References" list at the end. The canvas-drawing pointer says "read it before you draw" in bold.

SKILL.md goes from 37.9 KB to 27.8 KB, about 27% less loaded on every trigger.

Changes

  • SKILL.md: these blocks moved out:
    • "Modes at a glance" and "Connecting" go to references/connecting.md.
    • "Quick patterns" and "Compound → granular" go to references/patterns.md.
    • "Security", "Platform support", "Reporting a problem" and "Full documentation" go to references/setup-and-security.md.
  • What stays in SKILL.md:
    • Start here, the 6 compound tools, cost tiers and the quick reference
    • When to reach for the skill, and sensitive apps
    • The universal loop and the execution playbook (including batch)
    • Safety, the coordinate system and error recovery
  • scripts/sync-version.ts: copies references/ into skills/clawdcursor/references/, the same way it copies SKILL.md.
  • tests/version-drift.test.ts: checks that the copies are byte-identical and that every references/… link in SKILL.md exists.
  • src/surface/skill-register.ts: when registration falls back to copying instead of symlinking, it now copies references/ next to SKILL.md too. A symlinked registration already has the files. There's a test assertion for this.
  • package.json files and scripts/build-mcpb.mjs: both ship references/.

Test plan

  • npm run typecheck, typecheck:tests and lint: clean (0 errors)
  • vitest --project unit: 4111 passed, 6 skipped. The steering, skill-register and version-drift tests include the new checks.
  • npm run sync-version is idempotent, and the plugin copy matches.
  • Live check that Claude Code follows the reference links from the plugin skill: not run here.

Risk / scope

  • Behavior risk: an agent that skips the pointer won't see the canvas-drawing steps or the HTTP details unless it opens the reference. That trade is the point of the PR. If drawing quality drops, move "Draw on a canvas" back into SKILL.md.
  • I don't know how ClawHub/OpenClaw publishes the skill. If it uploads SKILL.md alone, the reference links won't resolve there. Please check before merging.
  • This only moves text, and nothing is deleted.

Generated by Claude Code

…o references/

SKILL.md is loaded in full every time the skill triggers. The connection
config, HTTP endpoint table, worked call sequences, compound-to-granular map,
per-OS setup and security notes are needed only sometimes, so they move,
verbatim, to references/*.md, linked from SKILL.md. No line of text is
removed: every original line is in SKILL.md or a reference file.

SKILL.md: 37.9 KB -> 27.7 KB (~27% less loaded per trigger).

sync-version copies references/ into skills/clawdcursor/ like SKILL.md; the
drift test checks the copies and that every linked reference exists;
skill-register copies them next to a copied SKILL.md; npm and .mcpb ship them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BKm7nbpP8aK35EfAYVt7NL
@AmrDab AmrDab self-assigned this Nov 27, 2026
Comment thread scripts/sync-version.ts Fixed
…-then-read (CodeQL)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BKm7nbpP8aK35EfAYVt7NL

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants