Skip to content

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

Merged
TheodoreSpeaks merged 12 commits into
stagingfrom
feat/parallel-cleanup-skill
Jul 13, 2026
Merged

feat(skills): canonicalize skills to a single source with generated .claude/.cursor projections#5609
TheodoreSpeaks merged 12 commits into
stagingfrom
feat/parallel-cleanup-skill

Conversation

@TheodoreSpeaks

@TheodoreSpeaks TheodoreSpeaks commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

Establishes a single source of truth for the repo's agent skills and eliminates the three-copy drift that had accumulated across .agents/skills, .claude/commands, and .cursor/commands.

  • Single source: every skill now lives once at .agents/skills/<name>/SKILL.md (frontmatter name + description + optional argument-hint, then body). .claude/commands/<name>.md and .cursor/commands/<name>.md are generated from it by scripts/sync-skills.ts — never hand-edited.
  • Drift made impossible: bun run skills:sync regenerates; bun run skills:check fails on any stale projection and is wired into CI (test-build.yml); a pre-commit hook auto-regenerates when a SKILL.md is staged. CONTRIBUTING.md documents "edit canonical only."
  • Reconciliation: the three drifted copies of each skill were reconciled to the latest content (26 canonical skills touched). Where a newer copy had dropped a section, it was merged back — and referenced code (e.g. listingCapped, registry-maps.ts) was verified still live before restoring guidance. Stale-and-wrong instructions were corrected (e.g. the old "don't add tags to BlockConfig" rule, now the opposite in current code).
  • /cleanup overhaul (the original seed of this PR): rewritten from sequential to parallel read-only analysis → converge → sequential pass-ordered apply, avoiding concurrent-write clobbering while keeping the analysis speedup. Adds a new comment-reduction pass (you-might-not-need-a-comment) and wires you-might-not-need-url-state into the set (8 passes total).
  • Structural fixes that fell out of generating from canonical: the abbreviated .claude/commands/ship.md is now the full ship; Cursor gained the 8 skills it was missing; babysit's /ship references now point at the canonical source.

Type of Change

  • Improvement / refactor (tooling + docs; no runtime app code)

Testing

  • bun run skills:check passes; all three trees hold the same 31 skills with no orphans
  • Verified .agents/skills is tracked (not gitignored) so the CI gate runs on a fresh checkout
  • Generator is idempotent (re-running skills:sync is a no-op); biome-clean
  • Per-skill reconciliation decisions (which copy won / what was merged) are documented in the commit history

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Jul 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Jul 13, 2026 10:47pm

Request Review

@cursor

cursor Bot commented Jul 12, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Documentation-only changes to agent skills and commands; no production code paths or deploy behavior are modified.

Overview
This PR is almost entirely agent skill and slash-command documentation under .agents/skills/ and mirrored .claude/commands/ — no application runtime code.

/cleanup is rewritten to run eight quality passes in parallel with fix=false, then converge overlapping proposals and apply fixes sequentially (effects → state → memo → callback → React Query → url-state → emcn → comments), including content-anchored edits when parallel analysis goes stale. Two new passes join the set: you-might-not-need-url-state and you-might-not-need-a-comment.

New skills/commands document operational workflows: add-block-preview (AppConfig/PREVIEW_BLOCKS gating), add-feature-flag (AppConfig vs env flags), babysit (Greptile/Cursor review loop), and db-migrate (zero-downtime migrations and -- migration-safe).

Integration builder docs are aligned across add/validate skills: no guessed API/webhook/tool outputs; blocks register in registry-maps.ts (BLOCK_REGISTRY / BLOCK_META_REGISTRY); BlockMeta requires ≥7 templates plus grounded skills; block outputs clarified as flat/json-only (no nested tool-style properties); icons use currentColor + check:bare-icons; BYOK registration points at lib/api/contracts/byok-keys.ts; internal tool routes use lib/api/contracts/tools/{service}.ts.

Connector/trigger docs add syncContext.listingCapped for truncated listings, @/connectors/utils helpers, expanded polling trigger registration, and stricter validate-connector checks for deletion reconciliation.

Reviewed by Cursor Bugbot for commit 183a605. Bugbot is set up for automated code reviews on this repo. Configure here.

@greptile-apps

greptile-apps Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR updates the cleanup skill and skill command projection flow. The main changes are:

  • Runs cleanup analysis passes in parallel before applying fixes in order.
  • Parses cleanup scope and fix arguments before spawning read-only passes.
  • Adds and updates canonical skill files plus Claude and Cursor command projections.
  • Adds a skills:check CI step for projection drift.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
.agents/skills/cleanup/SKILL.md Defines the parallel analysis and sequential apply workflow for the cleanup skill.
.claude/commands/cleanup.md Updates the Claude cleanup command with parsed scope substitution and read-only analysis passes.
.cursor/commands/cleanup.md Updates the Cursor cleanup command with the same cleanup orchestration flow.
scripts/sync-skills.ts Adds projection generation and checking from canonical skill sources.
.github/workflows/test-build.yml Adds the skill projection check to the build workflow.

Reviews (11): Last reviewed commit: "Merge remote-tracking branch 'origin/sta..." | Re-trigger Greptile

Comment thread .claude/commands/cleanup.md
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cursor review

Comment thread .claude/commands/cleanup.md
Comment thread .claude/commands/cleanup.md Outdated
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cursor review

Comment thread .claude/commands/cleanup.md Outdated
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cursor review

Comment thread .claude/commands/babysit.md Outdated
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cursor review

Comment thread .claude/commands/babysit.md
Comment thread .claude/commands/cleanup.md
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cursor review

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cursor review

Comment thread .agents/skills/cleanup/SKILL.md Outdated
… .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).
@TheodoreSpeaks TheodoreSpeaks requested a review from a team as a code owner July 13, 2026 18:55
Comment thread .claude/commands/add-hosted-key.md Outdated
…ck 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
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cursor review

Comment thread .agents/skills/add-block/SKILL.md

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit dfb6c34. Configure here.

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
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cursor review

Comment thread .agents/skills/add-block/SKILL.md
…nup-skill

# Conflicts:
#	.claude/commands/cleanup.md
#	.claude/commands/ship.md
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 183a605. Configure here.

Comment thread scripts/sync-skills.ts
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 183a605. Configure here.

@TheodoreSpeaks TheodoreSpeaks changed the title improvement(cleanup-skill): parallelize analysis, apply fixes sequentially feat(skills): canonicalize skills to a single source with generated .claude/.cursor projections Jul 13, 2026
@TheodoreSpeaks TheodoreSpeaks merged commit 66d1e61 into staging Jul 13, 2026
19 checks passed
@TheodoreSpeaks TheodoreSpeaks deleted the feat/parallel-cleanup-skill branch July 13, 2026 23:14
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.

1 participant