git-workflow
Commits, branches and pull requests in a repository the person is working in. Use when asked to commit, stage, branch, rebase, write a commit message, open a pull request, or inspect git history or status.
- License 许可
- Apache-2.0
- 最近更新
- 2026-10-22
- Stars
- ★ 3
- Forks
- 0
01 前言 Front Matter
- name
- git-workflow
- license
- Apache-2.0
- trinity
- { "risk": "write", "requires_toolsets": [ "shell" ] }
- metadata
- { "author": "trinity", "version": "1.0", "category": "development" }
- description
- Commits, branches and pull requests in a repository the person is working in. Use when asked to commit, stage, branch, rebase, write a commit message, open a pull request, or inspect git history or status.
- compatibility
- Needs the shell tool with git on the machine.
02 资源文件 1
- 参考文档references/conventional-commits.md500 B
03 SKILL.md 正文
Git workflow
Work in the repository the session's project root points at. Read before you write: git status
and git log --oneline -10 first, so a commit lands on the branch the person expects.
Committing
git status --shortandgit diff --stat: know what will go in. Nevergit add -Aon a tree you have not listed; stage the files the task is about.- Write a Conventional Commits message:
type(scope): summaryon the first line, at most 72 characters, imperative mood; a blank line; then the why, not the what, in a few lines. Types:feat,fix,docs,test,refactor,chore. - If the repository has a
.githooksdirectory or acommit-msghook, expect it to check the message and read what it says when it refuses. - Never commit secrets:
.env, keys, tokens. Ifgit statusshows one, stop and say so.
Branches and pull requests
- Branch from the default branch with a short, hyphenated name (
fix/receipt-order). - Never force-push a shared branch; never rewrite history that is tagged.
- A pull request body says what changed and why, names the tests that prove it, and links the
issue when there is one.
references/conventional-commits.mdhas the message grammar.
When unsure
Ask before any of: git push --force, git reset --hard, git clean, deleting a branch, or
amending a commit that is already pushed.
04 同仓库更多 Skills
no-shell-fallback
What to do without a shell. Shown only when the shell toolset has no tool.
needs-web
Requires a toolset that no configuration names. Hidden.
needs-shell
Requires the shell toolset. Shown where the shell tool is registered.
needs-missing-tool
Requires a tool nobody registers. Hidden by conditional activation.
echo-skill
The user's own echo skill, which shadows the bundled one. Use when a test wants precedence.
tampered
A skill whose manifest was written for other bytes. Refused.