Agent skill

State Management

by EmeaAppGbb in EmeaAppGbb/spec2cloud

Read, write, and maintain .spec2cloud/state.json across phases and increments.

MITAuto-check passedFrontend & Design

Install State Management

skills CLI
$ npx skills add EmeaAppGbb/spec2cloud --skill state-management -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install EmeaAppGbb/spec2cloud state-management --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/EmeaAppGbb/spec2cloud.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/state-management .claude/skills/state-management && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
state-management
GitHub stars
100
Token cost
~1.5k tokens
SKILL.md length
597 words
Files
2 (incl. references)
Skills in repo
38
Repo updated
First seen
Licence
MIT

At a glance

Read, write, and maintain .spec2cloud/state.json across phases and increments.

  • Works in 4 steps: Read .spec2cloud/state.json → Parse currentPhase to determine where… → If in increment-delivery, parse… → …
  • Reading project state
  • SKILL.md covers Reading State, Writing State, State File Schema and Increment Object Fields, plus 6 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

State Management is an agent skill from EmeaAppGbb/spec2cloud. Read, write, and maintain .spec2cloud/state.json across phases and increments. Defines the state schema, read/write protocol, and resume re-validation logic. Use when reading project state, updating state after task completion, or resuming from a previous session.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/schema.md`).

It sits in Frontend & Design, covering State management. The licence is MIT.

When your agent uses it

  • Reading project state
  • Updating state after task completion
  • Resuming from a previous session

Example prompts

  • “/state-management”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Read .spec2cloud/state.json
  2. Parse currentPhase to determine where you are (setup, discovery, or increment-delivery)
  3. If in increment-delivery, parse currentIncrement and its steps to determine what's been done and what's next
  4. Parse humanGates to check which approvals have been granted

What it can do on your machine

Read from SKILL.md and the folder at commit 8e76618. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

State Management loads about 1.5k tokens when it runs, and up to ~3.7k if it reads all its reference files. Until then it costs about 70 tokens; SKILL.md has 597 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~70
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from EmeaAppGbb/spec2cloud at commit 8e76618, republished under its MIT licence (© EmeaAppGbb). 597 words, ~1,498 tokens.

Download SKILL.mdSave it as .claude/skills/state-management/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
state-management
description
Read, write, and maintain .spec2cloud/state.json across phases and increments. Defines the state schema, read/write protocol, and resume re-validation logic. Use when reading project state, updating state after task completion, or resuming from a previous session.

State Management

State lives in .spec2cloud/state.json. You read it at the start of every loop iteration and write it at the end.

Reading State

At the start of every loop iteration:

  1. Read .spec2cloud/state.json
  2. Parse currentPhase to determine where you are (setup, discovery, or increment-delivery)
  3. If in increment-delivery, parse currentIncrement and its steps to determine what's been done and what's next
  4. Parse humanGates to check which approvals have been granted

Writing State

At the end of every loop iteration:

  1. Update the relevant section with the result of the task you just executed
  2. Update lastUpdated to the current ISO timestamp
  3. Write the updated state back to .spec2cloud/state.json

State File Schema

See references/schema.md for the full JSON schema example and field descriptions.

Increment Object Fields

FieldTypeDescription
status"pending" | "in-progress" | "done"Overall increment delivery status. "done" only when Step 4 (Verify & Ship) completes.
stepsobjectPer-step status tracking: tests, contracts, implementation, verification.

Step Object Fields

StepKey FieldsDescription
testse2eSpecs, gherkinFiles, cucumberSteps, vitestFilesFiles generated for this increment's test scaffolding.
contractsapiContracts, sharedTypes, infraUpdatedContract artifacts for this increment.
implementationslices (api, web, integration)Per-slice tracking with modifiedFiles, failingTests, lastTestRun, iteration.
verificationregression, deployment, smokeTests, docsFull regression results, deployment URL, smoke test results, docs status.

Slice Dependencies (within implementation)

Contracts → api  (api slice reads contract types)
Contracts → web  (web slice reads contract types)
api + web → integration  (integration requires both slices done)
integration → verification  (verify requires all slices green)

Brownfield State Fields

When operating in brownfield mode, the state includes additional fields for testability tracking and per-feature track assignment.

FieldTypeDescription
brownfield.testability"full" | "partial" | "none"Overall testability verdict after the testability gate.
brownfield.track"A" | "B" | "hybrid"Delivery track: A (testable, green baseline), B (doc-only), or hybrid (mix per feature).
brownfield.testabilityChecklistobjectSix binary checks: canBuild, externalDepsReachable, apiExercisable, uiRenderable, devEnvExists, existingTestsRunnable.
brownfield.featureTracksobjectMap of featureId → "A" | "B". Only present when track is "hybrid".
brownfield.greenBaselineobjectTrack A metrics: per-feature scenarios count, testsPass boolean, lastVerified ISO timestamp.
brownfield.behavioralDocsobjectTrack B metrics: per-feature scenarios count and manualChecklist item count.
Show full SKILL.md (281 more words)Show less

Brownfield State Transitions

TriggerPhaseState Updates
Extraction complete"B1"currentPhase: "B1", extraction output paths recorded in brownfield.extraction
Spec-Enable complete"B2"currentPhase: "B2", brownfield.prdGenerated: true, brownfield.frdCount: N
Testability gate complete"B3"currentPhase: "B3", brownfield.testability, brownfield.track, brownfield.testabilityChecklist recorded
Track A baseline green(still B3)brownfield.greenBaseline.features populated with per-feature test results
Track B docs complete(still B3)brownfield.behavioralDocs.features populated with per-feature scenario/checklist counts
Path selection (human gate)"assessment"brownfield.selectedPaths array recorded (e.g., ["modernize", "security"])
Assessment + planning done"increment-delivery"Increments generated, incrementPlan populated, delivery proceeds track-aware

When track is "hybrid", each increment in Phase 2 inherits its track from featureTracks. Track A increments follow the full test → contract → implement → verify cycle. Track B increments follow a doc-only path (behavioral docs + manual checklists instead of automated green baselines).

On Resume

  1. Read .spec2cloud/state.json
  2. Determine current increment and current step within it
  3. Re-validate by running the appropriate test suite:
    • Tests step: verify test files exist and compile
    • Implementation step: run tests for the current slice, compare to state
    • Verification step: check deployment status
  4. If results match state → continue from where you left off
  5. If results differ → update state to reflect reality, then continue

Mandatory Completion Checklist

The orchestrator MUST verify ALL of the following after every state write:

  • .spec2cloud/state.json is valid JSON (parseable without errors)
  • currentPhase reflects the actual phase the orchestrator is in
  • currentIncrement and increment step match the work just completed
  • lastUpdated timestamp is current
  • No fields are null/undefined that downstream skills depend on (e.g., adrs.nextNumber, incrementPlan)
  • State file is committed alongside the artifacts it describes (not orphaned)

BLOCKING: If state.json is invalid or inconsistent with actual artifacts, the resume skill will reconstruct the wrong position. Fix state before proceeding.

© EmeaAppGbb, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in .github/skills/state-management of EmeaAppGbb/spec2cloud.

  • SKILL.md
  • references/schema.md

Open the folder on GitHubat commit 8e76618

Compare with similar skills

State Management next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

State Management compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
State Management this skillEmeaAppGbb/spec2cloud100—~1.5kAutomated safety check: PassMIT
Svelte Core Best Practicesrilldata/rill2.9k4 repos~1.8kAutomated safety check: PassApache-2.0
Dify Component Writing Guidelanggenius/dify158k—~626Automated safety check: PassCustom licence
React State Managementinvolvex/youtube-music-cli45613 repos~3kAutomated safety check: PassMIT
GPUI Kit Desktop App GuideAprilNEA/OpenLogi23k—~5.5kAutomated safety check: PassApache-2.0
Pierre Theming Librarypierrecomputer/pierre6.2k—~661Automated safety check: PassApache-2.0

Similar skills

  • Rules for writing idiomatic Svelte 5 code: when to reach for runes like state, derived and effect, and how to handle props, attachments and bindings.

    2.9k GitHub starsUsed in 4 repos~1.8k tokens
    Frontend & DesignAuto-check passed
  • Use when implementing or refactoring React/TypeScript components and the task requires decisions about component ownership, feature boundaries, state, data…

    158k GitHub stars~626 tokensUpdated today
    Frontend & DesignAuto-check passed
  • React State Management

    involvex/youtube-music-cli

    Master modern React state management with Redux Toolkit, Zustand, Jotai, and React Query.

    456 GitHub starsUsed in 13 repos~3k tokens
    Frontend & DesignAuto-check passed
  • Guides building Rust desktop apps with the gpui-kit crate, covering component selection, state ownership, theming and overlays, plus normative GPUI coding rules.

    23k GitHub stars~5.5k tokensUpdated 4 days ago
    Frontend & DesignAuto-check passed
  • Pierre Theming Library

    pierrecomputer/pierre

    Explains how to use the @pierre/theming package to list, resolve, select, switch and persist themes, with controller, color and React references.

    6.2k GitHub stars~661 tokensUpdated today
    Frontend & DesignAuto-check passed
  • Frontend Patterns

    kurealnum/dotfiles

    Frontend development patterns for React, Next.js, state management, performance optimization, and UI best practices.

    290 GitHub starsUsed in 19 repos~3.7k tokens
    Frontend & DesignAuto-check passed

More from EmeaAppGbb/spec2cloud

All 38 skills in this repo
  • Azure Deployment

    EmeaAppGbb/spec2cloud

    Provision Azure infrastructure, deploy to Azure Container Apps, and verify via smoke tests.

    100 GitHub stars~1.8k tokensUpdated 5 mo ago
    Auto-check passed
  • Contract Generation

    EmeaAppGbb/spec2cloud

    Generate API contracts, shared TypeScript types, and infrastructure resource definitions from Gherkin scenarios and test files.

    100 GitHub stars~1.6k tokensUpdated 5 mo ago
    Auto-check passed
  • Ddd Modeling

    EmeaAppGbb/spec2cloud

    Create Domain-Driven Design proposals from product specs or brownfield extraction outputs.

    100 GitHub stars~2.4k tokensUpdated 5 mo ago
    Auto-check passed
  • Implementation

    EmeaAppGbb/spec2cloud

    Write application code to make failing tests pass using contract-driven, slice-based architecture.

    100 GitHub stars~2.8k tokensUpdated 5 mo ago
    Auto-check passed
  • Spec Refinement

    EmeaAppGbb/spec2cloud

    Review PRDs and FRDs through product and technical lenses. An agent skill from EmeaAppGbb/spec2cloud.

    100 GitHub stars~2.2k tokensUpdated 5 mo ago
    Auto-check passed
  • Tech Stack Resolution

    EmeaAppGbb/spec2cloud

    Identify, research, and resolve every technology needed by the application.

    100 GitHub stars~1.8k tokensUpdated 5 mo ago
    Auto-check passed

Questions about State Management

What does State Management do?

Read, write, and maintain .spec2cloud/state.json across phases and increments. State Management is an agent skill from EmeaAppGbb/spec2cloud.json across phases and increments.

When should I use State Management?

State Management fits situations like: reading project state; updating state after task completion; resuming from a previous session.

How do I install State Management in Claude Code?

Run `npx skills add EmeaAppGbb/spec2cloud --skill state-management -a claude-code`. Or copy the skill folder (.github/skills/state-management in EmeaAppGbb/spec2cloud) into .claude/skills/state-management in your project. Claude Code loads it when a task matches its description.

How do I install State Management in Codex?

Run `npx skills add EmeaAppGbb/spec2cloud --skill state-management -a codex`. Or copy the skill folder (.github/skills/state-management in EmeaAppGbb/spec2cloud) into .agents/skills/state-management in your project. Codex loads it when a task matches its description.

Can I use State Management in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add EmeaAppGbb/spec2cloud --skill state-management -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/state-management, .gemini/skills/state-management, .github/skills/state-management and .opencode/skills/state-management in your project.

What does State Management need to run?

SKILL.md names no scripts, command-line tools or credentials: State Management is instructions for the agent only.

Does State Management access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is State Management safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does State Management use?

State Management is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does State Management use?

About 1.5k tokens (SKILL.md is roughly 6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.2k tokens, read only when the agent opens those files.

What are the alternatives to State Management?

Skills that share tags, products or a category with State Management: Svelte Core Best Practices (rilldata/rill, 2.9k stars), Dify Component Writing Guide (langgenius/dify, 158k stars), React State Management (involvex/youtube-music-cli, 456 stars) and GPUI Kit Desktop App Guide (AprilNEA/OpenLogi, 23k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains State Management?

EmeaAppGbb (a GitHub organization) maintains it in EmeaAppGbb/spec2cloud, which has 100 GitHub stars. The repository holds 38 skills in this directory. The repository was last updated on April 16, 2026.

Source: EmeaAppGbb/spec2cloud on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.