/cf-remember

High> 3,000 tokens injected into promptupdated

Capture project knowledge for AI memory across sessions.

Context footprint: (high) — what does this mean?

CLI Requirement: OPTIONAL

Uses the memory MCP from coding-friend-cli for fast indexed search. Without the CLI: falls back to grep -r '<query>' docs/memory/. Full functionality preserved, slower memory recall. See CLI requirements.

The /cf-remember skill captures important project knowledge and saves it for AI recall in future sessions in docs/memory/. Unlike /cf-learn (educational notes for humans), this saves project context — conventions, decisions, feature flows, gotchas — that Coding Friend and Claude Code can reference later.

Usage

/cf-remember [topic]

Without [topic], it will scan the entire conversation for key knowledge.

What It Does

  1. Captures Context — Extracts relevant code patterns and decisions
  2. Documents Learning — Writes clear explanations of how things work
  3. Saves to Memory — Stores in docs/memory/ with proper organization
  4. Indexes for Retrieval — Makes knowledge searchable and linkable; confirms with a 2-line summary: the markdown file path and MCP database indexing status
  5. Enables Cross-Session Reference — Future work uses these docs

Examples

/cf-remember auth flow decisions and implementation
/cf-remember
# Auto detect the key knowledge based on the conversation

Memory Organization

Knowledge is saved to docs/memory/ organized by category:

CategoryFolderUse For
Featuresfeatures/Feature-specific logic, flows, APIs
Conventionsconventions/Project-wide patterns and rules
Decisionsdecisions/Architecture/design decision records
Bugsbugs/Bug root causes, fixes, and how to avoid recurrence
Infrastructureinfrastructure/Build, deploy, CI/CD, environment setup

Category selection guide:

  • Fixing a bug → bugs/ (root cause, fix, prevention), NOT features/
  • Adding/changing a feature → features/
  • Establishing a pattern or rule → conventions/
  • Choosing between approaches → decisions/
  • Build/deploy/tooling knowledge → infrastructure/

For details on memory types, markdown format, search pipeline, and tier architecture, see the Memory System reference.

Auto-Invocation

cf-remember activates automatically on four signals:

  1. Non-obvious bug fix — a cf-fix or cf-sys-debug session that involved a tricky root cause, a workaround, or multiple failed attempts → saved to bugs/
  2. Architecture decision — an explicit "we chose X over Y because…" moment in conversation → saved to decisions/
  3. New convention — a project-wide naming rule, API pattern, or structural constraint established during implementation → saved to conventions/
  4. Session gotchas — a substantial session ends with undocumented feature flows or non-obvious API behavior → saved to features/

It does not auto-invoke for trivial one-line fixes, simple config changes, or purely educational exchanges (use /cf-learn for those).

When to Use

  • After onboarding to understand current patterns
  • When completing complex features
  • After discovering important design decisions
  • When solving challenging problems (for future reference)
  • Documenting gotchas and lessons learned