plugins/hypercore/skills/git-commit/SKILL.md
[Hyper] Create one or more Conventional Commits from the current repository state. Inspect staged and unstaged changes, group them into logical change sets, generate a compliant message per group, and commit each group separately in sequence.
npx skillsauth add alpoxdev/hypercore git-commitInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
<output_language>
Default all user-facing deliverables, saved artifacts, reports, plans, generated docs, summaries, handoff notes, commit/message drafts, and validation notes to Korean, even when this canonical skill file is written in English.
Preserve source code identifiers, CLI commands, file paths, schema keys, JSON/YAML field names, API names, package names, proper nouns, and quoted source excerpts in their required or original language.
Use a different language only when the user explicitly requests it, an existing target artifact must stay in another language for consistency, or a machine-readable contract requires exact English tokens. If a localized template or reference exists (for example *.ko.md or *.ko.json), prefer it for user-facing artifacts.
</output_language>
<scripts>| Script | Purpose |
|------|------|
| scripts/repo-discover.sh [start_dir] | Detect current-repo vs descendant-repo layout |
| scripts/repo-status.sh [repo] | Show branch, status, staged summary, and unstaged summary |
| scripts/git-commit.sh [--repo path] "msg" [files...] | Commit staged or selected files in one repository |
| scripts/git-push.sh [--repo path] [--force] | Push the current branch safely in one repository |
<trigger_conditions>
| User intent | Activate | |------|------| | "commit these changes" | yes | | "make a git commit" | yes | | "/git-commit" | yes | | requests that only ask for push/rebase/reset | no, unless commit creation is also requested |
</trigger_conditions>
<argument_validation>
If ARGUMENT is missing:
git status and git diff output before staging or committing.If ARGUMENT is "ALL" or "all":
If ARGUMENT is present (other than ALL):
</argument_validation>
<scope_assumptions>
</scope_assumptions>
<required>| Category | Rule |
|------|------|
| Inspect first | Run git status --short --branch before any staging or commit command. |
| Argument mode | Resolve whether execution is in session-default mode or explicit-argument mode before repository discovery and staging. |
| Repository discovery | Determine whether the current working directory is a git repository. If not, inspect descendant directories and build a repository list before any git add or git commit action. |
| Diff source | If staged changes exist, treat the staged set as the default commit candidate and inspect with git diff --staged. If nothing is staged, inspect git diff. |
| Repository boundary | When multiple git repositories are discovered under the current directory, run git status, git add, and git commit inside each repository separately. Never treat multiple repositories as one commit unit. |
| Logical scope | Each commit covers exactly one logical change. When multiple logical groups exist, identify each group and commit them separately in sequence. Do not stop to ask — iterate through all groups. |
| Staging discipline | Stage only the files required for the selected logical change. Do not stage everything by default. |
| Type selection | Choose the Conventional Commit type from the actual dominant change, not from filenames alone. |
| Scope selection | Use a scope only when one module, package, feature area, or subsystem clearly owns the change. Omit scope when the change spans multiple unrelated areas or the scope would be vague. |
| Language | Write commit subject and body in Korean. The Conventional Commit type and scope stay in English (e.g. feat(auth):), but the description after the colon and the body text must be in Korean. |
| Subject line | Use imperative mood, present tense, lowercase after the colon, and keep the subject under 72 characters. |
| Body/footer | Add a body only when the subject cannot capture important context. Add footers only for verified issue references, breaking changes, or explicitly requested metadata. |
| Push confirmation | After git add and git commit complete successfully, ask whether to run git push. In Codex, ask in plain text. In OpenCode, prefer its native ask-style approval prompt when available; otherwise fall back to plain text. |
| Safety | Never commit secrets, generated credentials, or unrelated user changes. Never use --no-verify, force flags, or destructive git commands unless the user explicitly asks. |
| Failure handling | If hooks fail, inspect the error. Fix and retry only when the failure is directly caused by the current change set and the fix is safe. Otherwise stop and report the blocker. |
| Category | Avoid |
|------|------|
| Staging | git add . or blanket staging when unrelated changes exist (exception: ALL mode stages all files but still commits per logical group) |
| Argument handling | ignoring an explicit ARGUMENT and committing a broader change set than requested |
| Cherry-picking in ALL mode | skipping files or leaving uncommitted changes behind when ARGUMENT is ALL |
| Repository boundary | running git add or git commit from a non-repository root and assuming nested repositories will be included |
| Push | auto-running git push after commit without explicit confirmation |
| Hooks | --no-verify unless the user explicitly requests it |
| History rewrite | amend, rebase, reset, force push, or other history-editing commands without explicit request |
| Secrets | committing .env, credentials, private keys, or tokens |
| Guessing | inventing a scope, footer, or grouped change set that is not supported by the diff |
<decision_tables>
| Input state | Action | |------|------| | No ARGUMENT provided | Start from the current session's modified files and repositories, confirm them with git state, group into logical changes, and commit each group separately | | No ARGUMENT provided, and current-session work is already committed | If uncommitted changes still remain, allow the remaining uncommitted change set to become the next candidate and apply the same grouping logic | | ARGUMENT is "ALL" or "all" | Take ALL uncommitted changes regardless of session, group into logical changes, and commit each group separately — no stopping, no skipping, every file must be committed | | ARGUMENT provided (other than ALL) and matches one logical change | Use ARGUMENT as the primary filter for repository discovery, staging, and message generation | | ARGUMENT provided (other than ALL) and covers multiple logical groups | Use ARGUMENT as the filter, then group and commit each group separately | | ARGUMENT provided (other than ALL) but conflicts with git state | Stop and report the mismatch |
| Observed layout | Action | |------|------| | Current working directory is a git repository | Operate in the current repository and follow the normal commit workflow | | Current working directory is not a git repository, but one or more descendant directories are repositories | Build the repository list and run the full commit workflow separately inside each repository that has relevant changes | | Current working directory is not a git repository and no descendant repository exists | Stop and report that no git repository was found |
| Repository state | Action | |------|------| | Staged changes only | Commit the staged set. | | Staged + unstaged changes, same logical change | Stage the missing files deliberately, then commit the full set. | | Staged + unstaged changes, unrelated changes mixed together | Default to the staged set only, or stop if the intended commit target is unclear. | | No staged changes, one clear logical change | Stage only the relevant files, then commit. | | No staged changes, multiple unrelated changes | Group changes into logical sets. Stage and commit each group separately in sequence. | | No diff to commit | Stop and report that there is nothing to commit. |
| Observed dominant change | Type |
|------|------|
| User-facing capability added | feat |
| Incorrect behavior fixed | fix |
| Docs only | docs |
| Formatting or style only, no behavior change | style |
| Internal restructure without feature or bug fix | refactor |
| Performance improvement | perf |
| Tests added or updated | test |
| Build tooling or dependency management | build |
| CI workflow or automation config | ci |
| Repo maintenance, chores, metadata | chore |
| Reverting an earlier commit | revert |
| Condition | Output rule |
|------|------|
| One-line subject fully explains the change | Subject only |
| Why, risk, or follow-up matters for reviewers | Add a short body |
| Breaking API, schema, or behavior change | Use ! and/or BREAKING CHANGE: footer |
| Verified issue or ticket reference exists | Add Refs: or Closes: footer |
| Co-author requested explicitly by the user | Add Co-authored-by: footer exactly as requested |
</decision_tables>
<workflow>Decide argument mode first:
scripts/repo-discover.sh
Then branch by repository layout:
git rev-parse --show-toplevel succeeds, inspect the current repository:scripts/repo-status.sh
scripts/repo-status.sh path/to/repo
Do not run one git add or one git commit from the non-repository root for multiple descendant repositories.
Analyze the full candidate set and partition it into logical change groups. Each group should contain files that belong to the same feature, fix, module, or purpose.
Grouping heuristics (apply in order):
In ALL mode: every uncommitted file must appear in exactly one group. No file may be left behind.
For each logical group identified in Phase 2, repeat the following:
Use targeted staging commands. Stage only the files in the current group.
git add path/to/file1 path/to/file2
git add -p
git restore --staged path/to/file
Build:
typescopeMessage format:
<type>[optional scope]: <subject>
[optional body]
[optional footer]
Subject only:
scripts/git-commit.sh "<type>[scope]: <subject>"
scripts/git-commit.sh --repo path/to/repo "<type>[scope]: <subject>"
Body or footer included:
scripts/git-commit.sh "$(cat <<'EOF'
<type>[scope]: <subject>
<optional body>
<optional footer>
EOF
)"
scripts/git-commit.sh --repo path/to/repo "$(cat <<'EOF'
<type>[scope]: <subject>
<optional body>
<optional footer>
EOF
)"
Move to the next logical group. Repeat 3a–3c until all groups are committed.
Stop within a group only if:
If multiple descendant repositories are in scope, repeat Phase 2 and Phase 3 inside each repository separately.
After a successful commit, ask for explicit push confirmation.
Commit created. Run git push?| Failure case | Response |
|------|------|
| Hook or lint failure caused by current changes | Fix the issue, restage the affected files, and create a new commit attempt |
| Hook failure unrelated to the current change set | Stop and report the blocker |
| Empty commit after staging decision | Stop and report that nothing remains to commit |
| Merge conflict or index lock | Stop and report the repository state |
| User declines push | Stop after reporting the successful commit |
| User approves push | Run scripts/git-push.sh in the relevant repository, then report the result |
feat(auth): add passkey login flowfix(cache): prevent stale data when reading projectsdocs(cli): document release prerequisitesrefactor(worker): split mailbox parsing logicupdated stuffFix bug in the API modulefeat: add new featurechore(repo): change many thingsgit commit -m "$(cat <<'EOF'
feat(api): filter team memberships
Include only memberships visible to active users in the list response.
Refs: #482
EOF
)"
/git-commit
Result:
/git-commit
Result:
feat(auth): add passkey login flowdocs(cli): document release prerequisites/git-commit
Result:
/git-commit ALL
Result:
Example output sequence:
scripts/git-commit.sh "feat(auth): add passkey login flow" src/auth/passkey.ts src/auth/passkey.test.ts
scripts/git-commit.sh "fix(cache): prevent stale data when reading projects" src/cache/reader.ts
scripts/git-commit.sh "docs(cli): document release prerequisites" docs/release.md
scripts/git-commit.sh "chore: update dependencies" package.json pnpm-lock.yaml
/git-commit packages/api session validation fix
Result:
packages/api session validation fix as the primary targetCommit created. Run git push?
scripts/git-commit.sh --repo packages/web "fix(web): handle empty session" src/auth.ts
scripts/git-commit.sh --repo packages/api "fix(api): validate session payload" src/routes/session.ts
git add packages/web/src/auth.ts packages/api/src/routes/session.ts
git commit -m "fix: update web and api"
</examples>
<validation>
git add and git commit sequence.git push was not run until explicit confirmation was received.development
[Hyper] Use when working on Vite + TanStack Router projects - enforces architecture rules (layers, routes, hooks, services, conventions) with mandatory validation before any code change. Triggers on file creation, route work, hook patterns, or any structural change in a Vite + TanStack Router codebase.
development
[Hyper] Update semantic versions across node/rust/python projects, keep discovered version files synchronized, and prefer the installed `git-commit` skill for the final git step with a direct fallback when it is unavailable.
development
[Hyper] Use when working on TanStack Start projects and the task involves auth, sessions, cookies, CSRF, secrets, env exposure, server functions/routes, headers/CSP, webhooks, or security review/fixes. Triggers on protecting routes, hardening auth flows, preventing secret leaks, securing server boundaries, or reviewing HTTP/security behavior in a TanStack Start app.
tools
[Hyper] Enforce TanStack Start architecture in existing Start projects, especially project/folder structure, route structure, nested shared folder organization, server functions, loader/client-server boundaries, importProtection, hooks, SSR/hydration, and hypercore conventions. Use before structural code changes, folder-structure reviews, route work, server function work, or architecture audits in TanStack Start codebases.