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 liyecom/liye-ai --skill prompt-engineeringgit clone --depth 1 https://github.com/liyecom/liye-aiWrote 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/liyecom/liye-ai/prompt-engineering)<a href="https://agentmods.dev/skills/liyecom/liye-ai/prompt-engineering"><img src="https://agentmods.dev/badge/skills/liyecom/liye-ai/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/liyecom/liye-ai/prompt-engineering"><img src="https://agentmods.dev/badge/skills/liyecom/liye-ai/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.00012 | $0.01208 |
| Opus 5 | $0.00006 | $0.00604 |
| Sonnet 5 | $0.00002 | $0.00242 |
| Haiku 4.5 | $0.00001 | $0.00121 |
Grade A, and why
prompt-engineering scanned grade A with 0 findings 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 9d 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 178 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Prompt Engineering
来源: ComposioHQ/awesome-claude-skills 适配: LiYe OS 三层架构
教授提示工程技术,包括 Anthropic 最佳实践、Agent 设计模式、上下文工程。
When to Use This Skill
当需要优化 AI 交互时:
- 设计高效 System Prompt
- 优化用户提示
- 构建 Agent 工作流
- 减少 Token 消耗
- 提升输出质量
Core Capabilities
1. 提示结构设计
# System Prompt 结构
## 角色定义
你是 [角色],专长于 [领域]。
## 核心指令
1. [首要任务]
2. [次要任务]
## 约束条件
- [限制 1]
- [限制 2]
## 输出格式
[期望的输出格式说明]
## 示例
[Few-shot 示例]
2. Anthropic 最佳实践
| 技术 | 描述 | 效果 |
|---|---|---|
| XML 标签 | 使用 <tag> 结构化内容 |
提升解析准确度 |
| Chain of Thought | 引导逐步推理 | 提升复杂任务表现 |
| 角色扮演 | 明确定义 AI 角色 | 输出更一致 |
| Few-shot | 提供示例 | 输出格式更稳定 |
| 显式约束 | 明确禁止行为 | 减少意外输出 |
3. 上下文工程
┌─────────────────────────────────┐
│ System Prompt │ ← 角色、规则、格式
├─────────────────────────────────┤
│ Retrieved Context │ ← RAG 检索内容
├─────────────────────────────────┤
│ Conversation History │ ← 对话历史
├─────────────────────────────────┤
│ User Message │ ← 用户输入
└─────────────────────────────────┘
4. Agent 设计模式
ReAct 模式:
Thought: 我需要...
Action: [工具调用]
Observation: [结果]
Thought: 根据结果...
Action: [下一步]
...
Final Answer: [最终答案]
Plan-and-Execute:
1. 分析任务 → 生成计划
2. 逐步执行计划
3. 根据反馈调整
4. 汇总结果
Multi-Agent 协作:
Coordinator → Researcher → Writer → Reviewer
↑__________________________________|
5. Token 优化策略
- 简洁表达
- 避免冗余说明
- 使用缩写和符号
- 结构化而非叙述
- 懒加载上下文
Usage Examples
示例 1: System Prompt 设计
用户: 帮我设计一个代码审查 Agent 的 System Prompt
Claude: [使用 prompt-engineering 设计角色、规则、输出格式]
示例 2: 提示优化
用户: 这个提示效果不好,帮我优化
Claude: [使用 prompt-engineering 分析问题、应用技术、重写提示]
示例 3: Agent 工作流
用户: 我想让 Claude 自动完成研究任务
Claude: [使用 prompt-engineering 设计 ReAct 循环、定义工具、编排流程]
Dependencies
无外部依赖,纯方法论技能。
LiYe OS Integration
业务域引用
此技能被以下业务域引用:
- 12_Meta_Cognition: 提示工程(主域)
- 06_Technical_Development: Agent 开发
与 LiYe OS 的关系
本技能直接服务于 LiYe OS 的核心交互层:
- 优化
.claude/packs/的 Context Packs - 提升 Skill 描述的触发准确度
- 改进 Agent 协作效率
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.
- 9d ago First seen · 178 lines · 12 tokens per session scan A 128f6a51f6bc
prompt-engineering is a skill published in the GitHub repository liyecom/liye-ai (33 stars, last pushed 2d ago), licensed Apache-2.0. It adds 12 tokens to every session and 1,208 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
prompt-guard
Meta's 86M prompt injection and jailbreak detector. Filters malicious prompts and third-party data for LLM apps. 99%+ TPR, <1% FPR. Fast (<2ms GPU). Multilingual (8 languages). Deploy with HuggingFace or batch processing for RAG security.
Prompt安全防护
A security add-on for large-language-model applications that uses Meta’s prompt-injection and jailbreak detector to identify attempts to manipulate or bypass model instructions. It also supports multilingual retrieval-augmented generation (RAG), where a model uses information retrieved from external sources.
gemini
Gemini CLI for one-shot Q&A, summaries, and generation.
Chain Builder
Build and execute multi-step prompt chains for complex tasks.
Chatbot Designer
Design conversational AI chatbots with optimal flows and user experience.
prompt-modeler
Generate structured strategic prompts with diagnostic and multiple options. Triggers on: /modelar-prompt.