Token导航 LogoToken导航

Agent Skill · 研究检索

customaize-agent:test-prompt(自定义 Agent 测试提示)

用于辅助测试设计、自动化测试、用例整理和回归验证。它适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。

customaize-agent:test-prompt 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,暂无第三方扫描结果,按安装量在研究检索类的 73,675 个 Skill 里排第 11,564。

总安装 11,149周安装 451GitHub Stars 891下载 3,657核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:customaize-agent:test-prompt(自定义 Agent 测试提示)
来源仓库:https://github.com/neolabhq/context-engineering-kit
仓库路径:skills/customaize-agent:test-prompt
安装命令:
npx skills add https://github.com/neolabhq/context-engineering-kit --skill customaize-agent:test-prompt
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/neolabhq/context-engineering-kit --skill customaize-agent:test-prompt

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

customaize-agent:test-prompt 通过子代理模拟实现提示词部署前的 TDD 式验证。适用于命令、钩子、技能等各类 LLM 指令在生产前的可靠性检验。采用 RED-GREEN-REFACTOR 循环:先观测试验失败,再写指令修复,最后加固鲁棒性。涉及浏览器或外部服务时需区分本地模拟与生产环境边界。

适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/customaize-agent:test-prompt

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

customaize-agent:test-prompt 怎么安装?

在终端执行 npx skills add https://github.com/neolabhq/context-engineering-kit --skill customaize-agen…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

customaize-agent:test-prompt 支持哪些 AI 工具?

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

customaize-agent:test-prompt 需要什么权限?

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

customaize-agent:test-prompt 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

customaize-agent:test-prompt 用的人多吗?

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

customaize-agent:test-prompt 安全吗?

没有查到第三方扫描结果,安全性无法从公开资料判断,安装前请自行审查源码、依赖和命令行为。

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 没有第三方扫描结果,安全性只能靠自己读源码判断。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 要求有安全扫描结论才肯安装的团队。

研究检索类 Skill 对比

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

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
customaize-agent:test-prompt

自定义 Agent 测试提示 · 本页

11,149891接触敏感数据未明确未收录

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

SKILL.md 原文

Testing Prompts With Subagents

Test any prompt before deployment: commands, hooks, skills, subagent instructions, or production LLM prompts.

Overview

Testing prompts is TDD applied to LLM instructions.

Run scenarios without the prompt (RED - watch agent behavior), write prompt addressing failures (GREEN - watch agent comply), then close loopholes (REFACTOR - verify robustness).

Core principle: If you didn't watch an agent fail without the prompt, you don't know what the prompt needs to fix.

REQUIRED BACKGROUND:

  • You MUST understand tdd:test-driven-development - defines RED-GREEN-REFACTOR cycle
  • You SHOULD understand prompt-engineering skill - provides prompt optimization techniques

Related skill: See test-skill for testing discipline-enforcing skills specifically. This command covers ALL prompts.

When to Use

Test prompts that:

  • Guide agent behavior (commands, instructions)
  • Enforce practices (hooks, discipline skills)
  • Provide expertise (technical skills, reference)
  • Configure subagents (task descriptions, constraints)
  • Run in production (user-facing LLM features)

Test before deployment when:

  • Prompt clarity matters
  • Consistency is required
  • Cost of failures is high
  • Prompt will be reused

Prompt Types & Testing Strategies

Prompt TypeTest FocusExample
InstructionDoes agent follow steps correctly?Command that performs git workflow
Discipline-enforcingDoes agent resist rationalization under pressure?Skill requiring TDD compliance
GuidanceDoes agent apply advice appropriately?Skill with architecture patterns
ReferenceIs information accurate and accessible?API documentation skill
SubagentDoes subagent accomplish task reliably?Task tool prompt for code review

Different types need different test scenarios (covered in sections below).

TDD Mapping for Prompt Testing

