No. 016 Write the change
Add a {endpoint} endpoint that returns {payload}
Use when the behavior is already chosen and a file should change
- Claude Code
- Codex
- Cursor
- Write the change
add a {endpoint} endpoint that returns {payload}
When to use
“Add a {endpoint} endpoint that returns {payload}” fits when the behavior is already chosen and a file should change, because it says “add a {endpoint} endpoint that returns {payload}”, after you replace {endpoint}, {payload} with names from the repo.
One filled message for “Add a {endpoint} endpoint that returns {payload}” is: add a GET /cart/total endpoint that returns the item count and the total in cents
When not to use
Leave “Add a {endpoint} endpoint that returns {payload}” unused when you only wanted the file explained, or two designs are still open, because “add a {endpoint} endpoint that returns {payload}” points the other way
How to run it
Claude Code
Claude Code takes “Add a {endpoint} endpoint that returns {payload}” as one paste at the repo root. Do not also save .claude/commands, or “add a {endpoint} endpoint that returns {payload}” replays on the next task.
Codex
Codex takes “Add a {endpoint} endpoint that returns {payload}” as a paste above the task. Leave AGENTS.md unchanged so the next thread does not inherit “add a {endpoint} endpoint that returns {payload}”.
Cursor
Cursor should see “Add a {endpoint} endpoint that returns {payload}” only as a chat paste of “add a {endpoint} endpoint that returns {payload}” for this turn. A file at .cursor/rules would keep applying after the turn ends.
Comparison
对比待补
This before-and-after was not run on this machine.
Related
- Stage: Write the change
- Same stage: Create a {tool} using HTML, CSS, and vanilla JavaScript…
来源:Anthropic · https://code.claude.com/docs/en/prompt-library · 2026-12-01