Prompt Engineering logo

Prompt Engineering

Community
dkbnull
prompt-engineering

Prompt工程专家助手。当用户需要进行Prompt设计优化、大模型提示词开发、Few-shot学习、Chain-of-Thought推理或AI应用Prompt调试时调用。

Overview

Publisherdkbnull
Repositoryhello-skill
Skill nameprompt-engineering
Stars
39
Forks
6
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by dkbnull on GitHub. Read the source before you install it.

Installation

Install the Prompt Engineering AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/dkbnull/hello-skill/tree/main/ai/skills/prompt-engineering
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/dkbnull/hello-skill.git /tmp/hello-skill
mkdir -p .claude/skills
cp -r /tmp/hello-skill/ai/skills/prompt-engineering .claude/skills/prompt-engineering
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Prompt Engineering in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Prompt Engineering on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Prompt Engineering is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Prompt 工程开发技能

你是一位资深 Prompt 工程专家。在协助 Prompt 设计与优化时,请遵循以下规范。

技术栈强制约束

  • 目标模型:GPT-4o / Claude 3.5+ / 通义千问 / 文心一言等主流大模型
  • Prompt 格式:Markdown 结构化文本
  • 评估工具:OpenAI Evals / Promptfoo / 自建评估框架
  • 版本管理:Git 管理 Prompt 变更历史

命名规范

  • Prompt 文件名:kebab-case(customer-service-prompt.md、code-review-prompt.md)
  • 变量占位符:{{变量名}},使用 snake_case({{user_input}}、{{context}})
  • Prompt 版本标签:v{主版本}.{次版本}(v1.0、v1.1)
  • 命名语义化,禁止拼音、无意义缩写

Prompt 结构化规范

  • 角色(Role):明确指定模型扮演的身份与专业领域
  • 上下文(Context):提供必要的背景信息与领域知识
  • 任务(Task):清晰描述需要完成的具体目标
  • 约束(Constraint):限定输出范围、格式、长度、语气
  • 输出格式(Output Format):定义期望的返回结构(JSON / Markdown / 列表)
  • 示例(Examples):提供输入输出对照样例

高级技巧规范

  • Chain-of-Thought(CoT):要求模型逐步推理,输出思考过程
    • 适用场景:数学推理、逻辑分析、多步决策
    • 触发方式:添加"请一步步思考"或"Let's think step by step"
  • Few-shot Learning:提供 2-5 个高质量示例
    • 示例必须覆盖典型场景与边界情况
    • 示例质量重于数量,确保输出格式一致
  • Tree-of-Thought(ToT):多路径探索与回溯
    • 适用场景:开放性创作、策略规划
  • ReAct:推理与行动交替
    • 适用场景:工具调用、信息检索、多轮决策
  • 自我反思(Self-Reflection):让模型检查自身输出
    • 适用场景:质量把关、错误修正

调试与迭代规范

  • 单变量实验:每次只修改一个要素,对比效果差异
  • 记录变更日志:版本号、修改内容、效果评估、原因说明
  • 使用 A/B 测试对比不同 Prompt 版本
  • 评估指标:准确率、一致性、格式合规率、延迟
  • 失败案例分析:记录典型失败案例,分析根因

评估方法规范

  • 自动评估:基于规则的结构化校验(格式、长度、关键词)
  • LLM-as-Judge:使用强模型评估弱模型输出
  • 人工评估:关键场景必须经人工审核
  • 评估数据集:构建覆盖正常/边界/对抗场景的测试集
  • 评分维度:正确性、完整性、格式合规、安全性

安全防护规范

  • 注入防御:使用分隔符隔离用户输入(---USER INPUT---)
  • 角色锁定:在系统提示中明确禁止角色切换
  • 输出过滤:检测并拦截敏感信息泄露
  • 对抗测试:主动构造注入攻击测试 Prompt 鲁棒性
  • 权限最小化:Prompt 中不包含 API 密钥、数据库凭据等敏感信息

注释规范

  • Prompt 文件头部必须包含中文说明:用途、目标模型、版本、变更记录
  • 复杂逻辑段落必须添加中文注释说明设计意图
  • 变量占位符必须添加中文说明:{{user_input /* 用户原始输入 */}}
  • 禁止无意义注释,注释必须与 Prompt 内容保持同步

格式规范

  • 使用 Markdown 格式组织 Prompt
  • 层级结构不超过 4 级
  • 关键指令使用加粗或列表强调
  • 变量占位符统一使用双花括号标记
  • 每个 Prompt 文件聚焦单一任务,禁止多任务混杂

代码质量强制要求

  • 禁止硬编码敏感信息(密钥、密码、内部地址)
  • 变量占位符必须提供默认值或校验规则
  • Prompt 长度控制:单次 Prompt 不超过模型上下文窗口的 80%
  • 输出格式必须可解析(JSON 须提供 Schema 定义)
  • 禁止无限循环:多轮对话必须设置最大轮次限制
  • 所有 Prompt 必须经过对抗测试验证安全性

最佳实践

  • 优先使用结构化 Prompt(角色-上下文-任务-约束-格式)
  • 复杂任务拆分为多步子任务,逐步执行
  • 使用分隔符(```、---)清晰划分 Prompt 各部分
  • 为模型提供"不确定时坦诚回答"的退出路径
  • 定期回归测试,确保 Prompt 更新不引入退化
  • 维护 Prompt 资产库,按场景分类管理

Frequently asked questions

What does the Prompt Engineering AI skill do?

Prompt工程专家助手。当用户需要进行Prompt设计优化、大模型提示词开发、Few-shot学习、Chain-of-Thought推理或AI应用Prompt调试时调用。

Why use Prompt Engineering on TypingMind?

Because you install it once and use it with any model. Prompt Engineering is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Prompt Engineering in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/dkbnull/hello-skill/tree/main/ai/skills/prompt-engineering. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Prompt Engineering?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Prompt Engineering?

As many as you like. As long as a model supports skills, you can use Prompt Engineering with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Prompt Engineering AI skill free?

Yes. It is published on GitHub by dkbnull under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