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 skills add nazmulnahid-git/Ai-Stack --skill mergemaingit clone --depth 1 https://github.com/nazmulnahid-git/Ai-StackWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/nazmulnahid-git/ai-stack/mergemain)<a href="https://agentmods.dev/skills/nazmulnahid-git/ai-stack/mergemain"><img src="https://agentmods.dev/badge/skills/nazmulnahid-git/ai-stack/mergemain/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/nazmulnahid-git/ai-stack/mergemain"><img src="https://agentmods.dev/badge/skills/nazmulnahid-git/ai-stack/mergemain.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What 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.1 | $0.00097 | $0.01422 |
| Opus 5.5 | $0.00039 | $0.00569 |
| Sonnet 5.5 | $0.00019 | $0.00284 |
| Haiku 4.5 | $0.00010 | $0.00142 |
Grade A, and why
mergemain 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 1mo 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 — 132 lines — stays where its author put it; the contents beside it link to each section on GitHub.
mergemain
Merge the latest main into the current branch and resolve the conflicts
correctly. The whole point is the conflict resolution: never resolve by
picking a side because it is easier.
Step 1 — Pre-flight
git rev-parse --abbrev-ref HEAD # current branch
git status --porcelain # must be clean
git remote -v
git rev-parse --abbrev-ref origin/HEAD # real default branch (main/master/develop)
- If HEAD is already the default branch, stop and tell the user — there is nothing to merge.
- If the working tree is dirty, stop and ask: commit, stash, or abort. Do not stash silently; someone's uncommitted work is not yours to move.
- Note the current HEAD sha so you can offer an exact rollback later.
Step 2 — Get main fresh
git fetch origin --prune
Merge from origin/<default> directly — do not check out main, and do not rely
on a stale local copy. Report how far behind the branch was
(git rev-list --count HEAD..origin/main) and how many files main touched.
Step 3 — Merge
git merge origin/main --no-edit
If it merges cleanly, jump to Step 6.
Step 4 — Understand before resolving
List the conflicts (git diff --name-only --diff-filter=U) and, for each file,
build real context before touching it:
git log --oneline HEAD..origin/main -- <file>— why main changed it.git log --oneline origin/main..HEAD -- <file>— why this branch changed it.- Read the whole file, not just the
<<<<<<<hunks, plus the callers of anything whose signature moved.
Classify each conflicted hunk:
- Disjoint — the two sides changed different concerns that happen to sit on adjacent lines. Keep both, ordered so the file still reads correctly.
- Same concern, main is newer — main refactored/renamed/moved what the branch also edited. Take main's structure and re-apply the branch's intent on top of it (rename the branch's call sites, move its logic into main's new file, adapt to the new signature). Never discard the branch's behavior just because main rewrote the surroundings.
- Same concern, genuinely competing — both sides implement the same thing differently. This is the only case that needs a decision, and it is the case you escalate if it is not obvious.
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.
- 1mo ago First seen · 132 lines · 97 tokens per session scan A 89ab5a2d3498
mergemain is a skill published in the GitHub repository nazmulnahid-git/Ai-Stack (4 stars, last pushed yesterday), licensed MIT. It adds 97 tokens to every session and 1,422 once invoked, about $0.0004 per session on Opus 5.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 skills, from other repositories
breaking-changes
Detects breaking changes between two git refs and generates a migration guide.
pr-create
Creates a pull request from the current branch with a generated title and description.
github
GitHub via gh CLI: PRs, issues, reviews, repos, auth.
otto-pr-review-loop
Run Polly and OCR on a PR until all findings settle.
resolve-drive-pr
Drive an open PR through Polly/OCR, validation, and maintainer handoff.
issue-to-pr-resolver
Implement a GitHub issue end-to-end — create a worktree branch, implement the feature with tests, create a draft PR, then iteratively resolve all CI failures and review comments until the PR is clean. Use when you need to fully implement a GitHub issue from start to merge-ready. Triggers on "implement issue", "resolve…