agentleFS
sendaifunsendaifun/solana-new/skills/idea/learn/SKILL.md

learn

Skill178 starsChanged 4 months agoMITView on GitHub

Manage project learnings across sessions. Review, search, prune, and export what superstack has learned. Use when asked to "what have we learned", "show learnings", "prune stale learnings", "export learnings", or "remember this". Proactively suggest when the user asks about past patterns or wonders "didn't we fix this before?"

  • Sends data out

195 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use add-anydoc, add-clidash 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.
  • 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 5 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 5 projects that use this

  • 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 11 projects that use this

  • Saqlain-811Skill

    ios-sync

    Regenerate the iOS debug bridge against the latest upstream gstack templates. (gstack)

    Also in 6 projects that use this

  • MicrosoftSkill

    add-codex

    Use Codex (CLI + AppServer) as the full agent provider — planning, tool orchestration, native compaction, MCP tools, session resume — in place of the Claude Agent SDK. ChatGPT subscription or OPENAI_API_KEY. Per-group via agent_provider. Distinct from using OpenAI as an MCP tool (where Claude remains the planner).

    Also in 6 projects that use this

  • MicrosoftSkill

    add-deltachat

    Add DeltaChat channel integration via @deltachat/stdio-rpc-server. Native adapter — no Chat SDK bridge. Email-based messaging with end-to-end encryption.

    Also in 6 projects that use this

  • +5 more from TomGranot
  • +1 more from microsoft

The file

Show its rules and text

We split this skill into the rules it gives an agent

20 rules. 0 are common, 14 are distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 170 edited versions we read keep these.

  • 14

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If TEL_PROMPTED is no: Before starting the skill workflow, ask the user about telemetry.

    line 31
  2. Distinctive:

    If A: run this bash:

    line 41
  3. Distinctive:

    If B: run this bash:

    line 48
  4. Very specific:

    If the file does not exist, respond: "No learnings yet.

    line 138
  5. Distinctive:

    Search across all entry fields (key, insight, source, files) for the query string (case-insensitive)

    line 146
  6. Very specific:

    If no matches: "No learnings match '{query}'.

    line 148
  7. Very specific:

    Read all entries from .superstack/learnings.md

    line 152
  8. Distinctive:

    Use Glob to check if the referenced files still exist

    line 154
  9. Distinctive:

    If any file is missing, flag the entry as stale

    line 155
  10. Distinctive:

    Use AskUserQuestion to ask: "Where should I put the exported learnings?"

    line 192
  11. Distinctive:

    Use AskUserQuestion to gather each field one at a time:

    line 218
  12. Very specific:

    Read .superstack/learnings.md (create with the template header if missing)

    line 226
  13. Distinctive:

    Check if the key already exists:

    line 228
  14. Distinctive:

    If yes, append the new entry below the existing one (latest wins)

    line 229
  15. Distinctive:

    If no, append the entry at the end of the section

    line 231
  16. Distinctive:

    Write the updated file

    line 232
  17. Distinctive:

    De-duplication: If the same key already exists in the section, append the new entry below it.

    line 271
  18. Distinctive:

    Always use AskUserQuestion: before removing or modifying existing entries.

    line 290
  19. Distinctive:

    Check file existence: before claiming a learning is current (use Glob on referenced files).

    line 292
  20. Very specific:

    After the skill workflow completes (success, error, or abort), log the telemetry event.

    line 298

“Common” is measured: kept by at least 6 in 10 of the 170 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

Preamble (run first)

_TEL_TIER=$(cat ~/.superstack/config.json 2>/dev/null | grep -o '"telemetryTier": *"[^"]*"' | head -1 | sed 's/.*"telemetryTier": *"//;s/"$//'  || echo "anonymous")
_TEL_TIER="${_TEL_TIER:-anonymous}"
_TEL_PROMPTED=$([ -f ~/.superstack/.telemetry-prompted ] && echo "yes" || echo "no")
_TEL_START=$(date +%s)
_SESSION_ID="$$-$(date +%s)"
mkdir -p ~/.superstack
echo "TELEMETRY: $_TEL_TIER"
echo "TEL_PROMPTED: $_TEL_PROMPTED"
if [ "$_TEL_TIER" != "off" ]; then
_TEL_EVENT='{"skill":"learn","phase":"idea","event":"started","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"}' 
echo "$_TEL_EVENT" >> ~/.superstack/telemetry.jsonl 2>/dev/null || true
_CONVEX_URL=$(cat ~/.superstack/config.json 2>/dev/null | grep -o '"convexUrl":"[^"]*"' | head -1 | cut -d'"' -f4 || echo "")
[ -n "$_CONVEX_URL" ] && curl -s -X POST "$_CONVEX_URL/api/mutation" -H "Content-Type: application/json" -d '{"path":"telemetry:track","args":{"skill":"learn","phase":"idea","status":"success","version":"0.2.0","platform":"'$(uname -s)-$(uname -m)'","timestamp":'$(date +%s)000'}}' >/dev/null 2>&1 &
true
fi

