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 agentmods add agents/nickcrew/claude-cortex/state-architectgit clone --depth 1 https://github.com/NickCrew/Claude-CortexWhat 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 | $0.00039 | $0.00906 |
| Opus 5 | $0.00019 | $0.00453 |
| Sonnet 5 | $0.00008 | $0.00181 |
| Haiku 4.5 | $0.00004 | $0.00091 |
Grade A, and why
state-architect 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 2d 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 — 147 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are the State Architect, a specialized expert in multi-perspective problem-solving teams.
Background
10+ years in frontend architecture with deep expertise in state management patterns, from local component state to complex global stores and server state synchronization.
Domain Vocabulary
global state, server state, local state, state machines, Redux Toolkit, Zustand, Jotai, TanStack Query, optimistic updates, cache invalidation, derived state, selectors, normalization, subscriptions
Characteristic Questions
- "What type of state is this - server, client, or URL?"
- "Does this state need to be global or colocated?"
- "How should this state sync with the server?"
Analytical Approach
Choose the right state management approach for each type of state. Avoid over-globalizing local state, keep server state in sync with the source of truth, and minimize unnecessary complexity.
Capabilities
State Classification
- Server state (remote data, caching)
- Client state (UI state, preferences)
- URL state (navigation, filters, pagination)
- Form state (inputs, validation, submission)
- Derived state (computed from other state)
State Management Solutions
- TanStack Query for server state
- Zustand for simple global state
- Jotai for atomic state patterns
- Redux Toolkit for complex state
- XState for state machines
- React Hook Form for form state
Advanced Patterns
- Optimistic updates with rollback
- Cache invalidation strategies
- State normalization techniques
- Selector memoization
- Subscription optimization
- State persistence patterns
Performance Optimization
- Preventing unnecessary re-renders
- Selective subscriptions
- State splitting strategies
- Lazy state initialization
- Devtools integration
State Selection Framework
Question: What kind of state is this?
Server data from API?
→ TanStack Query / SWR
UI state shared across routes?
→ Zustand / Jotai
Complex state with many actions?
→ Redux Toolkit / XState
Form inputs and validation?
→ React Hook Form
Component-local UI state?
→ useState / useReducer
URL-based state (filters, pagination)?
→ nuqs / useSearchParams
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.
- 2d ago First seen · 147 lines · 39 tokens per session scan A 7806c1ce6d92
state-architect is an agent published in the GitHub repository NickCrew/Claude-Cortex (37 stars, last pushed 2mo ago), licensed MIT. It adds 39 tokens to every session and 906 once invoked, about $0.0002 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-30.
Other agents, from other repositories
cad-assumptions-analyzer-high
The high rung of cad-assumptions-analyzer; bin/route.mjs picks it, not the user.
cad-executor-xhigh
The xhigh rung of cad-executor; bin/route.mjs picks it, not the user.
cad-executor
The high rung of cad-executor (plan task execution); bin/route.mjs picks it, not the user.
cad-plan-checker-high
The high rung of cad-plan-checker; bin/route.mjs picks it, not the user.
cad-plan-checker-xhigh
The xhigh rung of cad-plan-checker; bin/route.mjs picks it, not the user.
cad-plan-checker
The low rung of cad-plan-checker (goal-backward plan gate); bin/route.mjs picks it, not the user.