Prompts tagged "AI 編程" in the PromptCraft library.
Has Claude Code scan your repo and produce a tight, verifiable CLAUDE.md project memory file under 200 lines—covering build/test/lint commands, directory structure, conventions, and prohibitions—while routing anything that doesn't belong there into skills or path-scoped rules instead.
Turns the checklist or multi-step process you re-paste every time into a custom slash command (.claude/commands/<name>.md, or the newer .claude/skills), with correct frontmatter, $ARGUMENTS parameters, live context pre-injected via `!cmd` (git diff, PR content), and permissions scoped down with allowed-tools.
Uses hooks in .claude/settings.json to automatically run formatting, linting, type-checking, or tests at specific Claude Code lifecycle events (PostToolUse after an edit, PreToolUse before running a command, Stop when wrapping up)—producing correct JSON config plus an executable hook script, with exit code 2 hard-blocking dangerous actions.
Has Claude Code interview you about a repetitive manual process, then produce a fully-structured Agent Skill (SKILL.md) covering name/description/trigger conditions/step-by-step instructions/acceptance criteria/supporting references, and verify it can be triggered automatically as well as invoked via a /slash command.
Has Claude Code break a large task into several independent, parallel subagents (each with its own context, restricted tools, and an assignable model), planning how to fan the work out, defining each subagent's responsibility boundaries and reporting format, and producing reusable .claude/agents subagent definition files when needed.
Have the agent interview you about your project, then produce a structured, no-fluff AGENTS.md that spells out build/test commands, code style, commit conventions, and off-limits areas in one shot — auto-loaded every time work starts.
Turns a vague requirement into a full Codex workflow: first force it to nail down a 'definition of done,' use plan mode to produce a plan for your approval, then implement in small steps, run its own tests, and finally produce a reviewable diff with verification evidence.
Has Codex do a disciplined code review of your git diff across three tracks (correctness bugs / simplification-and-reuse / security), listing each finding with a confidence level and a pastable fix, and explicitly instructed to say so when nothing's wrong instead of manufacturing complaints.
Forces Codex through a closed loop — write a failing test that reproduces the bug, find the root cause, make the minimal fix, watch that same test go from red to green, then run the full test suite to confirm no regressions — eliminating both 'fixed it without verifying' and 'changed a bunch of unrelated stuff along the way.'
A large-refactor playbook for agents: first do a read-only survey of the 'blast radius' — which files, call sites, and tests are affected — then split the change into small batches, each preserving behavior, each run through its own tests, each its own atomic commit. Puts an end to 'change 40 files at once, then the build breaks and no one knows where to start fixing it.'