agentleFS
Ian-LouwIan-Louw/potion/skills/learn/SKILL.md

learn

Skill1 starsChanged 5 months agoMITView on GitHub

Use when something non-obvious was discovered the hard way — a pitfall, a project convention, a tool quirk, a user preference — or when the user says "remember this", "log a learning", "what have we learned", "didn't we fix this before?", "same bug again", or "this bit us last time".

133 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use open-gstack-browser, design-html and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • seek888Skill

    open-gstack-browser

    Launch GStack Browser — AI-controlled Chromium with the sidebar extension baked in. Opens a visible browser window where you can watch every action in real time. The sidebar shows a live activity feed and chat. Anti-bot stealth built in. Use when asked to "open gstack browser", "launch browser", "connect chrome", "open chrome", "real browser", "launch chrome", "side panel", or "control my browser". Voice triggers (speech-to-text aliases): "show me the browser".

    Also in 6 projects that use this

  • seek888Skill

    design-html

    Design finalization: generates production-quality Pretext-native HTML/CSS. Works with approved mockups from /design-shotgun, CEO plans from /plan-ceo-review, design review context from /plan-design-review, or from scratch with a user description. Text actually reflows, heights are computed, layouts are dynamic. 30KB overhead, zero deps. Smart API routing: picks the right Pretext patterns for each design type. Use when: "finalize this design", "turn this into HTML", "build me a page", "implement this design", or after any planning skill. Proactively suggest when user has approved a design or has a plan ready. (gstack) Voice triggers (speech-to-text aliases): "build the design", "code the mockup", "make it real".

    Also in 7 projects that use this

  • chloropineSkill

    setup-gbrain

    Set up gbrain for this coding agent: install the CLI, initialize a local PGLite or Supabase brain, register MCP, capture per-remote trust policy. One command from zero to "gbrain is running, and this agent can call it." Use when: "setup gbrain", "connect gbrain", "start gbrain", "install gbrain", "configure gbrain for this machine". (cgstack)

    Also in 4 projects that use this

  • TomGranotSkill

    add-anydoc

    Add local office-document-to-Markdown conversion to NanoClaw agent containers with the pinned Firecrawl AnyDoc CLI. Use when agents need to read attached Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV, or text-based PDF files without uploading them to a hosted parser.

    Also in 3 projects that use this

  • TomGranotSkill

    add-clidash

    Add clidash — a zero-dependency, read-only web dashboard that derives its tabs and tables at runtime from any CLI that lists resources as JSON. Ships pre-wired for NanoClaw's ncl CLI (agent groups, sessions, channels, users, roles), plus message-activity charts, a log tail, and a read-only file viewer for group skills/CLAUDE.md/profiles.

    Also in 3 projects that use this

  • chloropineSkill

    plan-tune

    Self-tuning question sensitivity + developer psychographic for cgstack (v1: observational). Review which AskUserQuestion prompts fire across cgstack skills, set per-question preferences (never-ask / always-ask / ask-only-for-one-way), inspect the dual-track profile (what you declared vs what your behavior suggests), and enable/disable question tuning. Conversational interface — no CLI syntax required.

    Also in 4 projects that use this

  • +1 more from seek888
  • +5 more from TomGranot

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 114 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Don't log what the repo already records (code, git history, CLAUDE.md).

    line 15
  2. Distinctive:

    Before finishing, re-read the appended entry against this block.

    line 19
  3. Very specific:

    If the prevention is mechanically checkable — a command that fails or a grep that matches when the pitfall recurs — promote it by appending …

    line 57
  4. Distinctive:

    Commit project pages with the repo.

    line 91
  5. Very specific:

    When asked "what have we learned": show newest-per-key grouped by type, flag stale entries (entries whose files paths no longer exist on …

    line 126

“Common” is measured: kept by at least 6 in 10 of the 114 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Potion Learn

Inherit ${CLAUDE_PLUGIN_ROOT}/core/CORE.md. The compounding loop: what one session learns, every future session knows.

Entry contract (must hold in every appended journal line):

  • Grammar: one JSON object per line — type, key, insight, confidence, files, ts, optional "incident":{date,bad,fix}.
  • The bar: would this save 5+ minutes in a future session? No → don't log. Don't log what the repo already records (code, git history, CLAUDE.md).
  • Key discipline: newest-wins dedup per key — update by appending the same key, never editing; a promoted check takes its OWN check-{source-key} key, never the source pitfall's. Before finishing, re-read the appended entry against this block; fix in place, or regenerate it — at most once.

Logging

Append one line to .potion/learnings.jsonl:

{"type":"pitfall","key":"expo-metro-cache","insight":"Metro serves stale bundles after branch switch; always start with --clear","confidence":8,"files":["package.json"],"ts":"2026-07-03"}
  • type: per CORE.md's canonical list (includes check and tombstone)
  • key: stable kebab-case id; discipline per the entry contract above (the one edit exception, in CORE.md: compaction past ~500 lines).
  • files: backpointers used for staleness — if those files disappear, the learning is suspect.
  • confidence: 1-10. Raise it (append) when the learning proves out again.
  • incident: optional — "incident":{"date":"YYYY-MM-DD","bad":"<exact bad output or command>","fix":"<the delta that fixed it>"}. Rules that carry their incident are stickier. Forward-only, plus backfill where the details already sit in artifacts.

Promote up

Promote up: if the entry clears the cross-repo bar (CORE: confidence >= 8, generalizable, loop-born, nothing repo-private), ALSO append it to ~/.claude/potion/knowledge.jsonl with the source field filled. Create the directory on first use. Say 'Promoted: {key}' when you do. When in doubt, don't — a polluted shared journal is worse than a sparse one.

The ratchet — pitfalls become permanent checks

Logging a pitfall is half the job. Before moving on, ask three questions:

  1. Why did this happen? (root cause, not symptom)
  2. What else has the same problem? (blast radius — grep for siblings now)
  3. What prevents it from happening again?

If the prevention is mechanically checkable — a command that fails or a grep that matches when the pitfall recurs — promote it by appending a check entry:

{"type":"check","key":"check-expo-metro-cache","insight":"stale bundle after branch switch","cmd":"grep -q '\\-\\-clear' package.json","expect":"match","ts":"2026-07-03"}

Why check-{source-key} gets its own key: dedup and compaction operate per key with no type scoping — a shared key shadows one entry and compaction deletes it.

Checks run under CORE's check-runner contract: POSIX sh at repo root; exit N compares exit code, anything else compares trimmed stdout exactly; nonzero exit with matching stdout is still a MATCH — never add || true.

/potion:verify runs every check entry on every pass; a failing one is reported as a regression. Each click of the ratchet locks in — nothing regresses. A pitfall that bites twice without earning a check entry is a process failure, not bad luck.

Distill

Triggered at compaction, or on demand (/potion:learn distill). Procedure:

  1. Dedup the journal newest-wins by key; drop tombstoned entries.
  2. Cluster the entries into topics (2-6 entries per page typical); slug each topic (git-and-worktrees.md, github-rendering.md).
  3. REGENERATE each affected page whole — title, a 2-4 sentence synthesis paragraph (the compounding insight, not a list), then one ### {key} block per entry: insight, source citation (key; plus repo for user scope), confidence, ts. Never patch a page; rebuild it.
  4. Rewrite index.md: - [{topic}]({file}) — {one-line scope} ({N} entries).
  5. Project journal → .potion/knowledge/; user journal → ~/.claude/potion/pages/. Commit project pages with the repo; user pages live outside git.

Pages are cache: when a page and the journal disagree, the journal wins and the page is due a rebuild.

Lint

Runs automatically after every Distill, or on demand (/potion:learn lint). Project scope first, then user scope. Four hunts:

  1. Contradictions — within each topic, judge entry insights and the page synthesis against each other for incompatible assertions. Mechanical greps cannot see semantic conflict; you are the linter.
  2. Stale claims — entry files backpointers that no longer exist on disk; page claims citing keys that a newer same-key entry superseded.
  3. Orphans — page ### {key} blocks whose key no longer greps to a live (non-tombstoned) journal line.
  4. Coverage gaps — confidence >= 8 live entries no page distills.

Actions — the line that may not be crossed:

  • Cache-side (orphans, stale page claims, coverage gaps): rebuild the affected page(s) whole from the journal — refreshing cache is not editing knowledge.
  • Truth-side (contradictions; any urge to tombstone or reword a journal entry): NEVER self-resolve. Route to STATE.md ## Decision queue (added + expires dates), one line, both sources cited (lint: X contradicts Y — human call). The next /potion:discuss tables it.

Report as a table: hunt | location | finding | action (rebuilt / routed / none). Zero findings is a valid outcome — say 'lint clean' explicitly.

Recall

Reading happens automatically at session start (hook) and in /potion:resume. When asked "what have we learned": show newest-per-key grouped by type, flag stale entries (entries whose files paths no longer exist on disk) and contradictions (same key, opposing insights), and offer to prune — pruning appends a {"type":"tombstone","key":...} line.

Exit

Confirm what was logged in one line: Learned: {key} ({type}, confidence N).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.