Tabbit
活动资源博客模型
Tabbit LogoTabbit

Tabbit — 为你工作的 AI 浏览器

主题资源

  • AI Browser Resources
  • Agentic Browser Resources
  • Browser Downloads and Install Guides
  • Browser Comparisons
  • AI Browser Alternatives
  • Browser Productivity Resources

热门指南

  • AI Browser
  • Agentic Browser Download
  • Best AI Browser 2026: Top 9 Tested & Ranked
  • AI Browser Download
  • Free AI Browser
  • Best AI Browser 2026
  • AI Browser Comparison 2026
  • AI Browser for Windows
  • AI Browser for Mac
  • Chrome Alternative 2026

活动

  • 别装了,你在《牛来》里早有原型
  • Tabbit 妙招大赛
  • KPOP SBTI 饭圈人格测试
  • Tabbit 校园共创者计划
  • fifi 的论文文献妙招精选
  • 用户问卷

关于

  • Tabbit 博客
  • 媒体报道
提示词
媒体Claude Opus 4.7

Claude Opus 4.7:Anthropic 官方提示词库与最佳模式

原始来源

Anthropic 官方文档

作者Anthropic

Tabbit 整理2026-08-20

查看原文

一句话结论

Anthropic 官方提供了经过验证的提示词模式库,核心原则是"描述结果而非步骤"和"给 Claude 自检方法",这些模式可直接用于 Claude Opus 4.7 的日常开发任务。

适用场景

  • 适合的任务:API 开发、数据库迁移、性能优化、错误调试、文档生成、功能实现

  • 不适合的任务:需要极度精确控制的底层系统编程;官方模式更适合中高层抽象任务

  • 适用的模型版本:Claude Opus 4.7

  • 适用的客户端、Agent 或 API:Claude API、Claude Code

  • 推荐的推理档位和参数:复杂任务用 xhigh,一般任务用 high

可直接使用的内容

核心模式(官方验证)

模式 1:描述结果,而非步骤

❌ 错误方式:
"打开 src/api/routes.ts,在第 42 行添加 rate limiting 中间件,
 然后修改 config.ts 添加配置项..."

✅ 正确方式:
"为公共 API 添加速率限制,确保现有测试仍然通过"

原理:让 Claude 自己找到正确的文件和位置,而不是手动指定每一步。

模式 2:给 Claude 自检方法

❌ 错误方式:
"实现用户认证功能"

✅ 正确方式:
"实现用户认证功能,运行测试验证所有用例通过,
 然后尝试用无效 token 调用 API 确认被拒绝"

原理:要求 Claude 在同一提示中运行、测试、比较或验证,让它迭代而不是停在一次尝试后。

模式 3:具体示例提示词

API 开发:

add rate limiting to the public API and make sure existing tests still pass

数据库迁移:

write the migration, run it against the dev database, 
and confirm the schema matches

功能实现:

add a settings page that follows the same layout as the profile page

性能优化:

get the bundle size under 200KB and show me what you removed

错误调试:

why is the build failing? @build.log

文档生成:

explain how the payment retry logic works as an HTML page with a diagram, 
then open it in my browser

进阶工作流

将提示词保存为 Skill

# 1. 创建 skill 目录
mkdir -p .claude/skills/api-rate-limit

# 2. 创建 SKILL.md
cat > .claude/skills/api-rate-limit/SKILL.md << 'EOF'
---
name: api-rate-limit
description: 为 API 端点添加速率限制,包含配置和测试
---

# API 速率限制

## 步骤
1. 检查当前的 API 路由结构
2. 添加速率限制中间件
3. 配置限制参数(请求数/时间窗口)
4. 确保现有测试通过
5. 添加新的测试用例验证限制生效

## 验证
- 运行 `npm test` 确保所有测试通过
- 手动测试超过限制的请求被拒绝
EOF

使用 CLAUDE.md 记录约定

# CLAUDE.md

## 项目约定
- 所有 API 端点必须有速率限制
- 使用 express-rate-limit 包
- 限制:100 请求/15分钟/IP
- 测试必须覆盖正常请求和被限制的请求

## 常见模式
- 添加新功能时,总是先检查现有测试
- 性能优化后,必须对比优化前后的指标
- 错误调试时,先复现问题再修复

测试/工作流步骤

  1. 从官方提示词库选择一个与你的任务匹配的模式

  2. 根据你的项目上下文调整提示词(替换具体功能名称、文件路径等)

  3. 在提示词中包含验证步骤(运行测试、检查输出、对比预期)

  4. 如果效果好,将提示词保存为 skill 供团队复用

  5. 在 CLAUDE.md 中记录有效的模式和约定

  6. 对于重复任务,使用已验证的 skill 而不是重新编写提示词

原始证据与数据

  • 官方文档明确指出这些模式"基于发布的 Anthropic 资源"

  • 提示词库包含常见工作流、最佳实践、团队使用案例

  • 文档强调两个核心原则:

    1. "描述结果而非步骤" - 让 Claude 找到文件

    2. "给 Claude 自检方法" - 要求运行、测试、比较或验证

  • 官方建议将有效的提示词保存为 skill,记录约定到 CLAUDE.md

  • 文档提到 plan mode 用于大型或高风险变更,在编辑前显示文件列表

适用边界

  • 这些模式适用于大多数中高层抽象任务

  • 底层系统编程或需要极度精确控制的任务可能需要更详细的步骤

  • 提示词效果取决于 Claude Opus 4.7 的理解能力和项目上下文

  • 不是所有任务都适合"描述结果"模式,某些复杂任务可能需要分步指导

  • skill 和 CLAUDE.md 需要团队维护和更新

来源摘录或观察(仅做合规短引)

官方文档:"The prompts above share a few patterns. Recognizing them helps you adapt any prompt here to your own task. Describe the outcome, not the steps. Say what you want and let Claude find the files."

"Give it a way to check its own work. Ask for run, test, compare, or verify in the same prompt so Claude iterates instead of stopping after one attempt."

Tabbit 小编提醒

提示词内容来自公开资料与 Tabbit 编辑整理。引用前请查看原文授权与适用范围。

Claude Opus 4.7

在 Tabbit 中使用

Claude Opus 4.7

相关提示词

媒体Anthropic Claude Platform Docs / Anthropic Newsroom2026-04-16

Claude Opus 4.7:努力档位与迁移提示模板

媒体ZooClaw AI Help2026-04-07

Claude Opus 4.7:三模式实战策略 - Caveman 提示词、CLAUDE.md 安全护栏与 Git Worktrees

媒体Tenten Learning

Claude Opus 4.7:50+ 社群精华技巧完全攻略

媒体Anthropic 官方博客2026-06-18

Claude Opus 4.7:官方 Claude Code 定制指南 - CLAUDE.md、Skills、Hooks 与 Subagents 的选择

Claude Opus 4.7

相关测评

媒体Anthropic Newsroom2026-04-16

Claude Opus 4.7:官方编码、视觉与 Agent 基准

媒体Vellum2026-04-16

Claude Opus 4.7:Vellum 跨模型基准与任务选型

社区Reddit r/ClaudeCode

Claude Opus 4.7:Reddit ClaudeCode 发布后长会话体验