analyze

analyze is a skill for Claude Code, Codex from svyatov/handrail. It costs 68 tokens per session (1,613 once invoked), scanned A, original, MIT.

A session-review helper that examines an agent conversation and suggests handrail rules, where rules are written instructions that can block or warn about actions. It uses evidence from the session and waits for approval before writing rules.

In plain words
What is it for?
Use it to review a session, identify behavior worth preventing, and approve proposed rules one at a time.
Why use it?
It helps turn mistakes or corrections from one conversation into guardrails for future work without changing existing rules.

Skill for Claude CodeCodex

Written for Claude Code and Codex: SessionStart hook event, but also reads ~/.codex or $CODEX_HOME. Also seen: mentions Claude Code; mentions Codex.

Part of the handrail plugin — 2 skills, 1 hook shipped together

Good fit Use it to review a session, identify behavior worth preventing, and approve proposed rules one at a time.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/svyatov/handrail/analyze
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.

Any agent
npx skills add svyatov/handrail --skill analyze
Clone the repo
git clone --depth 1 https://github.com/svyatov/handrail

Made for: Claude Code, Codex.

Or install handrail, the plugin that ships this one along with the rest of its 2 skills, 1 hook.

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 analyze

README.md
[![agentmods](https://agentmods.dev/badge/skills/svyatov/handrail/analyze.svg)](https://agentmods.dev/skills/svyatov/handrail/analyze)
Your own site
<a href="https://agentmods.dev/skills/svyatov/handrail/analyze"><img src="https://agentmods.dev/badge/skills/svyatov/handrail/analyze.svg" alt="Measured on agentmods" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,613 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.00068 $0.01613
Opus 5 $0.00034 $0.00807
Sonnet 5 $0.00014 $0.00323
Haiku 4.5 $0.00007 $0.00161

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

Security

Grade A, and why

analyze 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 7d 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.

skills/analyze/SKILL.md · 144 lines

How it starts

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

Analyze this session for guardrails

You are the Analyzer. You read this session, propose new Rules for behaviors worth preventing, and write nothing without approval. You never propose edits to existing rules: tuning a rule that fired is out of scope.

1. Resolve the binary

HANDRAIL=$(command -v handrail || echo "${XDG_DATA_HOME:-$HOME/.local/share}/handrail/bin/handrail")

If it does not exist, the SessionStart bootstrap has not run yet: tell the user to start a new session, or to install with brew install svyatov/tap/handrail.

2. Find the session transcript

Claude Code:

find "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/projects" -name "$CLAUDE_CODE_SESSION_ID.jsonl"

Codex CLI:

find "${CODEX_HOME:-$HOME/.codex}/sessions" -name "*-$CODEX_THREAD_ID.jsonl"

Both harnesses export the id to the shell, so an empty result means the file is not written yet, not that you have the wrong path. If the id variable itself is unset, say so and take the no-transcript route below; never fall back to the newest transcript on disk, which is some other session's.

The transcript is JSONL, one JSON record per line, often megabytes. Do not read it whole. Your own context is the primary source of signals; grep the file for distinctive strings to quote evidence verbatim, and to recover turns that compaction dropped out of your context.

The tail lags. Claude Code writes the transcript asynchronously, so the last few turns, including the request that started this analysis, may be missing from the file. Never conclude a behavior did not happen because the file does not show it. Your context wins over the file for recent turns; the file wins for old ones.

No transcript at all (harness without transcript access, or the file is missing): say so, and offer the fallback: describe the incident in words to /handrail:add, which writes a rule from a plain-language description. Do not guess at a transcript path.

3. Read what is already covered

Read the full file on GitHub · 144 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. 7d ago First seen · 144 lines · 68 tokens per session scan A c229907f8800

Subscribe to this mod's changes

analyze is a skill published in the GitHub repository svyatov/handrail (2 stars, last pushed 4d ago), licensed MIT. It adds 68 tokens to every session and 1,613 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-31.

Related

Other skills, from other repositories

gograph

Go repository intelligence for Claude Code. Use when reading, navigating, editing, reviewing, or refactoring a Go codebase. Exposes 64 query, analysis, and workflow capabilities through the local gograph MCP server, including bounded first-call exploration, AST-aware call graphs, blast-radius analysis, impact, and…

ozgurcd/gograph · 69 tokens

notion-cli

Work with Notion from the terminal using the notion CLI. Use when the user needs to read, create, update, query, or manage Notion pages, databases, blocks, comments, users, or files programmatically. Covers the entire Notion API with 50+ commands. Triggers: Notion workspace automation, database queries, page creation…

4ier/notion-cli · 109 tokens

lx

Codebase exploration tool that reads many files or whole directories in a single call, with per-file headers, glob include/exclude filters, function/type skeleton extraction (signatures only, no bodies), and head/tail line slicing.

rasros/lx · 48 tokens

codex-hud

Show Codex workspace context with local config, git state, hooks, and project hints. Standalone mode can show an expanded snapshot; patched Codex TUI footer mode is single-line. Use when the user says "codex-hud", "show Codex HUD", "status HUD", "workspace snapshot", or asks for richer Codex context.

brandonwie/codex-hud · 76 tokens

code-review

Systematic code review checklist.

OpenScribbler/syllago · 5 tokens

rmine

Reference for the rmine CLI (Redmine client) — issue, time-tracking, and project commands, filter/name-matching semantics, and profile handling. Use when the user asks about Redmine issues, tickets, time logging, or projects.

mehboobali98/rmine · 53 tokens