clare: Command for Claude Code

.claude/commands/clare2-capture.md

clare2-capture is a command for Claude Code from jketreno/clare. It costs 0 tokens per session (552 once invoked), scanned A, original, MIT.

A command that starts a dated JSONL file for recording a CLARE₂ coding session and connects it to the project's CI verification script.

In plain words
What is it for?
Use it to start, stop, or check the status of session capture before running verification checks.
Why use it?
It keeps structured records of CI results in one session file, so later analysis can use what happened during the session.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

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

Reuse

Borrowing it

Nothing to install: this file belongs to jketreno/clare. 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/jketreno/clare/main/.claude/commands/clare2-capture.md
Clone the repo
git clone --depth 1 https://github.com/jketreno/clare

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 clare2-capture

README.md
[![agentmods](https://agentmods.dev/badge/commands/jketreno/clare/clare2-capture.svg)](https://agentmods.dev/commands/jketreno/clare/clare2-capture)
Your own site
<a href="https://agentmods.dev/commands/jketreno/clare/clare2-capture"><img src="https://agentmods.dev/badge/commands/jketreno/clare/clare2-capture.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 552 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.00000 $0.00552
Opus 5 $0.00000 $0.00276
Sonnet 5 $0.00000 $0.00110
Haiku 4.5 $0.00000 $0.00055

Measured 8d ago against content hash 25675a12d77d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

clare2-capture 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 8d 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/clare2-capture.md · 67 lines

How it starts

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

/project:clare2-capture — Start or stop a CLARE₂ session capture

Initializes a new JSONL session file in corpus/sessions/YYYY/MM/DD/ and sets CLARE2_SESSION_FILE in the environment. Once set, verify-ci.sh automatically appends structured CI event records to this file after each run.

Usage

/project:clare2-capture start    # Begin capturing this session
/project:clare2-capture stop     # End the session (optional — file is already written)
/project:clare2-capture status   # Show the current session file path

Instructions

Parse the argument passed as $ARGUMENTS:

start (or no argument)

Run the session initializer and activate capture:

AI_VLLM_ROOT="${CLARE2_ROOT:-../ai-vllm}"
eval "$("${AI_VLLM_ROOT}/clare2/scripts/clare2-session-start.sh")"
echo "CLARE₂ session capture started."
echo "Session file: $CLARE2_SESSION_FILE"
echo "Session ID:   $CLARE2_SESSION_ID"
echo ""
echo "verify-ci.sh will now emit structured CI event records to this file."
echo "Run /project:distill at any time to distill today's sessions on demand."

Report:

  • The session file path
  • The session ID (UUID)
  • A reminder that verify-ci.sh is now wired up

stop

echo "Session file: ${CLARE2_SESSION_FILE:-'(no active session)'}"
unset CLARE2_SESSION_FILE
unset CLARE2_SESSION_ID
echo "CLARE₂ session capture stopped. CI events will no longer be recorded."

status

if [[ -n "${CLARE2_SESSION_FILE:-}" ]]; then
  LINE_COUNT=$(wc -l < "$CLARE2_SESSION_FILE" 2>/dev/null || echo 0)
  echo "Active session: $CLARE2_SESSION_FILE"
  echo "Session ID:     ${CLARE2_SESSION_ID:-unknown}"
  echo "Records so far: $LINE_COUNT"
else
  echo "No active CLARE₂ session. Run /project:clare2-capture start to begin."
fi

Notes

  • The JSONL file is append-only. Stopping a session does not delete or truncate it.
  • Raw session files are excluded from git (see corpus/.gitignore).
  • The nightly distillation cron at 22:00 UTC processes today's sessions automatically. Use /project:distill for an on-demand run.

Read the full file on GitHub · 67 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. 8d ago First seen · 67 lines · 0 tokens per session scan A 25675a12d77d

Subscribe to this mod's changes

clare2-capture is a command published in the GitHub repository jketreno/clare (5 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 552 tokens. 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.