Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计提醒

prompt-refinement及时细化

Agent Skill

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

总安装

282

周安装

12

GitHub Stars

6

下载量

99
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:prompt-refinement(及时细化)
来源仓库:https://github.com/v1truv1us/ai-eng-system
仓库路径:skills/prompt-refinement
安装命令:
npx skills add https://github.com/v1truv1us/ai-eng-system --skill prompt-refinement
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/v1truv1us/ai-eng-system --skill prompt-refinement

简介

精细化打磨提示词细节以提高输出一致性。

  • 关注语气、格式、术语统一等微观层面。
  • 适合品牌文案、技术文档等专业场景。
  • 可与自动化测试工具联动使用。prompt-refinement 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 过度细化可能导致灵活性下降。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Prompt Refinement Skill

Critical Importance

Proper prompt refinement is critical for achieving optimal AI response quality. Vague or ambiguous prompts lead to inconsistent results, wasted iterations, and frustration. A well-structured prompt with clear task definition, rich context, explicit requirements, and specific output format dramatically improves AI performance. Each refinement iteration compounds the quality improvement—investing time upfront saves countless back-and-forth cycles later. Poor prompt quality is the #1 cause of unsatisfactory AI interactions.

Systematic Approach

approach prompt refinement systematically. Prompt refinement requires active listening, clarifying questions, and structured thinking. Don't assume understanding—ask targeted questions to uncover implicit requirements, constraints, and expectations. Use the TCRO framework as your organizing principle: Task (what), Context (why), Requirements (how), Output (what it looks like). Iterate until all four elements are clear, specific, and actionable. Patience in refinement pays off in execution.

The Challenge

The transform vague user input into perfectly structured prompts without over-constraining creativity or missing the true intent, but if you can:

  • Your AI responses will be consistently excellent
  • Users will get what they actually want
  • Iteration cycles will shrink dramatically
  • You'll establish trust in AI-assisted workflows

The challenge is extracting enough detail to guide the AI without boxing in the solution or asking too many exhausting questions. Can you find the sweet spot between clarity and efficiency?

Prompt Refinement Confidence Assessment

After refining a prompt, rate your confidence from 0.0 to 1.0:

  • 0.8-1.0: Prompt perfectly structured, all ambiguities resolved, constraints explicit, output format clear
  • 0.5-0.8: Prompt well-structured but minor uncertainties remain, some assumptions documented
  • 0.2-0.5: Prompt partially structured, several ambiguities, risk of misalignment with user intent
  • 0.0-0.2: Prompt still vague, missing critical information, high likelihood of poor results

Identify uncertainty areas: What aspects of the task are still unclear? Which requirements are assumed rather than explicit? What could go wrong based on the current prompt structure?

Purpose

Transform messy, incomplete prompts into well-structured specifications using the TCRO framework (Task, Context, Requirements, Output) with phase-specific clarifying questions. This skill ensures all user prompts to ai-eng-system commands are properly structured before execution, reducing ambiguity, increasing reproducibility, and improving AI response quality.

When This Skill is Invoked

This skill is ALWAYS invoked at the start of:

  • /ai-eng/research
  • /ai-eng/specify
  • /ai-eng/plan
  • /ai-eng/work

Commands should include this directive:

Use skill: prompt-refinement
Phase: [research|specify|plan|work]

The TCRO Framework

ElementPurposeKey Question
TaskWhat's the job to be done?"What specific outcome do you need?"
ContextWhy does this matter?"What's the broader system/goal?"
RequirementsWhat are the constraints?"What are the must-haves vs nice-to-haves?"
OutputWhat format is needed?"What should the deliverable look like?"

Process

Step 1: Read Project Context

Load CLAUDE.md from the project root to understand:

  • Project philosophy and core principles
  • Tech stack preferences
  • Quality standards and conventions
  • Naming conventions
  • Architectural patterns

Step 2: Detect Phase

Determine which phase based on:

  • The command being invoked
  • Keywords in the prompt (research, learn, investigate → research)
  • Explicit phase markers in user input

Step 3: Load Phase Template

Based on detected phase, load the appropriate template:

  • templates/research.md for /ai-eng/research
  • templates/specify.md for /ai-eng/specify
  • templates/plan.md for /ai-eng/plan
  • templates/work.md for /ai-eng/work

Step 4: Ask Clarifying Questions

Use phase-specific questions from the loaded template.

Minimum required questions:

  • 1 Task question
  • 1 Context question
  • 1-2 Requirements questions
  • 1 Output question

Present questions interactively:

  1. Display original user prompt
  2. Ask clarifying questions one at a time or in small groups
  3. Collect user responses
  4. Use responses to structure refined prompt

Step 5: Structure into TCRO

Format the refined prompt using the TCRO structure:

Task: [Specific, actionable task statement]
Context: [Broader system, goals, constraints from CLAUDE.md]
Requirements:
  - [Must-have requirement 1]
  - [Must-have requirement 2]
  - [Nice-to-have if mentioned]
Output: [Expected deliverable format and location]

Step 6: Apply Incentive Prompting

Enhance the TCRO-structured prompt with techniques from the incentive-prompting skill:

  • Expert Persona: Assign appropriate role based on task
  • Stakes Language: Add "This is critical..." for high-importance tasks
  • Step-by-Step Reasoning: Add " solve step by step"
  • Self-Evaluation: Add "Rate your confidence 0-1" request

Step 7: Confirm with User

Display the refined prompt and ask for confirmation:

## Refined Prompt

[The TCRO-structured, incentive-enhanced prompt]

