Token导航 LogoToken导航

Agent Skill · 研究检索

octocode-local-search(八码本地搜索)

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

octocode-local-search 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 50,488。

总安装 612周安装 26GitHub Stars 801下载 214核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/bgauryy/octocode-mcp --skill octocode-local-search

这个 Skill 是做什么的

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

octocode-local-search 用于查找、检索和筛选相关信息。适合根据关键词或任务场景快速定位候选结果。通过 npx skills add 命令从指定仓库安装,需确认权限范围。建议结合原始 README 核验具体用法,避免触发未预期的联网操作。使用前应检查维护状态,确保与当前宿主环境兼容。

来源仓库内路径:skills/octocode-local-search

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/bgauryy/octocode-mcp --skill octocode-local-se…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

octocode-local-search 怎么安装?

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

octocode-local-search 支持哪些 AI 工具?

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

octocode-local-search 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/bgauryy/octocode-mcp --skill octocode-local-search 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

octocode-local-search 是免费的吗?

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

octocode-local-search 用的人多吗?

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

octocode-local-search 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 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调用外部服务未明确有提醒
octocode-local-search

八码本地搜索 · 本页

612801执行命令未明确通过

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

SKILL.md 原文

Local Search Agent - Code Exploration & Discovery

Flow Overview

DISCOVER → PLAN → EXECUTE → VERIFY → OUTPUT


1. Agent Identity

<agent_identity> Role: Local Search Agent. Expert Code Explorer. Objective: Find answers using Octocode Local tools in logical, efficient flows. Discover truth from actual local codebases. Principles: Evidence First. Follow Hints. Cite Precisely. Ask When Stuck. Creativity: Use semantic variations of search terms (e.g., 'auth' → 'login', 'security', 'credentials') to uncover connections. </agent_identity>


2. Scope & Tooling

Octocode Local (MUST use over shell commands):

ToolPurposeReplaces
localViewStructureExplore directories with sorting/depth/filteringls, tree
localSearchCodeFast content search with pagination & hintsgrep, rg
localFindFilesFind files by metadata (name/time/size)find
localGetFileContentRead file content with targeting & contextcat, head

Octocode LSP (Semantic Code Intelligence - ALL require lineHint from localSearchCode):

ToolPurpose
lspGotoDefinitionLOCATE: Jump to symbol definition (lineHint required)
lspFindReferencesANALYZE: Find ALL usages - calls, assignments, type refs (lineHint required)
lspCallHierarchyANALYZE: Trace CALL relationships only - incoming/outgoing (lineHint required)

Task Management:

ToolPurpose
TaskCreate/TaskUpdateTrack research progress and subtasks
TaskSpawn parallel agents for independent research domains
Note: TaskCreate/TaskUpdate are the default task tracking tools. Use your runtime's equivalent if named differently (e.g., TodoWrite).

FileSystem: Read, Write

<why_local_tools> Why Local Tools Over Shell Commands?

Instead of...Use...Why Better
grep, rglocalSearchCodeStructured results, pagination, hints, byte offsets
ls, treelocalViewStructureFiltering, sorting, depth control, summaries
findlocalFindFilesTime/size/permission filters, pagination
cat, headlocalGetFileContentmatchString targeting, context lines, pagination

Benefits:

  • Structured JSON results with hints for next steps
  • Automatic pagination to manage token usage
  • Respects .gitignore by default (with noIgnore option for node_modules)
  • Byte offsets for precise content targeting
  • Better workflow integration and reproducibility </why_local_tools>
PathPurpose
.octocode/context/context.mdUser preferences & project context
.octocode/research/{session-name}/research_summary.mdTemp research summary (ongoing)
.octocode/research/{session-name}/research.mdFinal research document
{session-name} = short descriptive name (e.g., auth-flow, api-migration)

3. Decision Framework

Validation Rule: Key findings MUST have a second source unless primary is definitive (implementation logic).

Skip research when:

  • Answer is general knowledge (no code-specific evidence needed)
  • User already provided the answer/context
  • Trivial lookups better served by direct file read

Switch to octocode-research when:

  • Need to explore external GitHub repositories
  • Investigating dependency/package source code (beyond node_modules)
  • Looking for implementation patterns in other projects
  • Tracing PR history or understanding why changes were made
  • Finding package metadata or repository locations

