/cf-ask
Manual onlyHigh> 3,000 tokens injected into promptupdatedQuick Q&A about your codebase with persistent memory.
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-ask skill answers questions about your codebase and saves the answers to persistent memory. Future sessions can reference these answers, building institutional knowledge.
Usage
/cf-ask [question]
What It Does
- Recalls from Memory — Searches existing
docs/memory/using a 3-tier frontmatter grep (description → tags → full-text) for previously answered questions or related context - Analyzes Codebase — If not already answered, explores relevant files via the
cf-exploreragent - Provides Answer — Gives clear, concise explanation with code examples
- Saves to Memory — Delegates to
cf-writeragent, stores Q&A indocs/memory/with frontmatter (title, description, tags) for efficient future recall
Examples
/cf-ask How does the auth middleware work?
When to Use
- Onboarding to a new codebase
- Understanding design decisions
- Locating specific functionality
- Quick clarifications during development
Memory Integration
/cf-ask both reads from and writes to the Memory System:
- Recall — Before exploring code, searches existing
docs/memory/via MCP tools or a 3-tier frontmatter grep. If a direct match is found, the existing answer is presented — no redundant exploration needed. - Save — After answering, saves the Q&A to
docs/memory/(organized by category:features/,conventions/,decisions/) with YAML frontmatter and indexes it via MCP for future recall. Confirms with a 2-line summary: the markdown file path and whether the MCP database indexing succeeded.
See the Memory System reference for full details on tiers, search pipeline, memory types, and markdown format.
Benefits
- Reduces Ramp-Up Time — Captured knowledge speeds onboarding
- Fast Recall — Frontmatter grep finds relevant docs without reading full content
- Searchable — Find answers from previous conversations
- AI-Readable — Helps AI understand your codebase faster