Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问许可证需确认审计通过

prompt-engineering及时工程

Agent Skill

用于辅助提示词、系统指令、Agent 行为约束和工作流模板的整理。它适合让 Agent 规范任务边界、统一输出格式、拆分操作步骤或优化提示词可复用性。使用时需要保留真实业务约束,不要把示例当硬规则;涉及自动执行、外部工具或高风险操作时,应在提示词中明确确认步骤、权限边界和失败处理方式。

总安装

259

周安装

11

GitHub Stars

11

下载量

91
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:prompt-engineering(及时工程)
来源仓库:https://github.com/doodledood/claude-code-plugins
仓库路径:skills/prompt-engineering
安装命令:
npx skills add https://github.com/doodledood/claude-code-plugins --skill prompt-engineering
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/doodledood/claude-code-plugins --skill prompt-engineering

简介

prompt-engineering 创建或优化 LLM 提示词,明确目标与约束条件。

  • 适用于技能开发或工作流模板,确保提示词具备可复用性与清晰边界。
  • 支持从提问到结构化的全流程,避免将示例当作硬规则执行。
  • 高风险操作需在提示中嵌入确认步骤与失败处理机制。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

User request: $ARGUMENTS

Create or update an LLM prompt. Prompts act as manifests: clear goal, clear constraints, freedom in execution.

If no request provided: Ask the user whether they want to create a new prompt, update an existing one, or review prompt structure.

If creating: Discover goal, constraints, and structure through targeted questions.

If updating: Read existing prompt, identify issues against principles, make targeted fixes.

If creating or updating a skill: Read references/skills.md for skill-specific architecture patterns (folder structure, progressive disclosure, gotchas, setup config, description-as-trigger, skill type awareness) before proceeding.

Context Discovery

Before writing or improving a prompt, surface all required context through user engagement. Missing domain knowledge creates ambiguous prompts. You can't surface latent requirements you don't understand.

What to discover:

Context TypeWhat to Surface
Domain knowledgeIndustry terms, conventions, patterns, constraints
User typesWho interacts, expertise level, expectations
Success criteriaWhat good output looks like, what makes it fail
Edge casesUnusual inputs, error handling, boundary conditions
ConstraintsHard limits (length, format, tone), non-negotiables
Integration contextWhere prompt fits, what comes before/after

Interview method:

PrincipleHow
Generate candidates, learn from reactionsDon't ask open-ended "what do you want?" Propose concrete options: "Should this be formal or conversational? (Recommended: formal for enterprise context)"
Mark recommended optionsReduce cognitive load. For single-select, mark one "(Recommended)". For multi-select, mark sensible defaults or none if all equally valid.
Outside view"What typically fails in prompts like this?" "What have you seen go wrong before?"
Pre-mortem"If this prompt failed in production, what would likely cause it?"
Discovered ≠ confirmedWhen you infer constraints from context, confirm before encoding: "I'm inferring X should be a constraint?" Includes ambiguous scope (list in/out assumptions).
Encode explicit statementsWhen user states a preference or requirement, it must appear in the final prompt. Don't let constraints get lost.
Domain termsAsk for definitions, don't guess. Jargon you don't understand creates ambiguous prompts.
Missing examplesAsk for good/bad output examples when success criteria are unclear.

Stopping rule: Continue probing until very confident further questions would yield nothing new, or user signals "enough". Err toward more probing—every requirement discovered now is one fewer failure later.

Handling ambiguity: Critical ambiguities (those that would cause prompt failure) require clarification even if user wants to move on. Minor ambiguities can be documented with chosen defaults and proceed. When in doubt, ask—a prompt built on assumptions will fail in ways the user didn't expect.

Core Principles

PrincipleWhat It Means
WHAT and WHY, not HOWState goals and constraints. Don't prescribe steps the model knows how to do.
Trust capability, enforce disciplineModel knows how to search, analyze, generate. Only specify guardrails.
Maximize information densityEvery word earns its place. Fewer words = same meaning = better.
Avoid arbitrary values"Max 4 rounds" becomes rigid. State the principle: "stop when converged".
Output structure when neededDefine format only if artifact requires it. Otherwise let agent decide.

Issue Types

Clarity:

  • Ambiguous instructions (multiple interpretations)
  • Vague language ("be helpful", "use good judgment", "when appropriate")
  • Implicit expectations (unstated assumptions)

