Token导航 LogoToken导航

Agent Skill · 研究检索

codebase-research(代码库研究)

codebase-research 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

codebase-research 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 65,351。

总安装 282周安装 12GitHub Stars 25下载 99核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:codebase-research(代码库研究)
来源仓库:https://github.com/noobygains/godmode
仓库路径:skills/codebase-research
安装命令:
npx skills add https://github.com/noobygains/godmode --skill codebase-research
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/noobygains/godmode --skill codebase-research

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

codebase-research 奉行“先搜索现有代码再编写新代码”的铁律,杜绝重复造轮子。核心原则:发现已有实现时必须完全匹配其约定,禁止引入第二种做法。适用于任何新建功能前的权威参考检索,确保风格与模式一致性。需持续遍历相似文件直至穷尽,保证搜索覆盖率不低于 95% 才停止探查。

适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/codebase-research

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/noobygains/godmode --skill codebase-research;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

codebase-research 怎么安装?

在终端执行 npx skills add https://github.com/noobygains/godmode --skill codebase-research。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

codebase-research 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

codebase-research 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

codebase-research 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

codebase-research 用的人多吗?

公开数据是累计安装 282 次,近一周安装 12 次,下载 99 次,GitHub 25 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

codebase-research 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 标注为只读权限,试用阶段不容易误改本地文件。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 只想先试试效果、不希望它改动本地文件的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
codebase-research

代码库研究 · 本页

28225只读未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

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

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

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)

平台分布

Codex

35.93%
按下载量换算36

Claude

29.22%
按下载量换算29

Cursor

18.69%
按下载量换算19

Gemini CLI

9.73%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills