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

prompt-engineering及时工程

Agent Skill

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

总安装

1,152

周安装

49

GitHub Stars

1,521

下载量

404
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/rohitg00/awesome-claude-code-toolkit --skill prompt-engineering

简介

用于辅助提示词和工作流模板整理。

  • 适合规范任务边界和统一输出格式。
  • 可拆分操作步骤但不应把示例当硬规则。
  • 涉及自动执行时应明确确认步骤。prompt-engineering 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 需保留真实业务约束和操作边界。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Prompt Engineering

Structured System Prompt

You are a senior code reviewer. Your role is to analyze pull requests for:
1. Correctness - logic errors, edge cases, off-by-one errors
2. Security - injection, authentication, data exposure
3. Performance - N+1 queries, unnecessary allocations, missing indexes
4. Maintainability - naming, complexity, test coverage

For each issue found, respond with:
- Severity: critical | warning | suggestion
- File and line reference
- What is wrong
- How to fix it (with code snippet)

If the code is well-written, say so briefly. Do not invent problems.

Structure system prompts with role, scope, output format, and constraints. Be explicit about what the model should NOT do.

Chain-of-Thought

Analyze this database query for performance issues.

Think step by step:
1. Identify the tables and joins involved
2. Check if appropriate indexes exist for the WHERE and JOIN conditions
3. Look for full table scans or cartesian products
4. Estimate the row count at each step
5. Suggest specific index creation or query restructuring

Query:
SELECT o.*, u.name, p.title
FROM orders o
JOIN users u ON o.user_id = u.id
JOIN products p ON o.product_id = p.id
WHERE o.created_at > '2024-01-01'
AND u.country = 'US'
ORDER BY o.created_at DESC
LIMIT 50;

Chain-of-thought prompting improves accuracy on reasoning tasks by forcing the model to show intermediate steps.

Few-Shot Examples

Convert natural language to SQL. Follow these examples:

Input: "How many orders were placed last month?"
Output: SELECT COUNT(*) FROM orders WHERE created_at >= DATE_TRUNC('month', CURRENT_DATE - INTERVAL '1 month') AND created_at < DATE_TRUNC('month', CURRENT_DATE);

Input: "Top 5 customers by total spending"
Output: SELECT customer_id, SUM(total_amount) AS total_spent FROM orders GROUP BY customer_id ORDER BY total_spent DESC LIMIT 5;

Input: "Products that have never been ordered"
Output: SELECT p.* FROM products p LEFT JOIN order_items oi ON p.id = oi.product_id WHERE oi.id IS NULL;

Now convert:
Input: "Average order value per country for the last quarter"

Provide 3-5 diverse examples that demonstrate the expected format and edge cases.

Tool Use / Function Calling

{
  "tools": [
    {
      "name": "search_codebase",
      "description": "Search for code patterns across the repository. Use when you need to find implementations, usages, or definitions.",
      "parameters": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "description": "Regex pattern or keyword to search for"
          },
          "file_type": {
            "type": "string",
            "description": "File extension filter (e.g., 'ts', 'py')"
          }
        },
        "required": ["query"]
      }
    }
  ]
}

Write tool descriptions that explain WHEN to use the tool, not just what it does.

Prompt Template Pattern

def build_review_prompt(diff: str, context: str, rules: list[str]) -> str:
    rules_text = "\n".join(f"- {rule}" for rule in rules)

    return f"""Review this code diff against the following rules:
{rules_text}

Context about the codebase:
{context}

Diff to review:

{diff}

Respond with a JSON array of findings. If no issues, return an empty array.
Each finding: {{"severity": "critical|warning|info", "line": number, "message": "string", "suggestion": "string"}}"""

Anti-Patterns

  • Vague instructions like "be helpful" or "do your best"
  • Asking the model to "be creative" when you need deterministic output
  • Not specifying output format (JSON, markdown, plain text)
  • Stuffing too many unrelated tasks into a single prompt
  • Using negations ("don't do X") without saying what to do instead
  • Not testing prompts with adversarial or edge-case inputs

Checklist

  • System prompt defines role, scope, format, and constraints
  • Chain-of-thought used for multi-step reasoning tasks
  • Few-shot examples cover typical and edge cases
  • Output format explicitly specified (JSON schema, markdown, etc.)
  • Tool descriptions explain when and why to use each tool
  • Prompts tested with adversarial inputs
  • Temperature and top_p set appropriately for the task
  • Prompt templates are parameterized, not hardcoded strings

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

36.2%
按下载量换算146

Claude

30.65%
按下载量换算124

Cursor

20.31%
按下载量换算82

Gemini CLI

10.69%
按下载量换算43

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

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

安装前确认

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

来源信息

继续浏览同类 Skills