agentleFS
iamtouchskyeriamtouchskyer/memex/skills/memex-best-practices/SKILL.md

memex-best-practices

Skill142 starsChanged 3 months agoMITView on GitHub

Zettelkasten best practices for building a high-quality knowledge graph.

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 12 are distinctive, and 3 are 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.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before writing a card, verify:

    line 15
  2. Distinctive:

    Write in plain Markdown

    line 57
  3. Very specific:

    Use [[slug]] wikilinks inline, within natural sentences

    line 58
  4. Distinctive:

    Keep cards concise — aim for a few paragraphs, not an essay

    line 59
  5. Distinctive:

    Use these prefixes to signal card type at a glance:

    line 83
  6. Distinctive:

    Use the specific technology or concept name:

    line 108
  7. Distinctive:

    Use 1–3 tags per card (one domain + one type is ideal)

    line 127
  8. Distinctive:

    Prefer existing tags over creating new ones

    line 128
  9. Very specific:

    Every [[wikilink]] should appear in a sentence that explains the relationship:

    line 137
  10. Distinctive:

    Not every card needs to link to every related card.

    line 158
  11. Very specific:

    When two cards disagree, this is valuable signal — not a bug.

    line 234
  12. Distinctive:

    If a card's information is outdated:

    line 238
  13. Distinctive:

    Update it: if the new info is a simple correction

    line 239
  14. Distinctive:

    Write a new card + archive the old one: if the new understanding is significantly different

    line 240
  15. Distinctive:

    When importing notes from external tools like flomo, the bar is higher than session retro:

    line 244

≈ “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

Zettelkasten Best Practices

A reference guide for writing high-quality memex cards that compound in value over time. Covers card format, naming conventions, tagging, linking strategy, and graph health maintenance.

This is NOT a workflow skill (see memex-recall, memex-retro, memex-organize for those). This is a quality standard — consult it when writing or reviewing cards.

Card Quality Checklist

Before writing a card, verify:

  • Atomic — one insight per card. If you can split it, do.
  • Own words — distill and rephrase, don't copy-paste. This is the Feynman method: if you can't explain it simply, you don't understand it well enough.
  • Non-obvious — would this change how you approach a similar task in the future? If not, skip it.
  • Linked in context — [[wikilinks]] are embedded in sentences explaining why the relationship exists.

Card Format

---
title: "Short Noun Phrase ≤60 chars"
created: "YYYY-MM-DD"
source: "<auto-filled by client>"
tags: [domain-tag, type-tag]
category: "<domain>"
---

One atomic insight, written in your own words.

This relates to [[other-card]] because <explanation of the relationship>.

Required Frontmatter

FieldRequiredFormat
title✅Noun phrase, ≤60 chars
created✅ISO date YYYY-MM-DD
source✅Auto-filled by MCP/CLI client

Optional Frontmatter

FieldFormatNotes
tagsYAML listSee Tag System below
categorySingle stringSee Categories below
linksYAML list of slugsExplicit links (in addition to wikilinks)
statusconflict / draftSet by organize skill when needed

Body Rules

  • Write in plain Markdown
  • Use [[slug]] wikilinks inline, within natural sentences
  • Keep cards concise — aim for a few paragraphs, not an essay
  • Code examples are fine, but the insight should stand without them

Slug Naming

Slugs are permanent identifiers. Choose them carefully.

Format

  • kebab-case, all lowercase English
  • 3–60 characters
  • Descriptive but concise

Examples

✅ Good❌ BadWhy
docker-compose-port-bindingnote-1Descriptive vs. meaningless
jwt-revocation-blacklistdockerSpecific vs. too broad
nextjs-app-router-cachinghow-to-fix-the-bug-we-foundNoun phrase vs. sentence
vitest-mock-timer-gotchavitest_mock_timerkebab-case vs. snake_case

Special Slug Prefixes

Use these prefixes to signal card type at a glance:

PrefixUseExample
adr-*Architecture decision recordsadr-monorepo-vs-polyrepo
gotcha-*Pitfalls, traps, surprising behaviorgotcha-yaml-date-auto-parse
pattern-*Reusable patterns, best practicespattern-retry-with-backoff
tool-*Tool-specific tips and configstool-gh-cli-pagination

These are conventions, not enforced constraints. Use them when they fit naturally.

Categories

Assign one category per card to indicate its domain:

architecture · backend · frontend · devops · tooling · security · workflow · testing · data

Categories are broad. Use tags for fine-grained classification.

Tag System

Tags serve two purposes: domain (what technology) and type (what kind of knowledge).

Domain Tags

Use the specific technology or concept name:

docker · nodejs · typescript · react · nextjs · postgres · redis · git · api · css · linux · aws · azure

Type Tags

Classify the kind of insight:

TagWhen to use
decisionA choice was made between alternatives
gotchaSurprising behavior, easy-to-miss pitfall
patternReusable solution or approach
howtoStep-by-step procedure
referenceFactual lookup (config format, API shape)
debugRoot cause analysis of a specific bug

Tagging Guidelines

  • Use 1–3 tags per card (one domain + one type is ideal)
  • Prefer existing tags over creating new ones
  • Tags are lowercase, single-word or hyphenated (rate-limiting, not Rate Limiting)

Linking Strategy

Links are the most valuable part of a Zettelkasten. They create a network that surfaces unexpected connections.

Link in Context

Every [[wikilink]] should appear in a sentence that explains the relationship:

