8.0
热点
AI SCORE
编程提效2026-08-02 17:50
Claude Code 三大提效流程:规划-构建-修复
dev.to · AI#Claude Code#AI 编程#工作流
Editor brief · 编辑速览
展示用特定 Prompt 指导 Claude Code 完成项目规划、代码生成和问题修复,通过清晰流程减少需求模糊导致的返工和 bug。
Claude Code 可以根据自然语言指令构建出令人印象深刻的项目。
但模糊的需求往往会导致功能缺失、不必要的改动,以及反复出现的 bug。
下面是我用来让 Claude 遵循更清晰流程的三个 prompt:
在具体介绍之前,我把自己完整的 prompt 库整理成了 The Claude Code Toolkit。
其中包含 260 个用于网站、应用、SaaS 产品和调试的 prompt 与系统,以及 15 个 CLAUDE.md 模板、10 套完整工作流和 100 个 Claude Code skills。
你可以在这里查看:
https://alfiestips.gumroad.com/l/xydfaa
下面是三个可以免费尝试的 prompt。
在构建新项目或进行大规模改动之前使用这个 prompt。
text
Act as a senior software architect.
I want to build:
(PROJECT DESCRIPTION)
Before writing or changing any code:
1. Inspect the existing project structure if one exists.
2. Identify the files, components and dependencies connected to the project.
3. Explain how the current implementation works.
4. Identify technical risks, edge cases and missing requirements.
5. Recommend the simplest architecture that supports the complete project.
6. Create a step-by-step implementation plan.
7. List the files that will need to be created or modified.
8. Ask any questions that must be answered before implementation begins.
Rules:
- Do not write code yet.
- Do not redesign unrelated parts of an existing project.
- Reuse existing patterns and components where possible.
- Avoid adding unnecessary dependencies.
- Keep the proposed scope focused on the requested outcome.
Return the plan in a clear order that can be reviewed before implementation.
This gives Claude time to understand the project before it starts making decisions.
It also gives you a chance to correct the direction before any files are changed.
2. Build the Complete Project From the Approved Plan
Use this after Claude has inspected the requirements and created a plan.
Build the complete project described in the approved plan.
PROJECT:
(PROJECT DESCRIPTION)
TARGET USERS:
(TARGET USERS)
CORE PURPOSE:
(WHAT THE PROJECT MUST HELP USERS ACCOMPLISH)
PROJECT TYPE:
(WEBSITE, WEB APP, MOBILE APP OR SAAS PRODUCT)
TECH STACK:
(PREFERRED TECH STACK OR "CHOOSE THE MOST SUITABLE OPTION")
MUST-HAVE PAGES AND FUNCTIONALITY:
- (PAGE OR FUNCTION 1)
- (PAGE OR FUNCTION 2)
- (PAGE OR FUNCTION 3)
- (PAGE OR FUNCTION 4)
Before building:
1. Review the approved plan and requirements.
2. Confirm the proposed architecture and file structure.
3. Identify the required pages, components, routes and data.
4. Identify any authentication, database or external-service requirements.
5. Ask questions if a missing decision would materially change the build.
6. Do not begin until the requirements are clear.
Build the project in this order:
Phase 1: Create the project foundation, architecture and shared styles.
Phase 2: Build every required page, route and reusable component.
Phase 3: Implement the core functionality, data flow and user interactions.
Phase 4: Add validation, loading states, empty states and error handling.
Phase 5: Improve responsive behaviour, accessibility and visual consistency.
Phase 6: Test the complete user journey and fix any failures.
Requirements:
- Build a functional product, not a static mockup.
- Make every required button, form, link and interaction work.
- Do not add fake reviews, fake statistics or made-up customer data.
- Do not create unnecessary dashboards, pages or features.
- Do not leave placeholder text or unfinished sections.
- Use clear navigation and a consistent visual system.
- Make the complete project responsive across mobile, tablet and desktop.
- Reuse existing components and project patterns where appropriate.
- Avoid unnecessary dependencies and unrelated refactoring.
- Keep secrets and credentials out of the source code.
- Follow the approved scope instead of inventing new requirements.
Before finishing:
1. Test every important user journey from beginning to end.
2. Run the relevant tests, linting, type checks and production build.
3. Check every page at mobile and desktop sizes.
4. Confirm that all forms and interactions work.
5. Review the final project for incomplete or placeholder content.
6. Fix any errors caused by the implementation.
Finish with:
1. A summary of what was built.
2. The final project structure.
3. A list of every page and major function completed.
4. The checks that passed or failed.
5. Any setup or environment instructions.
6. Anything that still requires manual testing.
Do not claim the project is complete if a required page, function or verification check is missing.
This tells Claude to build the c
如需采取进一步措施,你可以考虑屏蔽此人和/或举报滥用行为。