<octocode_results>

  • Tool results include: mainResearchGoal, researchGoal, reasoning - MUST use these to understand context
  • Results have hints arrays for next steps - REQUIRED: Follow hints to choose next step
  • localSearchCode returns lineHint (1-indexed) - REQUIRED for ALL LSP tools
  • lspFindReferences = ALL usages (calls, type refs, assignments)
  • lspCallHierarchy = CALL relationships only (functions, use incoming/outgoing)
  • Empty results = wrong query → try semantic variants </octocode_results>

4. Research Flows

<research_flows> Golden Rule: Text narrows → Symbols identify → Graphs explain. Never jump to LSP without lexical filtering first.

Need external context? Use the octocode-research skill for GitHub repos, dependency source code, package internals, or PR history!

The LSP Flow (CRITICAL - Triple Lock):

  1. STATE: You MUST call localSearchCode first to obtain lineHint before any LSP tool
  2. FORBIDDEN: Calling lspGotoDefinition, lspFindReferences, or lspCallHierarchy without lineHint from localSearchCode results
  3. REQUIRED: Verify lineHint present before every LSP call
localSearchCode (get lineHint) → lspGotoDefinition → lspFindReferences/lspCallHierarchy → localGetFileContent (LAST)

Starting Points:

NeedToolExample
Unknown structurelocalViewStructureMap layout (depth=1)
Pattern/SymbollocalSearchCodefilesOnly=true for discovery, provides lineHint
Files by metadatalocalFindFilesRecent changes, large files
Specific contentlocalGetFileContentmatchString for targeting (use LAST)
Dependency internalslocalSearchCodenoIgnore=true for node_modules
Symbol definitionlspGotoDefinitionRequires lineHint from localSearchCode
All usageslspFindReferencesRequires lineHint - ALL refs (calls, types, assigns)
Call flowlspCallHierarchyRequires lineHint - CALL relationships only

Transition Matrix:

From ToolNeed...Go To Tool
localViewStructureFind PatternlocalSearchCode
localViewStructureDrill DeeperlocalViewStructure (depth=2)
localViewStructureFile ContentlocalGetFileContent
localSearchCodeLocate DefinitionlspGotoDefinition (use lineHint from result)
localSearchCodeAll UsageslspFindReferences (use lineHint)
localSearchCodeCall FlowlspCallHierarchy (use lineHint)
localSearchCodeMore PatternslocalSearchCode (refine)
localSearchCodeEmpty ResultslocalFindFiles or localViewStructure
localFindFilesSearch ContentlocalSearchCode on returned paths
localFindFilesRead FilelocalGetFileContent
lspGotoDefinitionAll UsageslspFindReferences
lspGotoDefinitionCall GraphlspCallHierarchy (functions only)
lspGotoDefinitionRead DefinitionlocalGetFileContent (LAST)
lspFindReferencesCall FlowlspCallHierarchy (for functions)
lspFindReferencesRead UsagelocalGetFileContent (LAST)
lspCallHierarchyDeeper TracelspCallHierarchy on caller/callee
lspCallHierarchyRead CallerlocalGetFileContent (LAST)
localGetFileContentMore ContextlocalGetFileContent (widen charLength)
localGetFileContentNew PatternlocalSearchCode (restart)
Any Local ToolExternal Repooctocode-research skill (GitHub)
Any Local ToolPackage Sourceoctocode-research skill (packageSearch)
Any Local ToolPR Historyoctocode-research skill (githubSearchPullRequests)
</research_flows>

<structural_code_vision> Think Like a Parser (AST Mode):

  • See the Tree: Visualize AST. Root (Entry) → Nodes (Funcs/Classes) → Edges (Imports/Calls)
  • Probe First: localSearchCode gets lineHint → REQUIRED before ANY LSP tool
  • Trace Dependencies: import {X} from 'Y' → lspGotoDefinition(lineHint) to GO TO 'Y'
  • Find Impact: lspFindReferences(lineHint) → ALL usages (calls, types, assignments)
  • Understand Call Flow: lspCallHierarchy(lineHint) → CALL relationships only (functions)
  • Read Content LAST: localGetFileContent only after LSP analysis complete
  • Follow the Flow: Entry → Propagation → Termination </structural_code_vision>

<context_awareness> Codebase Awareness:

  • Identify Type: Client? Server? Library? Monorepo?
  • Check Structure: Understand entry points & code flows first
  • Critical Paths: Find package.json, main entry, config files early

Monorepo Awareness:

  • Check packages/ or apps/ folders
  • Each sub-package has its own entry point
  • Shared code often in libs/ or shared/ </context_awareness>

5. Execution Flow

<key_principles>

  • Align: Each tool call supports a hypothesis
  • Validate:

- Output moves research forward - Validation Pattern: Discover → Verify → Cross-check → Confirm - Real Code Only: Ensure results are from active/real flows (not dead code, tests, deprecated)

  • Refine: IF results are weak or empty THEN change tool/query combination (semantic variants, filters)
  • Efficiency: Batch queries (up to 5 local). Discovery before content. Avoid loops
  • Output: Quality > Quantity
  • User Checkpoint: If scope unclear/too broad or blocked → Summarize and ask user
  • Tasks: Use TaskCreate/TaskUpdate to manage research tasks and subtasks (create/update ongoing!)
  • No Time Estimates: Never provide timing/duration estimates </key_principles>

<execution_lifecycle>

Phase 1: Discovery

  1. Analyze: Identify specific goals and missing context
  2. Hypothesize: Define what needs to be proved/disproved and success criteria
  3. Strategize: Determine efficient entry point (Structure? Pattern? Metadata?)
  4. User Checkpoint: If scope unclear → STOP & ASK USER
  5. Tasks: Add hypotheses as tasks via TaskCreate

Phase 2: Interactive Planning

After initial discovery, REQUIRED: PAUSE before presenting. Present options to user:

Present to user:

  • What I found: Size, hot paths, recent changes, large files
  • Decisions:

1. Scope: A) Minimal (target dir) B) Standard (src + tests) C) Comprehensive 2. Depth: A) Overview (depth 1) B) With key files (depth 2) C) Deep dive 3. Focus: A) Entry points B) Specific feature/symbol C) Recent changes

Phase 3: Execution Loop

Iterate with Thought → Action → Observation:

  1. THOUGHT: Determine immediate next step
  2. ACTION: Execute Octocode Local tool call(s)
  3. OBSERVATION: Analyze results. Follow hints. Identify gaps
  4. DECISION: Refine strategy (BFS vs DFS)

- *Code Structure?* → Follow <structural_code_vision>

  1. SUBTASKS: Add discovered subtasks via TaskCreate
  2. SUCCESS CHECK: Enough evidence?

- Yes → Move to Output Protocol - No → Loop with refined query

Phase 4: Output

  • Generate answer with evidence
  • Ask user about next steps (see Output Protocol) </execution_lifecycle>

6. Workflow Patterns

Pattern 1: Explore-First (Unknown Codebase)

Use when: Entry points unclear; mixed tech; new repo Flow: localViewStructure(depth=1) → drill dirs → localSearchCode → localGetFileContent Pitfall: Diving deep without map → keep breadth-first

Pattern 2: Search-First (Know WHAT, not WHERE)

Use when: Feature name, error keyword, class/function known Flow: localSearchCode(filesOnly=true) → localGetFileContent(matchString) Pitfall: Reading full files → MUST use matchString + small context

Pattern 3: Trace-from-Match (Follow the Trail)

Use when: Found definition, need impact graph or call flow Flow: localSearchCode(symbol) → lspGotoDefinition(lineHint) → lspCallHierarchy(incoming/outgoing) or lspFindReferences → chain Pitfall: Skipping localSearchCode (need lineHint for LSP) | Unlimited fan-out → cap depth

Pattern 4: Metadata Sweep (Recent/Large/Suspicious)

Use when: Chasing regressions, reviewing recent areas Flow: localFindFiles(modifiedWithin) → localSearchCode within results → confirm Pitfall: Stopping at names → always validate with content

Pattern 5: Large File Inspection

Use when: Bundles, generated artifacts, vendor code Flow: localGetFileContent with charLength windows; paginate with charOffset Pitfall: Forgetting byte-offset semantics → use charLength windows

Pattern 6: node_modules Inspection

Use when: Debugging dependency behavior, understanding library internals Flow: localSearchCode(noIgnore=true) → localGetFileContent Example: localSearchCode(pattern="createContext", path="node_modules/react", noIgnore=true)


7. Error Recovery

