migrate claud config
This commit is contained in:
parent
b3e4519dd2
commit
c9c6a95077
6 changed files with 217 additions and 0 deletions
43
config/claude/skills/commit/SKILL.md
Normal file
43
config/claude/skills/commit/SKILL.md
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
# /commit
|
||||
|
||||
Create a conventional commit from staged or unstaged changes.
|
||||
|
||||
## Instructions
|
||||
|
||||
1. Run exactly this one Bash command:
|
||||
```
|
||||
git status --short && echo "---DIFF---" && git diff --cached && echo "---LOG---" && git log --oneline -5
|
||||
```
|
||||
|
||||
2. If the diff section is empty (nothing staged), ask the user which files to
|
||||
stage from the status list. Then run exactly one Bash command:
|
||||
```
|
||||
git add <files> && git diff --cached
|
||||
```
|
||||
Do NOT re-run status or log — you already have them.
|
||||
|
||||
3. Draft the commit message. Rules:
|
||||
- Header: `type(scope): imperative summary` — max 72 chars, lowercase after
|
||||
colon, no trailing period.
|
||||
- Valid types: `feat` `fix` `docs` `refactor` `perf` `test` `ci` `build` `revert`
|
||||
- Scope is optional, lowercase.
|
||||
- Non-trivial changes require a body with `Problem:` / `Solution:` sections,
|
||||
wrapped at 72 chars, separated from header by a blank line.
|
||||
- Trivial one-liners: header alone is fine.
|
||||
- Match the style of the recent commits from step 1.
|
||||
|
||||
4. Present the full message and ask for approval.
|
||||
|
||||
5. After approval, run exactly one Bash command:
|
||||
```
|
||||
git commit -m "$(cat <<'EOF'
|
||||
<message here>
|
||||
EOF
|
||||
)"
|
||||
```
|
||||
|
||||
Total: 2 Bash calls (gather + commit), or 3 if staging was needed. Do not run
|
||||
any other commands. Do not read files, explore code, or run additional git
|
||||
commands beyond what is listed above.
|
||||
|
||||
Never amend. Never sign as co-author. Never push.
|
||||
44
config/claude/skills/pr/SKILL.md
Normal file
44
config/claude/skills/pr/SKILL.md
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
# /pr
|
||||
|
||||
Create a pull request from the current branch.
|
||||
|
||||
## Instructions
|
||||
|
||||
1. Run exactly this one Bash command:
|
||||
```
|
||||
echo "---BRANCH---" && git branch --show-current && echo "---LOG---" && git log --oneline main..HEAD && echo "---STAT---" && git diff main...HEAD --stat && echo "---TEMPLATE---" && cat .github/pull_request_template.md 2>/dev/null || true
|
||||
```
|
||||
If the branch is `main` or `master`, tell the user and stop.
|
||||
|
||||
2. Draft the PR using the commit log and diffstat (do NOT run `git diff` for the
|
||||
full diff — you already have conversation context from the work you did):
|
||||
- **Title**: `type(scope): imperative summary`, max 72 chars. For
|
||||
single-commit PRs, reuse the commit header. For multi-commit, summarize.
|
||||
- **Body**: if a PR template was found in step 1, fill it in. Otherwise:
|
||||
```
|
||||
## Problem
|
||||
|
||||
<why this change is needed>
|
||||
|
||||
## Solution
|
||||
|
||||
<what the change does>
|
||||
```
|
||||
- Write in plain prose. No bullet walls, no AI markdown soup.
|
||||
|
||||
3. Present the title and body. Ask for approval.
|
||||
|
||||
4. After approval, run exactly one Bash command (push + create chained):
|
||||
```
|
||||
git push -u origin <branch> && gh pr create --title "<title>" --body "$(cat <<'EOF'
|
||||
<body here>
|
||||
EOF
|
||||
)"
|
||||
```
|
||||
Print the PR URL from the output.
|
||||
|
||||
Total: 2 Bash calls (gather + push/create). Do not run any other commands. Do
|
||||
not read files, explore code, or run additional git commands beyond what is
|
||||
listed above.
|
||||
|
||||
Never force-push, even with lease. Never target main/master as the head branch.
|
||||
Loading…
Add table
Add a link
Reference in a new issue