octocode-research

0
0
Source

This skill should be used when the user asks to "research code", "how does X work", "where is Y defined", "who calls Z", "trace code flow", "find usages", "review a PR", "explore this library", "understand the codebase", or needs deep code exploration. Handles both local codebase analysis (with LSP semantic navigation) and external GitHub/npm research using Octocode tools.

Install

mkdir -p .claude/skills/octocode-research && curl -L -o skill.zip "https://mcp.directory/api/skills/download/8299" && unzip -o skill.zip -d .claude/skills/octocode-research && rm skill.zip

Installs to .claude/skills/octocode-research

About this skill

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

<server> HTTP server at `http://localhost:1987` by default.

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. </server>

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](referenc


Content truncated.

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

9521,094

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

846846

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

571700

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

548492

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

673466

fastapi-templates

wshobson

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

514280

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.