Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/nedcodes-ok/cursor-doctor/git-workflowgit clone --depth 1 https://github.com/nedcodes-ok/cursor-doctorWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00891 | $0.00891 |
| Opus 5 | $0.00445 | $0.00445 |
| Sonnet 5 | $0.00178 | $0.00178 |
| Haiku 4.5 | $0.00089 | $0.00089 |
Grade A, and why
git-workflow scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 38 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Git Workflow Rules
Commits
- Imperative mood, under 72 chars: "Add user authentication" not "Added user authentication" or "Adding user authentication." The commit message completes the sentence: "If applied, this commit will add user authentication"
- Conventional commit format:
type(scope): description—feat(auth): add OAuth2 login,fix(api): handle null response from payment provider. Types: feat, fix, refactor, docs, test, chore, perf, ci - One logical change per commit. A commit that adds a feature, fixes a typo, and reformats a file is three commits. If you can't describe the change without "and," split it
- Never commit: secrets/credentials (use
.gitignore+ pre-commit hooks to block),.envfiles (commit.env.example), build artifacts (dist/,node_modules/), large binary files (use Git LFS) git add -p(patch mode) to stage specific hunks — don't blindlygit add .when you have unrelated changes in the working tree
Branches
- Branch from
main(ordevelopif using Gitflow). Name format:type/short-description—feature/add-auth,fix/login-crash,chore/upgrade-deps - Short-lived branches: merge within days, not weeks. Long-lived feature branches diverge from main, accumulate merge conflicts, and get harder to review with every day
- Delete branches after merging — stale branches clutter the repo and confuse people about what's active. Enable auto-delete in your Git host
- One developer per branch. If two people work on one branch, you get conflicts on every pull. Use stacked PRs or split the work into separate branches that depend on each other
Pull Requests
- PR title is the commit message that will appear in main's history (if squash-merging) — make it meaningful, not "Update stuff"
- Description template: What changed, Why (link to issue/ticket), How to test, Screenshots (if UI), Risks/concerns. A PR without context gets either rubber-stamped or ignored
- Under 400 lines of meaningful diff. At 400+ lines, reviewers skim instead of reviewing — you get worse feedback on more code. Split large features into stacked PRs: infrastructure → API → UI
- Draft PRs for early feedback on approach before writing all the code — cheaper to course-correct at 30% than at 100%
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 38 lines · 891 tokens per session scan A 577548f3fe98
git-workflow is a cursor rule published in the GitHub repository nedcodes-ok/cursor-doctor (9 stars, last pushed 5mo ago), licensed MIT. It adds 891 tokens to every session, about $0.0045 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other cursor rules, from other repositories
angular
Angular: signals, standalone components, RxJS patterns.
django
Django: models, views, ORM best practices.
java
Modern Java: records, sealed classes, streams, virtual threads.
javascript
Modern JavaScript: ES2023+, async patterns, common traps.
rust
Rust patterns: ownership, Result types, iterators.
accessibility
Accessibility: semantic HTML, ARIA, keyboard navigation, testing.