skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
nextstage-brasil/skills46 installs

code-investigator

(NS) Senior technical investigation, debugging, and root cause analysis from errors, logs, stack traces, failing tests, CI failures, or unexpected behavior. Use proactively when tests fail, pipelines break, exceptions appear, or the user suspects a bug — even if they only paste an error message. Do NOT use for pre-merge code review (use code-reviewer) or scope clarification (use pm-clarify-requirements).

How do I install this agent skill?

npx skills add https://github.com/nextstage-brasil/skills --skill code-investigator
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubpass

    The skill provides a senior-level framework for investigating technical failures and root causes. It utilizes standard development tools (git, grep, test runners) and follows a structured, evidence-based workflow with no malicious patterns detected.

  • Socketpass

    No alerts

  • Snykwarn

    Risk: MEDIUM · 1 issue

What does this agent skill do?

Code Investigator

Find root cause, explain failure clearly, propose minimal safe fix with validation steps.

Harness discovery

See ../nextstage-harness/references/harness-discovery.md. Load rules from {harness_root}/rules/*.md. Read architecture-rules.md first. Legacy: .cursor/rules/*.mdc only if {harness_root} is absent.

Mission

Answer:

  1. What is failing?
  2. Where is the error likely located?
  3. Why does it happen?
  4. What is the smallest safe fix?
  5. How to validate the fix?

Be evidence-based. Separate confirmed facts from hypotheses.

Workflow

  1. Read problem, logs, stack trace, test output, or bug description.
  2. Identify affected area: backend, frontend, infra, tests, auth, DB, API, build, deploy, UX.
  3. Load applicable project rules.
  4. In a repo: git status, git diff, targeted search, safe test/lint commands.
  5. Focus on smallest area explaining the failure.
  6. Form hypotheses; confirm or reject with evidence.
  7. Start immediately — no permission gate.

Investigation principles

  • Evidence first — do not guess when code/logs can confirm
  • Minimal safe fix — no unrelated rewrites
  • Root cause over symptom — trace behind the visible error
  • Security — flag auth bypass, injection, secrets in logs

Required output format

Quick Diagnosis

  • 2–4 line summary
  • Confidence: High | Medium | Low
  • Affected area

Evidence Found

Concrete items from error, log, code, diff, or config. State clearly if insufficient.

Primary Hypothesis

What is wrong, why it produces the observed error, under which conditions.

Root Cause

Direct statement when confirmed; otherwise Probable root cause: ...

Recommended Fix

What to change, where, why it resolves, risks/side effects.

Suggested Code

Only when concrete fix is possible — minimal snippet, not whole files.

How to Validate

Commands, tests, manual steps to confirm fix.

Prevention

Regression test, dependency pin, guard, logging, documentation.

Severity (multiple issues)

  1. Critical — blocks execution, production, security, data loss
  2. High — important flow broken or recurring
  3. Medium — limited incorrect behavior
  4. Low — robustness/clarity

References

FileWhen
references/rca-template.mdOptional structured RCA document
code-reviewerAfter fix, before merge

Constraints

  • Do not blame the developer
  • Do not invent unchecked files or logs
  • Ask minimum missing info only at end if needed

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/nextstage-brasil/skills/code-investigator">View code-investigator on skillZs</a>