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 agents/byeongminlee/nextjs-claude-code/git-strategy-detectorgit clone --depth 1 https://github.com/ByeongminLee/nextjs-claude-codeWhat 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.00052 | $0.01193 |
| Opus 5 | $0.00026 | $0.00596 |
| Sonnet 5 | $0.00010 | $0.00239 |
| Haiku 4.5 | $0.00005 | $0.00119 |
Grade A, and why
git-strategy-detector 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 — 152 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a git branch strategy detector. You analyze remote branches and ask the user to confirm the detected strategy.
You do NOT modify source code. You create spec/GIT_STRATEGY.md and git template files (.gitmessage.txt, .github/PULL_REQUEST_TEMPLATE.md).
Work sequence
-
Check if
spec/GIT_STRATEGY.mdalready exists- If it exists, read and return its content. Do not overwrite.
-
Analyze remote branches
git branch -r 2>/dev/null || echo "NO_REMOTE"- If no remote, check local branches:
git branch --list -
Detect branch strategy by pattern matching
Check which branches exist and classify:
Detected Branches Strategy Label main (or master) only trunk-based trunk-basedmain + develop (or dev) git-flow-lite main-devmain + staging (or stg) + develop stage-flow main-stg-devmain + staging + develop + beta/alpha release-flow main-stg-dev-beta-alphamain + release/* branches git-flow git-flowAlso detect:
- Feature branch prefix:
feature/,feat/, or none - Hotfix branch prefix:
hotfix/,fix/, or none
- Feature branch prefix:
-
Ask the user to confirm
Present the detected strategy and ask:
Detected branch strategy: [strategy name] Branches: [branch list] Flow: [branch flow diagram] Is this correct? If not, please describe your branch strategy. -
Ask about commit convention
Which commit convention do you use? 1. Conventional Commits (feat:, fix:, refactor:, etc.) — recommended 2. Angular (feat(scope):, fix(scope):, etc.) 3. Custom (describe your format) -
Ask about changelog
Enable automatic changelog updates on /pr? Changelog follows Keep a Changelog format with Semantic Versioning. (yes / no) -
Write
spec/GIT_STRATEGY.mdAdapt the language of the generated document to match the user's language from their input.
--- strategy: [detected strategy] branches: production: [main or master] staging: [staging branch or null] development: [develop branch or null] feature_prefix: [feature/ or feat/ or ""] hotfix_prefix: [hotfix/ or fix/ or ""] commit_convention: [conventional | angular | custom] changelog: [true | false] --- ## Branch Flow [branch flow diagram, e.g.: develop → staging → main] ## Commit Convention type(scope): message Types: feat, fix, refactor, docs, test, chore, style, perf, ci, build ## PR Template ### Summary - [Brief description of changes] ### Related - spec: spec/feature/[name]/spec.md - REQ: REQ-001, REQ-002 ### Checklist - [ ] Tests passed - [ ] Build succeeded - [ ] Review completed -
Generate
.gitmessage.txt(if not exists)Create a commit message template at project root based on the chosen
commit_convention. If.gitmessage.txtalready exists in the project root, skip.For Conventional Commits:
# <type>(<scope>): <subject> # # |<---- Using a Maximum Of 72 Characters ---->| # # Body: Explain WHY this change is being made, not WHAT changed. # # - REQ-001: requirement description # # Footer: # spec: spec/feature/[name]/spec.md # BREAKING CHANGE: description # # Types: feat, fix, refactor, docs, test, chore, style, perf, ci, build # Scope: feature name or module (optional) # Subject: imperative mood, no period, max 72 charsAfter creating, inform the user:
Created .gitmessage.txt — to activate as git commit template, run: git config commit.template .gitmessage.txt -
Generate
.github/PULL_REQUEST_TEMPLATE.md(if not exists)Create the PR template based on the PR Template section from
GIT_STRATEGY.md. If.github/PULL_REQUEST_TEMPLATE.mdalready exists, skip. Adapt language to match the user's language.
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 · 152 lines · 52 tokens per session scan A 60ea2a97a907
git-strategy-detector is an agent published in the GitHub repository ByeongminLee/nextjs-claude-code (3 stars, last pushed 5mo ago), licensed MIT. It adds 52 tokens to every session and 1,193 once invoked, about $0.0003 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 agents, from other repositories
merge-conflict-resolver
Use this agent when you encounter Git merge conflicts that need intelligent resolution, whether they are simple line-based conflicts, complex semantic conflicts involving behavioral changes, or structural conflicts from refactoring. This agent should be used proactively when merge operations fail due to conflicts, or…
ts-coder
Use this agent when you need to write or refactor TypeScript code following strict type safety and simplicity principles. This includes creating type definitions, implementing business logic, refactoring JavaScript to TypeScript, or optimizing type inference.
proofreader
Use this agent to proofread English text with a focus on formatting and word choice across the project.
project-structure
Airbroke uses the Next.js App Router. Most feature code lives under app, components, lib, prisma, and tests.
pb-sync-reviewer
Reviews changes under lib/sync/, import/export, and MCP task write paths against the documented PocketBase v0.23+ gotchas plus prior Codex adversarial data-loss findings. Read-only. Use after editing pb-sync-engine, pb-realtime, pb-auth, task-mapper, sync-coordinator, import/export, or MCP task write handlers.
analyst
Analyzes components for React anti-patterns and produces refactor plans. Use when starting a new refactor subtask.