feat(skills): canonicalize skills to a single source with generated .claude/.cursor projections (#5609)

* improvement(cleanup-skill): parallelize analysis, apply fixes sequentially

* improvement(cleanup-skill): add comment-reduction pass; mirror 6 missing skills into .claude/commands

* fix(cleanup-skill): substitute parsed scope into analysis passes instead of literal <scope>

* fix(cleanup-skill): parse fix token anywhere; preserve pass labels through convergence for ordered apply

* fix(cleanup-skill): apply Step 1 proposals content-anchored, re-derive when a prior pass invalidated the snippet

* fix(babysit-skill): correct garbled --reverse explanation across all three copies

* fix(skills): propagate parallel cleanup to cursor/agents copies; disambiguate babysit /ship refs in claude copy

* fix(skills): port url-state + comment passes to cursor/agents; clarify converge pass-label ordering

* feat(skills): canonicalize skills under .agents/skills with generated .claude/.cursor projections

Establish .agents/skills/<name>/SKILL.md as the single source of truth (latest
content reconciled per skill from the three drifted copies), and generate the
.claude/commands and .cursor/commands projections from it via scripts/sync-skills.ts.
Adds skills:sync/skills:check, a CI gate, a pre-commit regen hook, and CONTRIBUTING docs.
Structurally fixes prior drift (e.g. abbreviated .claude ship -> full ship).

* fix(skills): strip leaked XML tags from skill tails; clarify lint:check has no per-file target

Removes stray </content>/</invoke> markup that leaked into add-block,
add-connector, add-hosted-key canonical skills, and reword the cleanup
skill's lint step to note bun run lint:check runs repo-wide via turbo
(no per-path API). Projections regenerated via skills:sync.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QjefwescJoHZ6zcc3C17FR

* fix(add-block-skill): restore unknown-output stop in Final Validation

Re-add the "if any tool outputs are still unknown, tell the user instead
of guessing block outputs" step that was dropped when Final Validation
step 5 became the BlockMeta template check.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QjefwescJoHZ6zcc3C17FR

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Theodore Li
2026-07-13 19:12:11 -04:00
committed by GitHub
co-authored by Claude Opus 4.8
parent 8e5dc40e72
commit 66d1e61beb
81 changed files with 7181 additions and 393 deletions
+2
View File
@@ -348,6 +348,8 @@ Sim is built in a modular fashion where blocks and tools extend the platform's f
> | A knowledge-base connector (sync docs from an external source) | [`.agents/skills/add-connector/SKILL.md`](../.agents/skills/add-connector/SKILL.md) |
>
> The shorter overview below is a high-level reference; the SKILL.md files are the authoritative source of truth and stay in sync with the codebase.
>
> **Skills have one source and two generated projections.** Edit only the canonical `.agents/skills/<name>/SKILL.md`. The `.claude/commands/<name>.md` and `.cursor/commands/<name>.md` files are generated from it by `scripts/sync-skills.ts` — never hand-edit them. After changing a canonical skill, run `bun run skills:sync` (the pre-commit hook does this automatically when a `SKILL.md` is staged). CI runs `bun run skills:check` and fails if any projection is stale. Canonical frontmatter is `name`, `description`, and optional `argument-hint`; the Claude projection keeps `description`/`argument-hint`, the Cursor projection drops the frontmatter.
### Where to Add Your Code
+3
View File
@@ -137,6 +137,9 @@ jobs:
- name: Verify realtime prune graph
run: bun run check:realtime-prune
- name: Verify skill projections are in sync
run: bun run skills:check
- name: Migration safety (zero-downtime) audit
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then