Skip to content
WANCODE
BM

▍AI Prompts

AI Prompt Library

Reusable prompts for coding assistants — written to get explanations and reviewable changes, not magic.

WANCode does not call any AI service. Copy the prompt into the assistant you already use.

Prompt builder

Fill in the blanks. The prompt is assembled locally in your browser — nothing is sent anywhere.

Your prompt
I'm a beginner working with JavaScript + React.

Task: Explain what this code does.

Explain it step by step.

Rules:
- Use plain language and define technical terms the first time you use them.
- State your assumptions. If something is missing, ask me before guessing.
- If you suggest changes, show small, reviewable changes (a diff or code block) and explain why.
- Tell me how to verify that it works (a test or manual steps).

Code / error:
```
[paste your code or error message here]
```

WANCode does not call any AI service. Copy the prompt into the assistant you already use.

Understand

Explain this code

Get a step-by-step explanation of unfamiliar code at your level, with the reasoning behind it — not a rewrite.

Debug

Debug an error

Turn an error message into a ranked list of likely causes, the smallest fix, and a way to prove it's fixed.

Refactor

Refactor for readability

Make working code easier to read and change — in small, reviewable steps that keep behaviour exactly the same.

Test

Write unit tests

Get a clear list of test cases (including edge cases) and readable tests for a function or component — without changing the code under test.

Understand

Understand project architecture

Get a map of an unfamiliar codebase: the main parts, how data flows between them, and where to start reading.

Build

Write a React component

Get one focused, accessible React component with a usage example and an explanation of the key decisions.

Review

Improve accessibility

Find accessibility problems in a piece of UI, understand who they affect, and get minimal fixes plus a manual test checklist.

Debug

Fix TypeScript errors

Understand what each TypeScript error actually means and fix it without throwing away type safety.

Review

Review dependencies

Understand what each package in your project is for, spot ones you may not need, and get commands to check for outdated or vulnerable versions yourself.

Plan

Plan a feature

Break a feature into small, testable steps with clear assumptions, risks and a definition of done — before writing code.

Review

Review a git diff

Get a structured code review of a change: does it do what it claims, what could break, and what tests are missing.

Plan

Write a specification

Turn a rough idea into a short, testable spec: problem, users, requirements, acceptance criteria and what's out of scope.