explain-state

explain-state is a skill for Claude Code, Codex from thettwe/nyann. It costs 166 tokens per session (884 once invoked), scanned A, original, MIT.

A read-only summary of what nyann detects in a repository, including its programming stack, active profile, branching strategy, hooks, CLAUDE.md, and recent commits.

In plain words
What is it for?
It helps answer questions about the active profile, detected language and tools, branch rules, hook status, and recent repository state.
Why use it?
It gives you one view of the current setup instead of requiring you to inspect each configuration source separately.

Skill for Claude CodeCodex

Part of the nyann plugin — 41 skills, 41 commands, 3 hooks shipped together

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.

agentmods
npx agentmods add skills/thettwe/nyann/explain-state
Any agent
npx skills add thettwe/nyann --skill explain-state
Clone the repo
git clone --depth 1 https://github.com/thettwe/nyann

Made for: Claude Code, Codex.

Or install nyann, the plugin that ships this one along with the rest of its 41 skills, 41 commands, 3 hooks.

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 explain-state

README.md
[![agentmods](https://agentmods.dev/badge/skills/thettwe/nyann/explain-state.svg)](https://agentmods.dev/skills/thettwe/nyann/explain-state)
Your own site
<a href="https://agentmods.dev/skills/thettwe/nyann/explain-state"><img src="https://agentmods.dev/badge/skills/thettwe/nyann/explain-state.svg" alt="Measured on agentmods" height="20"></a>
Per session 166 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 884 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 $0.00166 $0.00884
Opus 5 $0.00083 $0.00442
Sonnet 5 $0.00033 $0.00177
Haiku 4.5 $0.00017 $0.00088

Measured 5d ago against content hash 007af9f6e1a5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

explain-state 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 5d 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/explain-state/SKILL.md · 85 lines

How it starts

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

explain-state

Read-only. Never mutates. Wraps bin/explain-state.sh.

1. Invoke

bin/explain-state.sh --target <cwd> [--json] [--profile <name>]
  • No args → human-readable table, easy to read back to the user.
  • --json → machine-readable JSON when the user wants to pipe it or you need structured fields for a follow-up operation.
  • --profile <name> → override profile inference when the user names one explicitly.

2. Read the output aloud

The JSON has six blocks. When the user asks a general "what's the state", summarize the highlights rather than dumping the whole structure:

  • stack → "Detected <primary_language>" + framework + package manager. Call out confidence < 0.5 as "weak detection — might be worth confirming".
  • profile → "Active profile: <name> (source: <starter|user| team|unknown>)". When source is unknown, say "couldn't infer the profile; CLAUDE.md doesn't reference one".
  • branching → "Strategy: <strategy>; base branches: <list>". If null, profile isn't resolved.
  • hooks → "Husky: <bool> / pre-commit.com: <bool> / nyann core hooks: <bool>". These are presence signals only — they tell you whether something's wired, not whether it's healthy. For health, route to doctor.
  • claude_md → "CLAUDE.md present, <bytes> bytes, router markers <bool>". Mention the 3 KB soft / 8 KB hard budget if bytes > 3072.
  • recent_commits → Mention the count; read back the 1-2 most recent subjects.

3. Follow-up routing

The whole point of explain-state is to help the user decide what to do next. Offer one or two next steps based on what's present:

  • Stack but no profile → suggest bootstrap-project with a matching profile name.
  • Profile but no hooks wired → suggest re-running /nyann:retrofit to install the hook bundle.
  • CLAUDE.md missing router markers → note it can be regenerated via /nyann:retrofit.
  • Everything present and clean → "Looks set up. Want a deeper audit? Run doctor for drift checks."

Read the full file on GitHub · 85 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. 5d ago First seen · 85 lines · 166 tokens per session scan A 007af9f6e1a5

Subscribe to this mod's changes

explain-state is a skill published in the GitHub repository thettwe/nyann (6 stars, last pushed 6d ago), licensed MIT. It adds 166 tokens to every session and 884 once invoked, about $0.0008 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.