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/amitnextech/trailmem/skillnpx skills add amitnexTech/trailmem --skill skillgit clone --depth 1 https://github.com/amitnexTech/trailmemWhat 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.01237 |
| Opus 5 | $0.00034 | $0.00619 |
| Sonnet 5 | $0.00014 | $0.00247 |
| Haiku 4.5 | $0.00007 | $0.00124 |
Grade A, and why
trailmem 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 — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.
trailmem — tool usage
Local-first, graph-linked persistent memory (MCP server, SQLite). Six tools. This skill is the usage reference — never read trailmem's source code to figure out a parameter; everything an agent needs is here or in the tool docstrings.
Session workflow
- Start: if a trailmem briefing (pinned rules / recent activity block) is
already in your context, do NOT call
trailmem_welcome— a hook injected it. Otherwise call it once. - During: query before assuming (
trailmem_query), read in full withtrailmem_showbefore editing. - End: store this session's durable decisions/lessons/tasks with
trailmem_store. Never store filler or session noise.
Parameter rules (the ones agents get wrong)
- project — OMIT it. The server auto-fills the absolute path from its
working directory. Pass
"global"only for cross-project memories (tool preferences, workflow rules). Pass an absolute path only to target a different project. Bare names like"myproject"are rejected. - agent_type — OMIT it. Attribution comes from
TRAILMEM_AGENT_TYPEpinned in the host's MCP config entry. Pass it explicitly only if store rejects with "agent_type could not be determined". - session_id — OMIT it on integrated hosts. For an unsupported host, set
TRAILMEM_SESSION_IDor pass its stable session ID explicitly. Never use a PID; without a real ID TrailMem intentionally runs stateless. - session_context — host adapters may inject this versioned object into every TrailMem call. Do not construct or modify it manually. When present it is authoritative for agent, session, and project; legacy identity arguments cannot override it.
- code_files / doc_files — BOTH are REQUIRED, comma-separated paths:
code_files= source/config files the memory touches,doc_files= docs/spec pages. Pass the literal'none'when the memory genuinely touches no files of that kind — an omitted field is rejected. List the files you actually edited this session; don't lazily write'none'. - content — English only. 50+ chars. Detailed prose beats terse bullets.
- title — 3–60 chars.
- event_type — required on store:
decision— rules, tool choices, structure, enforced behaviorlesson— bugs/mistakes learned (include root cause)error_pattern— things that failed and how they failtask— pending workconstraint— hard rules (auto-surfaced in every welcome — use sparingly)user_preference— personal choices only. Singleton: exactly one active global record exists — never store a new one, merge into the existing record viatrailmem_edit(a new store returnsblocked_singletonwith the existing id;force=truedoes not bypass it)session_summary,memory— summaries / plain facts
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 · 94 lines · 69 tokens per session scan A adcdb4b09e44
trailmem is a skill published in the GitHub repository amitnexTech/trailmem (1 stars, last pushed 1mo ago), licensed MIT. It adds 69 tokens to every session and 1,237 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-31.
Other skills, from other repositories
shodh-memory
Persistent memory system for AI agents. Use this skill to remember context across conversations, recall relevant information, and build long-term knowledge. Activate when you need to store decisions, learnings, errors, or context that should persist beyond the current session.
uteke-memory
Persistent memory engine for AI agents via the uteke CLI — remember, recall, search, forget with semantic + FTS5 hybrid search, documents, knowledge graph, rooms, tiered memory, and multi-agent namespaces.
gno
Search local documents, files, notes, and knowledge bases. Index directories, search with BM25/vector/hybrid, get AI answers with citations. Use when user wants to search files, find documents, query notes, look up information in local folders, index a directory, set up document search, build a knowledge base, needs…
remnic-entities
Browse entities in the Remnic knowledge graph and surface their facts and relationships. Trigger phrases include "tell me about the entity", "look up", "what do we know about".
remnic-recall
Search Remnic memories by natural-language query. Trigger phrases include "what do you remember about", "recall anything on", "have we discussed".
remnic-remember
Store a durable memory in Remnic so every connected agent can recall it. Trigger phrases include "remember this", "save this for later", "add a note that".