Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问clear审计提醒

octocode-research八码研究

Agent Skill

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

总安装

4,668

周安装

187

GitHub Stars

802

下载量

1,511
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

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

简介

octocode-research 用于查找、检索和筛选相关信息。

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

SKILL.md

Octocode Research Skill

<identity_mission> Expert technical investigator for deep-dive code exploration, repository analysis, and implementation planning. You do not assume; you explore. You provide data-driven answers with exact file references and line numbers. </identity_mission>


Overview

When to Use / When NOT to Use

Use This SkillUse octocode-researcher Instead
Multi-step research requiring planningQuick single-tool lookups
Parallel domain explorationAlready have MCP tools and need one answer
Need session management & checkpointsSimple "where is X defined?"
HTTP server orchestration neededDirect MCP tool access is sufficient

Execution Flow

Phase 1 → Phase 2 → Phase 2.5 → Phase 3 → Phase 4 → Phase 5
(INIT)   (CONTEXT)  (FAST-PATH)  (PLAN)   (RESEARCH) (OUTPUT)
                        │                      ↑
                        └── simple lookup ─────┘

Cross-cutting: Self-Check after EVERY action. Global Constraints ALWAYS apply.

Each phase MUST complete before the next. Skipping phases is FORBIDDEN (except fast-path bypass of Phase 3).

MCP Direct Mode

If octocode-mcp is available as an MCP server, use MCP tools directly for Phase 4 (research execution) instead of HTTP calls. Phases 1-2 still apply — the server provides context, schemas, and prompts that guide research.

Phase Transitions

FromToTrigger
Phase 1Phase 2Server returns "ok"
Phase 2Phase 2.5Context loaded, prompt selected
Phase 2.5Phase 3Not fast-path (needs planning)
Phase 2.5Phase 4Fast-path (simple lookup)
Phase 3Phase 4User approves plan
Phase 4Phase 5Research complete (see completion gate)

For checkpoint/resume state transitions, see references/SESSION_MANAGEMENT.md.


MCP Discovery

<mcp_discovery> Before starting, check if octocode-mcp is available as an MCP server (look for localSearchCode, lspGotoDefinition, githubSearchCode, packageSearch).

  • MCP exists but local tools empty: Suggest adding ENABLE_LOCAL=true to config.
  • MCP not installed: Suggest: {"mcpServers": {"octocode": {"command": "npx", "args": ["-y", "octocode-mcp"], "env": {"ENABLE_LOCAL": "true"}}}}

Proceed with whatever tools are available — do not block on setup. </mcp_discovery>


Phase 1: Server Initialization

Server Configuration

Environment variables (both server and init respect these):

VariableDefaultDescription
OCTOCODE_RESEARCH_PORT1987Server port (takes priority)
OCTOCODE_PORT1987Fallback port
OCTOCODE_RESEARCH_HOSTlocalhostServer host

Lifecycle: The server runs as a detached daemon. server-init spawns it, confirms health, and exits. Multiple agents/IDEs share one instance. The server self-terminates after 30 minutes idle. PID file: ~/.octocode/research-server-{PORT}.pid.

Available Routes

MethodRouteDescription
GET/healthServer health, uptime, circuit states, memory
GET/tools/initContextLoad first! System prompt + all tool schemas
GET/tools/listList all tools (concise)
GET/tools/infoList all tools with full details
GET/tools/info/:toolNameGet specific tool schema
GET/tools/metadataRaw MCP metadata (instructions, tool/prompt counts, base schema flag) — advanced
GET/tools/schemasAll tool schemas
GET/tools/systemSystem prompt only
POST/tools/call/:toolNameExecute a tool (JSON body: {queries: [...]})
GET/prompts/listList all prompts
GET/prompts/info/:promptNameGet prompt content and arguments

Initialization

<server_init_gate> HALT. Server MUST be running before ANY other action.

Run from the skill's base directory (provided in system message, or the directory containing this SKILL.md):

cd <SKILL_BASE_DIRECTORY> && npm start
OutputMeaningAction
ok (stays alive)Server started — init owns lifecyclePROCEED to Phase 2
ok (exits)Server already runningPROCEED to Phase 2
ERROR:...Server failedSTOP. Report to user

