agentleFS
raomasterraomaster/skills/save-knowledge/SKILL.md

save-knowledge

Skill1 starsChanged 7 months agoMITView on GitHub

Use when a decision, discovery, plan outcome, or important finding needs to be saved for future reference. Routes to kb inbox (if available) AND appends to episodic memory for kb-dream. Falls back to docs/decisions/ when kb is not installed.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    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:

    NEVER use kb add "text" — it will fail with "file not found"

    line 18
  2. Very specific:

    When kb is available, every save goes to two places:

    line 22
  3. Very specific:

    When saving knowledge with kb available:

    line 68
  4. Very specific:

    When kb is NOT available:

    line 74
  5. Very specific:

    Create docs/decisions/YYYY-MM-DD-<title>.md in the current project

    line 75
  6. Very specific:

    When kb is NOT available, create docs/decisions/YYYY-MM-DD-<title>.md:

    line 93

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

save-knowledge

Save decisions and discoveries to the right place, automatically.

Priority Order

  1. If kb command exists → kb "<structured content>" (sends text directly to inbox as a timestamped .md file)
  2. Else → create docs/decisions/YYYY-MM-DD-<title>.md in the current project directory

IMPORTANT — kb CLI usage:

  • kb "text" → saves text to inbox (CORRECT for saving knowledge)
  • kb add <file> → copies an existing FILE to inbox (only for files, NOT text)
  • NEVER use kb add "text" — it will fail with "file not found"

Two Save Targets

When kb is available, every save goes to two places:

1. Inbox (for classification by kb process)

kb "Title: <descriptive title>

Decision: [what was decided]
Why: [the reason]
Context: [project, component]"

2. Episodic Memory (for consolidation by kb-dream)

Append claims to $KB_VAULT/memory/YYYY-MM-DD.md. This file accumulates claims throughout the day. kb-dream reads these to build MEMORY.md and promote high-confidence findings to raw/memory-derived/.

# Append to today's memory file — create if it doesn't exist
MEMORY_FILE="$KB_VAULT/memory/$(date +%Y-%m-%d).md"

Each claim uses this YAML format:

- claim: "Short factual statement of what was decided or discovered"
  memory_type: decision | technical-finding | user-preference | user-rule
  confidence: low | medium | high
  context: "Project or area this relates to"

memory_type guide:

TypeWhen to useExample
decisionA choice between alternatives was made"Chose Regional LB over Global LB for webhook traffic"
technical-findingSomething non-obvious was discovered or validated"Cloud Armor policy is active on the LB backend service"
user-preferenceUser expressed a preference for how things should work"User wants gemini-3-flash-preview only"
user-ruleUser set a rule that must always be followed"Never log webhook payloads"

confidence guide:

LevelCriteria
highVerified by evidence (logs, config, tests, user confirmation)
mediumReasonable inference from available data
lowSpeculation or unverified assumption

Workflow

When saving knowledge with kb available:

  1. Send structured content to inbox: kb "Title: ..."
  2. Append claim(s) to $KB_VAULT/memory/$(date +%Y-%m-%d).md
  3. Both happen every time — never skip memory

When kb is NOT available:

  1. Create docs/decisions/YYYY-MM-DD-<title>.md in the current project
  2. Memory is not written (no vault access)

What to Save

Save when you encounter:

  • A decision between multiple approaches (what was chosen and why)
  • A discovery that wasn't obvious from the code or docs
  • A constraint that will affect future work
  • The outcome of an experiment or investigation

What to Include

Structure every save with a clear title line followed by structured content. The content will be processed later by kb process which classifies and archives it.

Markdown Fallback Format

When kb is NOT available, create docs/decisions/YYYY-MM-DD-<title>.md:

# [Title]

**Date:** YYYY-MM-DD

## Decision
[What was decided]

## Why
[Rationale and constraints]

## Alternatives Discarded
- [Option A]: [why rejected]
- [Option B]: [why rejected]

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.