Token导航 LogoToken导航

Agent Skill · AI 工具

prompt-template-builder(提示模板生成器)

用于辅助提示词、系统指令、Agent 行为约束和工作流模板的整理。它适合让 Agent 规范任务边界、统一输出格式、拆分操作步骤或优化提示词可复用性。使用时需要保留真实业务约束,不要把示例当硬规则;涉及自动执行、外部工具或高风险操作时,应在提示词中明确确认步骤、权限边界和失败处理方式。

prompt-template-builder 是AI 工具类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证为 MIT,第三方扫描已通过,按安装量在AI 工具类的 2,536 个 Skill 里排第 755。

总安装 2,184周安装 91GitHub Stars 32下载 728核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:prompt-template-builder(提示模板生成器)
来源仓库:https://github.com/patricio0312rev/skills
仓库路径:skills/prompt-template-builder
安装命令:
npx skills add https://github.com/patricio0312rev/skills --skill prompt-template-builder
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/patricio0312rev/skills --skill prompt-template-builder

这个 Skill 是做什么的

AI 工具类 Skill 用来扩展助手本身的能力,例如接模型、接检索、接外部服务。

用于辅助提示词、系统指令和工作流模板的整理。适合优化提示词可复用性或拆分操作步骤。prompt-template-builder 属于AI 工具类 Skill,可作为该场景下的辅助能力补充。使用时需要保留真实业务约束,不要把示例当硬规则。涉及外部工具时应明确权限边界和失败处理方式。

适用于 Codex、Claude、Cursor 和 Gemini CLI。

来源仓库内路径:skills/prompt-template-builder

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/patricio0312rev/skills --skill prompt-template…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

prompt-template-builder 怎么安装?

在终端执行 npx skills add https://github.com/patricio0312rev/skills --skill prompt-template-builder。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

prompt-template-builder 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

prompt-template-builder 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

prompt-template-builder 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

prompt-template-builder 用的人多吗?

公开数据是累计安装 2,184 次,近一周安装 91 次,下载 728 次,GitHub 32 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

prompt-template-builder 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理AI 工具类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

AI 工具类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
executing-plans

执行计划 · Codex、Claude

1,515,336173,110只读MIT通过
verification-before-completion

完成前的验证 · Codex、Claude

1,319,472173,121权限未标注MIT通过
subagent-driven-development

子 Agent 驱动开发 · Codex、Claude

1,312,416173,138只读MIT通过
copy-editing

复制编辑 · Codex、Claude

1,209,57625,632只读MIT通过
paywall-upgrade-cro

付费专区升级 cro · Codex、Claude

1,030,17625,617只读MIT通过
prompt-template-builder

提示模板生成器 · 本页

2,18432只读MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Prompt Template Builder

Build robust, reusable prompt templates with clear contracts and consistent outputs.

Core Components

System Prompt: Role, persona, constraints, output format User Prompt: Task, context, variables, examples Few-Shot Examples: Input/output pairs demonstrating desired behavior Output Contract: Strict format specification (JSON schema, Markdown structure) Style Rules: Tone, verbosity, formatting preferences Guardrails: Do's and don'ts, safety constraints

System Prompt Template

# System Prompt: Code Review Assistant

You are an expert code reviewer specializing in {language} and {framework}. Your role is to provide constructive, actionable feedback on code quality, best practices, and potential issues.

## Output Format

Provide your review in the following JSON structure:

{ "summary": "Brief 1-2 sentence overview", "issues": [ { "severity": "critical|major|minor", "line": number, "message": "Description of the issue", "suggestion": "How to fix it" } ], "strengths": ["List of positive aspects"], "overall_score": 1-10 }

Style Guidelines

  • Be constructive and specific
  • Cite line numbers for issues
  • Provide actionable suggestions
  • Balance criticism with praise
  • Use professional, respectful tone

Constraints

  • Do NOT suggest unnecessary refactors
  • Do focus on correctness, security, performance
  • Do NOT be overly pedantic about style
  • Do consider the context and project requirements
## User Prompt Template with Variables

// prompt-templates/code-review.ts export const codeReviewPrompt = (variables: { language: string; framework: string; code: string; context?: string; }) => ` Please review the following ${variables.language} code:

${variables.context ? Context: ${variables.context}\n : ''}

\\\${variables.language} ${variables.code} \\\

Provide a thorough code review following the output format specified in the system prompt. `;

// Usage const prompt = codeReviewPrompt({ language: 'typescript', framework: 'React', code: userSubmittedCode, context: 'This is a production component for user authentication', });


## Few-Shot Examples

Few-Shot Examples

Example 1: Good Code

Input:

function calculateTotal(items: Item[]): number {
  return items.reduce((sum, item) => sum + item.price, 0);
}

**Output:**

{ "summary": "Clean, type-safe implementation with no issues found.", "issues": [], "strengths": [ "Type safety with TypeScript", "Functional approach with reduce", "Clear, descriptive naming" ], "overall_score": 9 }


## Example 2: Code with Issues

**Input:**

function calc(arr) { let total = 0; for (var i = 0; i < arr.length; i++) { total = total + arr[i].price; } return total; }


**Output:**

{ "summary": "Functional but has type safety and modern syntax issues.", "issues": [ { "severity": "major", "line": 1, "message": "Missing type annotations for parameters and return value", "suggestion": "Add types: function calc(arr: Item[]): number" }, { "severity": "minor", "line": 3, "message": "Using 'var' instead of 'let' or 'const'", "suggestion": "Replace 'var' with 'let': for (let i = 0; ...)" } ], "strengths": ["Logic is correct", "Handles empty array case"], "overall_score": 6 }

Output Contracts

// Define strict output schema
import { z } from 'zod';

export const codeReviewSchema = z.object({
  summary: z.string().min(10).max(200),
  issues: z.array(z.object({
    severity: z.enum(['critical', 'major', 'minor']),
    line: z.number().int().positive(),
    message: z.string(),
    suggestion: z.string(),
  })),
  strengths: z.array(z.string()),
  overall_score: z.number().int().min(1).max(10),
});

// Validate LLM output
export const parseCodeReview = (output: string) => {
  try {
    const parsed = JSON.parse(output);
    return codeReviewSchema.parse(parsed);
  } catch (error) {
    throw new Error('Invalid code review output format');
  }
};

Template Variables

export interface PromptVariables {
  // Required
  required_field: string;

  // Optional with defaults
  optional_field?: string;

  // Constrained values
  severity_level: "low" | "medium" | "high";

  // Numeric with ranges
  max_tokens: number; // 1-4096
}

export const buildPrompt = (vars: PromptVariables): string => {
  // Validate variables
  if (!vars.required_field) {
    throw new Error("required_field is required");
  }

  // Set defaults
  const optional = vars.optional_field ?? "default value";

  // Build prompt
  return `Task: ${vars.required_field}
