Agent skill

Codebase Research

by NoobyGains in NoobyGains/godmode

A skill your agent uses when building ANY feature within an existing project - search the current codebase for existing patterns, conventions, similar implementations, and established approaches…

MITAuto-check: notes

Install Codebase Research

skills CLI
$ npx skills add NoobyGains/godmode --skill codebase-research -a claude-code

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

GitHub CLI
$ gh skill install NoobyGains/godmode codebase-research --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/NoobyGains/godmode.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/codebase-research .claude/skills/codebase-research && 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
codebase-research
GitHub stars
107
Token cost
~3.2k tokens
SKILL.md length
1,149 words
Files
1
Skills in repo
34
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when building ANY feature within an existing project - search the current codebase for existing patterns, conventions, similar implementations, and established approaches…

  • Works in 4 steps: SEARCH -- Query the codebase for similar… → ANALYZE -- Study how existing code… → MATCH -- Align your new code with… → …
  • Building ANY feature within an existing project - search the current codebase for existing patterns
  • SKILL.md covers Overview, The Prime Directive, When to Use and The Entry Protocol, plus 9 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Codebase Research is an agent skill from NoobyGains/godmode. Use when building ANY feature within an existing project - search the current codebase for existing patterns, conventions, similar implementations, and established approaches before writing new code

Its SKILL.md is about 3.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: The AI development framework that thinks before it builds. 36 composable skills for Claude Code, Cursor, Codex, and OpenCode. The licence is MIT.

When your agent uses it

  • Building ANY feature within an existing project - search the current codebase for existing patterns
  • Similar implementations
  • Established approaches before writing new code

Example prompts

  • “/codebase-research”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. SEARCH -- Query the codebase for similar files, functions, patterns, and conventions
  2. ANALYZE -- Study how existing code handles the same concerns
  3. MATCH -- Align your new code with established conventions
  4. ONLY THEN -- Begin writing

What it can do on your machine

Read from SKILL.md and the folder at commit 441103a. 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

    No scripts in the folder and no shell commands in SKILL.md (its code samples are dot).

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

  • Network

    No URLs in SKILL.md.

    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.

Context cost

Codebase Research loads about 3.2k tokens when it runs. Until then it costs about 54 tokens; SKILL.md has 1,149 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~54
When it runs · the whole SKILL.md, loaded when a task matches
~3.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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:95
    * | Match config approaches | Search for .env usage, config files, constants |

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 NoobyGains/godmode at commit 441103a, republished under its MIT licence (© NoobyGains). 1,149 words, ~3,208 tokens.

Download SKILL.mdSave it as .claude/skills/codebase-research/SKILL.md (or your agent's skills folder).
name
codebase-research
description
Use when building ANY feature within an existing project - search the current codebase for existing patterns, conventions, similar implementations, and established approaches before writing new code

Codebase Research

Overview

Before writing new code in an existing project, understand what already exists inside it. The codebase itself is the most authoritative reference for how things should be built. Every project accumulates conventions, patterns, and implicit standards that new code must respect.

Core principle: Search the current codebase before coding. Find similar files, functions, and patterns. Match existing conventions exactly. Never introduce a second way of doing something when a first way already exists.

No exceptions. No workarounds. No shortcuts.

The Prime Directive

NO NEW CODE WITHOUT UNDERSTANDING THE EXISTING CODE FIRST

If you have not searched the current codebase for prior implementations of the same pattern, you are risking inconsistency. Found nothing similar? Document what you searched. Then build, establishing the convention deliberately.

No excuses:

  • Do not "just start coding and check conventions later"
  • Do not assume your preferred pattern is the project's pattern
  • Do not introduce new libraries when the project already uses an equivalent
  • Do not create a new file structure that contradicts the existing one
  • "I know the best way to do this" is irrelevant if the project already does it a different way consistently

When to Use

Mandatory when:

  • Adding a new feature to an existing codebase
  • Creating a new file, component, module, or service
  • Implementing a pattern that likely exists elsewhere in the project
  • Writing tests for existing functionality
  • Adding error handling, logging, or validation logic

Particularly valuable when:

  • The project has established architectural patterns (MVC, hexagonal, etc.)
  • There are existing files similar to what you need to create
  • The codebase has custom utilities, helpers, or shared modules
  • The project uses specific naming conventions or code organization rules
  • There are existing tests that demonstrate the expected testing approach

The Entry Protocol

dot
digraph codebase_research_gate {
    rankdir=TB;
    start [label="Task: Write new code\nin existing project", shape=doublecircle];
    search [label="SEARCH\ncurrent codebase for\nsimilar implementations", shape=box];
    found [label="Similar patterns found?", shape=diamond];
    analyze [label="ANALYZE\nConventions, structure,\nnaming, error handling", shape=box];
    template [label="Use as template?\n(follow the pattern)", shape=diamond];
    follow [label="FOLLOW\nMatch the existing pattern\nexactly", shape=box style=filled fillcolor=lightgreen];
    adapt [label="ADAPT\nUse the convention\nwith modifications", shape=box style=filled fillcolor=lightyellow];
    establish [label="ESTABLISH\nNo precedent exists;\ncreate a deliberate\nnew convention", shape=box];
    document [label="Document search results\nand decision rationale", shape=box];

    start -> search;
    search -> found;
    found -> analyze [label="yes"];
    found -> document [label="no"];
    document -> establish;
    analyze -> template;
    template -> follow [label="yes - close match"];
    template -> adapt [label="partially - same idea\ndifferent details"];
}

BEFORE writing new code in an existing project:

  1. SEARCH -- Query the codebase for similar files, functions, patterns, and conventions
  2. ANALYZE -- Study how existing code handles the same concerns
  3. MATCH -- Align your new code with established conventions
  4. ONLY THEN -- Begin writing

Search Methodology

What to Search For

When about to create something new, search the codebase for each of these:

Search TargetWhyHow
Similar filesFind the template to followGlob for files with similar names or in similar directories
Similar functionsMatch function signatures and patternsGrep for functions that do analogous work
Imports and dependenciesUse what the project already usesGrep for import statements to find established libraries
Error handlingMatch the project's error patternsGrep for try/catch, Result types, error classes
Naming conventionsUse the same casing and terminologyRead adjacent files, check for camelCase vs snake_case vs kebab-case
File organizationPlace new files where they belongList directory structures, find where similar code lives
Test patternsWrite tests the way the project writes testsFind test files for similar modules, match their structure
Configuration patternsMatch config approachesSearch for .env usage, config files, constants
Search Techniques

Structured search sequence -- Follow this order for thorough coverage:

1. DIRECTORY SCAN: List files in the relevant directories
   -> Understand the project's file organization

2. SIMILAR FILE SEARCH: Glob for files with similar names or purposes
   -> Find the closest existing template for what you need to build

3. PATTERN GREP: Search for specific patterns you plan to use
   -> Confirm the project's approach to that pattern

4. IMPORT ANALYSIS: Check what libraries and utilities are already imported
   -> Use existing dependencies rather than introducing new ones

5. TEST FILE REVIEW: Find tests for similar functionality
   -> Match the testing approach, assertion style, and setup patterns

Minimum threshold before writing new code: Review at least 2 similar files in the codebase.

Convention Matching

The Consistency Principle

When the codebase does something one way, you do it the same way. Personal preference is irrelevant. Project consistency outweighs individual opinion.

DimensionMatch Exactly
NamingVariable names, function names, file names, class names
StructureFile layout, directory organization, module boundaries
PatternsHow the project handles state, errors, async, validation
StyleFormatting, comment style, documentation approach
DependenciesUse the project's existing libraries, not alternatives
TestingTest framework, assertion library, setup/teardown approach
Error handlingThrow vs return, error types, error messages
Common Convention Signals
LOOK FOR these indicators of established conventions:

- Linter/formatter config (.eslintrc, .prettierrc, rustfmt.toml, etc.)
  -> These are explicit rules. Follow them exactly.

- Shared utility files (utils/, helpers/, lib/, common/)
  -> These are the project's building blocks. Use them.

- Base classes or interfaces (BaseController, AbstractService)
  -> These define the inheritance/composition pattern. Extend them.

- Barrel files (index.ts, __init__.py, mod.rs)
  -> These define the export pattern. Add to them.

- Test helpers (test/helpers/, fixtures/, factories/)
  -> These are the testing infrastructure. Build on them.

Analysis Checklist

When you find similar code in the codebase, extract answers to these questions:

1. FILE PLACEMENT: Where does this type of file live?
   -> Same directory? Nested by feature? Grouped by type?

2. FILE NAMING: What naming pattern does the file follow?
   -> ComponentName.tsx? component-name.ts? component_name.py?

3. EXPORTS: How are things exported?
   -> Default export? Named exports? Re-exported from barrel?

4. FUNCTION SIGNATURES: What do similar function signatures look like?
   -> Parameter ordering, return types, async vs sync

5. ERROR HANDLING: How does this part of the codebase handle errors?
   -> Try/catch? Result types? Error callbacks? Thrown exceptions?

6. LOGGING: Does the project have a logging pattern?
   -> Logger instance? Console methods? Structured logging?

7. VALIDATION: How does the project validate input?
   -> Zod? Joi? Manual checks? Type guards?

8. STATE MANAGEMENT: How is state handled?
   -> Redux? Zustand? Context? Signals? Local state?

9. TESTING APPROACH: What do tests for similar code look like?
   -> Unit tests? Integration? What assertion library?

10. DOCUMENTATION: Are there JSDoc comments, docstrings, or inline docs?
    -> Match the existing documentation density and style.

When No Precedent Exists

Sometimes you are genuinely building something the codebase has never done before. In that case:

  1. Confirm absence -- Search at least 3 different ways to be sure no precedent exists
  2. Check adjacent projects -- If this is a monorepo, check sibling packages
  3. Consult external sources -- Use godmode:github-search to find patterns from public repositories
  4. Establish deliberately -- When creating a new convention, make it consistent with the spirit of the existing codebase
  5. Document the decision -- Note why a new pattern was introduced
Show full SKILL.md (459 more words)Show less

Integration with Other Skills

During Intent Discovery

When godmode:intent-discovery is exploring the project landscape:

  1. Search the codebase for existing implementations related to the proposed feature
  2. Report conventions that the new feature must follow
  3. Identify reusable code -- utilities, components, and services that already solve part of the problem
During Implementation

When writing code after design approval:

  1. Find the template file -- the closest existing file to what you need to create
  2. Copy the structure -- match the template's organization exactly
  3. Swap the specifics -- replace domain details while preserving the pattern
  4. Verify consistency -- compare your new file against the template to catch deviations

Cognitive Traps

RationalizationTruth
"My approach is cleaner than what the project uses"Consistency across a project is worth more than local perfection. Two patterns are worse than one adequate pattern.
"I will refactor the existing code to match my style"Refactoring is a separate task. Match the existing style now. Propose a refactor later if warranted.
"The project does not have a pattern for this"Did you search thoroughly? Check 3+ similar files. If truly no precedent, establish one deliberately.
"I do not need to check -- this is a new module"New modules still live inside the existing project. They must respect its conventions.
"The existing pattern is outdated"Outdated but consistent is better than modern but inconsistent. Propose a migration, do not create a fork.
"Checking conventions slows me down"Writing code that fails review or introduces inconsistency slows you down more.
"It is just a small utility function"Small utilities are the most reused code. Getting their pattern wrong affects everything that depends on them.

Guardrails

Prohibited actions:

  • Writing new code without searching the codebase for similar implementations
  • Introducing a new library when the project already uses an equivalent
  • Creating a file structure that contradicts the existing organization
  • Using a naming convention different from the project's established one
  • Skipping test pattern matching ("I will write tests my way")

Required actions:

  • Search the codebase for at least 2 similar files before writing new code
  • Match the naming conventions of the surrounding code exactly
  • Use existing shared utilities and helpers instead of creating duplicates
  • Follow the established testing patterns for the project
  • Document your findings when no precedent exists in the codebase

Quick Reference

SEARCH -> ANALYZE -> MATCH -> BUILD

Search: Find 2+ similar files, grep for patterns, check imports
Analyze: Extract conventions for naming, structure, error handling, testing
Match: Align your new code with every convention you found
Build: Write code that looks like it belongs in the project

Integration

Invoked during:

  • godmode:intent-discovery -- Search codebase during "Survey project landscape" phase
  • godmode:reference-engine -- Routed here for internal code pattern research
  • godmode:task-planning -- Verify conventions before each implementation task
  • godmode:quality-enforcement -- Consistency checks against codebase patterns

Complementary skills:

  • godmode:github-search -- For searching EXTERNAL repositories, GitHub, and package registries for open-source implementations, libraries, and patterns to study or adopt
  • godmode:pattern-matching -- Deeper pattern analysis within the codebase
  • godmode:specification-first -- Feeds codebase conventions into formal specifications
  • godmode:project-bootstrap -- When starting a new project (no existing codebase to research)

© NoobyGains, 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/codebase-research of NoobyGains/godmode.

Open the folder on GitHubat commit 441103a

Compare with similar skills

Codebase Research 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.

Codebase Research compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Codebase Research this skillNoobyGains/godmode107—~3.2kAutomated safety check: NotesMIT
Stay Within LimitsBuilderIO/skills4.5k—~857Automated safety check: PassMIT
Upgrading Mwaa Environmentsaws/agent-toolkit-for-aws2.8k—~7.3kAutomated safety check: PassApache-2.0
Od Next Media Inputsnexu-io/open-design100k—~1.1kAutomated safety check: PassApache-2.0
Cost Sessionruvnet/ruflo74k1 repos~781Automated safety check: NotesMIT
Link In Text Blockthedaviddias/Front-End-Checklist74k—~918Automated safety check: PassMIT

Similar skills

  • Stay Within Limits

    BuilderIO/skills

    A skill your agent uses when long-running or parallel agent work must respect 5-hour and weekly usage limits by checking usage between waves, pausing near the cap, and resuming only when the window…

    4.5k GitHub stars~857 tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Upgrading Mwaa Environments

    aws/agent-toolkit-for-aws

    Official

    Upgrades an MWAA environment to a newer Airflow version — within 2.x, within 3.x, or across the 2.x-to-3.x boundary.

    2.8k GitHub stars~7.3k tokensUpdated today
    Data & AnalyticsAuto-check passed
  • Od Next Media Inputs

    nexu-io/open-design

    Prepare required media inputs within an existing OD Next plan.

    100k GitHub stars~1.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Cost Session

    ruvnet/ruflo

    Per-message cost breakdown within a single session. An agent skill from ruvnet/ruflo.

    74k GitHub starsUsed in 1 repo~781 tokens
    Auto-check: notes
  • Link In Text Block

    thedaviddias/Front-End-Checklist

    A skill your agent uses when applies to hyperlinks (<a elements) that appear inline within paragraphs or text blocks.

    74k GitHub stars~918 tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Scheduling

    asgeirtj/system_prompts_leaks

    Find meeting or appointment times, create private calendar holds or invitations, and reschedule or cancel events within the user's authorization.

    69k GitHub stars~1.4k tokensUpdated today
    Auto-check passed

More from NoobyGains/godmode

All 34 skills in this repo
  • Activation

    NoobyGains/godmode

    A skill your agent uses when starting any conversation - establishes how to locate and invoke skills, mandating Skill tool usage before ANY response including clarifying questions

    107 GitHub stars~2.4k tokensUpdated 7 mo ago
    Auto-check passed
  • Agent Messaging

    NoobyGains/godmode

    A skill your agent uses when dispatching subagents, composing prompts for teammates, structuring handoff reports, or managing context boundaries between agents.

    107 GitHub stars~3k tokensUpdated 7 mo ago
    Auto-check passed
  • Completion Gate

    NoobyGains/godmode

    A skill your agent uses when about to declare work done, fixed, or passing, before committing or opening PRs - demands executing verification commands and reading their output before making any…

    107 GitHub stars~1.6k tokensUpdated 7 mo ago
    Auto-check passed
  • Comprehension Check

    NoobyGains/godmode

    A skill your agent uses when implementing any substantial feature, multi-file modification, or architectural change - produces a plain-language walkthrough of every alteration so the developer can…

    107 GitHub stars~1.5k tokensUpdated 7 mo ago
    Auto-check passed
  • Delegated Execution

    NoobyGains/godmode

    A skill your agent uses when executing implementation plans with independent tasks in the current session

    107 GitHub stars~2.4k tokensUpdated 7 mo ago
    Auto-check passed
  • Deployment Advisor

    NoobyGains/godmode

    A skill your agent uses when making technology, hosting, or infrastructure decisions — recommends services, databases, and deployment strategies based on project requirements and what the user…

    107 GitHub stars~4k tokensUpdated 7 mo ago
    Auto-check: notes

Questions about Codebase Research

What does Codebase Research do?

A skill your agent uses when building ANY feature within an existing project - search the current codebase for existing patterns, conventions, similar implementations, and established approaches…. Codebase Research is an agent skill from NoobyGains/godmode.

When should I use Codebase Research?

Codebase Research fits situations like: building ANY feature within an existing project - search the current codebase for existing patterns; similar implementations; established approaches before writing new code.

How do I install Codebase Research in Claude Code?

Run `npx skills add NoobyGains/godmode --skill codebase-research -a claude-code`. Or copy the skill folder (skills/codebase-research in NoobyGains/godmode) into .claude/skills/codebase-research in your project. Claude Code loads it when a task matches its description.

How do I install Codebase Research in Codex?

Run `npx skills add NoobyGains/godmode --skill codebase-research -a codex`. Or copy the skill folder (skills/codebase-research in NoobyGains/godmode) into .agents/skills/codebase-research in your project. Codex loads it when a task matches its description.

Can I use Codebase Research 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 NoobyGains/godmode --skill codebase-research -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/codebase-research, .gemini/skills/codebase-research, .github/skills/codebase-research and .opencode/skills/codebase-research in your project.

What does Codebase Research need to run?

SKILL.md names no scripts, command-line tools or credentials: Codebase Research is instructions for the agent only.

Does Codebase Research access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Codebase Research safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Codebase Research use?

Codebase Research is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Codebase Research use?

About 3.2k tokens (SKILL.md is roughly 13k 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 Codebase Research?

Skills that share tags, products or a category with Codebase Research: Stay Within Limits (BuilderIO/skills, 4.5k stars), Upgrading Mwaa Environments (aws/agent-toolkit-for-aws, 2.8k stars), Od Next Media Inputs (nexu-io/open-design, 100k stars) and Cost Session (ruvnet/ruflo, 74k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Codebase Research?

NoobyGains (a GitHub user) maintains it in NoobyGains/godmode, which has 107 GitHub stars. The repository holds 34 skills in this directory. The repository was last updated on March 9, 2026.

Source: NoobyGains/godmode on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.