If TEL_PROMPTED is no: Before starting the skill workflow, ask the user about telemetry. Use AskUserQuestion:

Help superstack get better! We track which skills get used and how long they take — no code, no file paths, no PII. Change anytime in ~/.superstack/config.json.

Options:

  • A) Sure, help superstack improve (anonymous)
  • B) No thanks

If A: run this bash:

echo '{"telemetryTier":"anonymous"}' > ~/.superstack/config.json
_TEL_TIER="anonymous"
touch ~/.superstack/.telemetry-prompted

If B: run this bash:

echo '{"telemetryTier":"off"}' > ~/.superstack/config.json
_TEL_TIER="off"
touch ~/.superstack/.telemetry-prompted

This only happens once. If TEL_PROMPTED is yes, skip this entirely and proceed to the skill workflow.

Wrong skill? See SKILL_ROUTER.md for all available skills.

Adapted from gstack learn skill.

Project Learnings

You manage the project's knowledge base. Learnings are stored in a single human-readable markdown file at .superstack/learnings.md, grouped by type: Patterns, Pitfalls, Preferences, Architecture, and Tools. Each entry has a key, insight, confidence score, source skill, relevant files, and date.

This skill is read/write for the learnings file ONLY. You never modify project code.

Commands

CommandAction
/learnShow recent learnings (last 20 entries across all types)
/learn search <query>Search learnings by keyword
/learn pruneCheck for stale or contradictory entries
/learn exportFormat learnings for CLAUDE.md
/learn statsSummary statistics
/learn addManually add a learning

Learnings File Format

File: .superstack/learnings.md

# Project Learnings

> Managed by `/learn`. Append-only — latest entry wins on conflicts.

## Patterns

### pda-seed-convention
- **Insight:** Use [program_id, user_pubkey, "vault"] as PDA seeds
- **Confidence:** 8/10
- **Source:** build-with-claude
- **Files:** programs/src/lib.rs
- **Date:** 2026-03-28

## Pitfalls

### cpi-signer-missing
- **Insight:** CPI calls require PDA signer seeds, not just the address
- **Confidence:** 9/10
- **Source:** debug-program
- **Files:** programs/src/instructions/settle.rs
- **Date:** 2026-03-28

## Preferences

(entries here)

## Architecture

(entries here)

## Tools

(entries here)

Each entry follows this structure:

### kebab-case-key
- **Insight:** One clear sentence describing the learning
- **Confidence:** N/10
- **Source:** skill-name-that-generated-this
- **Files:** relevant/file/path.rs, another/file.ts (optional)
- **Date:** YYYY-MM-DD

Command Implementations

Show Recent (/learn)

  1. Read .superstack/learnings.md
  2. If the file does not exist, respond: "No learnings yet. As you use skills, superstack captures patterns and insights automatically. Use /learn add to manually record something."
  3. Parse all entries across all type sections
  4. Display the 20 most recent entries (sorted by Date descending)
  5. Show total count at the bottom: "Showing 20 of N total learnings."

Search (/learn search <query>)

  1. Read .superstack/learnings.md
  2. Search across all entry fields (key, insight, source, files) for the query string (case-insensitive)
  3. Display all matching entries, grouped by type
  4. If no matches: "No learnings match '{query}'. Try a broader search or check /learn stats for what's recorded."

Prune (/learn prune)

  1. Read all entries from .superstack/learnings.md
  2. For each entry that has a Files field:
    • Use Glob to check if the referenced files still exist
    • If any file is missing, flag the entry as stale
  3. Check for contradictions:
    • Entries with the same key but different insights
    • Entries where one says "do X" and another says "don't do X" on related topics
  4. For each flagged entry, present via AskUserQuestion:
    • A) Remove — delete the entry
    • B) Keep — mark as still valid (update date to today)
    • C) Update — provide a new insight (ask for the updated text)
  5. Apply changes and save the file

Export (/learn export)

  1. Read all entries from .superstack/learnings.md
  2. Format as a clean markdown section:
## Learnings

Key patterns, pitfalls, and preferences discovered during development.

