refigure: Command for Claude Code

.claude/commands/post-merge-sync.md

post-merge-sync is a command for Claude Code from HelgDemidov/refigure. It costs 19 tokens per session (854 once invoked), scanned A, original, Apache-2.0.

A post-merge documentation updater for changes that have been added to the main code branch.

In plain words
What is it for?
Use it after a pull request merges to review recent changes and update affected project records.
Why use it?
It helps keep project instructions, long-term notes, specifications, and the README consistent with merged code.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md.

This is HelgDemidov/refigure's own configuration. It tells Claude Code how to work on refigure 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 refigure configures →

Reuse

Borrowing it

Nothing to install: this file belongs to HelgDemidov/refigure. 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/HelgDemidov/refigure/main/.claude/commands/post-merge-sync.md
Clone the repo
git clone --depth 1 https://github.com/HelgDemidov/refigure

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 post-merge-sync

README.md
[![agentmods](https://agentmods.dev/badge/commands/helgdemidov/refigure/post-merge-sync.svg)](https://agentmods.dev/commands/helgdemidov/refigure/post-merge-sync)
Your own site
<a href="https://agentmods.dev/commands/helgdemidov/refigure/post-merge-sync"><img src="https://agentmods.dev/badge/commands/helgdemidov/refigure/post-merge-sync.svg" alt="Measured on agentmods" 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 854 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.00854
Opus 5 $0.00010 $0.00427
Sonnet 5 $0.00004 $0.00171
Haiku 4.5 $0.00002 $0.00085

Measured 6d ago against content hash 024d75517ed8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

post-merge-sync 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 6d 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/commands/post-merge-sync.md · 49 lines

How it starts

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

Sync project documentation and long-term memory after a successful PR merge into main.

Run git log main --oneline -15 and git diff HEAD~1 --stat to understand what changed. Then perform ALL of the following steps — in order, without skipping:

Step 1 — Update CLAUDE.md (repo root)

Read the current CLAUDE.md. Update ONLY sections that are factually outdated based on the merged changes:

  • New modules landing in refigure/ (e.g. docx.py, xlsx.py, chart_data.py ported)
  • New/changed extras in pyproject.toml ([docx], [xlsx], [vlm])
  • Changes to commands, dependency versions, or dev tooling
  • New architectural constraints or "Do NOT" rules

Do NOT add micropatterns or implementation details — only architectural/infrastructure facts. Keep the file under 100 lines.

Step 2 — Update or create memory files

Read the current MEMORY.md index at the project memory path. For each significant change in the merged PR, decide:

  • New subsystem or feature → create project_<feature>.md (type: project)
  • Architectural decision with lasting consequences → create or update project_*.md
  • Testing/tooling lesson learned → create or update feedback_*.md
  • New external resource or reference → create reference_*.md

Memory body structure: lead with the fact/rule, then Why: and How to apply: lines. Update MEMORY.md index: add one line per new file, update description of changed files.

Step 3 — Update spec status

If the merge closes a feature branch with a spec at docs/<category>/<slug>/<slug>-<date>.md AND that file still exists in this local checkout (docs/ is gitignored since 2026-08-19 — the spec was never committed/pushed by /tech-spec, so it only exists if you're running this on the same machine that drafted it; if it's missing, skip this step, there's nothing to update), append a concise §"Статус выполнения" section (10–15 lines) stating: merge date, PR number, commit hashes, what was done, what remains out of scope. Like Step 1/2, this edit is made in place on disk but is NEVER staged or committed — it's local-only bookkeeping now, not a shared repo artifact.

Read the full file on GitHub · 49 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. 6d ago First seen · 49 lines · 19 tokens per session scan A 024d75517ed8

Subscribe to this mod's changes

post-merge-sync is a command published in the GitHub repository HelgDemidov/refigure (0 stars, last pushed 4d ago), licensed Apache-2.0. It adds 19 tokens to every session and 854 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-31.