analyze-code
CommandAnalyze 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 improvements
> /plugin marketplace add nimbalyst/nimbalyst> /plugin install nimbalyst-wiki@nimbalyst
name: analyze-sessions description: Audit recent AI coding sessions to find repeated mistakes, speed losses, and missed Nimbalyst tool usage — then propose harness improvements
Audit recent Nimbalyst AI coding sessions and propose improvements to the **agent harness**: the rules, memory, agent-mistakes log, and CLAUDE.md guidance that shape how future sessions behave. The goal is to make subsequent sessions get the right answer faster and avoid repeating known failures.
**Read-only by default.** Produce a structured report, then use `PromptForUserInput` to let the user pick which suggested changes to apply.
`/analyze-sessions [<time-period>|<count>|all]`
The default is intentionally narrow: most of the time the user runs this right after finishing a piece of work, and the most actionable signal is in the session they just finished (or the parallel sessions on the same workstream).
Three categories. The point is to find **patterns**, not to grade individual sessions.
A mistake the agent makes once is a log entry. A mistake repeated across multiple sessions is a missing rule. Look for:
For each repeated mistake, decide whether it needs:
Where did the agent burn turns or tokens without progress? Look for:
The agent has a rich MCP toolset that frequently goes untouched when it would have helped. Check whether sessions used these where appropriate:
| Tool | Should have been used when… | | --- | --- | | `mcp__nimbalyst-extension-dev__database_query` | Agent asked the user to share DB state, or hand-rolled a guess at row contents | | `mcp__nimbalyst-extension-dev__get_main_process_logs` / `get_renderer_debug_logs` | Agent asked the user to paste logs, or speculated about runtime behavior without checking | | `mcp__nimbalyst-extension-dev__renderer_eval` | Agent wanted to know runtime DOM/state and asked the user to inspect manually | | `mcp__nimbalyst-extension-dev__restart_nimbalyst` | Agent asked the user to restart after a main-process change (still requires explicit user approval, but the agent should at least offer) | | `mcp__nimbalyst-extension-dev__extension_build` / `extension_install` / `extension_reload` / `extension_test_run` | Agent was iterating on an extension and asked the user to rebuild/reinstall manually | | `mcp__nimbalyst-extension-dev__extension_test_ai_tool` / `extension_test_open_file` | Agent wrote an extension tool but never exercised it | | `mcp__nimbalyst-extension-dev__get_environment_info` | Agent made code changes without verifying dev-mode is running (CLAUDE.md says to check this first) | | `mcp__nimbalyst-mcp__capture_editor_screenshot` | Agent described a UI state in prose instead of showing it | | `mcp__nimbalyst-mcp__display_to_user` | Agent presented tabular numeric data as a markdown table instead of a chart | | `mcp__nimbalyst-mcp__developer_git_commit_proposal` | User said "propose a commit" / "commit this" and the agent ran `git commit` instead | | `mcp__nimbalyst-session-context__get_session_summary` | Agent re-derived context the prior session already produced | | `mcp__nimbalyst-mcp__AskUserQuestion` / `PromptForUserInput` | Agent buried a blocking question in chat instead of using the interactive widget |
These are *suggestions*, not commands the agent must run unprompted — but if a session would have been measurably faster with one of them, that's a harness gap.
Resolve the inventory based on the argument (or lack thereof):
**No argument (default)**: 1. Call `mcp__nimbalyst-session-context__get_session_summary` with no `sessionId` to identify the **current** session. Note its `workstreamId` (or equivalent grouping field) if present. 2. If the current session belongs to
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.
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.
Deploy the collab server, web console and/or metrics console, whichever changed since its last deploy
Shortcut for "continue working" — pick the work in flight back up exactly where it stopped and keep going until it is done or…