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.
git clone --depth 1 https://github.com/closedloop-ai/claude-pluginsWrote 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.
[](https://agentmods.dev/commands/closedloop-ai/claude-plugins/goal-stats)<a href="https://agentmods.dev/commands/closedloop-ai/claude-plugins/goal-stats"><img src="https://agentmods.dev/badge/commands/closedloop-ai/claude-plugins/goal-stats/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.
<a href="https://agentmods.dev/commands/closedloop-ai/claude-plugins/goal-stats"><img src="https://agentmods.dev/badge/commands/closedloop-ai/claude-plugins/goal-stats.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00017 | $0.00588 |
| Opus 5 | $0.00009 | $0.00294 |
| Sonnet 5 | $0.00003 | $0.00118 |
| Haiku 4.5 | $0.00002 | $0.00059 |
Grade A, and why
goal-stats 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 yesterday.
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.
How it starts
The opening of the file, as written. The whole thing — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Goal Stats Command
Analyzes goal performance by examining runs.log and outcomes.log to compute statistics.
Metrics Computed
- Pass Rate: Percentage of runs that achieved the active goal
- Average Score: Mean goal score across all evaluated runs
- Top Contributing Patterns: Patterns with highest correlation to success
- Underperforming Patterns: Patterns with high apply rate but low success rate
- Improvement Trends: Score changes over time
Process
- Read
runs.logfor run outcomes. Rows are pipe-delimited:run_id|timestamp|goal|iteration|status[|command|last_session_id]. Treatcommandandlast_session_idas optional append-only fields so legacy rows remain valid. - Read
outcomes.logfor pattern applications and goal results - Correlate pattern usage with goal success/failure
- Calculate aggregate statistics
- Identify patterns to review or promote
Output Format
Goal Performance Report: {goal_name}
=====================================
Summary:
Total Runs: 25
Pass Rate: 72% (18/25)
Average Score: 0.68
Top Contributing Patterns:
1. "auth_flow" - 90% success when applied (10 applications)
2. "null_check" - 85% success when applied (7 applications)
3. "api_retry" - 80% success when applied (5 applications)
Patterns to Review [REVIEW]:
1. "deprecated_api" - 30% success (flagged for review)
2. "old_pattern" - 25% success (consider removal)
Trends (last 10 runs):
Score: 0.55 → 0.68 → 0.75 (+36% improvement)
Pass Rate: 60% → 72% → 80% (+33% improvement)
Recommendations:
- Pattern "auth_flow" consistently helps - consider promoting to HIGH confidence
- Pattern "deprecated_api" hurting performance - review or remove
Usage
# View goal stats (invoked via ClosedLoop orchestrator)
# Requires runs.log and outcomes.log to exist
Dependencies
runs.log: Contains run metadata with goal outcomes and optional command/session correlationoutcomes.log: Contains pattern applications with success trackinggoal.yaml: Defines active goal for filtering
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.
- yesterday First seen · 75 lines · 17 tokens per session scan A 696df3ef3fc0
goal-stats is a command published in the GitHub repository closedloop-ai/claude-plugins (103 stars, last pushed 2d ago), licensed Apache-2.0. It adds 17 tokens to every session and 588 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-09-07.
Other commands, from other repositories
aside
Answer a quick side question without interrupting or losing context from the current task. Resume work automatically after answering.
cpp-test
Enforce TDD workflow for C++. Write GoogleTest tests first, then implement. Verify coverage with gcov/lcov.
flutter-build
Fix Dart analyzer errors and Flutter build failures incrementally. Invokes the dart-build-resolver agent for minimal, surgical fixes.
cpp-review
Comprehensive C++ code review for memory safety, modern C++ idioms, concurrency, and security. Invokes the cpp-reviewer agent.
epic-claim
Claim an epic issue, stamp coordination state, and sync local ownership.
epic-review
Mark epic review requested, approved, or changes requested.