Proceed with this refined prompt? (y/n/edit)
  • y: Proceed with refined prompt
  • n: Ask more clarifying questions
  • edit: Allow user to manually refine the prompt

Integration with Commands

Commands should reference this skill with:

---
name: ai-eng/[command-name]
description: [Description]
agent: [agent]
---

Use skill: prompt-refinement
Phase: [research|specify|plan|work]

# [Command Name]

[Rest of command definition...]

Template Structure

Phase-specific templates are located in templates/:

skills/prompt-refinement/
├── SKILL.md
└── templates/
    ├── research.md
    ├── specify.md
    ├── plan.md
    └── work.md

Each template includes:

  • Phase-specific clarifying questions
  • TCRO structure for that phase
  • Examples of vague → refined transformations
  • Phase-specific requirements and considerations

Example Transformation

Input (Vague)

"need auth"

Phase Detection

Detected phase: specify (feature request)

Clarifying Questions

  1. Task: What type of authentication capability do you need?

- User login/logout - OAuth/SSO integration - API key management - Multi-factor authentication (MFA) - Other: _________

  1. Context: What's the broader system this fits into?

- New greenfield project or adding to existing codebase? - What's the tech stack? - Are there existing authentication patterns to follow?

  1. Requirements: What are the must-have requirements?

- Security/compliance needs (SOC2, GDPR, etc.)? - User experience expectations? - Rate limiting requirements?

  1. Output: What should the specification include?

- User stories only - Full spec with acceptance criteria - Include non-functional requirements - Include UI/UX considerations

Refined TCRO

Task: Create specification for JWT-based user authentication system
Context:
  Adding to existing Next.js application with PostgreSQL database.
  Project follows CLAUDE.md philosophy of simplicity and pragmatism.
  Existing authentication middleware pattern in src/lib/auth/ can be extended.
Requirements:
  Must-have:
  - Email/password login with secure password hashing (bcrypt, cost factor 12)
  - JWT token-based session management with configurable expiry
  - Password reset flow via email delivery
  - Rate limiting on authentication endpoints (5 attempts/minute)
  Nice-to-have:
  - Email verification for new accounts
  - Session persistence across device reboots
  Non-functional:
  - Security: Tokens must be cryptographically secure, single-use for reset flows
  - Performance: Authentication requests should complete within 200ms (p95)
  - Compliance: GDPR-compliant data handling, no passwords in logs
Output:
  Full specification with user stories, acceptance criteria, and non-functional
  requirements saved to specs/auth/spec.md in Spec Kit compatible format.

Incentive-Enhanced Prompt

You are a senior security engineer and product owner with 15+ years of experience
building production authentication systems at companies like Stripe and Auth0.

Task: Create a comprehensive specification for JWT-based user authentication system
Context:
  Adding to existing Next.js application with PostgreSQL database.
  Project follows CLAUDE.md philosophy of simplicity and pragmatism.
  Existing authentication middleware pattern in src/lib/auth/ can be extended.

Requirements:
  Must-have:
  - Email/password login with secure password hashing (bcrypt, cost factor 12)
  - JWT token-based session management with configurable expiry
  - Password reset flow via email delivery
  - Rate limiting on authentication endpoints (5 attempts/minute)
  Nice-to-have:
  - Email verification for new accounts
  - Session persistence across device reboots
  Non-functional:
  - Security: Tokens must be cryptographically secure, single-use for reset flows
  - Performance: Authentication requests should complete within 200ms (p95)
  - Compliance: GDPR-compliant data handling, no passwords in logs

Output:
  Full specification with user stories, acceptance criteria, and non-functional
  requirements saved to specs/auth/spec.md in Spec Kit compatible format.

 think through this specification systematically. Consider all
security implications, edge cases, and user experience flows before finalizing.

Rate your confidence in this specification from 0-1 after completion.

Handling Edge Cases

Prompt Already Structured

If user input is already well-structured:

  1. Analyze prompt for TCRO elements
  2. Identify any missing elements
  3. Ask targeted questions to fill gaps (not full re-clarification)
  4. Confirm if structure is sufficient or needs refinement

User Refuses Clarification

If user declines clarifying questions:

  1. Proceed with best-effort TCRO structure
  2. Use [NEEDS CLARIFICATION:...] markers for ambiguous items
  3. Note which elements were assumed vs explicitly specified

Incomplete Context

If CLAUDE.md doesn't exist or is incomplete:

  1. Proceed without project-specific context
  2. Ask basic context questions (tech stack, goals)
  3. Note in refined prompt: "No project constitution found, using generic defaults"

Quality Checklist

Before finalizing refined prompt, verify:

  • Task is specific and actionable
  • Context includes relevant project information
  • Requirements distinguish must-have vs nice-to-have
  • Output format is clearly specified
  • Appropriate expert persona assigned
  • Stakes language added for important tasks
  • Clarification markers used for ambiguities

Integration with incentive-prompting Skill

This skill builds on the incentive-prompting skill. Always load both skills together when refining prompts:

Use skill: incentive-prompting
Use skill: prompt-refinement

The incentive-prompting skill provides the enhancement techniques (Expert Persona, Stakes Language, Step-by-Step, Self-Evaluation).

This skill provides the structuring framework (TCRO) and phase-specific clarification questions.

Together they produce prompts that are both well-structured and enhanced for maximum AI response quality.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.98%
按下载量换算35

Claude

29.18%
按下载量换算29

Cursor

19.4%
按下载量换算19

Gemini CLI

9.7%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills