What it does
This prompt instructs the AI to act as a staff-level Node.js debugging engineer who, given a Node.js stack trace and the relevant source code (plus optional context), produces a production-ready incident-style report: it determines the root cause and precise failure location, proposes the smallest safe code change to fix the bug without altering intended behavior, and supplies a Jest/Vitest regression test that would have failed before the fix and passed after, with clear structure and explicit assumptions when details are ambiguous.
For more installation instructions go to https://raw.githubusercontent.com/BetterPromptme/skills/refs/heads/main/betterprompt/SKILL.md to check out this skill.
Inputs
textInputs
Pass each text input using flags.
| Variable key | Required? | Description | Defaults |
|---|---|---|---|
| Optional | Any extra context such as: recent changes, environment (prod/stage/local), or known constraints | ||
| Optional | A full Node.js error stack trace, including file paths and line numbers where possible. | ||
| Optional | The relevant code (function, module, or small file) where the error originates. |
Models and options
This skill's modality is: .
To discover which values you can use (and which keys/values are valid for each model), run:
Then filter the returned JSON array to entries where is .
How to run
Step 1: Collect inputs
First, run and filter to to discover valid models and available options:
Use only the models and option values that appear in the filtered results.
Then collect all inputs from the human:
- Optional text inputs (use defaults if not provided by the human):
- (default: )
- (default: )
- (default: )
- (default: )
- Optional: model and options.
- Present the human with the default model and its available options. Look up in the output (filtered to modality ) and show its as: . Mark a value if it matches these defaults: .
- If the human does not specify, defaults are used: model , options . Other models from the resources call are also available.
Step 2: Run via BetterPrompt CLI
Use the frontmatter's as the positional argument (for this skill, use ).
Command form:
Notes:
- Pass each text input as a separate flag.
- If the human does not mention a model, omit and BetterPrompt will use the default model: .
- If the human does not mention options, omit and BetterPrompt will use the default options: .
- If the run times out, the response will include a you can use to fetch the result later.
Example (using defaults shown above):
