Agent Skills

Memstate AI Skill

Install persistent, versioned memory into your AI coding agent with one command. The Memstate skill teaches your agent to check existing context before every task and save summaries after — automatically.

What is an Agent Skill?

Agent Skills are a portable, open format for giving AI agents specialized knowledge and workflows. A skill is a folder containing a SKILL.md file with instructions that the agent loads automatically when relevant. Skills follow the Agent Skills open standard and work across Claude Code, Cline, Cursor, GitHub Copilot, and other compatible agents.

The Memstate skill teaches your agent when and how to use Memstate: check memory before tasks, save summaries after, and use the right tool for each situation.

Quick Install

Run this in your project directory. The CLI auto-detects your agent(s), installs the skill, and updates your AGENTS.md with pre/post task instructions.

Terminal
npx @memstate/skills setup
🔍Auto-detects Claude Code, Cline, Cursor, and more
📁Installs to the correct location for each agent
📝Updates AGENTS.md with before/after task instructions

What the Skill Does

Before every task

Your agent automatically checks existing project memories to avoid duplicate work and surface prior decisions.

memstate_get(project_id="my-app")
After every task

Your agent saves a markdown summary of what was done, key decisions made, and files modified.

memstate_remember(project_id="my-app", content="## Summary\n...", source="agent")

Where Skills Are Installed

The npx @memstate/skills setup CLI handles all of this automatically. The table below shows where each agent expects skill files.

AgentSkill LocationInstruction File
Claude Code (project).claude/skills/memstate/SKILL.mdCLAUDE.md
Claude Code (global)~/.claude/skills/memstate/SKILL.md
Kilo Code (project).kilocode/skills/memstate/SKILL.md.kilocode/rules/memstate.md
Kilo Code (global)~/.kilocode/skills/memstate/SKILL.md~/.kilocode/rules/memstate.md
Cline.clinerules/memstate.md.clinerules/memstate.md
Cursor (project).cursor/rules/memstate.mdc.cursor/rules/memstate.mdc
Cursor (global)~/.cursor/rules/memstate.mdc~/.cursor/rules/memstate.mdc
Windsurf.windsurf/rules/memstate.md.windsurf/rules/memstate.md
AGENTS.md (universal).claude/skills/memstate/SKILL.mdAGENTS.md
Gemini CLI.claude/skills/memstate/SKILL.mdGEMINI.md

Manual Installation

Prefer to install manually? Use the commands below for your specific agent.

Claude Code (project-level)

Terminal
mkdir -p .claude/skills/memstate
curl -o .claude/skills/memstate/SKILL.md \
  https://raw.githubusercontent.com/memstate-ai/memstate-skills/main/memstate/SKILL.md

Claude Code (Plugin — recommended for teams)

Register the Memstate skills repository as a Claude Code plugin marketplace, then install:

Claude Code
/plugin marketplace add memstate-ai/memstate-skills

Cline

Terminal
mkdir -p .clinerules
curl -o .clinerules/memstate.md \
  https://raw.githubusercontent.com/memstate-ai/memstate-skills/main/memstate/SKILL.md

Cursor

Terminal
mkdir -p .cursor/rules
curl -o .cursor/rules/memstate.mdc \
  https://raw.githubusercontent.com/memstate-ai/memstate-skills/main/memstate/SKILL.md

Kilo Code (global)

Terminal
mkdir -p ~/.kilocode/skills/memstate
curl -o ~/.kilocode/skills/memstate/SKILL.md \
  https://raw.githubusercontent.com/memstate-ai/memstate-skills/main/memstate/SKILL.md

Windsurf

Terminal
mkdir -p .windsurf/rules
curl -o .windsurf/rules/memstate.md \
  https://raw.githubusercontent.com/memstate-ai/memstate-skills/main/memstate/SKILL.md

AGENTS.md / CLAUDE.md / GEMINI.md (Universal)

For any agent that reads AGENTS.md (OpenAI Codex, Gemini CLI, Amp, Jules, Factory, and others):

Terminal
curl -o memstate-instructions.md \
  https://raw.githubusercontent.com/memstate-ai/memstate-skills/main/memstate/SKILL.md
# Then append to your AGENTS.md / CLAUDE.md / GEMINI.md

Prerequisites

The Memstate skill requires the Memstate MCP server to be configured with an API key. Get a free API key at memstate.ai/dashboard, then run:

npx @memstate/mcp setup

Or follow the MCP Setup Guide.