### Patterns
- **pda-seed-convention:** Use [program_id, user_pubkey, "vault"] as PDA seeds (8/10)
- **another-pattern:** Description here (7/10)

### Pitfalls
- **cpi-signer-missing:** CPI calls require PDA signer seeds, not just the address (9/10)

### Preferences
...

### Architecture
...

### Tools
...
  1. Use AskUserQuestion to ask: "Where should I put the exported learnings?"
    • A) Append to CLAUDE.md — add the section at the end of the project's CLAUDE.md
    • B) Save to .superstack/learnings-export.md — standalone file
    • C) Print only — display without saving

Stats (/learn stats)

  1. Read all entries from .superstack/learnings.md
  2. Compute and display as a table:
MetricValue
Total entriesN
Unique keysN
PatternsN
PitfallsN
PreferencesN
ArchitectureN
ToolsN
Top sourceskill-name (N entries)
Avg confidenceX.X/10
Oldest entryYYYY-MM-DD
Newest entryYYYY-MM-DD

Manual Add (/learn add)

  1. Use AskUserQuestion to gather each field one at a time:
    • Type: pattern / pitfall / preference / architecture / tool
    • Key: kebab-case identifier (suggest one based on context if possible)
    • Insight: one clear sentence
    • Confidence: 1-10 (suggest a default based on certainty)
    • Files: relevant file paths, comma-separated (optional — offer to skip)
  2. Set Source to manual
  3. Set Date to today
  4. Read .superstack/learnings.md (create with the template header if missing)
  5. Find the correct type section (e.g., ## Patterns)
  6. Check if the key already exists:
    • If yes, append the new entry below the existing one (latest wins)
    • Inform the user: "Updated existing learning '{key}' — latest entry wins."
  7. If no, append the entry at the end of the section
  8. Write the updated file
  9. Confirm: "Added {type} learning '{key}' with {confidence}/10 confidence."

How Other Skills Write Learnings

Other skills (build-with-claude, debug-program, scaffold-project, etc.) should append learnings by following this protocol:

  1. Read .superstack/learnings.md — if it does not exist, create it with this template:
# Project Learnings

> Managed by `/learn`. Append-only — latest entry wins on conflicts.

## Patterns

## Pitfalls

## Preferences

## Architecture

## Tools
  1. Find the right section — match the type to the heading (## Patterns, ## Pitfalls, etc.)
  2. Append a new entry under that section using the standard format:
### kebab-case-key
- **Insight:** One clear sentence
- **Confidence:** N/10
- **Source:** skill-name
- **Files:** path/to/file.rs
- **Date:** YYYY-MM-DD
  1. De-duplication: If the same key already exists in the section, append the new entry below it. The latest entry (by date) wins. Do not delete the old entry — it serves as history.
  2. When to write a learning:
    • A non-obvious pattern was discovered during implementation
    • A pitfall was hit and resolved (especially if it cost > 10 minutes)
    • The user expressed a preference ("I prefer X over Y")
    • An architectural decision was made with trade-offs
    • A tool or library was chosen for specific reasons
  3. When NOT to write a learning:
    • Trivial or obvious information
    • Temporary workarounds that will be removed
    • Information already in the project's README or CLAUDE.md

Non-Negotiables

  • NEVER modify project code. This skill manages learnings only.
  • Always use AskUserQuestion before removing or modifying existing entries.
  • Append-only by default — latest entry for a given key wins. Old entries are history.
  • Check file existence before claiming a learning is current (use Glob on referenced files).
  • Respect the format — other skills and tools parse this file programmatically.
  • No silent writes — always confirm with the user what was added or changed.

Telemetry (run last)

After the skill workflow completes (success, error, or abort), log the telemetry event. Determine the outcome from the workflow result: success if completed normally, error if it failed, abort if the user interrupted.

Run this bash:

_TEL_END=$(date +%s)
_TEL_DUR=$(( _TEL_END - ${_TEL_START:-$_TEL_END} ))
_TEL_TIER=$(cat ~/.superstack/config.json 2>/dev/null | grep -o '"telemetryTier": *"[^"]*"' | head -1 | sed 's/.*"telemetryTier": *"//;s/"$//' || echo "anonymous")
if [ "$_TEL_TIER" != "off" ]; then
echo '{"skill":"learn","phase":"idea","event":"completed","outcome":"OUTCOME","duration_s":"'"$_TEL_DUR"'","session":"'"$_SESSION_ID"'","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","platform":"'$(uname -s)-$(uname -m)'"}' >> ~/.superstack/telemetry.jsonl 2>/dev/null || true
true
fi

Replace OUTCOME with success/error/abort based on the workflow result.

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.