octocode-research
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.zipInstalls 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 Skill | Use octocode-researcher Instead |
|---|---|
| Multi-step research requiring planning | Quick single-tool lookups |
| Parallel domain exploration | Already have MCP tools and need one answer |
| Need session management & checkpoints | Simple "where is X defined?" |
| HTTP server orchestration needed | Direct 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
| From | To | Trigger |
|---|---|---|
| Phase 1 | Phase 2 | Server returns "ok" |
| Phase 2 | Phase 2.5 | Context loaded, prompt selected |
| Phase 2.5 | Phase 3 | Not fast-path (needs planning) |
| Phase 2.5 | Phase 4 | Fast-path (simple lookup) |
| Phase 3 | Phase 4 | User approves plan |
| Phase 4 | Phase 5 | Research 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=trueto 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):
| Variable | Default | Description |
|---|---|---|
OCTOCODE_RESEARCH_PORT | 1987 | Server port (takes priority) |
OCTOCODE_PORT | 1987 | Fallback port |
OCTOCODE_RESEARCH_HOST | localhost | Server 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
| Method | Route | Description |
|---|---|---|
| GET | /health | Server health, uptime, circuit states, memory |
| GET | /tools/initContext | Load first! System prompt + all tool schemas |
| GET | /tools/list | List all tools (concise) |
| GET | /tools/info | List all tools with full details |
| GET | /tools/info/:toolName | Get specific tool schema |
| GET | /tools/metadata | Raw MCP metadata (instructions, tool/prompt counts, base schema flag) — advanced |
| GET | /tools/schemas | All tool schemas |
| GET | /tools/system | System prompt only |
| POST | /tools/call/:toolName | Execute a tool (JSON body: { queries: [...] }) |
| GET | /prompts/list | List all prompts |
| GET | /prompts/info/:promptName | Get 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
| Output | Meaning | Action |
|---|---|---|
ok (stays alive) | Server started — init owns lifecycle | PROCEED to Phase 2 |
ok (exits) | Server already running | PROCEED to Phase 2 |
ERROR: ... | Server failed | STOP. Report to user |
FORBIDDEN: Any tool calls until server returns "ok".
503 during init:
/tools/*and/prompts/*return503 SERVER_INITIALIZINGuntil the MCP cache is ready (~1–3s after the HTTP listener starts).npm starthandles this automatically by polling/health. If starting the server directly (node scripts/server.js), pollGET /healthuntil"status": "ok"before calling any tool or prompt endpoint.
Troubleshooting
| Problem | Solution |
|---|---|
Missing script: start | Wrong directory — check skill base path |
| Health check fails | Wait, retry: curl http://localhost:1987/health |
| Port in use (orphan) | lsof -sTCP:LISTEN -ti :1987 then kill <PID> |
| Init process still running | Normal — 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
| # | Step | Command |
|---|---|---|
| 1 | Load context | curl http://localhost:1987/tools/initContext |
| 2 | Choose prompt | Match user intent → prompt table below |
| 3 | Load prompt | curl http://localhost:1987/prompts/info/{prompt} |
| 4 | Confirm | Verbalize: "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
| PromptName | When to Use |
|---|---|
research | External libraries, GitHub repos, packages |
research_local | Local codebase exploration |
reviewPR | PR URLs, review requests |
plan | Bug fixes, features, refactors |
roast | Poetic 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:
- Read the description — what does this tool do?
- Check required fields — what MUST be provided?
- Check types & constraints — enums, min/max, patterns
- 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 expected | Same repo, same service | Cross-repo tracing |
| Few tool calls (≤3) | Search → LSP → Done | Full execution path trace |
| Unambiguous target | Unique symbol | Overloaded 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.
- Identify domains to explore
- Create tasks via
TodoWrite - Evaluate parallelization: multiple independent domains → MUST spawn parallel agents
- 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:
- Execute tool with required params (
mainResearchGoal,researchGoal,reasoning) - Read response — check
hintsFIRST - Verbalize hints — tell user what they suggest
- Follow hints — they guide the next action
- Iterate until goal achieved
| Hint Type | Action |
|---|---|
| Next tool suggestion | Use the recommended tool |
| Pagination | Fetch next page if needed |
| Refinement needed | Narrow the search |
| Error guidance | Recover as indicated |
Error Recovery
| Error | Recovery |
|---|---|
| Empty results | Broaden pattern, try semantic variants |
| Timeout | Reduce scope/depth |
| Rate limit | Back off, batch fewer queries |
| Dead end | Backtrack, alternate approach |
| Looping | STOP → 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.
More by bgauryy
View all skills by bgauryy →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.
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.
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."
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.
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.
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.
Related MCP Servers
Browse all serversUnlock seamless Figma to code: streamline Figma to HTML with Framelink MCP Server for fast, accurate design-to-code work
Official Laravel-focused MCP server for augmenting AI-powered local development. Provides deep context about your Larave
Safely connect cloud Grafana to AI agents with MCP: query, inspect, and manage Grafana resources using simple, focused o
Empower your workflows with Perplexity Ask MCP Server—seamless integration of AI research tools for real-time, accurate
Boost your productivity by managing Azure DevOps projects, pipelines, and repos in VS Code. Streamline dev workflows wit
Boost AI coding agents with Ref Tools—efficient documentation access for faster, smarter code generation than GitHub Cop
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.