agentleFS
ElliotJLTElliotJLT/Claude-Skill-Potions/skills/breadcrumbs/SKILL.md

breadcrumbs

Skill60 starsChanged 10 months agoMITView on GitHub

Leaves notes for future Claude sessions in .claude/breadcrumbs.md. At session end or after significant work, records what was tried, what worked, what failed, and context for next time. On session start, reads breadcrumbs to understand history. Session-to-session memory without manual updates.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 12 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈12

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before starting work on a familiar codebase

    line 28
  2. Distinctive:

    After completing significant work

    line 31
  3. Distinctive:

    After hitting a dead end or failed approach

    line 32
  4. Distinctive:

    Before ending a session

    line 33
  5. Distinctive:

    After discovering something important about the codebase </triggers>

    line 35
  6. Very specific:

    Create .claude/ directory if it doesn't exist.

    line 47
  7. Distinctive:

    If found, summarize key points:

    line 58
  8. Distinctive:

    Don't read the whole file aloud - summarize what's relevant.

    line 73
  9. Distinctive:

    Delete truly obsolete info (completed features, resolved issues)

    line 156
  10. Distinctive:

    Write breadcrumbs for trivial work

    line 187
  11. Distinctive:

    Write vague notes ("worked on stuff")

    line 189
  12. Distinctive:

    Check for breadcrumbs at session start

    line 193
  13. Distinctive:

    Keep entries scannable (bullets, not paragraphs)

    line 197

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “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

Breadcrumbs

<purpose> Claude sessions are stateless. You close the terminal, context is gone. Next session starts fresh with no memory of what was tried, what failed, or why certain approaches were abandoned. Breadcrumbs fixes this - notes you leave for future-you (or future-Claude) to find. </purpose>

When To Activate

<triggers> **Read breadcrumbs (session start):** - Beginning of a new session - User says "what were we working on?" - User references previous session work - Before starting work on a familiar codebase

Write breadcrumbs (during/end of session):

  • After completing significant work
  • After hitting a dead end or failed approach
  • Before ending a session
  • User says "remember this" or "note for next time"
  • After discovering something important about the codebase</triggers>

Instructions

File Location

.claude/breadcrumbs.md    # Project-specific (preferred)
~/.claude/breadcrumbs/    # Global breadcrumbs by project

Create .claude/ directory if it doesn't exist. Add to .gitignore if user prefers.

Reading Breadcrumbs (Session Start)

<read_breadcrumbs> At session start, check for breadcrumbs:

cat .claude/breadcrumbs.md 2>/dev/null || echo "No breadcrumbs found"

If found, summarize key points:

## Previous Session Context

**Last worked on:** [topic]
**Status:** [completed/in-progress/blocked]
**Key notes:**
- [important finding 1]
- [important finding 2]

**Warnings from past self:**
- [thing that didn't work]

Don't read the whole file aloud - summarize what's relevant. </read_breadcrumbs>

Writing Breadcrumbs

<write_breadcrumbs> Append to breadcrumbs file (don't overwrite):

---
## [Date] - [Brief Topic]

**What we worked on:**
[1-2 sentence summary]

**What worked:**
- [approach that succeeded]

**What didn't work:**
- [approach that failed] - [why it failed]

**Left off at:**
[current state, what's next]

**Notes for next time:**
- [important context]
- [gotcha to remember]
- [file locations worth knowing]

</write_breadcrumbs>

Breadcrumb Types

Discovery breadcrumb - Found something important:

## 2024-01-15 - Discovery: Auth flow

**Found:** Auth doesn't use middleware. It's in route handlers.
**Location:** src/routes/api/*.ts - each route calls `validateSession()` directly
**Why it matters:** Don't look in middleware/ for auth stuff

Dead end breadcrumb - Tried something that failed:

## 2024-01-15 - Dead End: Redis caching

**Tried:** Adding Redis cache for user sessions
**Failed because:** App uses serverless, Redis connections don't persist
**Don't try again:** Any persistent connection solution
**Instead:** Use edge-compatible cache (KV store)

Progress breadcrumb - Work in progress:

## 2024-01-15 - In Progress: API refactor

**Done:**
- [x] Moved routes to /api/v2
- [x] Updated auth middleware

**Not done:**
- [ ] Update client SDK
- [ ] Migration script

**Blocked on:** Waiting for DB schema approval
**Next steps:** Once approved, run migration then update SDK

Context breadcrumb - Important background:

## 2024-01-15 - Context: Why we use X

**Decision:** Using Prisma instead of raw SQL
**Why:** Team preference, type safety, migration tooling
**Trade-off:** Slower queries but faster development
**Don't suggest:** Switching to raw SQL (already discussed)

Breadcrumb Hygiene

Pruning old breadcrumbs:

  • Keep last 10-15 entries
  • Archive old ones to .claude/breadcrumbs-archive.md
  • Delete truly obsolete info (completed features, resolved issues)

When to prune:

  • File exceeds ~200 lines
  • User asks to clean up
  • Old breadcrumbs reference deleted code

Output Format

When reading:

📍 **Breadcrumbs found** - Last session: [date]

[Brief summary of relevant context]

Ready to continue, or starting fresh?

When writing:

📝 **Breadcrumb dropped**

[What was recorded]

This will be here next session.

NEVER

  • Overwrite the entire breadcrumbs file (append only)
  • Include sensitive data (passwords, keys, secrets)
  • Write breadcrumbs for trivial work
  • Ignore existing breadcrumbs at session start
  • Write vague notes ("worked on stuff")

ALWAYS

  • Check for breadcrumbs at session start
  • Record dead ends (future you will thank you)
  • Include file paths for important discoveries
  • Note the "why" not just the "what"
  • Keep entries scannable (bullets, not paragraphs)

Example Session

Session 1 ends:

---
## 2024-01-15 - Auth Bug Investigation

**What we worked on:**
Users randomly getting logged out. Investigated session handling.

**What we found:**
- Sessions stored in Redis with 1hr TTL
- TTL not refreshing on activity (bug in middleware)
- File: src/middleware/session.ts:45 - missing `touch()` call

**What didn't work:**
- Checked JWT expiry first - red herring, JWTs are fine
- Looked in auth/ directory - session logic isn't there

**Left off at:**
Found the bug, haven't fixed yet. Fix is adding `session.touch()` after validation.

**Notes for next time:**
- Session middleware is in src/middleware/session.ts, NOT src/auth/
- Redis TTL is 1hr (REDIS_SESSION_TTL env var)

Session 2 starts:

📍 Breadcrumbs found - Last session: 2024-01-15

Previous session investigated logout bug:
- Found: session TTL not refreshing (src/middleware/session.ts:45)
- Fix identified: add session.touch() call
- Note: session code is in middleware/, not auth/

Ready to apply the fix?

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.