/dstack-core:commitfrom DStack Core
Creates typed atomic local git commits from working-tree changes and rewrites unpushed commit messages. Does not push or open PRs.
Ships in DStack Core. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Shape messages to repository conventions. Two jobs share this skill. create stages working-tree changes and commits them as typed atomic local commits. rewrite rewords the messages of HEAD or a short unpushed range while the tree stays byte-identical.
This skill owns local commits, local branch placement, and message shape. It does not push, open or edit a PR or MR, compose a PR or MR body, watch CI, or resolve review threads. Push and PR or MR publication belong to commit-push-pr (which also owns title and body composition, including the ## Demo / ## Screenshots / ## Evidence section and preserved Related: / Fixes trailers). Watching belongs to watch-and-repair-pr.
Everything here is reversible and local. create writes only the local index, one local feature branch, and local commits. rewrite writes only local commit messages. Rollbacks are git reset --hard <prior-HEAD>, git branch -D <created-branch>, and the reflog with original refs. No remote mutation happens in this skill.
create is done when each logical concern is committed with an explicit named file list and a value-communicating message, git status confirms success, and hashes and subjects are reported. rewrite is done when git diff <old>..<new> is empty, dates are preserved by position, and git log alone carries the handoff.
create needs the working-tree state (git status, git diff HEAD), the current branch (git branch --show-current), and recent history (git log --oneline -10). Gather each probe as its own call. Treat the result as a snapshot and re-read the staged set immediately before committing.
You also need the remote default (git rev-parse --abbrev-ref origin/HEAD), used only to know which branch is the default. Strip origin/ from it. On an unresolved default or bare HEAD, try the forge viewer matching the verified remote (GitHub gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name', GitLab glab repo view -F json reading its default_branch field). Select the forge from the verified remote URL and never assume GitHub. When every resolver fails, report DEFAULT_BRANCH_UNRESOLVED and stop any step that needs the default. Never guess.
Other inputs arrive with the request. Repo commit conventions are used directly when already in context. An issue number, when one exists, is prefixed into the branch name and footer. A target platform (GitHub or GitLab) is required only when closing issues cross-repo; no forge command runs for that input, and the platform only shapes the cross-repo closing footer written into the commit message. rewrite needs the target (HEAD or HEAD~N..HEAD) with the intended text, plus explicit confirmation when any target is already pushed.
Pick the convention in this order: repo conventions already in context first, then a clear pattern in recent commits, then the seven-rule fallback with conventional-commit types (feat, fix, docs, test, build, ci, chore, style, ref / refactor, perf, meta, license, revert). With conventional commits, default to fix: over feat: when ambiguous; a user override wins. The subject is imperative and names the outcome, not the file list.
rewrite runs only when the user asks to reword existing messages. Otherwise you are in create mode.
git log --format='%H %an <%ae> %ad %cn <%ce> %cd' <range>. Record each target tree SHA (git rev-parse <sha>^{tree}) and author and committer dates by position.git branch -r --contains <sha>. When any target is pushed, stop and require explicit confirmation.git rebase plus GIT_SEQUENCE_EDITOR and git commit --amend, scoped to the range. Never create a new change.GIT_AUTHOR_DATE and GIT_COMMITTER_DATE by position.git diff <old>..<new> is empty, dates match by position, and the log carries the handoff with the diff hidden. On drift, abort and restore original refs from the reflog.When git status shows no staged, modified, or untracked files, report nothing to commit and stop. Do not use git diff HEAD alone; it misses untracked files.
On detached HEAD, ask whether to create a feature branch (use the platform blocking question tool). On yes, derive a typed name as below, run git checkout -b <branch-name>, and re-read the branch. On no, continue detached with the commit.
Name the branch <type>/[issue-]<description>: lowercase, hyphens, under 50 chars, with the type matched to the work.
Split into one concern per commit, by mechanism and never by file alone. When one file carries two mechanisms, write the filtered patch from git diff -- <file>, keep one mechanism, and stage with git apply --cached <patch>. A lint, format, or whitespace sweep is its own commit. Order commits so each leaves the tree building.
Partition by contract dependency, not file count or line distance. Tables joined by a boot-time registry guard, signature changes with their callers, and mutually dependent repair hunks belong together when either half alone breaks the tree. Each published slice must be coherent without its successor. A green dirty union does not prove the staged tree or individual commits.
Generate real unified or binary-safe patches with the external diff disabled on the diff subcommand. Use a smaller context or explicit content reconstruction only when needed to isolate a concern. Re-read the candidate hunks after each commit or base change; regenerate rather than blindly rewriting stale offsets. Inspect the staged content, not merely its stat or rendered display. Preserve the intended final tree across a split with exact object and tree comparison.
Keep a standalone formatting sweep separate, but attribute repair-required formatter changes to the owning concern when constructing an explicitly authorized unpublished series. Do not put all formatting in the last commit by default. Folding, recutting committed blobs, or rewriting a published series needs authority covering that history operation; create mode and message-only rewrite mode do not silently grant it.
On a default branch with work, automatically create a feature branch first. Before creating it, verify the base resolves, the name is unused (git branch --list <branch-name> must be empty), and the working tree is clean or its dirty files are surfaced for user decision; a blocked check changes nothing. Then run git checkout -b <branch-name> and confirm with git branch --show-current. Do not ask; committing on the default branch is not an option. A default branch with no work means nothing to do: report that and stop.
Gate each group before staging it: run the repo-native typechecker or linter for that group. A failing group is not ready; skip it and name the failure. Skip silently when neither is configured.
Stage and commit each group with named files only. Never git add -A or git add .. Honor exclude:<paths>: those files stay uncommitted and are named in the report. Write the full message (subject, blank line, optional body) to a file outside the repo with the file-write tool, then run two calls per group:
git add file1 file2 file3
git commit -F <message-file> -- file1 file2 file3
The -F file avoids shell quoting for $, quotes, backticks, and multiline bodies. The trailing path list is required: a bare git commit would sweep anything already staged. Never include customer names, emails, secrets, PII, a Claude signature, AI attribution, or a Co-authored-by trailer for an AI agent. When the commit carries someone else's ported work, end with one Co-authored-by: Name <email> trailer per credited person, copied exactly from their commits or patch trailers; when no email is recorded, name them in the body instead of guessing.
Before changing a shared index, establish exclusive ownership and record existing staged paths, modes, and blob identities. Leave foreign staged entries unchanged; an ordinary commit without pathspec includes the whole index, so do not commit while unapproved staged entries remain in that index. Use an isolated construction index or workspace when necessary, without racing the real index.
Run git status after the commit and report hash and subject.
add -A.! or a BREAKING CHANGE: footer.Preserve recoverable original content before reconstruction, including tracked, staged, unstaged, and relevant untracked files. Never use add-all as a final sweep over shared work. A failed split remains uncommitted; that is not permission for blanket restore, reset, or force publication.
For create: local commits on a typed branch plus a report of hashes, subjects, excluded paths, and confirming git status. For rewrite: rewritten messages over the exact range with empty tree diff, dates preserved by position, and verification results.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
89 skills in this plugin
/abstract-wellUse when the user wants to classify abstractions as useful, bad, or busy and keep one shallow level. Not for tasks requiring source or remote-system changes./architectUse when non-trivial code needs a design, codebase architecture needs improving through survey and deepening, or one module needs targeted interface narrowing, seams, or testability. Not for rendered visual artifacts, deploy, or irreversible changes./architecture-simplificationUse when the user explicitly asks to simplify an architecture, collapse modules or crates, or cut a dependency graph within approved boundaries. Executes an approved layout direction slice by slice. Not for single-module cleanup: use code-simplification. Not for layout planning from nothing: use architect. Not for blind re-derivation: use breaking-driven./askmeUse when eliciting intent/scope/referents or gating long/bundled/high-stakes/hard-to-undo work: exhaustive/collaborative/adversarial/grill/gate/batch/interview/proposal/pairing. Grill me and grill batches select evidence-backed, chat-only grill mode. Not for scanning a stated request: use clarify. Not for one fork by default: use decide./audit-projectUse when the user says "audit my code", "find all the bugs", "review until clean", or "grill my changes". Not for remote, credential, or irreversible changes./autolearnUse when a verified fix yields a generalized well-abstracted invariant with enforcement or proof, or existing solution docs need bounded refresh. Not for unverified fixes, minor learnings, narrative/activity/weak-test stories, retrospective analysis, or remote migration.npx claudepluginhub gosuda/dstack-skills --plugin dstack-coreOther plugins' skills for the same job