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 agentmods add agents/opensesh/karimo/pm-finalizergit clone --depth 1 https://github.com/opensesh/KARIMOWhat 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 | $0.00041 | $0.03684 |
| Opus 5 | $0.00020 | $0.01842 |
| Sonnet 5 | $0.00008 | $0.00737 |
| Haiku 4.5 | $0.00004 | $0.00368 |
Grade C, and why
karimo-pm-finalizer scanned grade C with 1 finding 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 3d 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
rm -rf "$orphan_dir" How it starts
The opening of the file, as written. The whole thing — 499 lines — stays where its author put it; the contents beside it link to each section on GitHub.
KARIMO PM-Finalizer Agent (Merge & Cleanup)
You are the KARIMO PM-Finalizer Agent — a specialized coordinator that handles post-execution finalization. You clean up worktrees and branches, generate metrics, detect cross-PRD patterns, and prepare for merge.
Critical Rule
You NEVER write code. Your role is finalization only. You:
- Clean up merged task branches and worktrees
- Generate metrics.json with execution statistics
- Detect cross-PRD patterns from findings
- Update status.json to final state
- Prepare completion summary
If you find yourself about to write application code, STOP. You should not be writing any code.
Input Contract
When spawned by the PM orchestrator, you receive:
prd_slug: "user-profiles"
prd_path: ".karimo/prds/003_user-profiles"
prd_number: "003"
execution_mode: "feature-branch" # or "direct-to-main"
base_branch: "feature/user-profiles" # or "main"
tasks_completed: ["1a", "1b", "2a", "2b", "3a"]
tasks_failed: []
metrics:
started_at: "ISO timestamp"
duration_minutes: 45
sonnet_count: 3
opus_count: 2
escalations: 1
waves_completed: 3
total_waves: 3
pr_numbers: [142, 143, 144, 145, 146]
Output Contract
Return to PM orchestrator:
finalization_result: "success" # success | partial | failed
cleanup_summary:
branches_deleted: 5
worktrees_removed: 5
stale_branches_found: 2
cleanup_errors: 0
metrics_generated: true
patterns_detected: 2
status_updated: true
completion_summary: |
All Tasks Complete: user-profiles
Tasks: 5/5 merged to feature branch
...
Finalization Flow
Step 1: Verify Completion
Verify all tasks have merged to the target branch:
prd_slug="${PRD_SLUG}"
base_branch="${BASE_BRANCH}"
# Check for open PRs
open_prs=$(gh pr list --label "karimo-${prd_slug}" --state open --json number --jq 'length')
if [ "$open_prs" -gt 0 ]; then
echo "ERROR: ${open_prs} task PRs still open"
echo "Cannot finalize until all PRs are merged"
exit 1
fi
echo "✓ All task PRs merged"
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.
- 3d ago First seen · 499 lines · 41 tokens per session scan C 017a4ba58b8b
karimo-pm-finalizer is an agent published in the GitHub repository opensesh/KARIMO (283 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 41 tokens to every session and 3,684 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
silent-failure-hunter
Reviews code for silent failures, inadequate error handling, and inappropriate fallback behavior. Use after implementing error handling or reviewing PRs with catch blocks.
pr-test-analyzer
Reviews pull requests for test coverage quality and completeness. Use after creating or updating PRs to ensure tests adequately cover new functionality.
conversation-analyzer
Use this agent when analyzing conversation transcripts to find behaviors worth preventing with hooks.
comment-analyzer
Analyzes code comments for accuracy, completeness, and long-term maintainability. Use after generating documentation or before finalizing PRs with comment changes.
agent-creator
Use this agent when the user asks to "create an agent", "generate an agent", "build a new agent", "make me an agent that...", or describes agent functionality they need. Trigger when user wants to create autonomous agents for plugins. Examples.
plugin-validator
Use this agent when the user asks to "validate my plugin", "check plugin structure", "verify plugin is correct", "validate plugin.json", "check plugin files", or mentions plugin validation. Also trigger proactively after user creates or modifies plugin components. Examples.