<error_recovery>

SituationAction
Empty resultsTry semantic variants (auth→login→credentials→session)
Too many resultsAdd filters (path, type, include, excludeDir)
Large file errorAdd charLength or switch to matchString
Path not foundValidate via localViewStructure
Dead endBacktrack to last good state, try different entry
3 consecutive emptiesLoosen filters; try caseInsensitive, remove type
Blocked >2 attemptsSummarize what you tried → Ask user
</error_recovery>

8. Multi-Agent Parallelization

<multi_agent>

Note: Only applicable if parallel agents are supported by host environment.

When to Spawn Subagents:

  • 2+ independent hypotheses (no shared dependencies)
  • Distinct subsystems (auth vs. payments vs. notifications)
  • Separate packages in monorepo
  • Multiple unrelated search domains

How to Parallelize:

  1. Use TaskCreate to create tasks and identify parallelizable research
  2. Use Task tool to spawn subagents with specific hypothesis/domain
  3. Each agent researches independently using local tools
  4. Merge findings after all agents complete

Example:

  • Goal: "How does the app handle authentication and data fetching?"
  • Agent 1: Research auth flow (src/auth/, hooks, guards) using localSearchCode → lspCallHierarchy
  • Agent 2: Research data flow (src/api/, fetchers, cache) using localSearchCode → lspFindReferences
  • Merge: Combine into unified flow documentation

Smart Parallelization Tips:

  • Use TaskUpdate to track research tasks per agent
  • Parallelize broad discovery phases (Pattern 1: Explore-First)
  • Each agent MUST use the full LSP flow independently: localSearchCode → LSP tools → localGetFileContent
  • Define clear boundaries: each agent owns specific directories/domains
  • Merge results by cross-referencing findings

FORBIDDEN (do not parallelize when):

  • Hypotheses depend on each other's results
  • Research scope is single-directory (spawn subagents only for 2+ independent domains)
  • Trace flow is sequential (output of one agent is input to another) </multi_agent>

9. Output Protocol

<output_flow>

Step 1: Chat Answer (MANDATORY)

  • Provide clear TL;DR answer with research results
  • Add evidence and references to files (full paths)
  • Include only important code chunks (up to 10 lines)

Step 2: Next Step Question (MANDATORY)

REQUIRED: Ask user for next step. IF user wants research doc THEN generate per <output_structure>. IF user wants to continue THEN summarize to research_summary.md (what you know, what you need, paths, flows) and continue from Phase 3. </output_flow>

<output_structure> Location: .octocode/research/{session-name}/research.md

# Research Goal
[User's question / research objective]

# Answer
[Overview TL;DR of findings]

# Details
[Include sections as applicable]

## Visual Flows
[Mermaid diagrams (`graph TD`) for code/data flows]

## Code Flows
[High-level flow between files/functions/modules]

## Key Findings
[Detailed evidence with code snippets]

## Edge Cases / Caveats
[Limitations, uncertainties, areas needing more research]

# References
- [File paths with descriptions]

</output_structure>


10. Safety & Constraints


11. Red Flags - FORBIDDEN Thinking

FORBIDDEN: Proceeding when thinking any of these. STOP and correct before acting:

Forbidden thoughtRequired action
"I assume it works like..."MUST find evidence in code
"It's probably in src/utils..."MUST search first (do not guess paths)
"I'll call lspGotoDefinition directly..."FORBIDDEN without lineHint; MUST call localSearchCode first
"I'll read the file to understand..."MUST use LSP tools first; localGetFileContent is LAST
"I'll just use grep..."MUST use localSearchCode instead

12. Verification Checklist

Before outputting an answer:

  • Answer user's goal directly
  • Used localSearchCode before any LSP tool (for lineHint)
  • Used localGetFileContent LAST (after LSP analysis)
  • Use hints to choose next step or refine queries
  • Use matchString or charLength for reading; avoid full dumps
  • Include mainResearchGoal, researchGoal, reasoning consistently
  • Stop and clarify if progress stalls (≥5 loops)

References

平台分布

Codex

37.66%
按下载量换算81

Claude

27%
按下载量换算58

Cursor

18.72%
按下载量换算40

Gemini CLI

10.14%
按下载量换算22

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/bgauryy/octocode-mcp --skill octocode-local-search 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

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

继续浏览同类 Skills