octocode-engineer

star 863

System-engineering skill for codebase understanding, bug investigation, refactors, PR safety, architecture review, and RFC validation. Enforces Clean Architecture and Clean Code with AST, LSP, and scanner evidence. Produces a flows / boundaries / architecture-health artifact with file:line citations before recommending action.

bgauryy By bgauryy schedule Updated 6/6/2026

name: octocode-engineer description: "Use when investigating, implementing, reviewing, refactoring, or auditing code — local or remote — and the task needs code search, AST/LSP analysis, PR review, architecture assessment, dead-code sweep, binary inspection, or OQL graph research."

Octocode Engineer

Use this skill to understand, review, or change code without guessing. This file is the router; detailed playbooks live in references/. Read the smallest set of references the scenario needs.

0. Transport default: CLI first

Default to the Octocode CLI quick commands (search, pr, unzip, clone, cache fetch). Use search --search path for file discovery, search --tree for structure, search --content-view exact|compact|symbols for reads, search --pattern/--rule --lang <lang> for structural code search, search --op <semantic-op> for LSP semantics, search --target repositories for repo discovery, search --target packages for package lookup, search --target commits for history, search --target artifacts for binary/archive inspection, and search --target diff for file diffs. If octocode is not installed, use npx octocode <cmd>. Use MCP tools only when the host provides them and the CLI is unavailable.

Hard rules:

  • Prefer --json whenever another step depends on returned paths, refs, line numbers, or pagination.
  • Read octocode tools <name> --scheme before every raw-tool call. Quick-command flags and raw-tool fields differ.
  • Use octocode search --scheme / search --explain before relying on OQL for partial targets.
  • For dead-code, reachability, or drift sweeps, start with search target:"research" as a broad candidate pass, then prove with LSP/AST/exact reads.
  • Treat snippets as leads. Prove with search --match-string --content-view exact, AST, LSP, history, or tests.
  • Follow returned next.*, pagination, char offsets, match/file pages. Never invent offsets or paths.
  • Keep ≥2 plausible explanations alive for ambiguous bugs until evidence eliminates one.
  • Reflect before final output: weakest claim, strongest counter, whether one cheap command changes the answer.

1. Reference routing

2. Fast routing

  • Already on diskresearch-local.md
  • Remote repo/packageresearch-external.md; clone when analysis spans >3 files or needs AST/LSP
  • Archive/binaryresearch-binary.md; unpack before code research
  • PR or local diff reviewworkflow-pr-local-review.md + review checklist + report template
  • Architecture/refactor/bugworkflow-engineering-research.md + relevant research reference
  • Dead-code / reachability / safe-deleteworkflow.md (graph algorithm + OQL patterns)
  • Quality smell / security findingchecklist-quality-signals.mdworkflow-validation-playbooks.md
  • Exact CLI/raw-tool/MCP syntaxcontext-cli-mcp-commands.md

3. Operating loop

  1. State goal and scope in one line.
  2. Read the matching reference.
  3. Write a compact hypothesis map: likely explanation, alternate, and what would disconfirm each.
  4. Map before reading — structure/file discovery first, then exact slices.
  5. Use AST for code shape; use LSP for symbol identity and blast radius.
  6. After each observation, update confidence and choose the next cheapest proof step.
  7. Mark confidence: confirmed, likely, or uncertain.
  8. Stop and ask when scope, contract, blast radius, or safest fix requires a user decision.

4. Output

Quick tasks: finding, evidence, next step. When presenting investigation results or multi-finding reports, use template-artifact-report.md — summary, flows, boundaries, quality findings, confidence, next step. When writing a PR or local diff review, use template-review-report.md — cap to ~5–7 key issues, concrete fixes.

5. Safety gates

Ask before continuing when a task would change a public contract, cross layers/packages, delete/rename shared things, affect many consumers, require an architectural tradeoff, or when evidence conflicts.

Install via CLI
npx skills add https://github.com/bgauryy/octocode --skill octocode-engineer
Repository Details
star Stars 863
call_split Forks 73
navigation Branch main
article Path SKILL.md
More from Creator