create-prompt-template

create-prompt-template is a command for Claude Code from 854771076/oh-my-claude-roles. It costs 19 tokens per session (311 once invoked), scanned A, original, MIT.

A command that creates a reusable AI prompt template and a Zod schema. A prompt template defines instructions for an AI, while a schema describes and checks the allowed input and output data.

In plain words
What is it for?
Use it to create .prompt.ts and schema files for a business task, with LangChain.js formatting, eight required sections, security rules, and names following the stated file convention.
Why use it?
It gives new prompts a fixed structure and adds checks for data shape, safety, errors, and missing details. This reduces inconsistent prompt files and invalid data passed between parts of an application.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to create .prompt.ts and schema files for a business task, with LangChain.js formatting, eight required sections, security rules, and names following the stated file convention.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/854771076/oh-my-claude-roles/create-prompt-template
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.

Clone the repo
git clone --depth 1 https://github.com/854771076/oh-my-claude-roles

Made for: Claude Code.

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 create-prompt-template

README.md
[![agentmods](https://agentmods.dev/badge/commands/854771076/oh-my-claude-roles/create-prompt-template/github.svg)](https://agentmods.dev/commands/854771076/oh-my-claude-roles/create-prompt-template)
Your own site
<a href="https://agentmods.dev/commands/854771076/oh-my-claude-roles/create-prompt-template"><img src="https://agentmods.dev/badge/commands/854771076/oh-my-claude-roles/create-prompt-template/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.

agentmods 80×15 button for create-prompt-template

Your own site · 80×15
<a href="https://agentmods.dev/commands/854771076/oh-my-claude-roles/create-prompt-template"><img src="https://agentmods.dev/badge/commands/854771076/oh-my-claude-roles/create-prompt-template.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 311 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.00019 $0.00311
Opus 5 $0.00010 $0.00156
Sonnet 5 $0.00004 $0.00062
Haiku 4.5 $0.00002 $0.00031

Measured 12d ago against content hash 1b5e7dc20c02, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

create-prompt-template 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 12d 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.

packages/ai/Prompt/v1.0.0/commands/create-prompt-template.md · 30 lines

What it actually says

命令内容

根据用户提供的提示词名称和业务场景,生成完整符合企业级规范的提示词模板文件和Zod Schema文件。

提示词名称:$ARGUMENTS

执行步骤:

  1. 分析用户提供的业务场景和需求,确认核心目标、输入输出边界
  2. 创建 .prompt.ts 格式的提示词文件,严格按照8模块结构生成框架
  3. 创建配套的 [prompt-name].schema.ts 文件,定义输入和输出Zod Schema
  4. 自动添加基础安全规则、异常处理规则、约束禁忌模块的标准模板内容
  5. 标记需要用户补充填充的内容,输出文件路径和下一步操作指引

检查要点:

  • 必须使用LangChain.js ChatPromptTemplate标准封装
  • 必须严格遵循8模块固定顺序,无内容模块标注「无特殊要求」
  • Schema必须符合企业Zod类型安全规范,可直接导出供业务代码复用
  • 必须预填入企业强制要求的基础安全合规规则
  • 文件名必须符合企业规范,使用小写连字符命名

---
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. 12d ago First seen · 30 lines · 19 tokens per session scan A 1b5e7dc20c02

Subscribe to this mod's changes

create-prompt-template is a command published in the GitHub repository 854771076/oh-my-claude-roles (22 stars, last pushed 5mo ago), licensed MIT. It adds 19 tokens to every session and 311 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.