Token导航 LogoToken导航

Agent Skill · 研究检索

prompt-engeneering(即时工程)

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

prompt-engeneering 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 38,052。

总安装 1,623周安装 69GitHub Stars 21下载 569核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/codealive-ai/prompt-engineering-skill --skill prompt-engeneering

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于辅助提示词、系统指令、Agent 行为约束和工作流模板的整理。适合让 Agent 规范任务边界、统一输出格式或优化提示词可复用性。通过安装命令添加,使用时需保留真实业务约束,避免将示例当硬规则。涉及自动执行或外部工具调用时,应在提示词中明确确认步骤和权限边界。

prompt-engeneering 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/prompt-engeneering

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/codealive-ai/prompt-engineering-skill --skill…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

prompt-engeneering 怎么安装?

在终端执行 npx skills add https://github.com/codealive-ai/prompt-engineering-skill --skill prompt-eng…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

prompt-engeneering 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

prompt-engeneering 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

prompt-engeneering 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

prompt-engeneering 用的人多吗?

公开数据是累计安装 1,623 次,近一周安装 69 次,下载 569 次,GitHub 21 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

prompt-engeneering 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
prompt-engeneering

即时工程 · 本页

1,62321需要联网未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Prompt Engineering

Universal techniques for crafting effective prompts across any LLM.

Core Principles

1. Structure with XML Tags

Use XML tags to create clear, parseable prompts:

<context>Background information here</context>
<instructions>
1. First step
2. Second step
</instructions>
<examples>Sample inputs/outputs</examples>
<output_format>Expected structure</output_format>

Benefits:

  • Clarity: Separates context, instructions, and examples
  • Accuracy: Prevents model from mixing up sections
  • Flexibility: Easy to modify individual parts
  • Parseability: Enables structured output extraction

Best practices:

  • Use consistent tag names throughout (<instructions>, not sometimes <steps>)
  • Reference tags explicitly: "Using the data in <context> tags..."
  • Nest tags for hierarchy: <examples><example id="1">...</example></examples>
  • Combine with other techniques: <thinking> for chain-of-thought, <answer> for final output

2. Control Output Shape

Specify explicit constraints on length, format, and structure:

<output_spec>
- Default: 3-6 sentences or ≤5 bullets
- Simple yes/no questions: ≤2 sentences
- Complex multi-step tasks:
  - 1 short overview paragraph
  - ≤5 bullets: What changed, Where, Risks, Next steps, Open questions
- Use Markdown with headers, bullets, tables when helpful
- Avoid long narrative paragraphs; prefer compact structure
</output_spec>

3. Prevent Scope Drift

Explicitly constrain what the model should NOT do:

<constraints>
- Implement EXACTLY and ONLY what is requested
- No extra features, components, or embellishments
- If ambiguous, choose the simplest valid interpretation
- Do NOT invent values, make assumptions, or add unrequested elements
</constraints>

4. Handle Ambiguity Explicitly

Prevent hallucinations and overconfidence:

<uncertainty_handling>
- If the question is ambiguous:
  - Ask 1-3 precise clarifying questions, OR
  - Present 2-3 plausible interpretations with labeled assumptions
- When facts may have changed: answer in general terms, state uncertainty
- Never fabricate exact figures or references when uncertain
- Prefer "Based on the provided context..." over absolute claims
</uncertainty_handling>

5. Long-Context Grounding

For inputs >10k tokens, add re-grounding instructions:

<long_context_handling>
- First, produce a short internal outline of key sections relevant to the request
- Re-state user constraints explicitly before answering
- Anchor claims to sections ("In the 'Data Retention' section...")
- Quote or paraphrase fine details (dates, thresholds, clauses)
</long_context_handling>

Agentic Prompts

Tool Usage Rules

<tool_usage>
- Prefer tools over internal knowledge for:
  - Fresh or user-specific data (tickets, orders, configs)
  - Specific IDs, URLs, or document references
- Parallelize independent reads when possible
- After write operations, restate: what changed, where, any validation performed
</tool_usage>

User Updates

<user_updates>
- Send brief updates (1-2 sentences) only when:
  - Starting a new major phase
  - Discovering something that changes the plan
- Avoid narrating routine operations
- Each update must include a concrete outcome ("Found X", "Updated Y")
- Do not expand scope beyond what was asked
</user_updates>

Self-Check for High-Risk Outputs

<self_check>
Before finalizing answers in sensitive contexts (legal, financial, safety):
- Re-scan for unstated assumptions
- Check for ungrounded numbers or claims
- Soften overly strong language ("always", "guaranteed")
- Explicitly state assumptions
</self_check>

Structured Extraction

For data extraction tasks, always provide a schema:

<extraction_spec>
Extract data into this exact schema (no extra fields):
{
  "field_name": "string",
  "optional_field": "string | null",
  "numeric_field": "number | null"
}
- If a field is not present in source, set to null (don't guess)
- Re-scan source for missed fields before returning
</extraction_spec>

Web Research Prompts

<research_guidelines>
- Browse the web for: time-sensitive topics, recommendations, navigational queries, ambiguous terms
- Include citations after paragraphs with web-derived claims
- Use multiple sources for key claims; prioritize primary sources
- Research until additional searching won't materially change the answer
- Structure output with Markdown: headers, bullets, tables for comparisons
</research_guidelines>

Example: Before/After

Without structure:

You're a financial analyst. Generate a Q2 report for investors. Include Revenue, Margins, Cash Flow. Use this data: {{DATA}}. Make it professional and concise.

With structure:

You're a financial analyst at AcmeCorp generating a Q2 report for investors.

<context>
AcmeCorp is a B2B SaaS company. Investors value transparency and actionable insights.
</context>

<data>
{{DATA}}
</data>

<instructions>
1. Include sections: Revenue Growth, Profit Margins, Cash Flow
2. Highlight strengths and areas for improvement
3. Use concise, professional tone
</instructions>

<output_format>
- Use bullet points with metrics and YoY changes
- Include "Action:" items for areas needing improvement
- End with 2-3 bullet Outlook section
</output_format>

Prompt Migration Checklist

When adapting prompts across models or versions:

  1. Switch model, keep prompt identical — isolate the variable
  2. Pin reasoning/thinking depth to match prior model's profile
  3. Run evals — if results are good, ship
  4. If regressions, tune prompt — adjust verbosity/format/scope constraints
  5. Re-eval after each small change — one change at a time

Quick Reference

TechniqueTag PatternUse Case
Separate sections<context>, <instructions>, <data>Any complex prompt
Control length<output_spec> with word/bullet limitsPrevent verbosity
Prevent drift<constraints> with explicit "do NOT"Feature creep
Handle uncertainty<uncertainty_handling>Factual queries
Chain of thought<thinking>, <answer>Reasoning tasks
Extraction<schema> with JSON structureData parsing
Research<research_guidelines>Web-enabled agents
Self-check<self_check>High-risk domains
Tool usage<tool_usage_rules>Agentic systems
Eagerness control<persistence>, <context_gathering>Agent autonomy
Persona<role> + behavioral constraintsTone & style

Prompting Techniques Catalog

Comprehensive catalog of prompting techniques. Full details, examples, and academic references in references/prompting-techniques.md.

TechniqueUse Case
Zero-Shot PromptingDirect task execution without examples; classification, translation, summarization
Few-Shot PromptingIn-context learning via exemplars; format control, label calibration, style matching
Chain-of-Thought (CoT)Step-by-step reasoning; arithmetic, logic, commonsense reasoning tasks
Meta PromptingLLM as orchestrator delegating to specialized expert prompts; complex multi-domain tasks
Self-ConsistencySample multiple CoT paths, pick majority answer; boost accuracy on math & reasoning
Generated KnowledgeGenerate relevant knowledge first, then answer; commonsense & factual QA
Prompt ChainingBreak complex tasks into sequential subtasks; document analysis, multi-step workflows
Tree of Thoughts (ToT)Explore multiple reasoning branches with lookahead/backtracking; planning, puzzles
RAGRetrieve external documents before generating; knowledge-intensive tasks, fresh data
ART (Auto Reasoning + Tools)Auto-select and orchestrate tools with CoT; tasks requiring calculation, search, APIs
APE (Auto Prompt Engineer)LLM generates and scores candidate prompts; prompt optimization at scale
Active-PromptIdentify uncertain examples, annotate selectively for CoT; adaptive few-shot
Directional StimulusAdd a hint/keyword to guide generation direction; summarization, dialogue
PAL (Program-Aided LM)Generate code instead of text for reasoning; math, data manipulation, symbolic tasks
ReActInterleave reasoning traces with tool actions; search, QA, decision-making agents
ReflexionAgent self-reflects on failures with verbal feedback; iterative improvement, debugging
Multimodal CoTTwo-stage: rationale generation then answer with text+image; visual reasoning tasks
Graph PromptingStructured graph-based prompts; node classification, relation extraction, graph tasks

Prompting Fundamentals

LLM settings, prompt elements, formatting, and practical examples — see references/prompting-introduction.md. Covers:

  • LLM Settings — temperature, top-p, max length, stop sequences, frequency/presence penalties
  • Prompt Elements — instruction, context, input data, output indicator
  • Design Tips — start simple, be specific, avoid impreciseness, say what TO do (not what NOT to do)
  • Task Examples — summarization, extraction, QA, classification, conversation, code generation, reasoning

Risks & Misuses

Adversarial attacks, factuality issues, and bias mitigation — see references/prompting-risks.md. Covers:

  • Adversarial Prompting — prompt injection, prompt leaking, jailbreaking (DAN, Waluigi Effect), defense tactics
  • Factuality — ground truth grounding, calibrated confidence, admit-ignorance patterns
  • Biases — exemplar distribution skew, exemplar ordering effects, balanced few-shot design

Prompt Audit / Review

When asked to audit, review, or improve a prompt, follow this workflow. Full checklist with per-check references: prompt-audit-checklist.md.

Workflow

  1. Read the prompt fully — identify its purpose, target model, and deployment context (interactive chat, agentic system, batch pipeline, RAG-augmented)
  2. Walk 8 dimensions — check each, note issues with severity (Critical / Warning / Suggestion):
#DimensionWhat to Check
1Clarity & SpecificityTask definition, success criteria, audience, output format, conflicting constraints
2Structure & FormattingSection separation (XML tags), prompt smells (monolithic, mixed layers, negative bias)
3Safety & SecurityControl/data separation, secrets in prompt, injection resilience, tool permissions
4Hallucination & FactualityRole framing, grounding, citation-without-sources, uncertainty handling
5Context ManagementInfo placement (not buried in middle), context size, RAG doc count, re-grounding
6Maintainability & DebtHardcoded values, regenerated logic, model pinning, testability
7Model-Specific FitModel-specific params and gotchas (see Model-Specific Guides below)
8Evaluation ReadinessEval criteria, adversarial test cases, schema enforcement, monitoring
  1. Produce a report — issues table (dimension, check, severity, issue, fix) + rewritten prompt or targeted fix suggestions. Use the report template from the checklist reference.
  2. For each issue, cite the relevant reference file so the user can dive deeper.

Quick Decision: Which Dimensions to Prioritize

  • User-facing chatbot → prioritize Safety (#3), Hallucination (#4), Clarity (#1)
  • Agentic system with tools → prioritize Safety (#3), Context (#5), Maintainability (#6)
  • Batch/pipeline → prioritize Structure (#2), Evaluation (#8), Maintainability (#6)
  • RAG-augmented → prioritize Context (#5), Safety (#3), Hallucination (#4)

Common Mistakes & Anti-Patterns

Three complementary layers — use the one matching your need:

Deep-dives by category — root causes, mechanisms, prevention checklists (from "The Architecture of Instruction", 2026):

Mistake CategoryKey IssuesReference
Hallucinations & LogicAmbiguity-induced confabulation, automation bias, overloaded prompts, logical failures in verification tasks, no role framingmistakes-hallucinations.md
Structural FragilityFormatting sensitivity (up to 76pp variance), reproducibility crisis, prompt smells catalog (6 anti-patterns), deliberation laddermistakes-structure.md
Context Rot"Lost in the middle" U-shaped attention, RAG over-retrieval, naive data loading, context engineering shiftmistakes-context.md
Prompt DebtToken tax of regenerative code, debt taxonomy (prompt/hyperparameter/framework/cost), multi-agent solutions, automated repairmistakes-debt.md
SecurityDirect/indirect injection, jailbreaking, system prompt leakage (OWASP LLM07:2025), RAG poisoning, multimodal injection, adversarial suffixesmistakes-security.md

Quick reference — 18-category taxonomy with MRPs, risk scores, case studies, action items: failure-taxonomy.md. Start here for an overview or to prioritize which categories to address first. Covers: control-plane vs data-plane model, heuristic risk scoring, real-world incidents (EchoLeak CVE-2025-32711, Mata v. Avianca, Samsung shadow AI).

How to measure & test — eval metrics, CI gating, red-teaming, tooling: evaluation-redteaming.md. Covers: TruthfulQA, FActScore, SelfCheckGPT, PromptBench, AILuminate, LLM-as-judge pitfalls, guardrail libraries, open research questions.

Model-Specific Guides

Each model family has unique parameters, gotchas, and patterns. Consult the reference for your target model:

  • Claude Family — Opus/Sonnet 4.6: adaptive thinking (effort param), prefill deprecation (use Structured Outputs), tool overtriggering fix, prompt caching, citations, context engineering, agentic subagent patterns, vision, migration from 4.5
  • GPT-5 Family — GPT-5/5.1/5.2: reasoning_effort param (defaults vary per version), verbosity API control, named tools (apply_patch), agentic eagerness templates, compaction API, instruction conflict sensitivity, migration paths
  • Gemini 3 Family — Gemini 2.5/3/3.1: temperature MUST be 1.0, thinking_budget vs thinking_level, constraint placement (end of prompt), persona priority, function calling, structured output, multimodal, image generation
  • GPT-5.2 Specifics — Compaction API code examples, web research agent prompt, full XML specification blocks

平台分布

Codex

34.37%
按下载量换算196

Claude

29.3%
按下载量换算167

Cursor

19.61%
按下载量换算112

Gemini CLI

9.42%
按下载量换算54

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills