claude-prompt-engineering

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Claude Prompt Engineering

Claude提示词工程

Knowledge snapshot from: 2026-02-20
Generated by: cogworks
知识快照时间: 2026-02-20
生成者: cogworks

Overview

概述

This skill provides practical, Claude-specific prompt engineering guidance for Opus 4.6, Sonnet 4.5, and Haiku 4.5. It emphasizes fast model-aware decisions: reasoning mode selection, context management, safe autonomy, tool efficiency, and output control.
本技能为Opus 4.6、Sonnet 4.5和Haiku 4.5提供实用的、针对Claude的提示词工程指导。它强调基于模型感知的快速决策:推理模式选择、上下文管理、安全自主性、工具效率以及输出控制。

When to Use This Skill

适用场景

Use this skill when you need to:
  • Design or review Claude system prompts
  • Tune adaptive or extended thinking behavior
  • Improve tool orchestration and parallelization
  • Handle long-horizon or multi-window workflows
  • Add prompt-injection and data-leakage safeguards
  • Reduce verbosity while preserving answer quality
当你需要以下操作时,可使用本技能:
  • 设计或审核Claude系统提示词
  • 调整自适应或扩展思维行为
  • 优化工具编排与并行处理
  • 处理长周期或多窗口工作流
  • 添加提示词注入和数据泄露防护措施
  • 在保证回答质量的同时降低冗余度

Quick Decision Cheatsheet

快速决策速查表

  • Opus 4.6: Use adaptive thinking (
    low|medium|high|max
    ) only when task complexity justifies it.
  • Sonnet 4.5: Use extended thinking for legacy workflows; minimum budget 1024 tokens.
  • Simple tasks: Prefer no explicit thinking config.
  • Long tasks: Persist state in files + git checkpoints.
  • Independent reads/searches: Run tool calls in parallel.
  • Risky/irreversible actions: Ask for confirmation first.
  • Production exposure: Apply defense-in-depth (input, architecture, output).
  • Opus 4.6:仅当任务复杂度需要时,使用自适应思维(
    low|medium|high|max
    )。
  • Sonnet 4.5:针对遗留工作流使用扩展思维;最低预算为1024 tokens。
  • 简单任务:建议不使用明确的思维配置。
  • 长任务:在文件中保存状态并通过git checkpoint记录。
  • 独立读取/搜索:并行运行工具调用。
  • 高风险/不可逆操作:先请求确认。
  • 生产环境部署:应用纵深防御(输入、架构、输出层面)。

Supporting Docs

配套文档

  • reference.md
    : Canonical guidance, decision rules, anti-patterns, and sources
  • patterns.md
    : Reusable patterns and templates
  • examples.md
    : Compact before/after prompt examples
  • reference.md
    :标准指导、决策规则、反模式及来源
  • patterns.md
    :可复用的模式与模板
  • examples.md
    :简洁的提示词优化前后示例

Model Routing Contract

模型路由约定

  • primary-capability-class: reasoning
  • fallback-capability-class: workhorse
  • task-to-capability mapping:
    • source ingestion/extraction: workhorse
    • synthesis/contradiction resolution: reasoning
    • final skill drafting: workhorse
  • quality gates tied to capability:
    • reasoning: resolve contradictions and justify the interpretation
    • workhorse: complete structure with citations and no stubs
  • runtime model resolution:
    • map capability classes to provider/runtime defaults automatically
    • never ask the user to choose a model
  • 核心能力类别:推理
  • ** fallback能力类别**:通用处理
  • 任务与能力映射
    • 源数据摄入/提取:通用处理
    • 合成/矛盾解决:推理
    • 最终技能起草:通用处理
  • 与能力绑定的质量门槛
    • 推理:解决矛盾并解释推理依据
    • 通用处理:完成结构化内容并包含引用,无残缺内容
  • 运行时模型解析
    • 自动将能力类别映射到供应商/运行时默认值
    • 绝不要求用户选择模型

Invocation

调用方式

text
/claude-prompt-engineering
text
/claude-prompt-engineering