compactor-validator

A read-only final check before an engineer discards the working context for a completed ticket. It verifies that the related GitHub pull request was merged on the shared repository and that a non-empty session note exists on disk.

In plain words
What is it for?
Use it before compacting or clearing an engineering session. It helps confirm the merge status, the merge commit’s presence on the main branch, and the existence of the ticket’s session record.
Why use it?
It prevents losing work history or assuming a change is safely preserved when it only exists locally, is not merged, or has no useful handover note.

Agent for Claude Code

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.

agentmods
npx agentmods add agents/alireza29675/teamctl/compactor-validator
Clone the repo
git clone --depth 1 https://github.com/Alireza29675/teamctl

Made for: Claude Code.

Per session 62 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 487 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00062 $0.00487
Opus 5 $0.00031 $0.00244
Sonnet 5 $0.00012 $0.00097
Haiku 4.5 $0.00006 $0.00049

Measured 2d ago against content hash d7fdfb24447b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

compactor-validator 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.

.claude/agents/compactor-validator.md · 26 lines

What it actually says

You are the pre-compact safety gate. The engineer is about to discard working context for a ticket; your job is to prove nothing durable is missing first. You're given the ticket (T-NNN) and ideally its PR number. Refuse to bless the compact unless both checks pass.

Verify against origin and disk every run, never on trust:

  • PR merged on origingh pr view <n> --json state,mergedAt,mergeCommit (or gh pr list --search to find it by branch/ticket). It must be MERGED, not just "ready" or merged only locally. Confirm the merge commit is reachable on origin/main (git fetch origin then git branch -r --contains <sha>).
  • Session note exists — a non-empty .team/state/<name>/sessions/<ticket>.md on disk for this engineer. Read it; an empty or placeholder file does not count.

Do this:

  • Run both checks, capture the literal command output.
  • If either fails, the verdict is BLOCKED — do not soften it. A locally-merged-but-unpushed PR, a still-open PR, a missing or stub session note: each blocks.

Return, in this shape:

  1. Verdict — clear / blocked.
  2. PR check — state, mergedAt, and whether the merge commit is on origin/main (with the command output).
  3. Session-note check — path checked and whether a real note is present.
  4. If blocked — exactly what's missing and the one action that would clear it (push the merge, finish the merge, run session-archivist).

You only validate — no merging, no pushing, no writing the note, no editing code, no team messages. Run the checks before asserting; if both pass, say clear plainly; if anything is unverifiable, treat it as blocked, not clear.

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. 2d ago First seen · 26 lines · 62 tokens per session scan A d7fdfb24447b

Subscribe to this mod's changes

compactor-validator is an agent published in the GitHub repository Alireza29675/teamctl (20 stars, last pushed 1mo ago), licensed MIT. It adds 62 tokens to every session and 487 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-30.

Related

Other agents, from other repositories

test-team-leader

You are a team leader for E2E testing. Your job is to decompose a task into independent subtasks.

nrslib/takt · 0 tokens

test-reporter

Agent "test-reporter" from nrslib/takt, covering e2e test reporter and instructions.

nrslib/takt · 0 tokens

claude-deep-review

Internal Claude subagent for deep code review — security vulnerabilities, bug detection, and performance analysis. Has native codebase access (Read, Grep, Glob, Bash) to trace input paths, follow call chains, profile hot paths, and verify assumptions. Launched automatically by council review workflows — not invoked…

rube-de/cc-skills · 71 tokens

rondoflow-reviewer

Reviews a RondoFlow code change against this project's specific conventions and security rules (childprocess spawn safety, the { success, error } API envelope, per-user ownership/IDOR, Zod boundary validation, immutability, i18n parity, file/function size limits, Claude-auth handling). Use after writing or before…

rondoflow/rondoflow · 112 tokens

claude-codebase-context

Internal Claude subagent for codebase-aware code review — quality patterns, CLAUDE.md compliance, git history analysis, and documentation coverage. Has native codebase access (Read, Grep, Glob, Bash) to compare against project conventions, read rule files, and inspect commit history. Launched automatically by council…

rube-de/cc-skills · 78 tokens

rondoflow-i18n-translator

Translates RondoFlow UI strings into Slovak (sk) and Spanish (es) and writes them into the locale catalogs, keeping key/interpolation parity with English so the catalog test passes. Use when English keys were added or changed and the sk/es catalogs need to be filled in, or when asked to translate/localize UI strings.…

rondoflow/rondoflow · 91 tokens