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 lukasrepublic/agentic-foundry --skill learn-distillgit clone --depth 1 https://github.com/lukasrepublic/agentic-foundryWrote 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/lukasrepublic/agentic-foundry/learn-distill)<a href="https://agentmods.dev/skills/lukasrepublic/agentic-foundry/learn-distill"><img src="https://agentmods.dev/badge/skills/lukasrepublic/agentic-foundry/learn-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/lukasrepublic/agentic-foundry/learn-distill"><img src="https://agentmods.dev/badge/skills/lukasrepublic/agentic-foundry/learn-distill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00077 | $0.00709 |
| Opus 5.5 | $0.00031 | $0.00284 |
| Sonnet 5.5 | $0.00015 | $0.00142 |
| Haiku 4.5 | $0.00008 | $0.00071 |
Grade A, and why
learn-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 1mo 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 — 43 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/foundry:learn-distill
The self-improvement consumer — a native-scheduling WRAP for the cadence. Two halves:
- CUSTOM (no native equivalent): the deterministic clustering + report logic, implemented in
scripts/foundry-distill.py— read the dated partitions under.foundry/session-learnings/<YYYY-MM-DD>/*.jsonl(the reconciliation.harvest-log.jsonl+ dotfiles excluded), token-overlap cluster (≥3 shared normalized tokens drawn from every string scalar field +tags; no embeddings; fully-pinned canonicalization + ordering → byte-reproducible), threshold-promote (≥3-record components) to HBK/memory/skill/unclassified candidates over the realtype/kindvocabulary, write.foundry/learnings/DISTILL_REPORT-<UTC-date>.md(an untracked runtime artifact — NOT the governedspecs/tree), then prune buffer partitions whose directory-NAME date is >90 days old (never by mtime). Run it directly:scripts/foundry-distill.py [--date YYYY-MM-DD] [--dry-run]; self-testscripts/foundry-distill.py --selftest. (The doctor drop-in check this line originally named was retired with the drop-in registry in the v0.25.0 realignment — an open loop is now visible only by running the distiller itself.) - WRAP over native: the CADENCE. Instead of a bespoke scheduler, the distill tick
is scheduled via native
ScheduleWakeup(session-local) orCronCreate(persistent) — e.g. a daily tick that runs the consumer. Producers feed the buffer via/foundry:learn-capture(the in-session path) + the worker-sidecar harvest.
Procedure
- Scheduled tick (native
CronCreatedaily, orScheduleWakeup): invoke the consumer —scripts/foundry-distill.py. - Consume the buffer (Read → Cluster → Threshold → Write → Retention, in that strict order — retention prunes only partitions whose NAME-date is >90 days old, never a within-window partition).
- Emit
.foundry/learnings/DISTILL_REPORT-YYYY-MM-DD.mdwith HBK/memory/skill/unclassified candidates (operator-reviewed; no auto-dispatch).
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.
- 1mo ago First seen · 43 lines · 77 tokens per session scan A 36159ecda5b6
learn-distill is a skill published in the GitHub repository lukasrepublic/agentic-foundry (1 stars, last pushed yesterday), licensed MIT. It adds 77 tokens to every session and 709 once invoked, about $0.0003 per session on Opus 5.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-09-03.
Other skills, from other repositories
g-resume
Re-hydrate a fresh session with the right slice of the durable record. The read-side counterpart to /g-retro — selectively retrieves the relevant retro, ADRs, journal, and handoff keyed by the current branch/milestone/first-task, and assembles a focused re-entry briefing. Loads distilled context into a clean window…
principle-guard-the-context-window
Apply when context is filling up: large outputs, long files, repeated reads, fan-out planning. Route bulk to subagents; keep summaries in the main thread, not raw payloads.
agents-skills-feedback-loop
Adds per-skill learnings loops for dated patterns, mistakes, and domain facts. Use when wiring skill memory, consolidation, or drift audits.
dev-context-multi-repo
Builds multi-repo context hubs and compiled markdown knowledge maps. Use when profiling repo portfolios or assembling LLM-ready cross-repo knowledge bases.
volt-firmware
Produce a complete firmware architecture spec for a described device — layer diagram, module responsibilities, HAL interface definitions, key state machines, RTOS decision. Use when asked to "design firmware architecture", "plan embedded firmware", "architect an IoT device", "how should I structure this firmware", or…
prism-ui
Implement a complete UI screen or feature from a Form visual spec. Use when asked to "build a page", "implement this screen", "build the frontend for this feature", or "create this UI".