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/kouroshez/coding-os/agent-memorynpx skills add kouroshez/coding-os --skill agent-memorygit clone --depth 1 https://github.com/kouroshez/coding-osWhat 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.00121 | $0.02650 |
| Opus 5 | $0.00060 | $0.01325 |
| Sonnet 5 | $0.00024 | $0.00530 |
| Haiku 4.5 | $0.00012 | $0.00265 |
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 yesterday.
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 — 192 lines — stays where its author put it; the contents beside it link to each section on GitHub.
agent-memory
Purpose: turn the policy in src/core/rules/memory.md into mechanical recipes the agent can execute. The rule answers when and what; this skill answers how — the exact tool signatures, what is automatic vs explicit, and what the return envelopes look like. Every signature here is verified against src/core/thinking_os/server.py; a CI drift-guard test fails if any drifts.
Read when: recalling from memory (cos_search, cos_details, cos_timeline, cos_learn_suggest), running the learning loop (cos_learn_extract / cos_learn_validate), or understanding how observations get captured.
Skip when: the query target is current code (use graph-explorer) or current docs (use cos_doc_search per search). Memory is the third-priority retrieval layer.
The mental model — writes are automatic, you mostly READ
The single most important fact: you do not hand-author observations. Memory is written automatically by PostToolUse capture hooks — every Write/Edit/MultiEdit derives a sanitized, deduped, impact-scored observation (capture.py), and separate hooks capture tool failures and session events. Confidence on learned patterns is system-computed by brain-inspired LTP/LTD formulas, not a number you set. The agent's job is to read memory in the Orient phase and reinforce patterns via the learn loop. There is no freeform record(title, body, confidence) tool — by design.
The Decision Gate — before any memory call
Question → Layer + Tool
─────────────────────────────────────────────────────────
"Where is function X defined?" → graph cos_graph_query
"What does spec Y say?" → docs cos_doc_search
"What's in flight / blocked?" → tasks cos_task_board
"Have I seen this pattern before?" → memory cos_search
"Why did we choose approach Z?" → memory cos_search (memory_type=decision)
"Which patterns apply to my task?" → memory cos_learn_suggest(domain=, complexity=)
"What changed in the last N days?" → memory cos_timeline(days=N)
"How does X work / who calls X / rename" → graph cos_graph_* (graph/code FIRST)
"Not sure which layer" → default to graph/code; memory only for cross-session recall
What ships with it
2 files 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.
- yesterday First seen · 192 lines · 121 tokens per session scan A 413aa0d6eac6
agent-memory is a skill published in the GitHub repository kouroshez/coding-os (6 stars, last pushed yesterday), licensed Apache-2.0. It adds 121 tokens to every session and 2,650 once invoked, about $0.0006 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-31.
Other skills, from other repositories
potpie-source-ingestion
Use when the user explicitly asks to ingest, refresh, or deeply understand a repository, PR, issue, ticket, runbook, incident report, document, or web link into Potpie. The harness performs todo-driven discovery, uses local/GitHub/integration tools and read-only subagents when available, builds evidence-backed…
potpie-repo-baseline
Use when establishing, refreshing, or deeply understanding a repository's baseline memory in Potpie: purpose, application type, features, services/modules, environments, deploy shape, dependencies, API contracts, datastores, integrations, ownership, and explicit preferences. The harness reads authored and…
graph-mutation-plan
Cookbook for composing an applygraphmutations plan — stable entitykey patterns, the canonical label/edge vocabulary, evidence/invalidation/confidence discipline, and a worked example. Load this when building a non-trivial mutation plan.
obsidian-layout-adjustment
Workflow for working with the user on changing how Obsidian looks using CSS snippets. Use this whenever the user asks to restyle Obsidian, tune a vault's visual layout, adjust tabs, sidebars, note surfaces, properties, backlinks, graph panes, file explorer rows, icons, links, shadows, active states, or CSS snippets.…
alfworld-locate-target-object
Navigates to a suspected location and identifies a target object. Use when your goal requires finding a specific object (e.g., "potato", "plate") and its location is not immediately known. Moves to a relevant receptacle (like a fridge or cabinet), checks its contents, and outputs the object's location or confirms its…
scienceworld-growth-focuser
Use when you have planted a seed or need to track a plant's growth stage (sprouting, flowering, reproduction). Applies the 'focus on' action to a specific plant or biological entity to signal intent and monitor its development. Trigger after planting or when you need to observe life cycle progression in the…