$npx -y skills add fusengine/agents --skill post-commitUniversal post-commit actions. CHANGELOG update for all repos (git tag is created POST-MERGE, not here — see commit command Step 8). Plugin version bumping for marketplace repos. Triggered after any code commit (except wip/amend/undo).
| 1 | # Post-Commit Skill |
| 2 | |
| 3 | Universal post-commit actions after a successful code commit. |
| 4 | |
| 5 | ## Step 1: Read Last Commit |
| 6 | |
| 7 | ```bash |
| 8 | git log --format='%s' -1 |
| 9 | ``` |
| 10 | |
| 11 | Save the commit message for CHANGELOG entry. |
| 12 | |
| 13 | ## Step 2: Detect Repo Type |
| 14 | |
| 15 | Check if `.claude-plugin/marketplace.json` exists in the repo root. |
| 16 | |
| 17 | - **EXISTS** → Follow **Marketplace Path** (Steps M1–M5) |
| 18 | - **DOES NOT EXIST** → Follow **Standard Path** (Steps S1–S2) |
| 19 | |
| 20 | ## Standard Path (any repo without marketplace.json) |
| 21 | |
| 22 | ### Step S1: Update CHANGELOG |
| 23 | |
| 24 | Read the latest git tag to determine current version: |
| 25 | |
| 26 | ```bash |
| 27 | git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0" |
| 28 | ``` |
| 29 | |
| 30 | Increment PATCH: `X.Y.Z` → `X.Y.(Z+1)`. Add a new entry at the top of `CHANGELOG.md` (create it with a `# Changelog` heading first if missing). Load `references/changelog-templates.md` for the exact entry format and `references/changelog-type-mapping.md` for the commit-type prefix. |
| 31 | |
| 32 | ### Step S2: Commit CHANGELOG |
| 33 | |
| 34 | ```bash |
| 35 | git add CHANGELOG.md |
| 36 | git commit -m "$(cat <<'EOF' |
| 37 | chore: update CHANGELOG to X.Y.Z |
| 38 | EOF |
| 39 | )" |
| 40 | ``` |
| 41 | |
| 42 | STOP. Output summary. **No tag here** — it is created POST-MERGE by the `commit` command's Step 8 (or locally-only in LOCAL/DEGRADED mode when no remote/`gh` is available — see the Step 7 decision tree in `commands/commit.md`). Load `references/tag-timing.md` for the full post-merge rationale and the standalone-use exception. |
| 43 | |
| 44 | ## Marketplace Path (repo with .claude-plugin/marketplace.json) |
| 45 | |
| 46 | ### Step M1: Detect Modified Plugins |
| 47 | |
| 48 | ```bash |
| 49 | git diff --name-only HEAD~1 | grep '^plugins/' | cut -d/ -f2 | sort -u |
| 50 | ``` |
| 51 | |
| 52 | If no plugins modified, skip to Step M3 (still bump suite version). Skip directories without `.claude-plugin/plugin.json`. |
| 53 | |
| 54 | ### Step M2: Bump Plugin Versions |
| 55 | |
| 56 | For each modified plugin: read `plugins/{name}/.claude-plugin/plugin.json`, increment PATCH (`X.Y.Z` → `X.Y.(Z+1)`), write it back. Load `references/plugin-version-bump.md` for the marketplace.json type-detection rule (`plugins[]` vs `core[]`). |
| 57 | |
| 58 | ### Step M3: Bump Suite Version + Recompute README Badges |
| 59 | |
| 60 | Read `metadata.version` from `.claude-plugin/marketplace.json`, increment PATCH (`X.Y.Z` → `X.Y.(Z+1)`), write it back. |
| 61 | |
| 62 | Then recompute EVERY shields.io badge in `README.md` from the filesystem — never hand-maintain counts (they drift). Load `references/badge-recompute.md` for the exact count commands and `sed` replacements (version/plugins/agents/skills tokens). |
| 63 | |
| 64 | ### Step M3.5: Documentation Parity |
| 65 | |
| 66 | For any plugin **added** in this commit, create its docs page and link it. Doc filenames are abbreviated (e.g. dir `nextjs-expert` → `docs/plugins/nextjs.md`), so match existing naming in `docs/plugins/`, not the raw dir. Load `references/plugin-docs-parity.md` for the detection command and the full per-plugin checklist. |
| 67 | |
| 68 | ### Step M4: Update CHANGELOG |
| 69 | |
| 70 | Add a new entry at the top of `CHANGELOG.md`, using the new suite version `X.Y.Z` from Step M3 and `(plugin-name X.Y.Z)` for each bumped plugin. Load `references/changelog-templates.md` for the exact entry format and `references/changelog-type-mapping.md` for the commit-type prefix. |
| 71 | |
| 72 | ### Step M5: Commit the Bump |
| 73 | |
| 74 | Stage all modified files: |
| 75 | |
| 76 | ```bash |
| 77 | git add CHANGELOG.md README.md .claude-plugin/marketplace.json plugins/*/.claude-plugin/plugin.json docs/ |
| 78 | ``` |
| 79 | |
| 80 | Commit with HEREDOC format: |
| 81 | |
| 82 | ```bash |
| 83 | git commit -m "$(cat <<'EOF' |
| 84 | chore: bump marketplace and CHANGELOG to X.Y.Z |
| 85 | EOF |
| 86 | )" |
| 87 | ``` |
| 88 | |
| 89 | This MUST be a separate commit from the code changes. Never combine. **No tag here** — same post-merge rationale as Step S2. Load `references/tag-timing.md` for details. |
| 90 | |
| 91 | ## Version Bump Rules |
| 92 | |
| 93 | - ALL commit types trigger **PATCH** bump only |
| 94 | - MINOR/MAJOR bumps are **manual user decisions**, never automatic |
| 95 | - The bump commit is always SEPARATE from code changes |
| 96 | |
| 97 | ## CHANGELOG Type Mapping |
| 98 | |
| 99 | See `references/changelog-type-mapping.md` for the commit-type → CHANGELOG-prefix table used in Step S1 and Step M4 entries. |