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 skills add jasonkneen/lazar --skill distillgit clone --depth 1 https://github.com/jasonkneen/lazarWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/jasonkneen/lazar/distill)<a href="https://agentmods.dev/skills/jasonkneen/lazar/distill"><img src="https://agentmods.dev/badge/skills/jasonkneen/lazar/distill/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/jasonkneen/lazar/distill"><img src="https://agentmods.dev/badge/skills/jasonkneen/lazar/distill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to high
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- high Tool Misuse · line 79 Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
What 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.1 | $0.00000 | $0.01467 |
| Opus 5 | $0.00000 | $0.00733 |
| Sonnet 5 | $0.00000 | $0.00293 |
| Haiku 4.5 | $0.00000 | $0.00147 |
Grade A, and why
distill 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 10d 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 — 127 lines — stays where its author put it; the contents beside it link to each section on GitHub.
distill
Use lazar recursion to extract durable, structured learnings from rotated log archives, and write them into categorized memory files. Turns raw events (L3) into curated knowledge (a richer L2) on demand.
This is the opt-in LLM curation layer for lazar's memory. The mechanical L2 summaries written by _meta/log-rotation give you "what topics came up and what commands ran." distill goes further and asks the agent itself: "what did we learn that's worth remembering?"
When to use
- After a busy session has rotated, when you want curated learnings (not just a transcript) preserved.
- The user explicitly asks the agent to "remember what we figured out" or "save the lessons from this work."
- Periodically — say once per
.bakarchive — to build up a knowledge base over time.
Do NOT use this on every invocation. It costs an LLM call per archive, and learnings stabilize quickly. Once per rotation is plenty.
Hard rules
- Bound the sample. Never pass a whole archive into the recursion prompt. Pick a focused slice — last N invocations, or events around a specific topic — and cap by bytes.
- Use
lazar -precursion, not a separate API call. This keeps the kernel as the only API consumer and makes the LLM call appear instream.jsonlitself. - Write to
memory/distilled/<category>.md, never to top-level memory. Distilled insights are LLM-generated; mark them clearly. - Tag every entry with the source archive's timestamp and the date you distilled. Future-you needs to know how stale the learning is.
Recipe
# Pick the archive to distill (default: most recent rotation)
ARCHIVE=$(ls -t $LAZAR_HOME/logs/stream.jsonl.*.bak 2>/dev/null | head -n 1)
[ -z "$ARCHIVE" ] && { echo "no archives to distill"; exit 0; }
# Bounded sample: last 30 user prompts + assistant responses, capped at 30KB
SAMPLE=$(jq -s '
map(select(.kind == "user" or .kind == "assistant"))
| .[-30:]
| map({kind: .kind, content: (.content | tostring | .[0:2000])})
' "$ARCHIVE" 2>/dev/null | head -c 30000)
[ -z "$SAMPLE" ] && { echo "no usable events in $ARCHIVE"; exit 0; }
# Recurse — ask lazar to extract structured learnings
LAZAR_DEPTH=1 lazar -p "Read this conversation transcript (JSONL events) and extract durable learnings worth saving. Be selective — only include things future-you will genuinely benefit from remembering.
Output ONLY this exact format, with each section terse and one-line bullets:
## gotchas
- <thing that bit us, prefixed with the situation>
## conventions
- <a code/style/path convention adopted in this work>
## recipes
- <a multi-step bash/tool pattern that worked>
## preferences
- <a stated user preference>
Skip any section that has nothing real. Don't pad. If nothing is worth saving, output 'nothing durable' on a single line.
Transcript:
$SAMPLE" > /tmp/distill-out.md 2>/dev/null
# If the agent said nothing durable, bail
rg -qi "nothing durable" /tmp/distill-out.md && { echo "no durable learnings found"; exit 0; }
# Write to memory, tagged with source + date
mkdir -p $LAZAR_HOME/memory/distilled
TS=$(basename "$ARCHIVE" | rg -o '[0-9]+')
DATE=$(date -u +%Y-%m-%d)
# Split the output by section, append each to its category file
awk -v ts="$TS" -v date="$DATE" -v home="$LAZAR_HOME" '
/^## / { cat = tolower(substr($0, 4)); next }
/^- / && cat != "" {
path = home "/memory/distilled/" cat ".md"
print "- " substr($0, 3) " _(distilled " date ", from archive ." ts ".bak)_" >> path
close(path)
}
' /tmp/distill-out.md
echo "distilled into $LAZAR_HOME/memory/distilled/ (sections: $(ls $LAZAR_HOME/memory/distilled/ 2>/dev/null | tr '\n' ' '))"
rm -f /tmp/distill-out.md
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.
- 10d ago First seen · 127 lines · 0 tokens per session scan A 06da2c19e102
distill is a skill published in the GitHub repository jasonkneen/lazar (31 stars, last pushed 28d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,467 tokens. 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
media-ingest
Ingest video, audio, PDF, book, screenshot, and GitHub repo content into the brain. Multi-format handling with entity extraction and backlink propagation. Covers video-ingest, youtube-ingest, and book-ingest subtypes.
mem0-oss-to-platform
Plan and then execute a migration of a project from the mem0 open-source / self-hosted SDK (the local Memory class) to the mem0 Platform / hosted / managed SDK (the MemoryClient class). Use this whenever a developer wants to move, switch, or migrate their mem0 usage off OSS/self-hosted to the hosted API — e.g.…
Cortex
Operate Cortex, the LifeOS memory system — the typed Knowledge Archive (People, Companies, Ideas, Research with typed related: links) plus recall of prior work sessions, ISAs, and conversations. Search, add, harvest, develop, ingest, distill, graph-navigate, recall. USE WHEN cortex, knowledge, knowledge base, search…
memory
Use when the user asks to remember, recall, forget, update, search, or inspect durable OpenSquilla memory, including profile facts in USER.md and long-term notes in MEMORY.md or memory//.md.
ha-data-stores
Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…
shellm
Reference for the shellm system — recursive LLM shell, identity management, memory, skills, trajectory, and all CLI tools. Use when working on shellm itself, debugging agent behavior, or understanding how the pieces fit together.