escapeboy/ai-prompts/ctx
Claude Code and agent skill by escapeboy/ai-prompts
- community
Checking that the SKILL.md file is still in the repository.
Manage Serena memories and session context — load, save, refresh, inspect, and clear project knowledge. Use when loading or saving project memories (`/ctx load`, `/ctx save`). Not the built-in `/context`, which shows context-window usage.
Install
npx vskill@latest install escapeboy/ai-prompts/ctxSKILL.md
/ctx — Memory & Context Management
Manages the Serena memory system that stores architectural knowledge, conventions, and project context. Loading memories at the start of a session saves 60-70% of tokens by eliminating repeated file reads.
When to Use This Skill (and When NOT to)
| Use this skill for | Use a simpler approach for | |
|---|---|---|
Starting a session on a project with existing memories — load before any code work | A repo with no memories yet and one quick edit — just read the one file | |
Capturing durable architecture / conventions / deploy knowledge that outlives the session (save, create) | An ephemeral session fact — let auto-memory / MEMORY.md hold it | |
| Refreshing a memory after a major refactor so Claude stops making stale assumptions | A memory touched days ago on an unchanged codebase — it's still current | |
Auditing what's loaded and what caching is buying you (inspect, list) | A single-file lookup where symbolic exploration answers it directly |
Start simple. Reach for this skill only when the project has (or clearly warrants) reusable memories — don't scaffold a memory set for a one-off task. Without Serena, use `/optimize` instead; it has fallback strategies.
Usage
Quick Examples
Actions
Compact dispatch below. For the full process steps, parameters, and output formats of any action, read [references/actions.md](references/actions.md).
| Action | What it does | When to run | |
|---|---|---|---|
load | Load core memories (architecture, codebase-conventions) + conditionally load module/testing/docker/deployment memories by task context | Start of every session, before code work | |
list | List all project memories with last-updated + load/cache status | To see what's available | |
save [name] | Gather context → structure as Markdown → write .serena/memories/[name].md | After learning something durable worth persisting | |
refresh [name] | Re-explore the code and overwrite an existing memory with current state | After a major refactor, a new module, or a memory >2 weeks old | |
inspect | Show loaded memories, token sizes, cache hit rate, and project/Serena/constitution status | To audit context + caching | |
clear | Unload all memories from the current conversation (does not delete files) | Switching projects or context is stale | |
create [name] | Interactive memory creation — asks what to document and how to structure it | When you want to build a memory step by step |
save/create follow the house memory structure and per-topic template catalog in [references/memory-templates.md](references/memory-templates.md) — read it before writing a memory.
Token Savings
| Without memories | With memories | |
|---|---|---|
| Read files per session | Load cached memories | |
| ~15-25K tokens/session for context | ~1.5-2.5K tokens/session | |
| 100% cost each time | 10% cost after first load (cached) | |
| Savings: 60-70% per session |
Boundaries
Always
- Run
loadat the start of a session before code work — it's the whole point of the memory system. - Keep memories concise and current; refresh anything stale (>2 weeks) after significant codebase changes.
- Follow the house memory structure in references/memory-templates.md.
Ask first
refreshandsaveoverwrite an existing memory — confirm before discarding curated, user-authored content.- Writing memories into a shared/team repo's
.serena/(they become visible in diffs to teammates).
Never
- Delete memory files as part of
clear—clearonly unloads from context; the files stay on disk. - Fabricate project facts into a memory; write only what you verified from the codebase or the user.
- Store secrets, tokens, or credentials in a memory.
Troubleshooting
Common failure modes (no memories found, Serena not connected, memory outdated) and their fixes are in [references/troubleshooting.md](references/troubleshooting.md).
See Also
- `/optimize` — Uses loaded context for token-efficient work; the fallback when Serena is unavailable
- `/init-project` — Creates initial memory set for a new project
- `/cache-inspector` — Monitor cache performance
- Project Activation Guide
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking01-global-optimization/skills/ctx/SKILL.md
Popularity
- Repository stars
- 91
- Repository forks
- 14
- 7-day trend score
- 28
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/escapeboy/ai-prompts/ctx)