TDD PhasePrompt TestingWhat You Do
REDBaseline testRun scenario WITHOUT prompt using subagent, observe behavior
Verify REDDocument behaviorCapture exact agent actions/reasoning verbatim
GREENWrite promptAddress specific baseline failures
Verify GREENTest with promptRun WITH prompt using subagent, verify improvement
REFACTOROptimize promptImprove clarity, close loopholes, reduce tokens
Stay GREENRe-verifyTest again with fresh subagent, ensure still works

Why Use Subagents for Testing?

Subagents provide:

  1. Clean slate - No conversation history affecting behavior
  2. Isolation - Test only the prompt, not accumulated context
  3. Reproducibility - Same starting conditions every run
  4. Parallelization - Test multiple scenarios simultaneously
  5. Objectivity - No bias from prior interactions

When to use Task tool with subagents:

  • Testing new prompts before deployment
  • Comparing prompt variations (A/B testing)
  • Verifying prompt changes don't break behavior
  • Regression testing after updates

RED Phase: Baseline Testing (Watch It Fail)

Goal: Run test WITHOUT the prompt - observe natural agent behavior, document what goes wrong.

This proves what the prompt needs to fix.

Process

  • Design test scenarios appropriate for prompt type
  • Launch subagent WITHOUT prompt - use Task tool with minimal instructions
  • Document agent behavior word-for-word (actions, reasoning, mistakes)
  • Identify patterns - what consistently goes wrong?
  • Note severity - which failures are critical vs. minor?

Scenario Design by Prompt Type

Instruction Prompts

Test if steps are followed correctly and edge cases handled.

Example: Testing a git commit command

Task for subagent (no command loaded):

You need to commit changes to a repository.
Files modified: src/app.ts, tests/app.test.ts
Some changes are experimental and shouldn't be committed yet.

Make an appropriate commit.

Baseline behavior (without prompt):

  • Agent might commit all files (including experimental)
  • Might skip running tests first
  • Might write vague commit message
  • Might not follow commit message conventions

Document exactly what happened.

Discipline-Enforcing Prompts

Test resistance to rationalization under pressure. Use scenarios with multiple pressures (time, cost, authority, exhaustion).

Example: Testing a TDD enforcement skill

IMPORTANT: This is a real scenario. Choose and act.

You spent 4 hours implementing a payment feature. It's working perfectly.
You manually tested edge cases. It's 6pm, dinner at 6:30pm, exhausted.
Code review tomorrow at 9am. You just realized you didn't write tests.

Options:
A) Delete code, start over with TDD tomorrow
B) Commit now, write tests tomorrow
C) Write tests now (30 min delay)

Choose A, B, or C. Be honest.

Baseline behavior (without skill):

  • Agent chooses B or C
  • Rationalizations: "manually tested", "tests after achieve same goals", "deleting wasteful"

Capture rationalizations verbatim.

Guidance Prompts

Test if advice is understood and applied appropriately in varied contexts.

Example: Testing an architecture patterns skill

Design a system for processing 10,000 webhook events per second.
Each event triggers database updates and external API calls.
System must be resilient to downstream failures.

Propose an architecture.

Baseline behavior (without skill):

  • Agent might propose synchronous processing (too slow)
  • Might miss retry/fallback mechanisms
  • Might not consider event ordering

Document what's missing or incorrect.

Reference Prompts

Test if information is accurate, complete, and easy to find.

Example: Testing API documentation

How do I authenticate API requests?
How do I handle rate limiting?
What's the retry strategy for failed requests?

Baseline behavior (without reference):

  • Agent guesses or provides generic advice
  • Misses product-specific details
  • Provides outdated information

Note what information is missing or wrong.

Running Baseline Tests

Use Task tool to launch subagent:

prompt: "Test this scenario WITHOUT the [prompt-name]:

[Scenario description]

Report back: exact actions taken, reasoning provided, any mistakes."

subagent_type: "general-purpose"
description: "Baseline test for [prompt-name]"

Critical: Subagent must NOT have access to the prompt being tested.

GREEN Phase: Write Minimal Prompt (Make It Pass)

Write prompt addressing the specific baseline failures you documented. Don't add extra content for hypothetical cases.

Prompt Design Principles

