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/obsidian-owl/specwright/sw-learnnpx skills add Obsidian-Owl/specwright --skill sw-learngit clone --depth 1 https://github.com/Obsidian-Owl/specwrightWrote 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/obsidian-owl/specwright/sw-learn)<a href="https://agentmods.dev/skills/obsidian-owl/specwright/sw-learn"><img src="https://agentmods.dev/badge/skills/obsidian-owl/specwright/sw-learn.svg" alt="Measured on agentmods" 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 | $0.00040 | $0.01986 |
| Opus 5 | $0.00020 | $0.00993 |
| Sonnet 5 | $0.00008 | $0.00397 |
| Haiku 4.5 | $0.00004 | $0.00199 |
Grade A, and why
sw-learn 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 4d 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 — 150 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Specwright Learn
Goal
Extract reusable knowledge from the current work unit. Build failures, gate findings, and architecture decisions contain valuable patterns. Surface them, let the user curate, and promote the best ones so future work benefits.
Inputs
{worktreeStateRoot}/session.json-- selected work for this worktree{repoStateRoot}/work/{selectedWork.id}/workflow.json-- current work unit (should be shipped){workDir}/evidence/-- gate evidence files{workDir}/implementation-rationale.md-- curated build-time reasoning when present{workDir}/review-packet.md-- reviewer-facing audit synthesis when present{workDir}/plan.md-- architecture decisions{workArtifactsRoot}/{selectedWork.id}/approvals.md-- approval lineage for the work{projectArtifactsRoot}/CONSTITUTION.md-- existing practices{projectArtifactsRoot}/learnings/-- prior work unit learnings (for retrospective)- Git log for the work unit's commits
Outputs
- Learnings presented to user in categories
- User-approved patterns promoted to one of:
{projectArtifactsRoot}/CONSTITUTION.md(new practice rule)- Auto-memory MEMORY.md (compact pattern entry, loaded every session)
{projectArtifactsRoot}/patterns.md(reusable pattern library)
{projectArtifactsRoot}/learnings/{work-id}.json-- written when any finding is promoted OR when gateCalibration data is available. When only calibration is present (no promoted findings), write with an emptyfindingsarray.
Constraints
Stage boundary (LOW freedom):
- Follow
protocols/stage-boundary.md. - You capture learnings and promote patterns. You NEVER start new work units, run builds, or create PRs.
- It is not a core workflow stage and never claims top-level work ownership.
- After learnings are captured, STOP and present the handoff:
- If more work units pending: "Run
/sw-buildto start the next unit." - If no more units: "All work units complete. Learnings captured."
- If more work units pending: "Run
Discovery (HIGH freedom):
- Scan evidence files, git log, plan.md,
implementation-rationale.md,review-packet.md, and approval lineage for patterns worth remembering. - Look for: what broke, what was hard, what worked well.
- Check as-built notes for discovered behaviors per
protocols/build-quality.md. - If
commands.test:integrationis configured in config.json: check gate-build evidence for the integration tier. If it was SKIP or absent, surface as a learning candidate ("No integration tests ran"). Skip this check when no integration tier is configured. - MUST record gateCalibration for every gate that ran, even if all PASS with 0 findings. Populate from evidence files automatically. falsePositives array only populated when user explicitly labels a finding as false positive during presentation (dismissal alone does not count). Format per
protocols/evidence.md#verdict-rendering.
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.
- 4d ago First seen · 150 lines · 40 tokens per session scan A 49d29d640b77
sw-learn is a skill published in the GitHub repository Obsidian-Owl/specwright (9 stars, last pushed 4mo ago), licensed MIT. It adds 40 tokens to every session and 1,986 once invoked, about $0.0002 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
rust-skills
Rust best practices — 179 rules across 14 categories for idiomatic, optimized Rust code.
new-skill
Scaffold a new brooks-lint analysis skill so it passes npm run validate and npm run evals on the first try — generates skills/{name}/SKILL.md (with the mandatory "Do NOT trigger for:" clause and a Process section citing guide step ranges) plus skills/{name}/{name}-guide.md (sequentially numbered steps), then appends…
cco-task
Organize work by task, track tokens/cost per task, and keep a small patchable execution state that is re-injected after /compact (SKILL.state-style) — start a task, patch its state, list tasks, or mark the active one done. Pairs with /cco-pack to load minimal context per task.
cco-templates
Manage context templates for common task types.
discuss
Use when exploring a feature idea before committing, or revisiting a parked one. Triggers — "/engineer.discuss", "/engineer.discuss ", "I have an idea about", "should we build", "let's think about".
prompt-tuning
Tune a prompt, or anything whose quality is measured by non-deterministic model output, without chasing noise - a noise baseline before the first edit, medians over repeated runs, enforcement AFTER generation rather than in the wording. Use when iterating on prompts or model-judged output.