skills/check-logs/SKILL.md
Diagnose errors from dev server logs (Next.js, Vite, etc.) and fix them. Use this skill whenever the user mentions checking logs, server errors, terminal errors, build failures, or asks things like "why is my server crashing", "check my logs", "what's this error", "fix the build error", "the dev server is broken", "something's wrong with my app", "check the terminal", "I'm getting an error", or "debug the server output". Also trigger when the user asks you to monitor running tasks for errors, review background task output, or wants help understanding any error in terminal or task logs — even if they don't say "logs" explicitly.
npx skillsauth add switch-dimension/switch-dimension-skills check-logsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Find errors in dev server and task logs, diagnose them, and fix the source code.
This skill covers two scenarios:
Collect error output from all available sources in parallel:
From Bash / terminal:
/tmp/smoke-test-server.log or similar)From background tasks:
TaskList to see all active tasksTaskGet on any tasks with status in_progress or failed to read their outputFrom the dev server directly:
lsof -i :<port> -sTCP:LISTEN
npm run dev 2>&1 | head -100
package.json scripts and framework config first. If still unclear, ask the user rather than guessingnpm run build 2>&1 | head -200Scan the collected logs for these patterns:
Next.js specific:
Error: or error - prefixed linesModule not found — missing import or packageType error — TypeScript issuesUnhandled Runtime Error — runtime crashesFailed to compile — build-blocking errorsWarning: lines that indicate real problems (hydration mismatch, missing key, etc.)ENOENT or EACCES — file system issuesnext.config parsing errorsVite specific:
[vite] prefixed error linesFailed to resolve import — missing modulePre-transform error — plugin failuresTypeError or ReferenceError in SSR[hmr])optimized dependencies changed loopsGeneral:
at ...)EADDRINUSE — port conflictSyntaxError — malformed codeCannot find module — missing dependencyFor each error found:
next.config.js, vite.config.ts, tsconfig.json, etc.Apply fixes directly — don't just suggest them. Common fixes:
| Error | Fix |
|-------|-----|
| Module not found | Install the package or fix the import path |
| Type error | Fix the type issue in the source file |
| Failed to compile (syntax) | Fix the syntax error |
| EADDRINUSE | Find and kill the process on that port |
| Hydration mismatch | Fix the server/client rendering discrepancy |
| Missing env variable | Tell the user which .env variable is needed |
| Cannot find module (local) | Fix the relative import path |
For each fix:
npm install <package> (or the appropriate package manager)After fixing, verify by running the build or dev server again and checking that the error is gone.
Give the user a clear summary:
## Log Doctor Report
**Source:** <where you found the logs>
### Errors Found: N
**1. <Error title>**
- File: `path/to/file.ts:42`
- Error: <the error message>
- Cause: <why it happened>
- Fix: <what you did>
- Status: Fixed / Needs user action
### Verification
<did the fix work? paste the clean output or remaining errors>
If an error requires user input (like adding an env variable or choosing between options), explain what's needed and ask.
node_modules, the fix is usually in the project's code or config, not in the module itself — don't edit node_modulesTaskGet to read output — don't stop or restart tasks without askingtesting
Reviews project changes and updates relevant documentation to match current behavior, setup, configuration, security, operations, and usage. Use when the user asks to update docs, audit documentation, check docs drift, prepare a handoff, document recent changes, or ensure project docs are current.
tools
Starts the dev server, opens the browser, and tests recent changes end-to-end. Use this skill whenever the user says things like "test my changes", "check if this works", "run and test", "smoke test", "verify the app", "open the browser and test", "make sure it works", "test the UI", "check for errors", or asks you to visually verify, click through flows, or check console logs after making code changes. Also trigger when the user wants to see their app running and validated in the browser, even if they don't say "test" explicitly — phrases like "does it look right?", "spin it up and check", or "try it out" count too.
tools
Reviews new or modified agent skills for quality, safety, discoverability, structure, and repository best practices. Use when reviewing skill submissions, pull requests that add or change SKILL.md files, skill metadata, helper scripts, examples, or when the user asks to review a skill.
documentation
Ensures a .docs folder exists, creates project-log.md, and records current project status for handoff. Use when ending a session, before context switches, when handing off to another person or agent, or when the user asks to save project status or create a project log.