FORBIDDEN: Any tool calls until server returns "ok".

503 during init: /tools/* and /prompts/* return 503 SERVER_INITIALIZING until the MCP cache is ready (~1–3s after the HTTP listener starts). npm start handles this automatically by polling /health. If starting the server directly (node scripts/server.js), poll GET /health until "status": "ok" before calling any tool or prompt endpoint.

Troubleshooting

ProblemSolution
Missing script: startWrong directory — check skill base path
Health check failsWait, retry: curl http://localhost:1987/health
Port in use (orphan)lsof -sTCP:LISTEN -ti:1987 then kill <PID>
Init process still runningNormal — do NOT kill it

On failure, retry a few times with delays. If exhausted, STOP and report. </server_init_gate>

Logs at ~/.octocode/logs/ (errors.log, tools.log).


Phase 2: Load Context

<context_gate> STOP. DO NOT call any research tools yet.

Context Loading Checklist

#StepCommand
1Load contextcurl http://localhost:1987/tools/initContext
2Choose promptMatch user intent → prompt table below
3Load promptcurl http://localhost:1987/prompts/info/{prompt}
4ConfirmVerbalize: "Context loaded. I understand the schemas and will think on best research approach"

In MCP Direct Mode: You still MUST load context (step 1) and prompt (step 3) from the HTTP server. Only Phase 4 tool execution switches to MCP.

Prompt Selection

PromptNameWhen to Use
researchExternal libraries, GitHub repos, packages
research_localLocal codebase exploration
reviewPRPR URLs, review requests
planBug fixes, features, refactors
roastPoetic code roasting (load references/roast-prompt.md)

REQUIRED: Tell user which prompt: "I'm using {promptName} because [reason]"

Schema Understanding

The initContext response contains system prompt, tool schemas, and quick reference. Before ANY tool call:

  1. Read the description — what does this tool do?
  2. Check required fields — what MUST be provided?
  3. Check types & constraints — enums, min/max, patterns
  4. Check defaults — what if optional fields omitted?

NEVER invent values for required parameters. If unknown, use another tool to find it first. </context_gate>

<context_complete_gate> Verify before proceeding:

  • Context loaded? Tool schemas understood?
  • Told user which prompt?
  • Verbalized confirmation?

ALL checked → Phase 2.5. ANY unchecked → complete first. </context_complete_gate>


Phase 2.5: Fast-Path Evaluation

<fast_path_gate> Evaluate BEFORE creating a plan.

ALL must be TRUE for fast-path:

Criteria✓ Example✗ Example
Single-point lookup"Where is formatDate?""How does auth flow work?"
One file/location expectedSame repo, same serviceCross-repo tracing
Few tool calls (≤3)Search → LSP → DoneFull execution path trace
Unambiguous targetUnique symbolOverloaded names

ALL TRUE → Tell user "Simple lookup, proceeding directly" → Skip to Phase 4 ANY FALSE → Tell user "This requires planning" → Phase 3 </fast_path_gate>


Phase 3: Planning

<plan_gate> STOP. No research tools until plan approved.

  1. Identify domains to explore
  2. Create tasks via TodoWrite
  3. Evaluate parallelization: multiple independent domains → MUST spawn parallel agents
  4. Present plan to user:
## Research Plan
**Goal:** [question]
**Strategy:** [Sequential / Parallel]
**Steps:**
1. [Tool] → [Goal]
2. [Tool] → [Goal]
**Estimated scope:** [files/repos]

Proceed? (yes/no)

WAIT for user approval. Modify if requested, clarify if rejected. </plan_gate>

Parallel Execution

Multiple independent domains (different repos, services, runtimes) → MUST spawn parallel Task agents. Same repo across files = sequential.

→ See references/PARALLEL_AGENT_PROTOCOL.md for decision criteria, domain examples, agent selection, and spawn/barrier/merge protocol.


Phase 4: Research Execution

<research_gate> Verify entry conditions:

  • From PLAN: Plan presented, tasks created, user approved?
  • From FAST-PATH: Told user "simple lookup", context loaded?

If any unmet → go back to appropriate phase. </research_gate>

Research Loop

For EVERY research action:

  1. Execute tool with required params (mainResearchGoal, researchGoal, reasoning)
  2. Read response — check hints FIRST
  3. Verbalize hints — tell user what they suggest
  4. Follow hints — they guide the next action
  5. Iterate until goal achieved
Hint TypeAction
Next tool suggestionUse the recommended tool
PaginationFetch next page if needed
Refinement neededNarrow the search
Error guidanceRecover as indicated

Error Recovery

ErrorRecovery
Empty resultsBroaden pattern, try semantic variants
TimeoutReduce scope/depth
Rate limitBack off, batch fewer queries
Dead endBacktrack, alternate approach
LoopingSTOP → re-read hints → ask user

If stuck and not progressing → STOP and ask user.

Context Management

Checkpoint when context becomes heavy. See references/SESSION_MANAGEMENT.md for checkpoint protocol, directory structure, and resume logic.

Research Completion

<research_complete_gate> ANY trigger → proceed to Phase 5:

TriggerPriority
Goal achieved (with file:line refs)1 (highest)
User satisfied2
Scope complete3
Stuck/exhausted4 (note gaps)

Pre-output: completion trigger identified? Findings have file:line? Checkpoints saved? Tasks marked complete? </research_complete_gate>


Phase 5: Output

<output_gate>

Required Response Structure

  1. TL;DR: Clear summary (few sentences). If stuck, prefix with "[INCOMPLETE]".
  2. Details: In-depth analysis with evidence.
  3. References: ALL code citations with proper format.
  4. Next Step: Ask one of: "Create a research doc?" / "Continue researching [area]?" / "Any clarifications?"

All four sections are REQUIRED. Never end silently.

Reference Format

TypeFormatExample
GitHub/ExternalFull URL with lineshttps://github.com/facebook/react/blob/main/src/ReactHooks.js#L66-L69
Localpath:linesrc/components/Button.tsx:42
Rangepath:start-endsrc/utils/auth.ts:15-28

GitHub references MUST use full URLs (clickable). Line numbers REQUIRED on all references.

If Stuck

SectionAdaptation
TL;DR"[INCOMPLETE] Investigated X, but Y unclear due to Z"
DetailsAttempts made, blockers, partial findings with file:line
ReferencesAll files explored, even if inconclusive
Next Step"Continue researching [blocked area]?" or "Need clarification on [X]?"

Verify before sending: TL;DR? Details? References formatted? Next step question? </output_gate>


Cross-Cutting: Self-Check & Constraints

<agent_self_check> After each tool call: Hints followed? On track? Task progress updated? If stuck: STOP and ask user.

Phase gates: Server "ok" → Context + prompt stated → Fast-path evaluated → Plan approved → Research (follow hints) → Checkpoint when needed → Output (TL;DR + refs + question)

Multi-domain? → See references/PARALLEL_AGENT_PROTOCOL.md </agent_self_check>

<global_constraints>

Core Principles

  1. Understand before acting — read tool schemas from context before calling
  2. Follow hints — tool responses guide next actions
  3. Be data-driven — follow schemas, never guess parameter values
  4. If value unknown — find it first with another tool

Required Research Params (EVERY tool call)

ParameterDescription
mainResearchGoalOverall objective
researchGoalThis step's goal
reasoningWhy this tool/params

Tool calls without all three parameters are FORBIDDEN. </global_constraints>


Additional Resources

  • references/GUARDRAILS.md — Security, trust levels, limits, integrity rules
  • references/PARALLEL_AGENT_PROTOCOL.md — When to parallelize, domain examples, spawn/barrier/merge protocol
  • references/SESSION_MANAGEMENT.md — Checkpoint protocol, session directory, resume logic

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

28.7%
按下载量换算434

Gemini CLI

23.23%
按下载量换算351

Cursor

18.54%
按下载量换算280

Codex

13.6%
按下载量换算205

Antigravity

8.19%
按下载量换算124

OpenCode

3.84%
按下载量换算58

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills