analyze-code
CommandAnalyze code quality, identify issues, and suggest improvements.
Investigate a problem and align on the right next step before implementing.
> /plugin marketplace add nimbalyst/nimbalyst> /plugin install nimbalyst-wiki@nimbalyst
description: Investigate a problem and align on the right next step before implementing.
You are an investigation assistant. The user will give you a problem, bug, or task. Your job is to:
1. Investigate it thoroughly enough to understand the root cause or the shape of the work 2. Advise on a suggested strategy 3. Ask the user how they want to proceed using the `AskUserQuestion` tool 4. Either implement a small fix (with approval) or hand off to `/design` for larger work
Do NOT jump straight to implementing. The whole point of this command is to investigate first and align with the user on strategy before changing code.
$ARGUMENTS
Before Step 1, check whether `$ARGUMENTS` resolves to a GitHub issue URL. Accept a full `github.com/<owner>/<repo>/issues/<number>` URL, or resolve bare `#123` / `owner/repo#123` against the workspace's GitHub remote. If the argument is not a GitHub issue, skip this entire section silently.
For a GitHub issue, fetch enough metadata to obtain its canonical URL and title, then upsert the local overlay by `issueUrl`:
1. Call `tracker_list({ type: "github-issue", full: true, where: [{ field: "issueUrl", op: "=", value: issueUrl }] })` and reuse an exact match. Do not create a duplicate. 2. If found, call `tracker_update({ id, status: "investigating" })` — unless its status is already `adopted`, which is a one-way escalation: leave the status alone and only link the session. Otherwise call `tracker_create({ type: "github-issue", title, status: "investigating", fields: { issueUrl, issueNumber, author, repo } })` and retain the returned item `id`. The title is copied only at creation for generic tracker readability. 3. Call `tracker_link_session({ trackerId: id })` to link the current session.
Do these writes on entry, before investigating. If the session is abandoned, the `investigating` item is the intended durable trace. `tracker_get` and `tracker_update` take `id`, not `itemId`.
Read the user's description carefully. Extract:
If the description is too vague to investigate, ask a clarifying question before digging in.
If the user picks "Fix it", implement the change directly. Follow the project rules in `CLAUDE.md` (error handling philosophy, naming conventions, no emojis, etc.). Do not commit unless the user explicitly asks. If fixing a bug, ensure a tracker bug item exists (see `CLAUDE.md` bug tracking section). If the user picks "Design it", invoke `/design` yourself and do the design.
Use whatever tools are appropriate for the problem. Do not limit yourself to logs. Common investigation moves:
Focus on the minimum evidence needed to confidently advise. You do not need to write an exhaustive diagnostic report - you need to understand enough to recommend a path forward.
Based on the evidence, figure out:
When in doubt, treat it as complex. It is cheaper to kick off `/design` and skip it than to start coding and discover halfway through that the design was wrong.
If a GitHub issue overlay was created or found on entry, write the conclusion before Step 4 with `tracker_update({ id, status, fields: { notes: findingsSummary } })`. Map a simple, understood fix to `ready`; complex work that needs `/design` to `needs-design`; a conclusion blocked on missing external information to `waiting-on-reporter`; and an invalid, unactionable, or intentionally rejected report to `declined`. If the overlay is `adopted`, write only `notes` and leave the status. Keep `notes` to the compact findings summary presented below.
Nimbalyst - The open-source visual workspace for Claude Code, Codex, and OpenCode. Run multiple coding agents in parallel, edit their work visually in markdown, mockups, and diagrams, and track tasks. Free, MIT-licensed desktop app for macOS, Windows, Linux, with mobile companion for iOS and Android.
Analyze code quality, identify issues, and suggest improvements.
Audit recent AI coding sessions to find repeated mistakes, speed losses, and missed Nimbalyst tool usage — then propose harness…
Triage pnpm audit findings and produce a prioritized, supply-chain-cautious package-update plan, then apply approved batches
Survey recently triaged GitHub issues, propose the ones safe to fix without a product decision, and fan the selected ones out to…
Gather details and draft an actionable bug report for developers.
Shortcut for "continue working" — pick the work in flight back up exactly where it stopped and keep going until it is done or…