Nov 20, 2026

Forge Agent Skills from Your Real AI Sessions with Lore

A 1k-star skill from the SpecStory team mines the sessions your agents already saved, proves each workflow with evidence, and forges the ones you approve into every agent you use.

#tutorial#skill-creation#agent-tools#workflow

Hand-written agent skills describe how you think you work. Lore, from the SpecStory team, takes a different input: the sessions your coding agents already saved, mined for the workflows you demonstrably repeat. Note up front that Lore is not a standalone repo — it lives inside the specstoryai/getspecstory monorepo, next to the SpecStory CLI that captures those sessions.

Why This Skill Matters

Lore's unit is the beat: your prompt (the intent), everything the agent did until your next prompt (the method — real executed commands, files, exit codes), and your reply as an outcome label. Patterns that recur across beats, sessions, projects and teammates become skill candidates, ranked by what actually worked. Beyond commands, theme mining reads the conversational beats — the reviews, decisions and corrections — to surface the judgment you apply without naming it.

Installation

Lore reads histories from SpecStory's providers, so sessions need to be captured first. The SpecStory CLI installs via Homebrew:

brew tap specstoryai/tap
brew install specstory

Then install the skill itself (Node 22.5 or newer):

npx skills add specstoryai/getspecstory --skill lore

The installer detects every supported agent on your machine — Claude Code, Codex, Cursor, Gemini CLI, and more — and installs lore into each. Installs are copies, so they do not change until you update them with npx skills update lore. In Claude Code you can alternatively install it as a plugin: /plugin marketplace add specstoryai/getspecstory, then /plugin install lore@specstory, updated later with /plugin update lore.

Real Workflow: Mine a Month of Sessions

Invoke the skill — /lore in Claude Code, $lore in Codex, or just ask ("mine my lore") in Cursor and Gemini CLI. It walks you through scope, time window, and goal, then mines and shows evidence-backed dossiers of your candidate skills before presenting a forge plan to approve.

Steering is plain English, with no argument grammar to learn. The README's own examples:

mine this project
last 30 days, just show candidates
across my projects in ~/code
about supabase / only my judgment skills
status

The second line is the dry run the README documents: evidence dossiers only, no forging. Everything accumulates in one file, ~/.specstory/lore.db, incrementally and idempotently across all your projects and agents.

The pipeline itself splits responsibilities deliberately: a zero-dependency parser and SQLite engine does the counting, and your agent does the naming and judging — it never reads 400k-line transcripts, only engine-exported evidence, with credential values mechanically redacted before the model sees them. Top candidates get a deeper pass: one subagent reads every beat (failures first) while a second tries to refute the result. When you approve the plan, forged skills land in ~/.agents/skills/<name> and symlink into every harness; the registry remembers what was forged and declined, so re-runs never duplicate, and it proposes updates when the evidence grows.

Tips

  • Start with a dry run (last 30 days, just show candidates) and read the dossiers before letting anything forge.
  • In Claude Code the two heavy phases ship as bundled Workflow scripts that fan out subagents in parallel, and runs are resumable if interrupted.
  • The forge plan is hook-enforced: a PreToolUse hook bundled with the skill rejects any curation plan that does not embed the full evidence verbatim.
  • Histories committed by teammates are attributed (git author, then home directory, then machine user) — a workflow several people share becomes a team skill proposed for the repo, not presented as yours.
  • reset my lore starts fresh and asks first; forged skills stay installed.

When Not to Use This

Lore mines what SpecStory captured, so an agent history you never saved locally is out of its reach — capture has to come first, through the SpecStory CLI or IDE extensions, with cloud sync strictly optional and nothing syncing until you explicitly log in. And if you are on a fresh machine with a handful of sessions, there is not yet a pattern corpus worth mining; the README's own example scale (tens of thousands of beats) took real usage to accumulate.


See the leaderboard for more skills.