Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Code Context Finder

ASecurity

Automatically find relevant context from knowledge graph and code relationships

416 stars
0 votes
0 copies
0 views
Added 2/7/2026
developmentpythonnodedebuggingrefactoring

Works with

mcp

Security Analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned 2/12/2026

$npx -y skills add aiskillstore/marketplace --skill code-context-finder --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Code Context Finder?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Code Context Finder
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aiskillstore-code-context-finder/badge)](https://www.skillsdirectory.com/skills/aiskillstore-code-context-finder)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: code-context-finder
description: Automatically find relevant context from knowledge graph and code relationships
  while coding. Detects when context would be helpful (new files, unfamiliar code,
  architectural decisions) and surfaces related entities, prior decisions, and code
  dependencies.
author: Joseph OBrien
status: unpublished
updated: '2025-12-23'
version: 1.0.1
tag: skill
type: skill
---

# Code Context Finder

## Overview

Find and surface relevant context while coding by combining knowledge graph search with code relationship analysis. Uses smart detection to identify when additional context would be helpful, then retrieves:

- **Knowledge graph entities**: Prior decisions, project context, related concepts
- **Code relationships**: Dependencies, imports, function calls, class hierarchies

## When to Use (Smart Detection)

This skill activates automatically when detecting:

| Trigger | What to Search |
|---------|----------------|
| Opening unfamiliar file | Knowledge graph for file/module context, code for imports/dependencies |
| Working on new feature | Prior decisions, related concepts, similar implementations |
| Debugging errors | Related issues, error patterns, affected components |
| Refactoring code | Dependent files, callers/callees, test coverage |
| Making architectural decisions | Past ADRs, related design docs, established patterns |
| Touching config/infra files | Related deployments, environment notes, past issues |

For detection triggers reference, load `references/detection_triggers.md`.

## Core Workflow

### 1. Detect Context Need

Identify triggers that suggest context would help:

```
Signals to watch:
- New/unfamiliar file opened
- Error messages mentioning unknown components
- Questions about "why" or "how" something works
- Changes to shared/core modules
- Architectural or design discussions
```

### 2. Search Knowledge Graph

Use MCP memory tools to find relevant entities:

```
# Search for related context
mcp__memory__search_nodes(query="<topic>")

# Open specific entities if known
mcp__memory__open_nodes(names=["entity1", "entity2"])

# View relationships
mcp__memory__read_graph()
```

**Search strategies:**

- Module/file names → project context
- Error types → past issues, solutions
- Feature names → prior decisions, rationale
- People names → ownership, expertise

### 3. Analyze Code Relationships

Find code-level context:

```python
# Find what imports this module
grep -r "from module import" --include="*.py"
grep -r "import module" --include="*.py"

# Find function callers
grep -r "function_name(" --include="*.py"

# Find class usages
grep -r "ClassName" --include="*.py"

# Find test coverage
find . -name "*test*.py" -exec grep -l "module_name" {} \;
```

For common search patterns, load `references/search_patterns.md`.

### 4. Synthesize Context

Present findings concisely:

```markdown
## Context Found

**Knowledge Graph:**
- [Entity]: Relevant observation
- [Decision]: Prior architectural choice

**Code Relationships:**
- Imported by: file1.py, file2.py
- Depends on: module_a, module_b
- Tests: test_module.py (5 tests)

**Suggested Actions:**
- Review [entity] before modifying
- Consider impact on [dependent files]
```

## Quick Reference

### Knowledge Graph Queries

| Intent | Query Pattern |
|--------|---------------|
| Find project context | `search_nodes("project-name")` |
| Find prior decisions | `search_nodes("decision")` or `search_nodes("<feature>")` |
| Find related concepts | `search_nodes("<concept>")` |
| Find people/owners | `search_nodes("<person-name>")` |
| Browse all | `read_graph()` |

### Code Relationship Queries

| Intent | Command |
|--------|---------|
| Find importers | `grep -r "from X import\|import X"` |
| Find callers | `grep -r "function("` |
| Find implementations | `grep -r "def function\|class Class"` |
| Find tests | `find -name "*test*" -exec grep -l "X"` |
| Find configs | `grep -r "X" *.json *.yaml *.toml` |

## Integration with Coding Workflow

### Before Making Changes

1. Check knowledge graph for context on module/feature
2. Find all files that import/depend on target
3. Locate relevant tests
4. Review prior decisions if architectural

### After Making Changes

1. Update knowledge graph if significant decision made
2. Note new patterns or learnings
3. Add observations to existing entities

### When Debugging

1. Search knowledge graph for similar errors
2. Find all code paths to affected component
3. Check for related issues/decisions
4. Document solution if novel

## Resources

### references/

- `detection_triggers.md` - Detailed trigger patterns for smart detection
- `search_patterns.md` - Common search patterns for code relationships

### scripts/

- `find_code_relationships.py` - Analyze imports, dependencies, and call graphs

Attribution

aiskillstoreaiskillstore
View sourceSee grades on GitHubMore from aiskillstore →
SSkills Directory ProSkills Directory

Get any skill into Claude in one click.

Download any skill as a ZIP for Claude.ai, Claude Desktop, or .claude/skills. $9/mo.

See Pro

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills Directory ProSkills Directory

Get any skill into Claude in one click.

Download any skill as a ZIP for Claude.ai, Claude Desktop, or .claude/skills. $9/mo.

See Pro

Related Skills

Clean Code

Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments

304955 votes

Browser Extension Developer

Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.

285172 votes

Seo Optimizer

SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.

2222 votes

Google Official Seo Guide

Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation

1862 votes

Tanstack Start

Build a full-stack TanStack Start app on Cloudflare Workers from scratch — SSR, file-based routing, server functions, D1+Drizzle, better-auth, Tailwind v4+shadcn/ui. Use whenever the user mentions TanStack Start, asks to scaffold a full-stack Cloudflare app with SSR, wants an SSR dashboard, or asks for a React 19 + Cloudflare Workers app with file-based routing and server functions — even if they don't name TanStack Start specifically. No template repo — Claude generates every file fresh per ...

10311 votes
View all in development →