agent-memory · openhands — Claude Code skill: what it does, how to install
agent-memory saves repository rules and commands into AGENTS.md to feed context into later coding sessions.
MIT 117 installs ★ 185 updated 2026-10-25
npx skills add OpenHands/extensions --skill agent-memory -a claude-codeWhat agent-memory does
This skill maintains an AGENTS.md file located at your repository root. It records persistent knowledge like build steps, test commands, lint scripts, directory layouts, and formatting rules. Single-task details or ephemeral error logs are excluded to prevent context pollution.
Before writing anything to disk, the agent lists numbered points and asks for approval. You select what stays, after which the agent structures the entries under relevant headings. If parts of the project remain unexplored, the skill explicitly marks that limitation.
What it helps with
- persist build and test scripts across agent runs
- document repository layout for automated tools
- keep style guidelines in repository context
- prevent single-task bug details from entering shared memory
Example prompts for the agent
- /remember
- Review our recent steps and save the linting commands to AGENTS.md
- Keep items 1 and 2 from the suggested list
How to install agent-memory
1Skills CLI (Vercel)
npx skills add OpenHands/extensions --skill agent-memory -a claude-code2Manually: put the files in place
~/.claude/skills/agent-memory/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/agent-memory/
1Skills CLI (Vercel)
npx skills add OpenHands/extensions --skill agent-memory -a codex2Manually: put the files in place
.agents/skills/agent-memory/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add OpenHands/extensions --skill agent-memory -a cursor2Manually: put the files in place
.cursor/skills/agent-memory/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install OpenHands/extensions skills/agent-memory2Manually: put the files in place
.github/skills/agent-memory/SKILL.md1Skills CLI (Vercel)
npx skills add OpenHands/extensions --skill agent-memory -a gemini-cli2Platform CLI
gemini skills install https://github.com/OpenHands/extensions --path skills/agent-memoryManually: put the files in place
.devin/skills/agent-memory/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add OpenHands/extensions --skill agent-memory -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about agent-memory
How to install agent-memory in Claude Code?
Run npx skills add OpenHands/extensions --skill agent-memory -a claude-code in your terminal.
What does agent-memory do?
It compiles repository guidelines and workflow scripts into AGENTS.md, making them available across future sessions.
Does the skill write to files automatically?
No, it prepares a numbered proposal first and writes only the items you explicitly approve.
Source text
SKILL.md · MIT
--- name: agent-memory description: Persist and retrieve repository-specific knowledge using AGENTS.md files. Use when you want to save important information about a codebase (build commands, code style, workflows) for future sessions. triggers: - /remember --- * Repository memory: Use AGENTS.md in each repository root to store and access important information. - If this file exists, it will be added to your context automatically. - If missing, you should create it unless the user has explicitly asked you to not do so. * Store and maintain **general knowledge** that will be helpful for most future tasks: 1. Repository structure 2. Common commands (build, lint, test, pre-commit, etc.) 3. Code style preferences 4. Workflows and best practices 5. Any other repository-specific knowledge you learn * IMPORTANT: ONLY LOG the information that would be helpful for different future tasks, for example, how to configure the settings, how to setup the repository. Do NOT add issue-specific information (e.g., what specific error you have ran into and how you fix it). * When adding new information: - ALWAYS ask for user confirmation first by listing the exact items (numbered 1, 2, 3, etc.) you plan to save to AGENTS.md - Only save the items the user approves (they may ask you to save a subset) - Ensure it integrates nicely with existing knowledge in AGENTS.md - Reorganize the content if needed to maintain clarity and organization - Group related information together under appropriate sections or headings - If you've only explored a portion of the codebase, clearly note this limitation in the repository structure documentation - If you don't know the essential commands for working with the repository, such as lint or typecheck, ask the user and suggest adding them to AGENTS.md for future reference (with permission) When you receive this message, please review and summarize your recent actions and observations, then present a list of valuable information that should be saved in AGENTS.md to the user.
© OpenHands · MIT · OpenHands/extensions
Similar skills
All skills for Agent setup: memory, context, orchestration →agent-memory by other authors comes first.