Options: ${optional}
Severity: ${vars.severity_level}`;
};

Style Rules

## Tone Guidelines

- **Professional**: Formal language, no slang
- **Friendly**: Conversational but respectful
- **Technical**: Precise terminology, assume expertise
- **Educational**: Explain concepts, teach as you go

## Verbosity Levels

- **Concise**: 1-2 sentences, bullet points
- **Standard**: 1 paragraph per point
- **Detailed**: Full explanations with examples
- **Comprehensive**: Deep dive with references

## Formatting Preferences

- Use markdown headers for structure
- Bold important terms
- Code blocks for technical content
- Lists for enumeration
- Tables for comparisons

Do's and Don'ts

## Do's

✓ Provide specific, actionable feedback
✓ Include code examples when relevant
✓ Reference line numbers for issues
✓ Suggest concrete improvements
✓ Balance criticism with praise
✓ Consider context and constraints

## Don'ts

✗ Don't be vague ("this is bad")
✗ Don't suggest unnecessary rewrites
✗ Don't ignore security issues
✗ Don't be overly pedantic
✗ Don't assume unlimited resources
✗ Don't make assumptions without context

Prompt Chaining

// Multi-step prompts
export const chainedPrompts = {
  step1_analyze: (code: string) => `
    Analyze this code and identify potential issues:
    ${code}

    List issues in JSON array format with severity and description.
  `,

  step2_suggest: (issues: Issue[]) => `
    Given these code issues:
    ${JSON.stringify(issues)}

    Provide detailed fix suggestions for each issue.
  `,

  step3_summarize: (suggestions: Suggestion[]) => `
    Summarize these code review suggestions into a final report:
    ${JSON.stringify(suggestions)}
  `,
};

// Execute chain
const issues = await llm(chainedPrompts.step1_analyze(code));
const suggestions = await llm(chainedPrompts.step2_suggest(issues));
const report = await llm(chainedPrompts.step3_summarize(suggestions));

Version Control

// Track prompt versions
export const PROMPT_VERSIONS = {
  "v1.0": {
    system: "Original system prompt...",
    user: (vars) => `Original user prompt...`,
    deprecated: false,
  },
  "v1.1": {
    system: "Improved system prompt with better constraints...",
    user: (vars) => `Updated user prompt...`,
    deprecated: false,
    changes: "Added JSON schema validation, improved examples",
  },
  "v1.0-deprecated": {
    system: "...",
    user: (vars) => `...`,
    deprecated: true,
    deprecation_reason: "Replaced by v1.1 with better output format",
  },
};

// Use specific version
const prompt = PROMPT_VERSIONS["v1.1"];

Testing Prompts

// Test cases for prompt validation
const testCases = [
  {
    input: { code: "function test() {}", language: "javascript" },
    expected: {
      hasIssues: false,
      scoreRange: [8, 10],
    },
  },
  {
    input: { code: "func test(arr) { return arr[0] }", language: "javascript" },
    expected: {
      hasIssues: true,
      minIssues: 2,
      severities: ["major", "minor"],
    },
  },
];

// Run tests
for (const test of testCases) {
  const output = await llm(buildPrompt(test.input));
  const parsed = parseCodeReview(output);

  if (test.expected.hasIssues) {
    assert(parsed.issues.length >= test.expected.minIssues);
  }
  if (test.expected.scoreRange) {
    assert(parsed.overall_score >= test.expected.scoreRange[0]);
    assert(parsed.overall_score <= test.expected.scoreRange[1]);
  }
}

Best Practices

  1. Clear instructions: Be explicit about what you want
  2. Output contracts: Define strict schemas
  3. Few-shot examples: Show, don't just tell
  4. Variable validation: Check inputs before building prompts
  5. Version tracking: Maintain prompt history
  6. Test thoroughly: Validate against edge cases
  7. Iterate: Improve based on real outputs
  8. Document constraints: Explain limitations

Output Checklist

  • System prompt with role and constraints
  • User prompt template with variables
  • Output format specification (JSON schema)
  • 3+ few-shot examples (good and bad)
  • Style guidelines documented
  • Do's and don'ts list
  • Variable validation logic
  • Output parsing/validation
  • Test cases for prompt
  • Version tracking system

平台分布

Claude Code

27.72%
按下载量换算202

Gemini CLI

26.21%
按下载量换算191

Antigravity

16.46%
按下载量换算120

windsurf

12.24%
按下载量换算89

github-copilot

7.51%
按下载量换算55

Codex

3.3%
按下载量换算24

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills