Agent skill

Context Discovery

by jellydn in jellydn/my-ai-tools

Use MCP tools to trace behavior that spans multiple modules or history sources.

MITAuto-check passedAgent Workflows

Install Context Discovery

skills CLI
$ npx skills add jellydn/my-ai-tools --skill context-discovery -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jellydn/my-ai-tools context-discovery --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jellydn/my-ai-tools.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/context-discovery .claude/skills/context-discovery && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
context-discovery
GitHub stars
123
Token cost
~1.2k tokens
SKILL.md length
355 words
Files
1
Skills in repo
33
Repo updated
First seen
Licence
MIT

At a glance

Use MCP tools to trace behavior that spans multiple modules or history sources.

  • Works in 6 steps: File Discovery → Pattern Discovery via sem → Historical Context via ctx → …
  • Tasks that involve MCP servers
  • SKILL.md covers When to Use, What It Does, Discovery Workflow and Decision Tree, plus 3 more sections
  • Calls git

What it does

Context Discovery is an agent skill from jellydn/my-ai-tools. Use MCP tools to trace behavior that spans multiple modules or history sources.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: cline, claude, opencode, amp, codex, gemini, cursor, pi

It sits in Agent Workflows, covering MCP servers. The repository describes itself as: Comprehensive configuration management for AI coding tools - Replicate my complete setup for Claude Code, OpenCode, Amp, Li, Codex and Claude Code Switch with custom… The licence is MIT.

When your agent uses it

  • Tasks that involve MCP servers

Example prompts

  • “/context-discovery”

Requirements

  • Compatibility (from SKILL.md): cline, claude, opencode, amp, codex, gemini, cursor, pi

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. File Discovery
  2. Pattern Discovery via sem
  3. Historical Context via ctx
  4. Project Knowledge via qmd
  5. Code Structure via codebase-memory-mcp
  6. External Context via context7

What it can do on your machine

Read from SKILL.md and the folder at commit 7a06584. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    cline, claude, opencode, amp, codex, gemini, cursor, pi

    From compatibility in the SKILL.md frontmatter.

Context cost

Context Discovery loads about 1.2k tokens when it runs. Until then it costs about 24 tokens; SKILL.md has 355 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~24
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jellydn/my-ai-tools at commit 7a06584, republished under its MIT licence (© jellydn). 355 words, ~1,183 tokens.

Download SKILL.mdSave it as .claude/skills/context-discovery/SKILL.md (or your agent's skills folder).
name
context-discovery
description
Use MCP tools to trace behavior that spans multiple modules or history sources.
compatibility
cline, claude, opencode, amp, codex, gemini, cursor, pi
license
MIT
hint
Use before starting work to understand codebase context via available MCP tools
user-invocable
true

Context Discovery

When to Use

Use this skill before and during implementation when:

  • Starting work on an unfamiliar module or feature
  • The task involves multiple files or systems
  • You need to understand existing patterns before coding
  • Previous decisions or discussions may be relevant
  • You want to avoid duplicating existing functionality

What It Does

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.

Discovery Workflow

Step 1: File Discovery

Find the relevant files using fff:

fff auth                        # Find auth-related files
fff "*order*"                   # Find order-related files by pattern
fff config                      # Find config files

Scan the results to identify the module structure. fff returns frecency-ranked results — the files you access most appear first.

Step 2: Pattern Discovery via sem

Once 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 module

sem provides entity-level diffs (function-level, not just file-level), making it easier to understand what actually changed.

Step 3: Historical Context via ctx

Search 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-making

ctx indexes agent sessions, so you can find past discussions, decisions, and patterns the agent has already encountered.

Step 4: Project Knowledge via qmd

Query durable project knowledge:

qmd query "What architecture decisions exist for X?"
qmd search "authentication patterns"
qmd get ADR-001        # Get a specific ADR

qmd stores project learnings, ADRs, conventions, and gotchas that persist across sessions.

Step 5: Code Structure via codebase-memory-mcp

For 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 overview
Show full SKILL.md (136 more words)Show less
Step 6: External Context via context7

Look up documentation for libraries and frameworks:

context7 "express.js middleware API reference"
context7 "react useEffect cleanup pattern"

Decision Tree

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       │
└─────────────────────────────┴─────────────────┘

When Not to Use Context Discovery

  • Simple tasks: For well-known code, grep + read is faster
  • Already familiar: If you know the codebase well, skip steps
  • External APIs: Use context7 or web search instead
  • Configuration-only changes: Straightforward edits don't need deep context

Integration with Other Skills

  • Use after /blindspots to investigate surfaced unknowns
  • Use before implementation-logger to establish baseline understanding
  • Results from context discovery feed into implementation decisions
  • Document surprising finds in implementation log

Tips

  • Start broad, narrow fast: Use fff to find candidates, then sem/qmd for depth
  • Prefer recent context: ctx and git log give you recent work, which is most relevant
  • Limit discovery: 2-5 minutes is usually enough
  • Document what you find: Add significant discoveries to implementation log or qmd

© jellydn, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/context-discovery of jellydn/my-ai-tools.

Open the folder on GitHubat commit 7a06584

Compare with similar skills

Context Discovery next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Context Discovery compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Context Discovery this skilljellydn/my-ai-tools123—~1.2kAutomated safety check: PassMIT
MCP Server Builderanthropics/skills180k64 repos~2.3kAutomated safety check: PassApache-2.0
MCP Server BuildershareAI-lab/learn-claude-code78k5 repos~1.2kAutomated safety check: PassMIT
MCP Integration for Pluginsanthropics/claude-plugins-official38k11 repos~3.1kAutomated safety check: PassApache-2.0
Microsoft Skill CreatorMicrosoftDocs/mcp1.9k3 repos~2.1kAutomated safety check: PassCC-BY-4.0
Fastmcp Client CLIPrefectHQ/fastmcp28k1 repos~823Automated safety check: PassApache-2.0

Similar skills

  • MCP Server Builder

    anthropics/skills

    Official

    Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.

    180k GitHub starsUsed in 64 repos~2.3k tokens
    Agent WorkflowsAuto-check passed
  • MCP Server Builder

    shareAI-lab/learn-claude-code

    Walks through building MCP servers in Python or TypeScript that expose tools, resources and prompts to Claude, with templates, registration and testing.

    78k GitHub starsUsed in 5 repos~1.2k tokens
    Agent WorkflowsAuto-check passed
  • MCP Integration for Plugins

    anthropics/claude-plugins-official

    Official

    Explains how to bundle Model Context Protocol servers in a Claude Code plugin, covering config files, stdio, SSE, HTTP and WebSocket server types, and authentication.

    38k GitHub starsUsed in 11 repos~3.1k tokens
    Agent WorkflowsAuto-check passed
  • Microsoft Skill Creator

    MicrosoftDocs/mcp

    Official

    Create agent skills for Microsoft technologies using official documentation.

    1.9k GitHub starsUsed in 3 repos~2.1k tokens
    Agent WorkflowsAuto-check passed
  • Fastmcp Client CLI

    PrefectHQ/fastmcp

    Query and invoke tools on MCP servers using fastmcp list and fastmcp call.

    28k GitHub starsUsed in 1 repo~823 tokens
    Agent WorkflowsAuto-check passed
  • Crush Configuration

    charmbracelet/crush

    Explains how to configure the Crush coding agent with crushrc or crush.json, covering providers, models, LSPs, MCP servers, hooks, permissions and config precedence.

    29k GitHub stars~3.7k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed

More from jellydn/my-ai-tools

All 33 skills in this repo
  • Babysit PR

    jellydn/my-ai-tools

    A skill your agent uses when monitoring an open GitHub PR for CI failures, review feedback, mergeability, and safe retries or fixes.

    123 GitHub stars~4.1k tokensUpdated yesterday
    Auto-check passed
  • Visual PR

    jellydn/my-ai-tools

    Posts a concise visual outline as a GitHub pull request comment.

    123 GitHub stars~764 tokensUpdated yesterday
    Auto-check passed
  • Qmd Knowledge

    jellydn/my-ai-tools

    Manage project knowledge with qmd — captures learnings, decisions, and conventions

    123 GitHub stars~2.1k tokensUpdated yesterday
    Auto-check passed
  • Prd

    jellydn/my-ai-tools

    Generate Product Requirements Documents from feature ideas — plans specs and requirements

    123 GitHub starsUsed in 4 repos~1.8k tokens
    Auto-check passed
  • Capability Experiments

    jellydn/my-ai-tools

    Build an interactive report or experiment when the user asks to explore model capabilities.

    123 GitHub stars~2k tokensUpdated yesterday
    Auto-check passed
  • PR Review

    jellydn/my-ai-tools

    Fix PR review comments by implementing requested changes. An agent skill from jellydn/my-ai-tools.

    123 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Context Discovery

What does Context Discovery do?

Use MCP tools to trace behavior that spans multiple modules or history sources. Context Discovery is an agent skill from jellydn/my-ai-tools. Use MCP tools to trace behavior that spans multiple modules or history sources.

When should I use Context Discovery?

Context Discovery fits situations like: tasks that involve MCP servers.

How do I install Context Discovery in Claude Code?

Run `npx skills add jellydn/my-ai-tools --skill context-discovery -a claude-code`. Or copy the skill folder (skills/context-discovery in jellydn/my-ai-tools) into .claude/skills/context-discovery in your project. Claude Code loads it when a task matches its description.

How do I install Context Discovery in Codex?

Run `npx skills add jellydn/my-ai-tools --skill context-discovery -a codex`. Or copy the skill folder (skills/context-discovery in jellydn/my-ai-tools) into .agents/skills/context-discovery in your project. Codex loads it when a task matches its description.

Can I use Context Discovery in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jellydn/my-ai-tools --skill context-discovery -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/context-discovery, .gemini/skills/context-discovery, .github/skills/context-discovery and .opencode/skills/context-discovery in your project.

What does Context Discovery need to run?

Going by SKILL.md and its folder, Context Discovery needs the command-line tools its instructions call (git). Compatibility (from SKILL.md): cline, claude, opencode, amp, codex, gemini, cursor, pi.

Does Context Discovery access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Context Discovery safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Context Discovery use?

Context Discovery is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Context Discovery use?

About 1.2k tokens (SKILL.md is roughly 4.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Context Discovery?

Skills that share tags, products or a category with Context Discovery: MCP Server Builder (anthropics/skills, 180k stars), MCP Server Builder (shareAI-lab/learn-claude-code, 78k stars), MCP Integration for Plugins (anthropics/claude-plugins-official, 38k stars) and Microsoft Skill Creator (MicrosoftDocs/mcp, 1.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Context Discovery?

jellydn (a GitHub user) maintains it in jellydn/my-ai-tools, which has 123 GitHub stars. The repository holds 33 skills in this directory. The repository was last updated on October 8, 2026.

Source: jellydn/my-ai-tools on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.