This skill guides developers through a sequence of discovery steps using tools such as `fff`, `sem`, `ctx`, and `qmd`, with code-graph and documentation lookups for deeper context. It also explains when discovery is unnecessary and recommends documenting significant findings to inform implementation decisions.
The canonical home for this skill is context-discovery in jellydn/my-ai-tools
Use this skill before and during implementation when:
Leverages available MCP tools to proactively discover context about the codebase, existing patterns, decisions, and related work. Instead of relying solely on grep/read cycles, it uses purpose-built discovery tools.
Find the relevant files using fff:
fff auth # Find auth-related files
fff "*order*" # Find order-related files by pattern
fff config # Find config filesScan the results to identify the module structure. fff returns frecency-ranked results — the files you access most appear first.
semOnce you know the relevant files, use sem to understand the code's history and structure:
sem blame path/to/file.ts # See who changed each line and when
sem diff main..HEAD -- path/ # See what changed in this area
sem summary path/to/ # Get a summary of the modulesem provides entity-level diffs (function-level, not just file-level), making it easier to understand what actually changed.
ctxSearch past agent sessions for relevant context:
ctx search "auth implementation patterns" # Past work on auth
ctx search "this module" path/to/module/ # Past discussions about this area
ctx search "decision" "why did we" path/ # Past decision-makingctx indexes agent sessions, so you can find past discussions, decisions, and patterns the agent has already encountered.
qmdQuery durable project knowledge:
qmd query "What architecture decisions exist for X?"
qmd search "authentication patterns"
qmd get ADR-001 # Get a specific ADRqmd stores project learnings, ADRs, conventions, and gotchas that persist across sessions.
codebase-memory-mcpFor large codebases, use the code graph to understand structure:
search_graph("OrderHandler") # Find the function/class
trace_path("OrderHandler", calls) # What does it call?
trace_path("OrderHandler", callers) # What calls it?
get_code_snippet("package.OrderHandler") # Read the source
get_architecture() # Project overviewcontext7Look up documentation for libraries and frameworks:
context7 "express.js middleware API reference"
context7 "react useEffect cleanup pattern"Where to look depends on what you need:
┌─────────────────────────────┬─────────────────┐
│ Need this │ Use this tool │
├─────────────────────────────┼─────────────────┤
│ Find files by name/pattern │ fff │
│ Find what changed recently │ sem diff │
│ Find past agent discussions │ ctx search │
│ Find ADRs / project memory │ qmd query │
│ Understand code structure │ codebase-memory │
│ Look up external docs │ context7 │
│ Find related PRs │ github MCP │
└─────────────────────────────┴─────────────────┘context7 or web search instead/blindspot-pass to investigate surfaced unknownsimplementation-logger to establish baseline understandingfff to find candidates, then sem/qmd for depthctx and git log give you recent work, which is most relevantjellydn/my-ai-tools
1524f4a
fffsemsem blamesem diffsem summaryctxctx searchqmdqmd queryqmd searchqmd getcontext7gitgit logsearch_graphtrace_pathget_code_snippetget_architecturecontext7Canonical home
since Nov 30, 2026
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.