map-states

map-states is a skill for Claude Code from melodic-software/claude-code-plugins. It costs 78 tokens per session (2,182 once invoked), scanned A, original, MIT.

A state-diagram generator for explicit XState or Stateless transition definitions. A state machine describes named conditions and the permitted changes between them.

In plain words
What is it for?
Use it to map an entity's states and the transitions leaving each state, with each transition tied to a source file.
Why use it?
It turns declared transitions into a diagram without guessing from scattered status assignments. This helps reveal unreachable or dead-end states.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the architecture plugin — 12 skills shipped together

Good fit Use it to map an entity's states and the transitions leaving each state, with each transition tied to a source file.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add melodic-software/claude-code-plugins
Claude Code
/plugin install architecture

Made for: Claude Code.

Or install architecture, the plugin that ships this one along with the rest of its 12 skills.

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 map-states

README.md
[![agentmods](https://agentmods.dev/badge/skills/melodic-software/claude-code-plugins/map-states/github.svg)](https://agentmods.dev/skills/melodic-software/claude-code-plugins/map-states)
Your own site
<a href="https://agentmods.dev/skills/melodic-software/claude-code-plugins/map-states"><img src="https://agentmods.dev/badge/skills/melodic-software/claude-code-plugins/map-states/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.

agentmods 80×15 button for map-states

Your own site · 80×15
<a href="https://agentmods.dev/skills/melodic-software/claude-code-plugins/map-states"><img src="https://agentmods.dev/badge/skills/melodic-software/claude-code-plugins/map-states.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,182 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.00078 $0.02182
Opus 5.5 $0.00031 $0.00873
Sonnet 5.5 $0.00016 $0.00436
Haiku 4.5 $0.00008 $0.00218

Measured 16d ago against content hash 54aa62130a4e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

map-states 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 16d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/collect-states.sh, scripts/collect-states.test.sh, scripts/render-states.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

plugins/architecture/skills/map-states/SKILL.md · 155 lines

How it starts

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

Repository context

The current repository is both the CONSUMER, whose convention home declares where artifacts land, and the DEFAULT SUBJECT, the repository whose tracked source declares the state machine.

Collect with an individual Bash call, one command per call: the project root, git rev-parse --show-toplevel. Treat a failure (not a repository, git unavailable) as an unknown value and carry on; ${CLAUDE_PROJECT_DIR} is the resolver's --root either way. An optional [entity] argument selects one machine when the record holds several.

Purpose

Answer "which states exist, and which transitions leave them" from an explicit transition table. Every transition cites a file. The scripts collect and render. Do not draw a transition the script did not emit. A status assignment scattered through the code is not a transition.

Resolve home

Read ${CLAUDE_PLUGIN_ROOT}/reference/config.md first. This skill writes into architecture_dir. It does not read landscape_dialect and it does not add a dialect key. A state diagram is not a C4 diagram type.

Run bash "${CLAUDE_PLUGIN_ROOT}/lib/resolve-convention-home.sh" --root "${CLAUDE_PROJECT_DIR}" and follow the exit code. Never parse the root instruction file yourself. Exit 0 means read <home>/architecture/README.md for architecture_dir. Exit 1, 2, and 3 mean there is no declared home.

Per key, in order: --out <dir> wins for this run alone, then a declared architecture_dir, then one question. architecture_dir has NO default. An undeclared and unconfirmed home, including every non-interactive run, STOPS and points at /architecture:setup. Do not invent a directory.

This skill never writes the consumer's root instruction file or its topic doc.

Build the record

"${CLAUDE_SKILL_DIR}/scripts/collect-states.sh" \
  --repo "<subject-repo>" --generated-on "<YYYY-MM-DD>" \
  --out "<architecture_dir>/states.json"

The record is schema_version 1 in the one-object-per-line layout the script writes. The shipped libraries are XState createMachine and Stateless Configure / Permit / PermitIf / PermitReentry. Confidence is high when every transition came from one of those tables. It is medium when a table is drawn and an ad hoc .Status = assignment elsewhere in the tracked source bypasses it (the record's reason says ad-hoc-status-assignments-beside-table): the diagram omits those transitions. Nothing drawn is refused.

Read the full file on GitHub · 155 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 16d ago Changed · +24 lines 54aa62130a4e
  2. 17d ago First seen · 131 lines · 78 tokens per session scan A c01150caf588

Subscribe to this mod's changes

map-states is a skill published in the GitHub repository melodic-software/claude-code-plugins (25 stars, last pushed today), licensed MIT. It adds 78 tokens to every session and 2,182 once invoked, about $0.0003 per session on Opus 5.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-29.

Related

Other skills, from other repositories

parallel-orchestrator

Manage parallel Claude Code workstreams using git worktrees. Use when: splitting large tasks across multiple workers, coordinating parallel development, monitoring worker progress, integrating completed work, analyzing work item documents (code reviews, issue lists). Triggers: parallel, orchestrator, worktrees…

jimmc414/claude-code-plugin-marketplace · 78 tokens

parallel-worker

Execute focused implementation tasks in a parallel workflow. Use when: working on assigned files in a worktree, making checkpoint commits, signaling dependencies or blockers, completing orchestrator-assigned tasks. Triggers: worker, checkpoint, worktree, assigned scope, commit prefix, parallel task.

jimmc414/claude-code-plugin-marketplace · 59 tokens

optimize-local-search

For NP-hard optimization: TSP, scheduling, assignment problems. Uses greedy construction + local improvement (2-opt, hill climbing).

jimmc414/claude-code-plugin-marketplace · 31 tokens

pass-function-as-arg

For generic algorithms: strategy pattern, callbacks, configurable behavior. Pass functions as parameters to customize algorithm behavior.

jimmc414/claude-code-plugin-marketplace · 27 tokens

solve-constraint-puzzle

For constraint satisfaction: Sudoku, scheduling, N-queens, logic puzzles, SAT-like problems, assignment problems. Uses propagate-then-search pattern.

jimmc414/claude-code-plugin-marketplace · 36 tokens

test-with-examples

For example-driven development: test cases as specifications, input/output pairs, documentation through examples.

jimmc414/claude-code-plugin-marketplace · 23 tokens