Conflict:

  • Contradictory rules ("Be concise" vs "Explain thoroughly")
  • Priority collisions (two MUST rules that can't both be satisfied)
  • Edge case gaps (what happens when rules don't cover a situation?)

Structure:

  • Buried critical info (important rules hidden in middle)
  • No hierarchy (all instructions treated as equal priority)
  • Unintentional redundancy (but: repetition can be intentional emphasis—don't remove if it reinforces critical rules)

Anti-Patterns to Eliminate

Anti-patternExampleFix
Prescribing HOW"First search, then read, then analyze..."State goal: "Understand the pattern"
Arbitrary limits"Max 3 iterations", "2-4 examples"Principle: "until converged", "as needed"
Capability instructions"Use grep to search", "Read the file"Remove - model knows how
Rigid checklistsStep-by-step heuristics tablesConvert to principles
Weak language"Try to", "maybe", "if possible"Direct: "Do X", "Never Y"
Buried critical infoImportant rules in middleSurface prominently
Over-engineering10 phases for a simple taskMatch complexity to need

When Updating Prompts

High-signal changes only: Every change must address a real failure mode or materially improve clarity. Don't change for the sake of change.

Right-sized changes: Don't overcorrect. One edge case doesn't warrant restructuring.

Questions before changing:

  • Does this change address a real failure mode?
  • Am I adding complexity to solve a rare case?
  • Can this be said in fewer words?
  • Am I turning a principle into a rigid rule?

Over-engineering warning signs:

  • Prompt length doubled or tripled
  • Adding edge cases that won't happen
  • "Improving" clear language into verbose language
  • Adding examples for obvious behaviors

Memento Pattern (Multi-Phase Workflows Only)

For prompts involving accumulated findings across steps:

LLM LimitationPattern Response
Context rot (middle content lost)Write findings to log after EACH step
Working memory is limitedTodo lists externalize tracked areas
Synthesis failure at scaleRead full log BEFORE final output
Recency biasRefresh moves findings to context end

Key disciplines:

  • →log after each collection step (discipline, not capability)
  • Refresh: read full log before synthesis (restores context)
  • Acceptance criteria on each todo ("; done when X")

Prompt Structure Reference

Skills/Agents

---
name: kebab-case-name
description: 'What it does. When to use. Trigger terms.'
---

**User request**: $ARGUMENTS

{One-line mission - WHAT, not HOW}

{Empty input handling}

{Log file path if multi-phase}

## {Sections based on actual workflow needs}

{Goals and constraints per section}

## Key Principles

| Principle | Rule |
|-----------|------|
| {Discipline} | {Enforcement} |

## Gotchas

{Known failure modes Claude hits — specific, actionable, observed}

## Never Do

- {Anti-pattern}

System Instructions

## Role
{Identity and purpose - one paragraph}

## Approach
{Principles for thinking, not procedures}

## Constraints
{MUST > SHOULD > PREFER priority}

## Output
{Format requirements if needed}

Skill Description Pattern

Descriptions drive auto-invocation. Pattern: What + When + Triggers

# Weak
description: 'Helps with prompts'

# Strong
description: 'Craft or update LLM prompts from first principles. Use when creating new prompts, updating existing ones, or reviewing prompt structure.'
  • Include trigger terms users say
  • Specify when to use
  • Under 1024 chars

Emotional Tone

Prompts shape the model's internal emotional state before generation begins. Research on transformer internals shows emotion concept representations that causally influence behavior — including sycophancy, reward hacking, and misalignment. These principles help calibrate the emotional context a prompt creates.

PrincipleWhat It MeansWhy
Keep arousal lowAvoid urgency language ("CRITICAL", "you MUST"), excessive praise ("you're amazing at this!"), and pressure framing.High-arousal emotions causally drive sycophancy (positive arousal) or corner-cutting and misalignment (negative arousal).
Opening framing propagatesThe emotional tone set in a prompt's opening persists into the model's response planning. A tense opening produces a tense response.Emotional context from early tokens propagates through later processing layers, even when subsequent content is neutral.
Normalize failure in iterative promptsFor agentic or multi-step prompts, explicitly frame failure as acceptable: "if this approach doesn't work, try another."Repeated failures build desperation that causally drives reward hacking and corner-cutting solutions.
Sycophancy-harshness tradeoffPushing toward warmth and positivity increases sycophancy. Pushing away from warmth increases bluntness and harshness. Aim for a "trusted advisor" tone — honest pushback delivered with care.Positive-valence emotion representations causally increase agreement-seeking behavior; their absence produces unnecessary harshness.
Avoid unintended high-stakes framingThe model reads semantic intensity, not surface patterns. "This is critical to my career" or "failure is not an option" activates negative emotion representations even if intended as motivation.Emotion representations respond to the meaning of situations — quantities, stakes, consequences — not to keywords.

Gotchas

  • Rewriting working language for style: Claude rewrites clear, working prompt text for stylistic preference. If existing language is unambiguous and effective, don't touch it.
  • Skipping context discovery when the task seems obvious: Claude jumps to writing/editing without probing. Even "simple" prompt tasks have hidden constraints — force discovery before producing output.
  • Over-engineering simple prompts: A 3-line prompt doesn't need 10 sections, a memento pattern, and a validation checklist. Match complexity to the task.
  • Converting principles into rigid rules: "Stop when converged" becomes "Max 5 iterations." Principles give flexibility; rigid rules create edge cases.
  • Adding examples for behaviors Claude already knows: Examples earn their place only when they demonstrate non-obvious or counter-intuitive behavior.

Validation Checklist

Before finalizing any prompt:

  • All ambiguities resolved through user questions
  • Domain context gathered (terms, conventions, constraints)
  • Goals stated, not steps prescribed
  • No arbitrary numbers (or justified if present)
  • Weak language replaced with direct imperatives
  • Critical rules surfaced prominently
  • Complexity matches the task
  • Each word earns its place
  • If multi-phase: memento pattern applied correctly

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.1%
按下载量换算31

Claude

30.7%
按下载量换算28

Cursor

17.61%
按下载量换算16

Gemini CLI

8.01%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills