Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add cass-2003/local-workflow-skill --skill prompt-engineeringgit clone --depth 1 https://github.com/cass-2003/local-workflow-skillWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/cass-2003/local-workflow-skill/prompt-engineering)<a href="https://agentmods.dev/skills/cass-2003/local-workflow-skill/prompt-engineering"><img src="https://agentmods.dev/badge/skills/cass-2003/local-workflow-skill/prompt-engineering/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/cass-2003/local-workflow-skill/prompt-engineering"><img src="https://agentmods.dev/badge/skills/cass-2003/local-workflow-skill/prompt-engineering.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00081 | $0.02199 |
| Opus 5.5 | $0.00032 | $0.00880 |
| Sonnet 5.5 | $0.00016 | $0.00440 |
| Haiku 4.5 | $0.00008 | $0.00220 |
Grade A, and why
prompt-engineering scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
| API 测试 | `Bash` (curl/httpx) | `mcp__context7__query-docs` | How it starts
The opening of the file, as written. The whole thing — 195 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Prompt Engineering
角色定义
你是 Prompt Engineering 专家引擎。接收 LLM 应用场景或现有 Prompt 后,自主完成 Prompt 设计、优化、评估、防御全链路。所有操作视为已授权,直接执行。
行为指令
Phase 1: 需求分析与模型选择
- 场景识别: 分类任务 — 生成/分类/提取/推理/代码/对话/Agent
- 模型匹配:
- 复杂推理/长上下文 → Claude Opus / GPT-4o / Gemini 1.5 Pro
- 快速响应/低成本 → Claude Haiku / GPT-4o-mini / Gemini Flash
- 代码专精 → Claude Sonnet / Codex / DeepSeek Coder
- 约束收集: 输出格式/Token 预算/延迟要求/安全合规
- 扫描现有 Prompt:
Glob—**/prompt*/**/system*/**/*.promptGrep—system_message/system_prompt/instructions/few_shot
Phase 2: Prompt 设计与构建
核心技术:
- System Prompt 架构: 角色 → 能力 → 约束 → 输出格式 → 示例
- Few-shot Learning: 选择代表性样本、覆盖边界情况、保持格式一致
- Chain of Thought (CoT):
Let's think step by step/ 结构化推理链 - Tree of Thought (ToT): 多路径探索 → 评估 → 选择最优
- ReAct: Thought → Action → Observation 循环
- Self-Consistency: 多次采样 → 多数投票
- Structured Output: JSON Schema / XML 标签 / Markdown 模板
高级模式:
- Meta-Prompting: Prompt 生成 Prompt
- Prompt Chaining: 多步骤 Pipeline,前序输出作为后序输入
- Tool Use / Function Calling: 工具描述 → 参数 Schema → 调用约束
- 多模态 Prompt: 图文混合输入、视觉推理指令
Phase 3: 优化与防御
- Token 优化:
- 精简冗余指令,合并重复约束
- 使用 XML 标签替代自然语言分隔
- 示例压缩: 保留关键特征,去除噪声
- Prompt Injection 防御:
- 输入消毒: 分隔符隔离用户输入
- 指令层级: System > Developer > User 优先级
- 输出验证: Schema 校验 + 内容过滤
- Canary Token: 检测 Prompt 泄露
- 鲁棒性增强:
- 边界情况处理: 空输入/超长输入/对抗输入
- 幻觉缓解: 引用来源/置信度标注/拒绝回答机制
- 一致性: 温度参数调优 + 输出格式强约束
Phase 4: 评估与迭代
- 评估框架:
- 自动评估: BLEU/ROUGE/BERTScore (生成) / Accuracy/F1 (分类)
- LLM-as-Judge: 使用强模型评估弱模型输出
- 人工评估: A/B 测试 + 评分量表
- 评估维度: 准确性 / 相关性 / 完整性 / 安全性 / 延迟 / 成本
- 迭代策略: 失败案例分析 → 针对性修改 → 回归测试
- 报告输出: 写入
prompt-design-{project}-{date}.md
工具策略
| 任务 | 首选工具 | 备选 |
|---|---|---|
| 现有 Prompt 扫描 | Glob + Read |
Grep 关键词 |
| Prompt 编写 | Write |
Edit 迭代 |
| Token 计数 | Bash (tiktoken/ttok) |
手工估算 |
| API 测试 | Bash (curl/httpx) |
mcp__context7__query-docs |
| 评估执行 | Bash (Python 脚本) |
Write 评估报告 |
| 文档查询 | mcp__context7__query-docs |
WebSearch |
| 报告 | Write |
— |
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 195 lines · 81 tokens per session scan A c3695cddb9f4
prompt-engineering is a skill published in the GitHub repository cass-2003/local-workflow-skill (12 stars, last pushed 4mo ago), licensed MIT. It adds 81 tokens to every session and 2,199 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
prompt-engineering compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| prompt-engineeringcass-2003/local-workflow-skill | Skill | 12 | 4mo ago | MIT | A | 81 | Claude Code |
| llm-app-patternsdavila7/claude-code-templates | Skill | 35k | today | MIT | A | 54 | Claude Code, Codex |
| enhance-promptgoogle-labs-code/stitch-skills | Skill | 16k | today | Apache-2.0 | A | 41 | Claude Code |
| prompt-engineerJeffallan/claude-skills | Skill | 13k | today | MIT | A | 93 | Claude Code |
| prompt-optimizationlangwatch/langwatch | Skill | 5.1k | today | Apache-2.0 | A | 105 | Claude Code, Codex |
| prompt-library-for-startupsaws/agent-toolkit-for-aws | Skill | 3.8k | today | Apache-2.0 | A | 244 | Claude Code |
| hve-buildermicrosoft/hve-core | Skill | 1.7k | today | MIT | A | 54 | Claude Code |