<!-- ✅ Good: link explains WHY -->
This contradicts what we found in [[jwt-migration]] — stateless tokens
can't be revoked without a server-side blacklist.

<!-- ❌ Bad: link without context -->
Related: [[jwt-migration]]

When to Link

  • Contradiction — "This conflicts with [[X]] because..."
  • Extension — "This builds on [[X]] by adding..."
  • Example — "[[X]] is a concrete instance of this pattern"
  • Alternative — "We chose this over the approach in [[X]] because..."
  • Prerequisite — "Understanding [[X]] is necessary context for this"

Avoid Over-Linking

Not every card needs to link to every related card. Link when the connection would surprise someone or change how they read either card.

The Keyword Index

The index card is a curated entry point to the entire knowledge graph — inspired by Luhmann's Schlagwortregister (keyword register).

Purpose

  • Provides structured entry points for the memex-recall skill
  • Groups cards by concept, not by chronology
  • Each card appears under 1–2 categories

Format

---
title: Keyword Index
created: <date>
source: organize
---

## Authentication
- [[jwt-revocation-blacklist]] — Server-side revocation for stateless tokens
- [[oauth2-pkce-flow]] — PKCE flow for public clients (SPAs, mobile)

## Docker
- [[docker-compose-port-binding]] — 0.0.0.0 vs 127.0.0.1 gotcha
- [[docker-multi-stage-builds]] — Reducing image size with build stages

The index is maintained by the memex-organize skill. You can also update it manually after writing cards.

The Recall → Work → Retro Loop

The core memex workflow is a learning cycle:

┌─────────────────────────────────────────────────┐
│                                                 │
│   ┌──────────┐    ┌──────────┐    ┌──────────┐ │
│   │  RECALL  │───▶│   WORK   │───▶│  RETRO   │ │
│   │          │    │          │    │          │ │
│   │ Search   │    │ Do the   │    │ Distill  │ │
│   │ existing │    │ actual   │    │ insights │ │
│   │ cards    │    │ task     │    │ to cards │ │
│   └──────────┘    └──────────┘    └──────────┘ │
│        ▲                               │       │
│        └───────────────────────────────┘       │
│              Cards feed future recalls          │
└─────────────────────────────────────────────────┘
  • Recall (task start) — search for relevant prior knowledge before starting work. Avoid repeating past mistakes.
  • Work — do the actual task, informed by what you recalled.
  • Retro (task end) — reflect on what you learned. Write cards for non-obvious insights only.

This loop is implemented by the memex-recall and memex-retro skills. The key insight: retro is not just documentation — it's how you learn. Writing in your own words forces deeper understanding than simply bookmarking a Stack Overflow link.

Graph Health Maintenance

A knowledge graph degrades without maintenance. The memex-organize skill handles this, but here are the principles:

Orphan Cards (0 inbound links)

An orphan is a card that nothing links to. It may be:

  • Genuinely standalone — fine, leave it alone
  • Missing connections — search for related cards and add contextual links

Hub Cards (≥10 inbound links)

A hub card is referenced by many others. It may be:

  • Appropriately central (e.g., a foundational concept) — fine
  • Too broad — consider splitting into smaller, more atomic cards

Contradictions

When two cards disagree, this is valuable signal — not a bug. The organize skill flags contradictions with status: conflict for human resolution. Don't auto-resolve conflicting beliefs.

Staleness

If a card's information is outdated:

  • Update it if the new info is a simple correction
  • Write a new card + archive the old one if the new understanding is significantly different

Importing from External Sources (e.g., Flomo)

When importing notes from external tools like flomo, the bar is higher than session retro:

  • Digest, don't copy. External notes are raw material, not Zettelkasten cards. Read them, identify the genuine insight, and rewrite as an atomic card.
  • Tag with source: flomo (or the appropriate source). This enables anti-loopback guards in bidirectional sync.
  • Merge related notes. 5 flomo memos about the same topic → 1 card with the distilled insight.
  • Skip garbage. Short fragments, bookmarks without context, copy-pasted quotes with no personal insight — these don't make it in.
  • Quality checklist still applies. Imported cards must be atomic, in your own words, non-obvious, and linked.

Anti-Loopback Rule

Cards with source: flomo are never pushed back to flomo. This is enforced in code and must not be removed. The same principle applies to any future external source: never echo content back to its origin.

Anti-Patterns

❌ Don't✅ Do Instead
Write a card for every taskOnly capture non-obvious insights
Copy-paste error messages as cardsDistill the root cause and fix
Create cards with no linksAlways link to at least one related card
Use vague slugs like notes or miscUse descriptive slugs: postgres-connection-pool-sizing
Write essay-length cardsKeep cards atomic — split if needed
Hoard tags (5+ per card)Use 1–3 tags: one domain + one type
Link without explaining whyEvery [[link]] needs a surrounding sentence
Mechanical 1:1 import from external toolsDigest and curate — external notes are raw material
Push source: flomo cards back to flomoAnti-loopback: never echo content to its origin

Quick Reference Card

For easy lookup, here's the complete format in one block:

---
title: "Descriptive Noun Phrase ≤60 chars"
created: "2025-01-15"
source: "<auto>"
tags: [typescript, gotcha]
category: "backend"
---

<One atomic insight in your own words.>

<Context with [[wikilinks]] explaining relationships.>

Slug: kebab-case-english-3-to-60-chars Tags: 1 domain + 1 type, lowercase Links: in sentences, not in lists Length: a few paragraphs, not an essay

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.