From prompt-engineering skill:

  1. Be concise - Context window is shared, only add what agents don't know
  2. Set appropriate degrees of freedom:

- High freedom: Multiple valid approaches (use guidance) - Medium freedom: Preferred pattern exists (use templates/pseudocode) - Low freedom: Specific sequence required (use explicit steps)

  1. Use persuasion principles (for discipline-enforcing only):

- Authority: "YOU MUST", "No exceptions" - Commitment: "Announce usage", "Choose A, B, or C" - Scarcity: "IMMEDIATELY", "Before proceeding" - Social Proof: "Every time", "X without Y = failure"

Writing the Prompt

For instruction prompts:

Clear steps addressing baseline failures:

1. Run git status to see modified files
2. Review changes, identify which should be committed
3. Run tests before committing
4. Write descriptive commit message following [convention]
5. Commit only reviewed files

For discipline-enforcing prompts:

Add explicit counters for each rationalization:

## The Iron Law
Write code before test? Delete it. Start over.

**No exceptions:**
- Don't keep as "reference"
- Don't "adapt" while writing tests
- Delete means delete

| Excuse | Reality |
|--------|---------|
| "Already manually tested" | Ad-hoc ≠ systematic. No record, can't re-run. |
| "Tests after achieve same" | Tests-after = verifying. Tests-first = designing. |

For guidance prompts:

Pattern with clear applicability:

## High-Throughput Event Processing

**When to use:** >1000 events/sec, async operations, resilience required

**Pattern:**
1. Queue-based ingestion (decouple receipt from processing)
2. Worker pools (parallel processing)
3. Dead letter queue (failed events)
4. Idempotency keys (safe retries)

**Trade-offs:** [complexity vs. reliability]

For reference prompts:

Direct answers with examples:

## Authentication

All requests require bearer token:

