Skip to content
Back to skills

Codebase Research 1

ASecurity

Patterns and methods for researching a codebase to understand bug context. Use when investigating how code works, finding related files, or understanding code flow.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
ai-agentsrefactoringgitdocumentation

Security analysis

A100/100

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

Scanned September 27, 2026

npx -y skills add David-Li0406/meta-skill-evloving --skill codebase-research-1 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Codebase Research 1?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Codebase Research 1
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-codebase-research-1/badge)](https://www.skillsdirectory.com/skills/david-li0406-codebase-research-1)

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

Download with Pro
SKILL.md
---
name: codebase-research
description: Patterns and methods for researching a codebase to understand bug context. Use when investigating how code works, finding related files, or understanding code flow.
license: MIT
compatibility: VS Code Insiders with GitHub Copilot
metadata:
  author: accruent
  version: "2.0"
  based-on: HumanLayer research_codebase pattern
---

# Codebase Research

This skill provides research patterns for bug investigation, following the HumanLayer documentarian philosophy.

## Core Principles

### The Documentarian Philosophy

From HumanLayer's research_codebase pattern:

> **YOUR ONLY JOB IS TO DOCUMENT AND EXPLAIN THE CODEBASE AS IT EXISTS TODAY**
> - DO NOT suggest improvements or changes
> - DO NOT perform root cause analysis (that's a separate phase)
> - DO NOT critique the implementation
> - ONLY describe what exists, where it exists, how it works

### Research Best Practices

1. **Read files FULLY first** - Never use limit/offset for initial reads
2. **Use a single comprehensive subagent** - VS Code subagents run sequentially
3. **Wait for subagent to complete** - Synthesize only after it returns
4. **Verify every claim** - Include file:line references
5. **Stay factual** - No opinions, evaluations, or suggestions

## VS Code Copilot Tool Reference

| Tool Identifier | Purpose | Example Usage |
|-----------------|---------|---------------|
| `search/codebase` | Semantic search | Find conceptually related code |
| `search/fileSearch` | File name patterns | Find `*.test.ts` files |
| `search/textSearch` | Grep-style search | Find exact error messages |
| `search/usages` | Symbol usages | Trace function calls |
| `read/readFile` | Read file contents | Get full context |
| `web/githubRepo` | Git/GitHub info | Historical context |
| `runSubagent` | Spawn subagent | Comprehensive research |
| `edit/editFiles` | Create files | Save research documents |

## Subagent Research Pattern

Since VS Code subagents run sequentially (not in parallel), combine all research tasks into a single comprehensive subagent prompt:

```
Use a subagent to perform comprehensive codebase research for bug {TICKET-ID}.

## Research Tasks

### Task 1: Locate Relevant Code
Find all locations related to: {bug symptoms}
- Search for: {keywords, function names, error messages}
- Return: Table of file:line references

### Task 2: Analyze Code Flow
For relevant files, document:
- Entry points, data flow, dependencies, exit points
- Return: Flow diagram with file:line citations

### Task 3: Find Related Patterns
Search for:
- Similar code, related tests, documentation
- Return: Examples with file:line references

## Rules
- Document only, no evaluations
- Include file:line for every claim
```

## Research Document Structure

### hypothesis.md
Initial investigation hypotheses created before research:
- Symptom analysis
- Investigation areas with search targets
- Priority order

### codebase-research.md
Comprehensive research findings:
- Code locations table
- Execution flow diagram
- Dependencies and relationships
- Exact code snippets with citations

### verified-research.md
Verification of research accuracy:
- Claim verification tables
- Corrections made
- Confidence ratings

## Templates

See the templates folder for:
- [research-template.md](templates/research-template.md) - Main research document
- [hypothesis-template.md](templates/hypothesis-template.md) - Initial hypotheses

## Forbidden Patterns

Never use these phrases in research documents:
- "This could be improved by..."
- "A better approach would be..."
- "This is a code smell..."
- "Consider refactoring..."
- "The problem is..."
- "This should be..."

## References

- [HumanLayer research_codebase.md](https://github.com/humanlayer/humanlayer/blob/main/.claude/commands/research_codebase.md)
- [VS Code Custom Agents](https://code.visualstudio.com/docs/copilot/customization/custom-agents)
- [VS Code Subagents](https://code.visualstudio.com/docs/copilot/chat/chat-sessions#_context-isolated-subagents)

Files in this skill

  • SKILL.md3.9 KB
  • templates/hypothesis-template.md2 KB
  • templates/research-template.md2.7 KB

Attribution

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

Loading comments…