$npx -y skills add Rune-kit/rune --skill gitSpecialized git operations — semantic commits, PR descriptions, branch management, conflict resolution guidance. Replaces ad-hoc git commands with a dedicated, convention-aware utility.
| 1 | # git |
| 2 | |
| 3 | ## Purpose |
| 4 | |
| 5 | Specialized git operations utility. Handles semantic commits, PR descriptions, branch naming, and changelog generation with consistent conventions. Replaces scattered git logic across cook Phase 7 and other skills with a single, convention-aware utility. |
| 6 | |
| 7 | ## Triggers |
| 8 | |
| 9 | - Called by `cook` Phase 7 for commit creation |
| 10 | - Called by `scaffold` Phase 8 for initial commit |
| 11 | - Called by `team` for parallel branch/PR management |
| 12 | - Called by `docs` for changelog generation |
| 13 | - Called by `launch` for release tagging |
| 14 | - `/rune git commit` — manual semantic commit |
| 15 | - `/rune git pr` — manual PR generation |
| 16 | - `/rune git branch <description>` — generate branch name |
| 17 | - `/rune git changelog` — generate changelog from commits |
| 18 | - `/rune git release <version>` — create tagged release with changelog |
| 19 | |
| 20 | ## Calls (outbound) |
| 21 | |
| 22 | None — pure L3 utility. Reads git state, produces git commands/output. |
| 23 | |
| 24 | ## Called By (inbound) |
| 25 | |
| 26 | - `cook` (L1): Phase 7 — create semantic commit after implementation |
| 27 | - `scaffold` (L1): Phase 8 — initial commit with generated project |
| 28 | - `team` (L1): parallel PR management across workstreams |
| 29 | - `launch` (L1): release tagging and changelog |
| 30 | - `docs` (L2): changelog generation sub-workflow |
| 31 | - User: `/rune git` direct invocation |
| 32 | |
| 33 | ## Modes |
| 34 | |
| 35 | ### Commit Mode (default) |
| 36 | |
| 37 | Analyze staged changes and produce a semantic commit. |
| 38 | |
| 39 | ### PR Mode |
| 40 | |
| 41 | Analyze full branch diff against base and produce a pull request. |
| 42 | |
| 43 | ### Branch Mode |
| 44 | |
| 45 | Generate a branch name from a task description. |
| 46 | |
| 47 | ### Changelog Mode |
| 48 | |
| 49 | Generate changelog entries from commit history. |
| 50 | |
| 51 | ## Executable Steps |
| 52 | |
| 53 | ### Commit Mode |
| 54 | |
| 55 | #### Step 1 — Analyze Staged Changes |
| 56 | |
| 57 | Read `git diff --staged` and `git status`. Classify the change: |
| 58 | |
| 59 | | Type | Signal | Prefix | |
| 60 | |------|--------|--------| |
| 61 | | New feature | New files, new exports, new routes | `feat` | |
| 62 | | Bug fix | Changed logic in existing code, test fix | `fix` | |
| 63 | | Refactor | Structural change, no behavior change | `refactor` | |
| 64 | | Test | Only test files changed | `test` | |
| 65 | | Documentation | Only .md, comments, JSDoc changed | `docs` | |
| 66 | | Build/CI | Config files, CI pipelines, Dockerfile | `chore` | |
| 67 | | Performance | Optimization, caching, query improvement | `perf` | |
| 68 | |
| 69 | #### Step 2 — Detect Scope |
| 70 | |
| 71 | Extract scope from file paths: |
| 72 | - `src/auth/*` → scope: `auth` |
| 73 | - `src/components/Button.tsx` → scope: `ui` |
| 74 | - `api/routes/users.ts` → scope: `api` |
| 75 | - Multiple directories → omit scope or use most relevant |
| 76 | - Root config files → scope: `config` |
| 77 | |
| 78 | #### Step 3 — Generate Commit Message |
| 79 | |
| 80 | Format: `<type>(<scope>): <description>` |
| 81 | |
| 82 | Rules: |
| 83 | - Description: imperative mood, lowercase first letter, no period |
| 84 | - Max 72 characters for subject line |
| 85 | - If > 5 files changed → add body with bullet summary |
| 86 | - If breaking change detected (removed export, changed API signature, schema change) → add `!` suffix and `BREAKING CHANGE:` footer |
| 87 | |
| 88 | ``` |
| 89 | feat(auth): add JWT refresh token rotation |
| 90 | |
| 91 | - Add refresh token endpoint with sliding window expiry |
| 92 | - Store token family for reuse detection |
| 93 | - Add middleware to validate refresh tokens |
| 94 | |
| 95 | BREAKING CHANGE: /api/auth/refresh now requires refresh_token in body instead of cookie |
| 96 | ``` |
| 97 | |
| 98 | #### Step 4 — Execute |
| 99 | |
| 100 | Run `git commit` with the generated message. If pre-commit hooks fail → report the failure, do not `--no-verify`. |
| 101 | |
| 102 | ### PR Mode |
| 103 | |
| 104 | #### Step 1 — Analyze Branch |
| 105 | |
| 106 | Read ALL commits on the current branch vs base branch using `git log <base>..HEAD` and `git diff <base>...HEAD`. |
| 107 | |
| 108 | Do NOT just look at the latest commit — PRs include ALL branch commits. |
| 109 | |
| 110 | #### Step 2 — Generate PR |
| 111 | |
| 112 | ```markdown |
| 113 | ## Summary |
| 114 | <1-3 bullet points covering ALL changes, not just the last commit> |
| 115 | |
| 116 | ## Changes |
| 117 | - [grouped by feature/area] |
| 118 | |
| 119 | ## Test Plan |
| 120 | - [ ] [specific test scenarios] |
| 121 | |
| 122 | ## Breaking Changes |
| 123 | - [if any — list explicitly] |
| 124 | ``` |
| 125 | |
| 126 | Title: < 70 characters, descriptive of the full change set. |
| 127 | |
| 128 | #### Step 3 — Execute |
| 129 | |
| 130 | Run `gh pr create` with generated title and body. If no remote branch → push with `-u` first. |
| 131 | |
| 132 | ### Branch Mode |
| 133 | |
| 134 | #### Step 1 — Parse Task |
| 135 | |
| 136 | Extract key intent from task description: |
| 137 | - Feature → `feat/short-kebab-description` |
| 138 | - Bug fix → `fix/issue-number-or-description` |
| 139 | - Refactor → `refactor/module-name` |
| 140 | - Chore → `chore/description` |
| 141 | |
| 142 | Rules: |
| 143 | - Max 50 characters total |
| 144 | - Kebab-case, no uppercase |
| 145 | - Include issue number if referenced: `fix/123-login-crash` |
| 146 | |
| 147 | #### Step 2 — Execute |
| 148 | |
| 149 | Run `git checkout -b <branch-name>` from current branch. |
| 150 | |
| 151 | ### Changelog Mode |
| 152 | |
| 153 | #### Step 1 — Read History |
| 154 | |
| 155 | Read commits since last tag (`git log $(git describe --tags --abbrev=0)..HEAD`) or since specified reference. |
| 156 | |
| 157 | #### Step 2 — Group and Format |
| 158 | |
| 159 | Group commits by conventional commit type. Format as [Keep a Changelog](https://keepachangelog.com/): |
| 160 | |
| 161 | ```markd |