totem: Skill for Claude Code

.claude/skills/postmerge/SKILL.md

postmerge is a skill for Claude Code from mmnto-ai/totem. It costs 21 tokens per session (1,425 once invoked), scanned A, original, Apache-2.0.

A post-merge procedure for extracting lessons from merged pull requests, updating the semantic index, and compiling the results into rules for AI tools. A pull request is a proposed set of code changes reviewed before merging.

In plain words
What is it for?
Running the Totem lesson extractor for merged pull requests, synchronizing the index, compiling and exporting rules locally, and reviewing the generated patterns for overly broad matches.
Why use it?
It turns important lessons from completed code reviews into reusable local rules and checks, while also telling maintainers to inspect the newly generated rules.

Skill for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

This is mmnto-ai/totem's own configuration. It tells Claude Code how to work on totem itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything totem configures →

Reuse

Borrowing it

Nothing to install: this file belongs to mmnto-ai/totem. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/mmnto-ai/totem/main/.claude/skills/postmerge/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/mmnto-ai/totem

Made for: Claude Code.

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 postmerge

README.md
[![agentmods](https://agentmods.dev/badge/skills/mmnto-ai/totem/postmerge/github.svg)](https://agentmods.dev/skills/mmnto-ai/totem/postmerge)
Your own site
<a href="https://agentmods.dev/skills/mmnto-ai/totem/postmerge"><img src="https://agentmods.dev/badge/skills/mmnto-ai/totem/postmerge/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 postmerge

Your own site · 80×15
<a href="https://agentmods.dev/skills/mmnto-ai/totem/postmerge"><img src="https://agentmods.dev/badge/skills/mmnto-ai/totem/postmerge.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,425 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00021 $0.01425
Opus 5 $0.00010 $0.00713
Sonnet 5 $0.00004 $0.00285
Haiku 4.5 $0.00002 $0.00143

Measured 10d ago against content hash 0520f53c87db, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

postmerge 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 10d 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.

.claude/skills/postmerge/SKILL.md · 113 lines

How it starts

The opening of the file, as written. The whole thing — 113 lines — stays where its author put it; the contents beside it link to each section on GitHub.

totem wrap is retired pending mmnto-ai/totem#1361 (it silently overwrites hand-crafted committed docs via the totem docs step). Run the post-merge steps directly instead.

After merging PRs, run the following sequence. Replace $ARGUMENTS with the merged PR numbers (space-separated, e.g. 1345 1347 1348).

  1. Extract lessons from the merged PR(s): pnpm exec totem lesson extract $ARGUMENTS --yes

  2. Sync the semantic index (usually already handled by the post-merge git hook, but running it explicitly is cheap and safe): pnpm exec totem sync

  3. Compile new rules locally and export to AI tool configs. Do NOT pass --cloud; the cloud worker is Gemini-only (migration to Claude declined — mmnto-ai/totem#1221, closed not-planned). Local compile routes to the orchestrator.overrides.compile role in totem.config.ts (currently Claude Sonnet 5): pnpm exec totem lesson compile --export

  4. Review the newly compiled rules. Step 3's output prints a count like N/M (100%) ... X compiled, Y skipped, Z failed. For each of the X newly compiled rules, inspect them in .totem/compiled-rules.json and verify:

    • The astGrepPattern or pattern is not over-broad (does it fire on legitimate code the rule is not trying to flag?)
    • The pattern does not reference hallucinated package names, type names, or file paths that do not exist in the repo
    • The lessonHeading accurately describes the rule's behavior

    For any rule that fails these checks, archive it with the atomic totem lesson archive <hash> --reason "<specific failure mode>" command (mmnto-ai/totem#1587). The command flips the rule's status to archived, stamps archivedAt on first transition, refreshes compile-manifest.json's output_hash, and regenerates the copilot and junie exports so the archived rule stops flowing into downstream AI tool configs — all in one invocation.

    pnpm exec totem lesson archive 8dbddb67 --reason "Pattern fires on every throw-in-catch; lesson's real scope is post-scaffold hooks only"
    

    Use as many characters of the hash as needed to unambiguously match one rule. The command matches on lessonHash prefix; ambiguous prefixes print the candidates and exit non-zero with no mutation. Idempotent on rerun — archivedReason refreshes, archivedAt is preserved. The mmnto-ai/totem#1345 archive filter in loadCompiledRules silences archived rules at lint time while preserving them in the ledger for future compile-worker prompt regression analysis.

    Do NOT use git checkout HEAD -- .totem/compiled-rules.json to revert the entire rules file. Reverting rules while keeping the new lessons on disk creates a manifest inconsistency (manifest.input_hash reflects the new lessons, output_hash reflects the reverted rules, verify-manifest fails on push). This is the symmetric counterpart of the mmnto-ai/totem#1337 bug. Archive-in-place via totem lesson archive is the intended curation surface; reverting is not.

    Empirical baseline: approximately 2 of every 6 auto-compiled rules are bad (1.14.1 postmerge), and the 2026-04-11 PM postmerge hit 4 of 5. The compile-worker prompt rewrite conversation lives under Strategy #73 and Strategy #62. Every archivedReason is feedback that informs that rewrite.

  5. Format everything compile and archive touched: pnpm run format

  6. Stage only the artifacts we keep: new lessons, the mutated rules file, the refreshed manifest, and the regenerated exports. Do NOT stage docs/wiki/roadmap.md or docs/reference/architecture.md unless you hand-edited them deliberately (those are totem docs targets and a postmerge run should not rewrite them): git add .totem/lessons/ .totem/compiled-rules.json .totem/compile-manifest.json .github/copilot-instructions.md .junie/skills/totem-rules/rules.md

  7. Commit: git commit -m "chore: totem postmerge lessons for $ARGUMENTS"

Read the full file on GitHub · 113 lines

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. 10d ago First seen · 113 lines · 21 tokens per session scan A 0520f53c87db

Subscribe to this mod's changes

postmerge is a skill published in the GitHub repository mmnto-ai/totem (17 stars, last pushed today), licensed Apache-2.0. It adds 21 tokens to every session and 1,425 once invoked, about $0.0001 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-30.

Related

Other skills, from other repositories

hunk-launch-video

Produces Hunk videos by driving the real TUI headlessly in a PTY, compositing captioned 1080p frames in Chromium, and encoding with ffmpeg. Use for feature demos, workflow explainers, announcements, launch videos, and full-release roundups.

modem-dev/hunk · 60 tokens

review-gate

Use before an agent-produced diff is committed, pushed, opened as a PR, merged, landed, or applied to user files when explicit implementation approval is missing. Trigger for review gate, review pack, approve before landing, diff first then land, human approval, merge gate, commit gate, push gate, or PR readiness.…

majiayu000/spellbook · 95 tokens

docs

Use when documentation generally needs to catch up with a branch before pushing or merging, covering internal developer docs, external customer-facing docs, and release notes together — "update the docs", "do a docs pass before I merge", "make sure everything's documented". Prefer this when no single documentation…

The01Geek/prflow · 97 tokens

ring:generating-release-guides

Generating an internal Operations-facing update/migration guide from the git diff between two refs, documenting per-change client impact, deploy ordering, monitoring, and rollback notes in English, pt-br, or both. Use when preparing a version release or recording what changed for the Ops team. Runs read-only by…

LerianStudio/ring · 85 tokens

agentplane-task-closure-recovery

Use when Agentplane task completion, direct finish, branchpr integration, hosted-close, close-tail PRs, PR metadata, dirty task artifacts, or remote branch divergence need diagnosis or recovery.

basilisk-labs/agentplane · 46 tokens

argot-setup

Set argot up for a repository end to end — audit its history, decide what should shape its voice, fit, verify the fit actually catches things, tune the rules its own history says are noisy, and wire the places it runs (pre-write hook, pre-commit, MCP, CI). One sitting, one decision at a time, each proposed with the…

get-tmonier/argot · 129 tokens