goal-check

goal-check is a command for Claude Code from naimkatiman/continuous-improvement. It costs 42 tokens per session (571 once invoked), scanned A, original, MIT.

A command that compares recent tool activity with the goal written in task_plan.md, a project task-plan file, and reports how closely the work matches.

In plain words
What is it for?
Use it during a coding session to measure goal drift, identify off-goal tool calls, and review the keywords and plan source used for the check.
Why use it?
It helps detect when an agent or developer has started spending time on work unrelated to the stated objective.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md). Also seen: reads .claude/ paths.

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /home/me/repo/task_plan.md.

Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

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 goal-check

README.md
[![agentmods](https://agentmods.dev/badge/commands/naimkatiman/continuous-improvement/goal-check.svg)](https://agentmods.dev/commands/naimkatiman/continuous-improvement/goal-check)
Your own site
<a href="https://agentmods.dev/commands/naimkatiman/continuous-improvement/goal-check"><img src="https://agentmods.dev/badge/commands/naimkatiman/continuous-improvement/goal-check.svg" alt="Measured on agentmods" height="20"></a>
Per session 42 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 571 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.1 $0.00042 $0.00571
Opus 5 $0.00021 $0.00285
Sonnet 5 $0.00008 $0.00114
Haiku 4.5 $0.00004 $0.00057

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

Security

Grade A, and why

goal-check 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.

commands/goal-check.md · 54 lines

How it starts

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

/goal-check — Goal Drift Check

Score this session's recent tool activity against the stated goal and report whether the work is still ON GOAL or has DRIFTed.

What it does

Reads the ## Goal section of task_plan.md (plus optional ## Goal Keywords and ## Goal Scope sections), scores the most recent observations from ~/.claude/instincts/<project-hash>/observations.jsonl, and reports a drift score with the top off-goal tool calls. Backed by the ci_goal_check MCP tool (expert mode) and the goal-monitor skill.

How to invoke

ci_goal_check                       # last 30 observations vs task_plan.md
ci_goal_check limit=50              # widen the observation window
ci_goal_check goal_file=docs/x.md   # score against a specific plan file

Goal source resolution order: task_plan.md in the project root, then ~/.claude/instincts/<project-hash>/goal.md, then an explicit goal_file.

Output shape

## Goal Check

**Goal source:** /home/me/repo/task_plan.md

**Status:** DRIFT
**Score:** 12% (1/8 matched, threshold 30%)
**Reason:** Only 1/8 recent observations relate to the goal (threshold 0.3).
**Goal keywords:** oauth, jwt, login, session

**Top off-goal activity (most recent 5):**
- [2026-05-28T12:01:00Z] Edit — src/marketing/landing.ts
- ...

_Drift detected. Either steer back to the goal, or update the `## Goal` section in your plan if the goal has legitimately changed._

Acting on the result

  • ON GOAL — the plan and the work agree; proceed.
  • DRIFT — steer back to the goal, or update ## Goal if it has legitimately changed. Keeping the plan and the work in disagreement is the Law 2 violation this command catches.
  • NO DATA — the observation window is still filling; keep working.

Pairs with

  • goal-monitor skill — the discipline this command runs.
  • continuous-improvement (core SKILL.md, Law 2 — Plan Is Sacred).
  • planning-with-files — creates the task_plan.md whose ## Goal section this command reads.

Read the full file on GitHub · 54 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 · 54 lines · 42 tokens per session scan A c20c1cc3c7c6

Subscribe to this mod's changes

goal-check is a command published in the GitHub repository naimkatiman/continuous-improvement (7 stars, last pushed 11d ago), licensed MIT. It adds 42 tokens to every session and 571 once invoked, about $0.0002 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.