escapeboy/ai-prompts/ctx

Claude Code and agent skill by escapeboy/ai-prompts

Trust tier 3
  • community
Source check pending

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/ctx

SKILL.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 forUse a simpler approach for
Starting a session on a project with existing memories — load before any code workA 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 assumptionsA 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

/ctx [action] [name]
Quick Examples
/ctx load # Load all relevant memories for current project
/ctx list # Show all available memories
/ctx save architecture # Create or update the architecture memory
/ctx refresh codebase-conventions # Regenerate a stale memory
/ctx inspect # Show what's currently loaded + cache status
/ctx clear # Unload all memories from context

Actions

Compact dispatch below. For the full process steps, parameters, and output formats of any action, read [references/actions.md](references/actions.md).

ActionWhat it doesWhen to run
loadLoad core memories (architecture, codebase-conventions) + conditionally load module/testing/docker/deployment memories by task contextStart of every session, before code work
listList all project memories with last-updated + load/cache statusTo see what's available
save [name]Gather context → structure as Markdown → write .serena/memories/[name].mdAfter learning something durable worth persisting
refresh [name]Re-explore the code and overwrite an existing memory with current stateAfter a major refactor, a new module, or a memory >2 weeks old
inspectShow loaded memories, token sizes, cache hit rate, and project/Serena/constitution statusTo audit context + caching
clearUnload 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 itWhen 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 memoriesWith memories
Read files per sessionLoad cached memories
~15-25K tokens/session for context~1.5-2.5K tokens/session
100% cost each time10% cost after first load (cached)
Savings: 60-70% per session

Boundaries

Always

  • Run load at 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

  • refresh and save overwrite 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 — clear only 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

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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/escapeboy/ai-prompts/ctx/badge)](https://verified-skill.com/skills/escapeboy/ai-prompts/ctx)

Something wrong with this skill or its page? Tell us.