replit-prompt
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseReplit Prompt Generator
Replit 提示词生成器
Transform requirements into optimized prompts for Replit Agent that maximize AI understanding and minimize iterations.
将需求转化为针对Replit Agent的优化提示词,最大化AI的理解度,减少迭代次数。
When to Use
使用场景
- User wants to build something with Replit Agent
- User needs to convert an idea into a Replit-ready prompt
- User wants to improve an existing Replit prompt
- User is preparing to start a new Replit project
- 用户希望使用Replit Agent构建内容
- 用户需要将想法转化为可直接用于Replit的提示词
- 用户想要优化现有的Replit提示词
- 用户准备启动新的Replit项目
Core Principles (Replit's Official Guidelines)
核心原则(Replit官方指南)
1. Checkpoint — Structure Iteratively
1. 阶段性检查——分步结构化
Break large goals into smaller, testable steps. Use checkpoints between phases.
将大型目标拆分为更小的、可测试的小步骤,在不同阶段之间设置检查点。
2. Debug — Provide Detailed Context
2. 调试——提供详细上下文
Include exact error messages, relevant code snippets, and steps already attempted.
包含精确的错误信息、相关代码片段以及已尝试的解决步骤。
3. Discover — Ask for Suggestions
3. 探索——寻求建议
Request tool/library recommendations when unsure about approach.
当不确定实现方案时,请求工具/库的推荐。
4. Experiment — Iterate on Prompts
4. 实验——迭代优化提示词
Refine requests by adjusting wording or adding detail.
通过调整措辞或补充细节来完善请求。
5. Instruct — Use Positive Goals
5. 指令——采用正向目标表述
Frame as "do this" rather than "don't do that".
以“请执行XX”而非“不要做XX”的方式表述需求。
6. Select — Focused Context
6. 聚焦——提供相关上下文
Provide relevant context only; avoid overwhelming with unrelated information.
仅提供相关的上下文信息,避免无关内容造成信息过载。
7. Show — Concrete Examples
7. 示例——提供具体案例
Reduce ambiguity with code snippets, mockups, or reference apps.
通过代码片段、模型图或参考应用来减少歧义。
8. Simplify — Concise Language
8. 简化——使用简洁语言
Use direct, short sentences. Avoid jargon.
采用直接、简短的句子,避免行话。
9. Specify — Define Outputs
9. 明确——定义输出要求
State expected outputs, constraints, data formats, and edge cases.
说明预期的输出内容、约束条件、数据格式和边缘情况。
10. Test — Plan First
10. 测试——先规划再执行
Outline features, data structures, and user flows before prompting.
在编写提示词之前,先概述功能、数据结构和用户流程。
Prompt Structure Template
提示词结构模板
When generating prompts for Replit, use this structure:
markdown
undefined为Replit生成提示词时,请使用以下结构:
markdown
undefinedProject Overview
项目概述
[1-2 sentences: What is being built and its core purpose]
[1-2句话:说明要构建的内容及其核心用途]
Tech Stack
技术栈
- Frontend: [specific framework/library]
- Backend: [specific framework/language]
- Database: [specific database]
- Authentication: [specific method]
- Additional: [any other required tools/APIs]
- 前端:[具体框架/库]
- 后端:[具体框架/语言]
- 数据库:[具体数据库]
- 认证:[具体方法]
- 其他:[任何所需的工具/API]
Core Features
核心功能
- [Feature 1]: [specific description with expected behavior]
- [Feature 2]: [specific description with expected behavior]
- [Feature 3]: [specific description with expected behavior]
- [功能1]:[包含预期行为的具体描述]
- [功能2]:[包含预期行为的具体描述]
- [功能3]:[包含预期行为的具体描述]
UI/UX Requirements
UI/UX要求
- Design style: [modern/minimal/material/etc.]
- Color scheme: [specific colors or "neutral professional"]
- Layout: [sidebar/top-nav/dashboard/etc.]
- Responsive: [yes/no, breakpoints if specific]
- 设计风格:[现代/极简/材料设计等]
- 配色方案:[具体颜色或“中性专业风”]
- 布局:[侧边栏/顶部导航/仪表盘等]
- 响应式:[是/否,如有特定要求请说明断点]
Data Model
数据模型
[Describe main entities and their relationships]
- Entity1: field1, field2, field3
- Entity2: field1, field2 (relates to Entity1)
[描述主要实体及其关系]
- 实体1:字段1、字段2、字段3
- 实体2:字段1、字段2(与实体1关联)
User Flows
用户流程
- [Flow 1]: Step A → Step B → Step C → Result
- [Flow 2]: Step A → Step B → Result
- [流程1]:步骤A → 步骤B → 步骤C → 结果
- [流程2]:步骤A → 步骤B → 结果
Constraints
约束条件
- [Constraint 1: e.g., "Must work offline"]
- [Constraint 2: e.g., "No external API calls except X"]
- [约束1:例如“必须支持离线使用”]
- [约束2:例如“除X外不允许调用外部API”]
Success Criteria
成功标准
- [Specific testable criterion 1]
- [Specific testable criterion 2]
- [Specific testable criterion 3]
undefined- [可测试的具体标准1]
- [可测试的具体标准2]
- [可测试的具体标准3]
undefinedProcedure
操作流程
Step 1: Gather Requirements
步骤1:收集需求
Ask the user about:
- What they want to build (core functionality)
- Who will use it (target users)
- How it should work (key user flows)
- Why (problem being solved)
If user provides vague input, ask clarifying questions:
- "What should happen when a user clicks X?"
- "Should data persist between sessions?"
- "Any specific design/framework preferences?"
向用户询问以下信息:
- 内容:他们想要构建什么(核心功能)
- 用户:目标用户是谁
- 方式:产品应如何运作(关键用户流程)
- 原因:要解决的问题是什么
如果用户提供的信息模糊,提出澄清问题:
- “当用户点击X时应该发生什么?”
- “会话之间数据需要持久化吗?”
- “有没有特定的设计/框架偏好?”
Step 2: Extract Technical Details
步骤2:提取技术细节
Determine from user input or ask about:
- Preferred tech stack (or let Replit decide)
- Authentication requirements
- Data storage needs
- Third-party integrations
- Performance requirements
从用户输入中确定或询问以下信息:
- 偏好的技术栈(或让Replit自行决定)
- 认证要求
- 数据存储需求
- 第三方集成
- 性能要求
Step 3: Structure the Prompt
步骤3:构建提示词结构
Transform gathered information into the structured template above.
Bad prompt transformation:
❌ Bad: "Make a website for my business"
✅ Good: "Create a portfolio website for a freelance photographer with:
- Home page with hero image carousel
- Gallery page with filterable photo categories
- Contact form with email integration
- About page with bio and testimonials
- Tech: React, TailwindCSS, EmailJS for form
- Design: Clean, minimal, lots of whitespace"将收集到的信息转化为上述结构化模板。
不良与良好的提示词转化示例:
❌ 不良:“为我的业务做个网站”
✅ 良好:“为自由摄影师创建一个作品集网站,包含:
- 带英雄图轮播的首页
- 可按类别筛选的图片画廊页面
- 集成邮箱的联系表单
- 包含个人简介和客户评价的关于页面
- 技术栈:React、TailwindCSS、EmailJS(用于表单)
- 设计风格:简洁、极简、留白充足”Step 4: Add Specificity
步骤4:增加细节
Enhance the prompt with:
- Concrete examples: "Like Stripe's dashboard layout"
- Specific behaviors: "Click 'Add' opens modal, not new page"
- Edge cases: "If cart is empty, show 'Start shopping' CTA"
- Validation rules: "Email must be valid format, password min 8 chars"
为提示词补充以下内容:
- 具体示例:“参考Stripe的仪表盘布局”
- 特定行为:“点击‘添加’按钮打开模态框,而非新页面”
- 边缘情况:“如果购物车为空,显示‘开始购物’的号召性用语”
- 验证规则:“邮箱格式必须有效,密码最少8位”
Step 5: Present Draft
步骤5:呈现草稿
Show the optimized prompt to the user:
undefined向用户展示优化后的提示词:
undefinedReplit Agent Prompt
Replit Agent 提示词
Optimized for: [Build Mode / Plan Mode]
Estimated complexity: [Low / Medium / High]
[Generated prompt content]
Recommendations:
- [Tip for using this prompt effectively]
- [Suggested follow-up prompts after initial build]
Ready to copy to Replit?
Wait for user confirmation or modification requests.优化模式: [构建模式 / 规划模式]
预估复杂度: [低 / 中 / 高]
[生成的提示词内容]
建议:
- [有效使用本提示词的技巧]
- [初始构建后的后续提示词建议]
是否准备好复制到Replit?
等待用户确认或修改请求。Step 6: Provide Iteration Guidance
步骤6:提供迭代指导
After delivering the prompt, advise on:
- Using Plan Mode first for complex features
- Setting up checkpoints between phases
- Follow-up prompts for refinements
交付提示词后,向用户建议:
- 对于复杂功能,先使用规划模式
- 在不同阶段之间设置检查点
- 后续优化的提示词方向
Output Format
输出格式
undefinedundefinedReplit Agent Prompt
Replit Agent 提示词
Mode: Build / Plan
Complexity: Low / Medium / High
[Structured prompt following template]
模式: 构建 / 规划
复杂度: 低 / 中 / 高
[遵循模板的结构化提示词]
Next Steps
后续步骤
- Initial Build: Copy prompt to Replit Agent
- After MVP: [Suggested enhancement prompt]
- Testing: [What to verify after build]
- 初始构建:将提示词复制到Replit Agent
- MVP完成后:[建议的增强提示词]
- 测试:[构建完成后需要验证的内容]
Checkpoint Strategy
阶段性检查策略
Phase 1: [Description] → Checkpoint
Phase 2: [Description] → Checkpoint
Phase 3: [Description] → Checkpoint
undefined阶段1:[描述] → 检查点
阶段2:[描述] → 检查点
阶段3:[描述] → 检查点
undefinedBad vs Good Prompt Examples
不良与良好提示词示例
| Issue | Bad Prompt | Good Prompt |
|---|---|---|
| Vague | "Fix my code" | "The login function in auth.js throws 'undefined user' on line 42 when email contains '+'" |
| No scope | "Make a website" | "Create a 3-page portfolio: Home (hero, skills), Projects (grid with filters), Contact (form)" |
| Negative | "Don't make it slow" | "Implement lazy loading for images, paginate lists to 20 items" |
| No detail | "Add animation" | "Fade in hero text on page load over 0.5s, slide in cards from bottom on scroll" |
| Overwhelming | "Build the entire backend" | "Implement user signup/login with JWT and a /api/profile GET endpoint" |
| 问题 | 不良提示词 | 良好提示词 |
|---|---|---|
| 模糊 | “修复我的代码” | “auth.js中的登录函数在邮箱包含'+'时,第42行抛出'undefined user'错误” |
| 无范围 | “做个网站” | “创建一个3页面的作品集:首页(英雄区、技能展示)、项目页(带筛选的网格布局)、联系页(表单)” |
| 负面表述 | “别让它变慢” | “为图片实现懒加载,列表分页显示20条内容” |
| 缺乏细节 | “添加动画” | “页面加载时英雄文本在0.5秒内淡入,滚动时卡片从底部滑入” |
| 内容过载 | “构建整个后端” | “实现基于JWT的用户注册/登录功能,以及/api/profile GET接口” |
Rules
规则
- ALWAYS use positive framing — "Do X" not "Don't do Y"
- ALWAYS include tech stack — Even if "let Replit decide"
- ALWAYS define success criteria — Testable checkboxes
- ALWAYS break into phases — For anything beyond simple apps
- NEVER use vague terms — No "nice", "good", "fast", "modern" without specifics
- NEVER assume context — Replit Agent has no prior knowledge
- 始终使用正向表述 —— 用“执行X”而非“不要做Y”
- 始终包含技术栈 —— 即使是“让Replit自行决定”
- 始终定义成功标准 —— 可测试的复选框形式
- 始终拆分阶段 —— 对于简单应用之外的项目
- 绝不使用模糊词汇 —— 没有具体说明的情况下,避免使用“不错”“优秀”“快速”“现代”等词
- 绝不假设上下文 —— Replit Agent没有前置知识
Additional Resources
额外资源
See reference files for detailed patterns:
- — Full prompt examples for common app types
references/examples.md - — Recommended tech stack combinations
references/tech-stacks.md
查看参考文件获取详细模式:
- —— 常见应用类型的完整提示词示例
references/examples.md - —— 推荐的技术栈组合
references/tech-stacks.md