Skip to content

feat(tooling): add Claude Code automations (MCPs, hooks, skills, subagents) - #31

Merged
schmug merged 2 commits into
mainfrom
claude/blissful-nash-de77c0
Apr 19, 2026
Merged

schmug merged 2 commits into
mainfrom
claude/blissful-nash-de77c0

Conversation

@schmug

@schmug schmug commented Apr 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds project-shared Claude Code config: .mcp.json (Cloudflare + Playwright), .claude/settings.json (permissions + hooks), two skills, two subagents.
  • Encodes the "green local checks are the merge gate" contract (per CLAUDE.md) into tooling since the repo has no CI.
  • Factored hooks into .claude/hooks/*.sh for readability/testability rather than inlining shell in settings.json.

What's in this PR

MCP servers (.mcp.json):

  • cloudflare — HTTP MCP at mcp.cloudflare.com for deploy/DNS/header inspection.
  • playwright — browser automation, replaces hand-parsing trace zips.

Hooks (.claude/settings.json + .claude/hooks/):

  • PostToolUse typecheck-on-edit.sh — non-blocking npm run typecheck after Edit/Write/MultiEdit on .ts/.tsx/.astro.
  • PreToolUse protect-files.sh — confirm gate on public/_routes.json, package-lock.json, .env*.

Skills (.claude/skills/):

  • add-app — registry-edit workflow, explicitly includes the springboard tile-count bump in e2e/smoke.spec.ts (known footgun).
  • verify-before-merge — typecheck + vitest + e2e, plus conditional npm run build when blog content/schema changed.

Subagents (.claude/agents/):

  • registry-consistency-reviewer — auto-dispatched on src/apps/registry.ts edits; enforces tile-count and AppManifest shape.
  • a11y-reviewer — enforces the OS-shell a11y contract from docs/architecture.md.

Test plan

  • npm run typecheck — clean (1 pre-existing hint)
  • npm test — 85/85 passed
  • Hook scripts: bash -n parse clean, protect-files.sh exits 2 with message on public/_routes.json, exits 0 on normal paths
  • After merge, verify .mcp.json loads (restart Claude Code, claude mcp list)
  • After merge, verify /add-app and /verify-before-merge appear in the skill palette
  • After merge, edit a .ts file and confirm PostToolUse typecheck fires in the transcript

Not included

  • No CI workflow — deliberate per CLAUDE.md.
  • .claude/settings.local.json trim happened locally but isn't committed (globally gitignored; per-dev).

🤖 Generated with Claude Code

@schmug
schmug enabled auto-merge (squash) April 18, 2026 23:22
schmug and others added 2 commits April 18, 2026 20:23
…agents

Since the repo has no CI, these encode the "green local checks are the
merge gate" contract into Claude Code tooling the team shares:

- .mcp.json: Cloudflare + Playwright MCP servers, cutting ad-hoc curl/dig
  and trace-zip parsing that had accumulated in settings.local.json.
- .claude/settings.json: project-shared permissions allowlist + two hooks.
  PostToolUse typecheck fires `npm run typecheck` after TS/Astro edits
  (non-blocking); PreToolUse protect asks for confirm before editing
  public/_routes.json, package-lock.json, or .env files.
- .claude/skills/add-app: packages the registry-edit workflow, including
  the easy-to-miss springboard tile-count bump in e2e/smoke.spec.ts.
- .claude/skills/verify-before-merge: the three-command pre-merge ritual
  from CLAUDE.md, plus a conditional build when blog content changed.
- .claude/agents/registry-consistency-reviewer: proactive reviewer for
  src/apps/registry.ts edits; catches the tile-count footgun.
- .claude/agents/a11y-reviewer: enforces the OS-shell a11y contract from
  docs/architecture.md on changes under src/components/os and mobile.

Hook scripts are factored into .claude/hooks/*.sh rather than inlined in
settings.json so they're readable and testable; both parse cleanly and
behave correctly against synthetic stdin payloads. Typecheck and vitest
both pass (85/85) post-change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Main merged #32 (GitHub Actions + eslint + prettier) while this branch
was in flight, making two of its new markdown files fail format:check
and making the verify-before-merge skill's "no CI" framing stale.

- Prettier auto-fixes on .claude/agents/registry-consistency-reviewer.md
  and .claude/skills/add-app/SKILL.md (trailing-newline nit).
- Rewrite verify-before-merge to mirror the CI gate in
  .github/workflows/ci.yml: format:check → lint → typecheck → vitest →
  playwright → build, with build still gated to blog/schema changes
  locally since CI will always run it anyway.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@schmug
schmug force-pushed the claude/blissful-nash-de77c0 branch from ff2e4b0 to a8cbb14 Compare April 19, 2026 00:27
@schmug
schmug merged commit 9f06528 into main Apr 19, 2026
3 of 4 checks passed
@schmug
schmug deleted the claude/blissful-nash-de77c0 branch April 19, 2026 00:30
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