Skip to content

Commit 892592d

Browse files
authored
Add new developer skills, auto-install git hooks, and Stripe MCP server (#889)
### Summary & Motivation Expand the developer-cli with auto-installed git hooks, five new agent-driven skills, and a Stripe MCP server for local development. - **Auto-install git hooks via the developer-cli `install` command**: A new `GitHooksSync` keeps `.git/hooks/` in sync with `developer-cli/git-hooks/`, so any committed hook activates automatically on `install` (and is removed on `uninstall`). Adds a `pre-push` hook that rejects branch names which don't follow the lowercase-kebab-case convention - GitHub's server-side branch-name restriction is Enterprise-only, so client-side enforcement closes the gap. Replaces the manual `core.hooksPath` wiring previously done by the `mcp-setup` command. - **Five new skills**: - `commit` — converts the commit slash-command into a skill. - `db-query` — psql access to the local Aspire Postgres. - `rebuild-branch` — cherry-picks each commit of a stale branch onto a fresh one off main with per-commit validation. - `pull-platformplatform-changes` — cherry-picks unmerged upstream PRs into a downstream project. - A new skill for opening GitHub PRs end-to-end, replacing the older description-only command of the same purpose. - **Stripe MCP server**: `.claude/scripts/stripe-mcp-dev.sh` reads the dev sandbox key from `dotnet user-secrets` and execs `@stripe/mcp`. Wired into `.mcp.json` for local agent use. ### Checklist - [x] I have added tests, or done manual regression tests - [x] I have updated the documentation, if necessary
2 parents e0b4d63 + 1b6503b commit 892592d

18 files changed

Lines changed: 1184 additions & 312 deletions

File tree

.claude/commands/commit.md

Lines changed: 0 additions & 50 deletions
This file was deleted.

.claude/commands/prepare-pull-request.md

Lines changed: 0 additions & 109 deletions
This file was deleted.

.claude/scripts/stripe-mcp-dev.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
# Reads the Stripe dev sandbox key from dotnet user-secrets and execs @stripe/mcp.
5+
# Today this uses sk_test_* (full perms, test-mode only). Swap to a read-only
6+
# rk_test_* restricted key by changing the secret name below.
7+
SECRET_NAME="Parameters:stripe-api-key"
8+
9+
STRIPE_SECRET_KEY=$(dotnet user-secrets list --project application/AppHost/AppHost.csproj | sed -n "s/^${SECRET_NAME} = //p")
10+
11+
if [ -z "$STRIPE_SECRET_KEY" ]; then
12+
echo "Stripe MCP: secret '${SECRET_NAME}' not found in dotnet user-secrets." >&2
13+
exit 1
14+
fi
15+
16+
export STRIPE_SECRET_KEY
17+
exec npx -y @stripe/mcp

.claude/skills/commit/SKILL.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
name: commit
3+
description: Commit session changes to git. Identify files from session context, ask user pick message, run validation only if needed. Use when user want commit / save / land changes.
4+
allowed-tools: *
5+
---
6+
7+
# Commit Workflow
8+
9+
**Asked commit now != permission for future commits.** Each commit needs explicit user instruction. No amend, revert, push without explicit ask.
10+
11+
Speed critical. No slow commands unless changes warrant.
12+
13+
## Identify Files
14+
15+
- Prefer session context over re-running `git status` / `log` / `diff`.
16+
- Clean session: all changed files. With context: only files you changed.
17+
18+
## Translations
19+
20+
Frontend changes touching user-facing strings: run `translate` to check `.po` files. Missing keys: flag user; don't commit until resolved.
21+
22+
## Validation (judgment)
23+
24+
Skip if `build` / `test` / `lint` / `format` / `aspire-restart` / `e2e` already ran clean this session on same files. No re-run, no offer.
25+
26+
When need:
27+
28+
Run `build` first:
29+
- **Backend change:** `build` (no flags - covers backend AND frontend; backend can break frontend via API contracts)
30+
- **Frontend-only:** `build --frontend`
31+
- **CLI-only:** `build --cli`
32+
33+
After build, parallel (`--no-build` where applicable):
34+
35+
- `format --<target>`, `lint --<target>` - per target whose code changed
36+
- `test --no-build` - backend change
37+
- `aspire-restart` - service / Aspire wiring change (large only)
38+
- `e2e` - large frontend or shared E2E-covered change; `--smoke` for low-impact (rare pre-commit)
39+
40+
Judge target by file (project / manifest / lock files affect owning build, even when extension non-obvious).
41+
42+
## Ask User
43+
44+
Simple, focused commit: propose one message, commit.
45+
46+
Complex (multiple unrelated changes, doesn't fit one line, validation choices needed, file set ambiguous): use AskUserQuestion - 2-4 message options + conditionals in one call. No back-and-forth. Follow up only on "Other" or unexpected input.
47+
48+
No conventional commit prefixes (`feat:`, `fix:`, `docs:`, `chore:`).
49+
50+
Conditional questions:
51+
- Validation tools multi-select, only those flagged needed. Default skip.
52+
- File selection if ambiguous.
53+
54+
## Stage and Commit
55+
56+
Stage explicit files. Never `git add -A` or `git add .`.
57+
58+
---
59+
60+
Asked commit now != permission for future commits.

0 commit comments

Comments
 (0)