sync-main

sync-main is a command for Claude Code from nunoamorim99/agile-ledger. It costs 19 tokens per session (316 once invoked), scanned A, original, MIT.

A read-only check that compares the Git main branch with an Agile-Ledger record of planned work. It identifies merged changes by their User Story IDs.

In plain words
What is it for?
Use it to review recent merges, suggest stories that should be marked Done, and find merged work that has no linked story.
Why use it?
It shows what changed while you were away and finds mismatches between the code and the work ledger before records are updated.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the agile-ledger plugin — 2 skills, 34 commands shipped together

Good fit Use it to review recent merges, suggest stories that should be marked Done, and find merged work that has no linked story.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/nunoamorim99/agile-ledger/sync-main
Install

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.

Clone the repo
git clone --depth 1 https://github.com/nunoamorim99/agile-ledger

Made for: Claude Code.

Or install agile-ledger, the plugin that ships this one along with the rest of its 2 skills, 34 commands.

Wrote 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.

agentmods badge for sync-main

README.md
[![agentmods](https://agentmods.dev/badge/commands/nunoamorim99/agile-ledger/sync-main/github.svg)](https://agentmods.dev/commands/nunoamorim99/agile-ledger/sync-main)
Your own site
<a href="https://agentmods.dev/commands/nunoamorim99/agile-ledger/sync-main"><img src="https://agentmods.dev/badge/commands/nunoamorim99/agile-ledger/sync-main/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.

agentmods 80×15 button for sync-main

Your own site · 80×15
<a href="https://agentmods.dev/commands/nunoamorim99/agile-ledger/sync-main"><img src="https://agentmods.dev/badge/commands/nunoamorim99/agile-ledger/sync-main.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 316 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00019 $0.00316
Opus 5.5 $0.00008 $0.00126
Sonnet 5.5 $0.00004 $0.00063
Haiku 4.5 $0.00002 $0.00032

Measured 12d ago against content hash 771584d2ae33, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

sync-main 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 12d 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.

plugins/agile-ledger/commands/sync-main.md · 8 lines

What it actually says

Using the Agile-Ledger skill, reconcile main against the ledger. Read git in the code repo; write only in the resolved ledger folder — take the code path from Registry.md or the cwd. Fetch main, list merges since the Last main sync cursor in Sprint.md, and map each commit to its US via the bracketed or parenthesized ID (case-insensitive). Flag two cases: (1) merged but the ledger does not show it Done → propose marking Done and filling the Increment; (2) merged with no US ID → surface it as off-plan work to back-fill or query. Read-only by default; update the sync cursor and sync log only after the user reviews.

Run the git commands from the code repo's directory where possible — the allowed-tools whitelist covers the plain git fetch / log / diff / status / branch / show forms, so a git -C <path> ... variant (needed when the code repo is elsewhere) falls outside it and will ask for approval once. Never reach for a git subcommand that writes.

Changes

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.

  1. 12d ago Changed · +2 lines 771584d2ae33
  2. 1mo ago First seen · 6 lines · 19 tokens per session scan A 6ad453d1e932

Subscribe to this mod's changes

sync-main is a command published in the GitHub repository nunoamorim99/agile-ledger (1 stars, last pushed 2d ago), licensed MIT. It adds 19 tokens to every session and 316 once invoked, about $0.0001 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.