mit einem Klick
git-commit-and-push-petems
Commit and push with Peter's conventional commit format (50-char titles, * bullet details, imperative mood)
Menü
Commit and push with Peter's conventional commit format (50-char titles, * bullet details, imperative mood)
| name | git-commit-and-push-petems |
| description | Commit and push with Peter's conventional commit format (50-char titles, * bullet details, imperative mood) |
| license | MIT |
| allowed-tools | ["Bash"] |
When the user asks you to commit (and optionally push) changes, follow these steps carefully.
This skill builds on established commit message conventions with petems-specific preferences layered on top. For background on why each rule exists, see the reference material below.
Read these files when you need deeper context on the reasoning behind a rule:
${CLAUDE_SKILL_DIR}/references/conventional-commits-v1.md${CLAUDE_SKILL_DIR}/references/karma-commit-message-convention.md${CLAUDE_SKILL_DIR}/references/sparkbox-semantic-commit-messages.md${CLAUDE_SKILL_DIR}/references/petems-preferences.mdgit add -A or git add ., which can accidentally include sensitive files (.env, credentials) or large binariesRun the following bash commands in parallel to understand the current state:
git status — see all untracked and modified files. IMPORTANT: Never use the -uall flag as it can cause memory issues on large repos.git diff and git diff --staged — see both staged and unstaged changes.git log --oneline -10 — see recent commit messages for style reference.git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@'
If that returns nothing (no remote HEAD configured), fall back to checking which of master or main exists as a local branch. Prefer master if both exist.git branch --show-current — get the current branch name.Compare the current branch against the detected trunk branch.
git checkout -b <branch-name>.<branch-name> to avoid committing directly to <trunk>."When creating a new branch, use the following pattern:
<type>/#<issueNumber>-<alias>
| | |
| | +---> Summary in kebab-case.
| +--------------> Reference to the issue/ticket.
+------------------------> Type: feat, fix, docs, style, refactor, test, or chore.
When there is no issue number, use a short slug, e.g. feat/add-oauth-login, fix/null-pointer-in-parser, refactor/extract-auth-middleware.
| Prefix | Purpose |
|---|---|
feat or feature | New feature |
fix | Bug fix |
docs | Documentation only |
style | Formatting, missing semicolons, etc. |
refactor | Code change that neither fixes nor adds |
test | Adding or updating tests |
chore | Maintenance (deps, CI, build, etc.) |
Reference: https://gist.github.com/seunggabi/87f8c722d35cd07deb3f649d45a31082
Analyze all staged changes (both previously staged and newly added) and draft a commit message following Conventional Commits format with petems preferences applied.
The base format comes from the Conventional Commits spec (
${CLAUDE_SKILL_DIR}/references/conventional-commits-v1.md), with type prefixes drawn from the Karma convention (${CLAUDE_SKILL_DIR}/references/karma-commit-message-convention.md). Where this skill diverges from those specs, see petems preferences (${CLAUDE_SKILL_DIR}/references/petems-preferences.md).
<type>(<scope>): <description>feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert* bullet points to describe what changed and why (petems preference; the specs do not mandate a bullet character)#123Closes #123 or Fixes #123 when the commit resolves an issuefeat(auth): add OAuth2 login support
* Add OAuth2 provider configuration
* Update login controller for new flow
* Add token refresh middleware
Closes #42
.env, credentials.json, etc.), warn the user if they specifically request to commit those filesgit commit -m "$(cat <<'EOF'
<type>(<scope>): <description>
* Detail line one
* Detail line two
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"
git status after the commit completes to verify success.If the user asked to push:
git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null-u: git push -u origin $(git branch --show-current)git push--amend).Download and verify a Three UK bill PDF via Chrome DevTools, using the My3 JSON API directly (resilient to SPA UI changes)
Build conference talk outlines and MARP slides using the Story Circle framework, tuned to Peter's DevOps/infra community voice. Use when the user wants to structure a tech talk, create presentation slides, or needs help organising talk ideas.
Transform brain dumps into blog posts in Peter's casual, self-deprecating British voice. Use when the user says "write a blog post," "draft a post," "write about [topic]," or provides scattered ideas that need shaping into a cohesive narrative.
Download and verify Hyperoptic broadband bill PDFs via Chrome DevTools browser automation. Use this skill whenever the user mentions Hyperoptic bills, broadband invoices, internet bill downloads, or wants to grab/fetch/save a bill from their Hyperoptic account. Also trigger when the user asks to download bills for expense tracking, filing, or record-keeping from Hyperoptic.
Set up prek git hooks with sensible defaults and language-specific linters