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.
npx skills add conorluddy/xclaude-plugin --skill state-managementgit clone --depth 1 https://github.com/conorluddy/xclaude-pluginWrote 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.
[](https://agentmods.dev/skills/conorluddy/xclaude-plugin/state-management)<a href="https://agentmods.dev/skills/conorluddy/xclaude-plugin/state-management"><img src="https://agentmods.dev/badge/skills/conorluddy/xclaude-plugin/state-management/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.
<a href="https://agentmods.dev/skills/conorluddy/xclaude-plugin/state-management"><img src="https://agentmods.dev/badge/skills/conorluddy/xclaude-plugin/state-management.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00038 | $0.04106 |
| Opus 5.5 | $0.00015 | $0.01642 |
| Sonnet 5.5 | $0.00008 | $0.00821 |
| Haiku 4.5 | $0.00004 | $0.00411 |
Grade A, and why
state-management 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 732 lines — stays where its author put it; the contents beside it link to each section on GitHub.
State Management Skill
Optimizing token efficiency and state management in xc-plugin
Overview
The xc-plugin implements sophisticated state management through caching, progressive disclosure, and configuration management. This Skill teaches how to leverage these patterns to minimize token usage, improve performance, and maintain clean state across operations.
Key Benefits:
- 85-90% token reduction through progressive disclosure
- Cache-friendly operations avoid redundant work
- Deterministic state ensures reliable test results
- Configuration consistency across development workflows
When to Use This Skill
Use this Skill when you need to:
-
Optimize Token Usage
- Working with large device lists or build logs
- Reducing context window consumption
- Implementing efficient query patterns
-
Manage Cache State
- Understanding when responses are cached
- Invalidating stale cache entries
- Querying cached data efficiently
-
Handle Configuration
- Setting up consistent build environments
- Managing simulator preferences
- Configuring test execution parameters
-
Design Efficient Workflows
- Implementing progressive disclosure patterns
- Avoiding expensive repeated operations
- Building cache-aware automation
Key Concepts
Progressive Disclosure Pattern
Principle: Show essentials first, provide details on-demand.
Instead of returning massive datasets that consume tokens, xc-plugin returns:
- Summary - Key metrics and booted devices (~100 tokens)
- cache_id - Reference to full dataset
- Follow-up query - Retrieve complete details only if needed
Token Efficiency:
Traditional approach: 2000 tokens (full device list)
Progressive disclosure: 100 tokens (summary) + optional 2000 tokens (details)
Average savings: 95% (most queries don't need full details)
Cache Architecture
The plugin uses deterministic caching for expensive operations:
Cache Key Generation:
- SHA-256 hash of operation + parameters
- First 16 characters used as
cache_id - Deterministic: Same input → Same cache_id
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.
- 1mo ago First seen · 732 lines · 38 tokens per session scan A 202a907b49a3
state-management is a skill published in the GitHub repository conorluddy/xclaude-plugin (186 stars, last pushed 4d ago), licensed MIT. It adds 38 tokens to every session and 4,106 once invoked, about $0.0002 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-08-30.
Other skills, from other repositories
session-recovery
Seamless continuation across sessions and IDEs — on session start, read .toh/memory/ and greet the user with where the last session left off so nothing needs re-explaining. Handles first run (no memory yet), mid-task resume, and returns after days or weeks. Use at the start of every new session or when the user says…
memory-system
Tiered, low-token project memory protocol for .toh/memory/ — 7 files across 3 tiers (Tier 1 active.md + summary.md always read, 800 tokens; Tier 2 architecture/components for build work and changelog for debug work; Tier 3 decisions/agents-log only on demand). Auto-saves after task completion with zero user effort…
session-recap
Document Claude Code sessions by extracting knowledge into cross-referenced documentation. Triggers on "recap the session", "summarize the work", or after significant code changes.
knowledge-bank-lookup
Delegates knowledge bank lookups to Explore subagents with reflections-first strategy that learns from past mistakes. Checks /reflections/ directory before documentation to extract documented failures to avoid and proven approaches to apply. Automatically triggers when user mentions services ([project-a], [project-b]…
kb-ingest
Ingest external sources into the knowledge bank through interactive study or quick filing. Two modes — Quick (summarize → file) and Study (theme-by-theme deep dive with online research and personal notes → multi-layer KB output → optional blog/slack synthesis). Triggers on "ingest this", "study this article", "add to…
session-manager
Set the current session's name, project, tags, or summary on its session note. Use when the user names, tags, or summarizes this session, sets its project, or mentions in passing what this session has been about.