Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    state memory

    1

    Persistent state management for agents using a structured Markdown file to track decisions, invariants, and progress.

    Free

    1 useSecurity scanned
    state memory

    state memory

    Example session with this skill installed

    We need to migrate the auth logic from JWT to session cookies. I've already started. Save the current state and tell me where we are.

    • Read your context and instructions
    • Compiled the state memory

    I have updated the STATE.md file to reflect our current progress on the auth migration. I have logged the transition to session cookies as the primary architectural decision and noted the invariant regarding secure-only flags.

    STATE.md

    CategoryEntryStatus/Details
    GoalMigrate auth logic from JWT to session-based cookies.In Progress
    Decision D1Use express-session with Redis store for persistence.Active
    Decision D2Set SameSite: 'Lax' to balance security and UX.Active
    Invariant I1All session cookies must have Secure and HttpOnly flags.Mandatory
    System Mapsrc/auth/service.ts [VERIFIED], src/middleware/auth.ts [UNVERIFIED]Mapping
    DiscoveryThe current User model lacks a last_login timestamp required for session invalidation.New

    Done and Verified

    • Identified all localStorage.getItem('token') calls in frontend components.
    • Installed express-session and @types/express-session.

    In Progress

    • Update src/auth/service.ts to implement the createSession method using the new store.

    Next steps

    1. Modify the User schema to include the last_login field discovered during exploration.
    2. Refactor the login controller to set the cookie instead of returning a JSON payload.
    3. Update the auth middleware to validate the session ID against the Redis store.
    STATE.md

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Context drift and memory loss are the primary causes of agent failure in long-running tasks. When an agent forgets a design decision from ten minutes ago or loses track of which files it has actually verified, it begins to hallucinate or break existing logic. This skill implements a disciplined state management protocol using a structured STATE.md file to act as the source of truth for your agent.

    What it does

    • Persistent State Tracking maintains a record of goals, progress, and pending tasks across multiple sessions.
    • Decision Logging captures technical choices and their rationale to prevent circular debates or regressions.
    • Invariant Enforcement documents non-negotiable rules that all subsequent code changes must respect.
    • Context Verification tracks which files have been read and validated to prevent the agent from guessing file contents.
    • Incremental Mapping builds a system map and interface list as the agent explores large codebases.

    How it works

    1. Initialize by checking for an existing STATE.md at the root or creating one from the template with a clear success criterion.
    2. Execute by reading the state before any other action to align with previous decisions and invariants.
    3. Log new decisions, discoveries, and verified interfaces in real-time as the work progresses.
    4. Finalize the session by moving completed items to the verified list and defining the exact starting point for the next session.

    Frameworks & tools

    This skill is platform-agnostic and works with any file-system-capable agent like Claude Code, Cursor, or Aider. It uses standard Markdown for the state file.

    Why this beats prompting it yourself

    Generic instructions to "remember what we did" fail as the context window fills up. This skill enforces a specific structural format that prioritizes invariants and decisions over chat history, ensuring the agent never loses the "why" behind the code even after a total session reset.

    Use cases

    • Multi-file Refactors where architectural decisions must remain consistent across dozens of files.
    • System Audits that require tracking which modules have been cleared and which are still pending review.
    • Long-running Builds where work is interrupted and resumed over several days or by different agents.
    • Large Codebase Exploration where the agent needs to build a durable map of interfaces it has already discovered.

    Known limitations

    The state file requires manual updates at the end of every session to remain useful. Large state files exceeding 200 lines require manual compression of the done list to maintain performance.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Agents & Orchestration.

    Requires file system access to read/write STATE.md. Requires manual update at session end. Effectiveness drops if state exceeds 200 lines without compression.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    1 use

    Times used to date

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 26 days ago

    • Free with an Agensi account

    Permissions

    Write Files
    Listed26 days ago

    What's inside

    Frequently Asked Questions

    This skill solves context drift and memory loss in long-running tasks by providing a structured 'STATE.md' protocol that tracks decisions, invariants, and progress better than a standard chat history.

    The skill is platform-agnostic and compatible with any AI agent that has file-system access, including Claude Code, Cursor, Aider, and custom LLM-based CLI tools.

    You receive the standardized state management protocol, a pre-configured STATE.md template, and the operational instructions (system prompts) to ensure your agent maintains the file accurately.

    No complex installation is required; simply add the provided protocol instructions to your agent's system prompt or project instructions and initialize the STATE.md file in your project root.

    Yes, while it works best with a single agent, the STATE.md file acts as a universal source of truth, allowing different agents to pick up exactly where the last one left off without losing context.

    While the agent manages updates automatically, we recommend manually compressing the 'Completed' section if the file exceeds 200 lines to keep the agent's immediate context window focused on active tasks.

    New in Agents & Orchestration

    Free