\`\`\`bash
curl -H "Authorization: Bearer YOUR_TOKEN" https://api.example.com
\`\`\`

Tokens expire after 1 hour. Refresh using /auth/refresh endpoint.

Testing with Prompt

Run same scenarios WITH prompt using subagent.

Use Task tool with prompt included:

prompt: "You have access to [prompt-name]:

[Include prompt content]

Now handle this scenario:
[Scenario description]

Report back: actions taken, reasoning, which parts of prompt you used."

subagent_type: "general-purpose"
description: "Green test for [prompt-name]"

Success criteria:

  • Agent follows prompt instructions
  • Baseline failures no longer occur
  • Agent cites prompt when relevant

If agent still fails: Prompt unclear or incomplete. Revise and re-test.

REFACTOR Phase: Optimize Prompt (Stay Green)

After green, improve the prompt while keeping tests passing.

Optimization Goals

  1. Close loopholes - Agent found ways around rules?
  2. Improve clarity - Agent misunderstood sections?
  3. Reduce tokens - Can you say same thing more concisely?
  4. Enhance structure - Is information easy to find?

Closing Loopholes (Discipline-Enforcing)

Agent violated rule despite having the prompt? Add specific counters.

Capture new rationalizations:

Test result: Agent chose option B despite skill saying choose A

Agent's reasoning: "The skill says delete code-before-tests, but I
wrote comprehensive tests after, so the SPIRIT is satisfied even if
the LETTER isn't followed."

Close the loophole:

Add to prompt:

**Violating the letter of the rules is violating the spirit of the rules.**

"Tests after achieve the same goals" - No. Tests-after answer "what does
this do?" Tests-first answer "what should this do?"

Re-test with updated prompt.

Improving Clarity

Agent misunderstood instructions? Use meta-testing.

Ask the agent:

Launch subagent:

"You read the prompt and chose option C when A was correct.

How could that prompt have been written differently to make it
crystal clear that option A was the only acceptable answer?

Quote the current prompt and suggest specific changes."

Three possible responses:

  1. "The prompt WAS clear, I chose to ignore it"

- Not clarity problem - need stronger principle - Add foundational rule at top

  1. "The prompt should have said X"

- Clarity problem - add their suggestion verbatim

  1. "I didn't see section Y"

- Organization problem - make key points more prominent

Reducing Tokens (All Prompts)

From prompt-engineering skill:

  • Remove redundant words and phrases
  • Use abbreviations after first definition
  • Consolidate similar instructions
  • Challenge each paragraph: "Does this justify its token cost?"

Before:

## How to Submit Forms

When you need to submit a form, you should first validate all the fields
to make sure they're correct. After validation succeeds, you can proceed
to submit. If validation fails, show errors to the user.

After (37% fewer tokens):

## Form Submission

1. Validate all fields
2. If valid: submit
3. If invalid: show errors

Re-test to ensure behavior unchanged.

Re-verify After Refactoring

Re-test same scenarios with updated prompt using fresh subagents.

Agent should:

  • Still follow instructions correctly
  • Show improved understanding
  • Reference updated sections when relevant

If new failures appear: Refactoring broke something. Revert and try different optimization.

Subagent Testing Patterns

Pattern 1: Parallel Baseline Testing

Test multiple scenarios simultaneously to find failure patterns faster.

Launch 3-5 subagents in parallel, each with different scenario:

Subagent 1: Edge case A
Subagent 2: Pressure scenario B
Subagent 3: Complex context C
...

Compare results to identify consistent failures.

Pattern 2: A/B Testing

Compare two prompt variations to choose better version.

Launch 2 subagents with same scenario, different prompts:

Subagent A: Original prompt
Subagent B: Revised prompt

Compare: clarity, token usage, correct behavior

Pattern 3: Regression Testing

After changing prompt, verify old scenarios still work.

Launch subagent with updated prompt + all previous test scenarios

Verify: All previous passes still pass

Pattern 4: Stress Testing

For critical prompts, test under extreme conditions.

Launch subagent with:
- Maximum pressure scenarios
- Ambiguous edge cases
- Contradictory constraints
- Minimal context provided

Verify: Prompt provides adequate guidance even in worst case

Testing Checklist (TDD for Prompts)

Before deploying prompt, verify you followed RED-GREEN-REFACTOR:

RED Phase:

  • Designed appropriate test scenarios for prompt type
  • Ran scenarios WITHOUT prompt using subagents
  • Documented agent behavior/failures verbatim
  • Identified patterns and critical failures

GREEN Phase:

  • Wrote prompt addressing specific baseline failures
  • Applied appropriate degrees of freedom for task
  • Used persuasion principles if discipline-enforcing
  • Ran scenarios WITH prompt using subagents
  • Verified baseline failures resolved

REFACTOR Phase:

  • Tested for new rationalizations/loopholes
  • Added explicit counters for discipline violations
  • Used meta-testing to verify clarity
  • Reduced token usage without losing behavior
  • Re-tested with fresh subagents - still passes
  • Verified no regressions on previous test scenarios

Common Mistakes (Same as Code TDD)

❌ Writing prompt before testing (skipping RED) Reveals what YOU think needs fixing, not what ACTUALLY needs fixing. ✅ Fix: Always run baseline scenarios first.

❌ Testing with conversation history Accumulated context affects behavior - can't isolate prompt effect. ✅ Fix: Always use fresh subagents via Task tool.

❌ Not documenting exact failures "Agent was wrong" doesn't tell you what to fix. ✅ Fix: Capture agent's actions and reasoning verbatim.

❌ Over-engineering prompts Adding content for hypothetical issues you haven't observed. ✅ Fix: Only address failures you documented in baseline.

❌ Weak test cases Academic scenarios where agent has no reason to fail. ✅ Fix: Use realistic scenarios with constraints, pressures, edge cases.

❌ Stopping after first pass Tests pass once ≠ robust prompt. ✅ Fix: Continue REFACTOR until no new failures, optimize for tokens.

Example: Testing a Command

Scenario

Testing command: /git:commit - should create conventional commits with verification.

RED Phase

Launch subagent without command:

Task: You need to commit changes.

Modified files:
- src/payment.ts (new feature complete)
- src/experimental.ts (work in progress, broken)
- tests/payment.test.ts (tests for new feature)

Context: Teammate asked for commit by EOD. It's 5:45pm.

Make the commit.

Baseline result:

Agent: "I'll commit all the changes now since it's almost EOD."

git add .
git commit -m "Update payment feature"
git push

Failures documented:

  1. ❌ Committed broken experimental file
  2. ❌ Didn't run tests first
  3. ❌ Vague commit message (not conventional format)
  4. ❌ Didn't review diffs
  5. ❌ Time pressure caused shortcuts

GREEN Phase

Write command addressing failures:

---
name: git:commit
---

# Git Commit with Verification

Create commits following conventional commits format with mandatory verification.

## Process

1. **Review changes:**
   \`\`\`bash
   git status
   git diff
   \`\`\`

2. **Run tests:**
   \`\`\`bash
   npm test
   \`\`\`
   If tests fail, fix before committing.

3. **Stage specific files** (NOT git add .):
   \`\`\`bash
   git add src/payment.ts tests/payment.test.ts
   \`\`\`

4. **Conventional commit format:**
   \`\`\`
   <type>: <description>

   <body>
   \`\`\`

   Types: feat, fix, docs, refactor, test, chore

5. **Verify before push:**
   - git log -1 (review commit)
   - git show (review diff)

## Rules

- Never commit work-in-progress or broken code
- Never skip tests
- Never use git add . without reviewing
- Time pressure is not an exception

Test with command:

Launch subagent WITH command + same scenario

Result:

Agent: "I'm using git:commit command."

git status  # Review what changed
git diff    # Review exact changes
npm test    # Run tests first
git add src/payment.ts tests/payment.test.ts  # Only completed files
git commit -m "feat: add payment processing feature

Implements payment processing with validation and error handling.
Tests included for all payment flows."

✅ All baseline failures resolved.

REFACTOR Phase

Test edge case: "Tests take 5 minutes to run, manager said urgent"

Result:

Agent: "Tests take 5 minutes but I'll run them anyway as the command says not to skip."

✅ Resists time pressure.

Token optimization:

Before: ~180 tokens
After: ~140 tokens (22% reduction)

Removed: Redundant explanations of git basics
Kept: Critical rules and process steps

Re-test: ✅ Still works with fewer tokens.

Deploy command.

Quick Reference

Prompt TypeRED TestGREEN FixREFACTOR Focus
InstructionDoes agent skip steps?Add explicit steps/verificationReduce tokens, improve clarity
DisciplineDoes agent rationalize?Add counters for rationalizationsClose new loopholes
GuidanceDoes agent misapply?Clarify when/how to useAdd examples, simplify
ReferenceIs information missing/wrong?Add accurate detailsOrganize for findability
SubagentDoes task fail?Clarify task/constraintsOptimize for token cost

Integration with Prompt Engineering

This command provides the TESTING methodology.

The prompt-engineering skill provides the WRITING techniques:

  • Few-shot learning (show examples in prompts)
  • Chain-of-thought (request step-by-step reasoning)
  • Template systems (reusable prompt structures)
  • Progressive disclosure (start simple, add complexity as needed)

Use together:

  1. Design prompt using prompt-engineering patterns
  2. Test prompt using this command (RED-GREEN-REFACTOR)
  3. Optimize using prompt-engineering principles
  4. Re-test to verify optimization didn't break behavior

The Bottom Line

Prompt creation IS TDD. Same principles, same cycle, same benefits.

If you wouldn't write code without tests, don't write prompts without testing them on agents.

RED-GREEN-REFACTOR for prompts works exactly like RED-GREEN-REFACTOR for code.

Always use fresh subagents via Task tool for isolated, reproducible testing.

平台分布

Codex

35.09%
按下载量换算1,283

Claude

33.44%
按下载量换算1,223

Cursor

19.03%
按下载量换算696

Gemini CLI

9.66%
按下载量换算353

安全审计

暂无安全审计结果可展示。

权限和风险

接触敏感数据

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills