Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/monkilabs/opencastle/agent-memorynpx skills add monkilabs/opencastle --skill agent-memorygit clone --depth 1 https://github.com/monkilabs/opencastleWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00069 | $0.00686 |
| Opus 5 | $0.00034 | $0.00343 |
| Sonnet 5 | $0.00014 | $0.00137 |
| Haiku 4.5 | $0.00007 | $0.00069 |
Grade A, and why
agent-memory scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 60 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agent Memory Protocol
Expertise File
Location: .opencastle/AGENT-EXPERTISE.md — one section per agent with Strong Areas, Weak Areas, File Familiarity tables.
Entry format: Area | Evidence | Last Updated — e.g. Server Components | Built TAS-42 | 2026-03-15. File familiarity: - src/lib/search/ — 3 tasks.
Update Triggers
| Trigger | Action |
|---|---|
| First-attempt success | Update Strong |
| 2+ retries | Update Weak |
| File modified | Increment familiarity |
| DLQ failure | Add Weak with ref |
| >3 months stale | Mark as "stale" |
Retrieval & Delegation
Query before delegating; include concise context block in prompt:
grep -A5 "## Developer" .opencastle/AGENT-EXPERTISE.md
Example prompt block: Agent Context: Strong — Server Components (3 tasks); Weak — Component styling (2 retries); Familiar — src/lib/search/ (2 tasks)
Update after task completion:
# Append a Strong Area entry
printf '| %s | %s | %s |\n' "Server Components" "Built TAS-42" "$(date +%Y-%m-%d)" >> .opencastle/AGENT-EXPERTISE.md
# Increment file familiarity
awk '/src\/lib\/search\// { if (match($0, /[0-9]+/)) { n = substr($0, RSTART, RLENGTH) + 1; sub(/[0-9]+[[:space:]]*tasks?/, n " tasks") } found=1 } {print} END { if(!found) print "- `src/lib/search/` — 1 task" }' \
.opencastle/AGENT-EXPERTISE.md > tmp && mv tmp .opencastle/AGENT-EXPERTISE.md
After each task also append file relationships to .opencastle/KNOWLEDGE-GRAPH.md. On DLQ failure, the Weak Area entry must carry the failure ID and a link to its logs.
Validation Checkpoints
- Before delegating: chosen agent has a Strong area matching the task and no conflicting Weak entry.
- After completion: expertise file has the new entry, timestamped today.
- After pruning:
rg "— [0-9]+ tasks" .opencastle/AGENT-EXPERTISE.mdshows no stale paths.
Pruning
Prune entries older than 6 months; remove familiarity for deleted paths; consolidate duplicates.
Knowledge Graph
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 60 lines · 69 tokens per session scan A c93ea1d6749d
agent-memory is a skill published in the GitHub repository monkilabs/opencastle (61 stars, last pushed 4d ago), licensed MIT. It adds 69 tokens to every session and 686 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
codex-delegation
Use when a coding task would benefit from delegating work to Codex in the background — a deep independent second opinion, security or architecture analysis, or a parallel implementation running while the session continues. Lets Claude drive the codex companion itself (task, review, status --wait, result) without the…
cursor-delegation
Use when a coding task would benefit from delegating work to Cursor in the background — fast parallel implementation, scaffolding, or an everyday review running while the session continues. Lets Claude drive the cursor companion itself (task, review, status --wait, result) without the user typing /cursor: commands.
cursor-prompting
Internal guidance for composing cursor-agent prompts and picking models for coding, review, diagnosis, and research tasks inside the Cursor Claude Code plugin.
cursor-result-handling
Internal guidance for presenting Cursor helper output back to the user.
agentflow
Expert guidance for building, debugging, and extending applications with AgentFlow (10xscale-agentflow). TRIGGER when: code imports from agentflow (e.g. from agentflow import, StateGraph, Agent, ToolNode, AgentState); user references agentflow.json or CLI commands (agentflow init, agentflow api, agentflow play…
agentflow
Expert guidance for building, debugging, and extending applications with AgentFlow (10xscale-agentflow). TRIGGER when: code imports from agentflow (e.g. from agentflow import, StateGraph, Agent, ToolNode, AgentState); user references agentflow.json or CLI commands (agentflow init, agentflow api, agentflow play…