prompt-design

prompt-design is a skill for Claude Code from ryanzhao1011/workframe. It costs 34 tokens per session (1,321 once invoked), scanned A, original, MIT.

A structured method for designing prompts, the instructions given to an AI system. It covers the situation, the desired output, constraints, context, user input, and replaceable variables.

In plain words
What is it for?
Use it to create or improve prompts, define their input variables, specify output formats, and set safety, quality, cost, or timing constraints.
Why use it?
It turns a vague business request into clearer instructions and makes missing information visible. The structure also helps keep prompts more consistent across uses.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the core plugin — 37 skills, 4 agents, 11 hooks shipped together

Good fit Use it to create or improve prompts, define their input variables, specify output formats, and set safety, quality, cost, or timing constraints.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ryanzhao1011/workframe/prompt-design
Install

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.

Any agent
npx skills add ryanzhao1011/workframe --skill prompt-design
Clone the repo
git clone --depth 1 https://github.com/ryanzhao1011/workframe

Made for: Claude Code.

Or install core, the plugin that ships this one along with the rest of its 37 skills, 4 agents, 11 hooks.

Wrote 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.

agentmods badge for prompt-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/ryanzhao1011/workframe/prompt-design.svg)](https://agentmods.dev/skills/ryanzhao1011/workframe/prompt-design)
Your own site
<a href="https://agentmods.dev/skills/ryanzhao1011/workframe/prompt-design"><img src="https://agentmods.dev/badge/skills/ryanzhao1011/workframe/prompt-design.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,321 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00034 $0.01321
Opus 5 $0.00017 $0.00660
Sonnet 5 $0.00007 $0.00264
Haiku 4.5 $0.00003 $0.00132

Measured 7d ago against content hash 74012e58efcc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

prompt-design 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 7d 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.

plugins/core/skills/prompt-design/SKILL.md · 179 lines

How it starts

The opening of the file, as written. The whole thing — 179 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Prompt 设计技能

适用场景

  • 为新场景设计 Prompt
  • 优化现有 Prompt(准确性/稳定性/成本)
  • 将业务需求转化为 AI 交互方案

五步流程

第 1 步:场景分析

在设计 Prompt 前,先澄清场景:

维度 核心问题
目标用户 谁会使用这个 Prompt 生成的输出?
使用场景 在什么业务流程中被调用?
期望输出 输出的格式、长度、质量要求?
约束条件 不能输出什么?安全/合规/品牌要求?
成本/延迟 对响应时间和 token 成本的要求?

信息不足时使用 [待确认: {说明}] 占位。

第 2 步:Prompt 架构设计

按分层架构设计:

┌─────────────────────────────────┐
│ System Instruction(系统指令)    │
│ - 角色定义                       │
│ - 能力边界                       │
│ - 输出格式约束                    │
│ - 安全红线                       │
├─────────────────────────────────┤
│ Context Injection(上下文注入)   │
│ - 业务数据                       │
│ - 历史对话                       │
│ - 检索结果                       │
├─────────────────────────────────┤
│ User Instruction(用户指令)      │
│ - 具体任务                       │
│ - 用户输入                       │
└─────────────────────────────────┘

每层的设计要点:

层级 设计要点
System 角色明确、能力清晰、格式严格、红线不可越
Context 结构化、去噪、按相关性排序
User 具体、可操作、避免歧义

第 3 步:变量接口定义

把 Prompt 中需要动态替换的部分抽象为变量:

variables:
  - name: user_input
    type: string
    required: true
    description: "用户输入的原始文本"
    max_length: 2000
  
  - name: style_tone
    type: enum
    required: false
    default: "neutral"
    values: ["formal", "casual", "neutral"]
    description: "输出文本的语气"

设计原则:

  • 变量名自解释
  • 类型明确,有范围约束
  • 必填/选填标注
  • 默认值安全

第 4 步:版本管理

每个 Prompt 方案标注版本信息:

## Prompt: {name} v{version}

- **版本**:v1.2
- **上一版本**:v1.1
- **变更理由**:{为什么改}
- **与前版差异**:
  - 新增:{...}
  - 修改:{...}
  - 删除:{...}
- **预期影响**:{对输出质量、成本、延迟的预期影响}

第 5 步:风险评估

评估 Prompt 的潜在风险:

风险类型 检查点
Prompt 注入 用户输入能否突破 System 指令?
输出失控 是否可能输出违规/有害/错误内容?
幻觉 是否有机制防止编造事实?
边界行为 极端输入(超长/空/非预期格式)如何处理?
成本失控 是否有 token 上限?是否可能陷入循环?
敏感信息 System Prompt 是否可能被泄露给用户?

输出模板

# Prompt 方案:{name} v{version}

## 1. 场景分析
- 目标用户:{...}
- 使用场景:{...}
- 期望输出:{...}
- 约束条件:{...}

## 2. 架构设计
### System Instruction

{system prompt}


### Context Schema

{context template}


### User Instruction Template

{user prompt template}


## 3. 变量接口
{variables yaml}

## 4. 版本信息
{version info}

## 5. 风险评估
{risk table}

## 6. 示例
### 输入
{example input}
### 期望输出
{example output}

Read the full file on GitHub · 179 lines

Changes

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.

  1. 7d ago First seen · 179 lines · 34 tokens per session scan A 74012e58efcc

Subscribe to this mod's changes

prompt-design is a skill published in the GitHub repository ryanzhao1011/workframe (4 stars, last pushed 20d ago), licensed MIT. It adds 34 tokens to every session and 1,321 once invoked, about $0.0002 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-31.

Related

Other skills, from other repositories

ai-automation

Workflow automation skills using AI. Build chatbots, automate repetitive tasks, integrate LLMs into pipelines, design intent-based assistants. Triggers on: chatbot, automation, workflow, AI agent, RAG, LLM integration, intent recognition, conversation design.

fatihkan/badi · 56 tokens

optimize

Rephrase a rough prompt to follow prompt-engineering best practices WITHOUT changing its meaning, then show it for review without executing. Use when the user runs /petprompt:optimize or asks to rewrite/clean up/optimize their prompt before running it.

zjchenQAQ/petprompt · 55 tokens

cursor-prompting

Prompt shaping rules for delegated cursor-agent tasks.

felipeinf/cursor-for-claude · 13 tokens

agent-orchestration-improve-agent

Systematic improvement of existing agents through performance analysis, prompt engineering, and continuous iteration.

lingxling/awesome-skills-cn · 25 tokens

prompt-cookbook

Build a prompt cookbook for one company's actual vertical and roles rather than generic examples. Each recipe names the job it does, who runs it, the prompt itself, what good output looks like, and how to tell when it went wrong. Written for people who have never written a prompt and will not read documentation about…

enalbenerraw/blanewarrene · 69 tokens

pentest-llm

LLM application red team — OWASP LLM Top 10, prompt injection, RAG poisoning, MCP server abuse, agent tool abuse, jailbreak testing advisory. Triggers on LLM red team, prompt injection, jailbreak, RAG poisoning, OWASP LLM Top 10, MCP abuse, agent tool abuse, AI security testing.

fatihkan/badi · 75 tokens