Token导航 LogoToken导航TokenDH.com
AI 工具敏感数据github未标认证来源可访问clear审计通过

ralph-prompt-single-task拉尔夫提示单一任务

Agent Skill

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

总安装

399

周安装

16

GitHub Stars

9

下载量

129
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:ralph-prompt-single-task(拉尔夫提示单一任务)
来源仓库:https://github.com/adaptationio/skrillz
仓库路径:skills/ralph-prompt-single-task
安装命令:
npx skills add https://github.com/adaptationio/skrillz --skill ralph-prompt-single-task
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/adaptationio/skrillz --skill ralph-prompt-single-task

简介

用于辅助提示词、系统指令和 Agent 行为约束的整理与规范化。

  • 适合规范任务边界、统一输出格式或拆分操作步骤。ralph-prompt-single-task 属于AI 工具类 Skill,可作为该场景下的辅助能力补充。
  • 使用时需保留真实业务约束,避免将示例当作硬规则。
  • 涉及自动执行或外部工具时,应明确确认步骤和权限边界。
  • 建议在高风险操作前定义失败处理方式和人工确认机制。

SKILL.md

Ralph Prompt Generator: Single Task

Overview

Generates well-structured prompts optimized for the Ralph Wiggum technique for single, focused tasks. These prompts include clear completion criteria, automatic verification (tests), self-correction loops, and proper <promise> completion tags.

Best For:

  • Bug fixes with clear success criteria
  • Single feature implementations
  • Refactoring tasks
  • Adding tests for existing code
  • Documentation for specific modules
  • Performance optimizations with measurable targets

Ralph Philosophy: This generator embraces the principle that failures are deterministic and fixable. Each iteration learns from the previous one. Don't fear failures—they're expected and provide data for improvement through prompt tuning.

Quick Start

Input Required:

  1. Task description (what needs to be done)
  2. Success criteria (how to verify completion)
  3. Completion promise text (the phrase that signals done)

Generate prompt with:

Generate a Ralph prompt for: [task description]
Success criteria: [how to verify]
Promise: [completion phrase]

Prompt Generation Workflow

Step 1: Analyze the Task

Identify these elements:

  • Action: What specific work needs to be done?
  • Scope: What files/modules are affected?
  • Verification: How can success be automatically verified?
  • Edge cases: What could go wrong?

Step 2: Define Completion Criteria

Good completion criteria are:

  • Measurable (tests pass, no errors, specific output)
  • Verifiable automatically (not subjective)
  • Binary (clearly done or not done)

Examples:

Task TypeGood CriteriaBad Criteria
Bug fix"Tests pass, bug no longer reproducible""Bug is fixed"
Feature"All CRUD endpoints return 200, tests pass""Feature works"
Refactor"All tests pass, code uses new pattern""Code is cleaner"

Step 3: Structure the Prompt

Use this template:

# Task: [Clear Task Title]

## Objective
[1-2 sentence clear description of what needs to be accomplished]

## Context
[Brief background - what exists, why this is needed]

## Requirements
1. [Specific requirement 1]
2. [Specific requirement 2]
3. [Specific requirement 3]

## Success Criteria
- [ ] [Measurable criterion 1]
- [ ] [Measurable criterion 2]
- [ ] [Measurable criterion 3]

## Verification Steps
1. [How to verify criterion 1]
2. [How to verify criterion 2]
3. [How to verify criterion 3]

## TDD Approach
1. Write/identify failing tests for the requirement
2. Implement the solution
3. Run tests: `[test command]`
4. If tests fail, analyze output and fix
5. Repeat until all tests pass

## Completion
When ALL of the following are true:
- All success criteria met (checklist above)
- All tests passing
- No regressions introduced

Output: <promise>[COMPLETION_PHRASE]</promise>

## If Stuck
After multiple iterations without progress:
- Document what's blocking progress
- List approaches attempted
- Identify specific error or issue
- Do NOT output false promise - continue iterating or wait for max-iterations

Step 4: Add Verification Commands

Include specific commands to verify success:

## Verification Commands

Run tests

npm test

or

pytest tests/

Check for errors

npm run lint

or

ruff check .

Verify specific functionality

curl -X GET http://localhost:3000/api/endpoint

Example Prompts

Example 1: Bug Fix

Input:

  • Task: Fix authentication token refresh race condition
  • Verification: Auth tests pass, no 401 errors in logs
  • Promise: AUTH_FIX_COMPLETE

Generated Prompt:

# Task: Fix Authentication Token Refresh Race Condition

## Objective
Fix the race condition in token refresh that causes intermittent 401 errors when multiple requests trigger refresh simultaneously.

## Context
The auth module in `src/auth/` handles JWT token refresh. When a token expires, multiple concurrent requests may all attempt to refresh, causing a race condition where some requests fail with 401.

## Requirements
1. Implement token refresh locking/queuing mechanism
2. Ensure concurrent requests wait for single refresh
3. Maintain backward compatibility with existing auth flow
4. Add tests covering concurrent refresh scenario

## Success Criteria
- [ ] All existing auth tests pass
- [ ] New concurrent refresh test passes
- [ ] No 401 errors in integration test logs
- [ ] Token refresh happens only once per expiration

## Verification Steps
1. Run auth tests: `npm test -- --grep "auth"`
2. Run concurrent refresh test: `npm test -- --grep "concurrent"`
3. Check logs for 401 after integration test
4. Verify single refresh in logs during concurrent requests

## TDD Approach
1. Write test for concurrent token refresh scenario
2. Verify test fails with current implementation
3. Implement locking mechanism
4. Run tests: `npm test`
5. If tests fail, analyze and fix
6. Repeat until all pass

## Completion
When ALL of the following are true:
- All auth tests passing (including new concurrent test)
- Integration tests show no 401 errors
- Single refresh verified in logs

Output: <promise>AUTH_FIX_COMPLETE</promise>

## If Stuck
After multiple iterations:
- Document the specific race condition behavior
- List locking approaches tried
- Identify where locks are failing
- Do NOT output false promise

Example 2: Feature Implementation

Input:

  • Task: Add pagination to /api/users endpoint
  • Verification: Pagination params work, tests pass
  • Promise: PAGINATION_DONE

Generated Prompt:

# Task: Add Pagination to Users Endpoint

## Objective
Implement offset-based pagination for GET /api/users endpoint with page, limit, and total count.

## Context
The users endpoint in `src/routes/users.ts` currently returns all users. As the user base grows, this needs pagination for performance.

## Requirements
1. Accept `page` (default 1) and `limit` (default 20, max 100) query params
2. Return paginated response with metadata: { data: [], page, limit, total, totalPages }
3. Handle edge cases: invalid params, page beyond data, empty results
4. Add comprehensive tests for pagination

## Success Criteria
- [ ] GET /api/users returns paginated response
- [ ] `page` and `limit` query params work correctly
- [ ] Response includes correct metadata (total, totalPages)
- [ ] Edge cases handled gracefully
- [ ] All new pagination tests pass
- [ ] Existing user tests still pass

## Verification Steps
1. Run tests: `npm test -- --grep "users"`
2. Manual verification:
   - `curl localhost:3000/api/users?page=1&limit=10`
   - `curl localhost:3000/api/users?page=999&limit=10`
   - `curl localhost:3000/api/users?limit=200`

## TDD Approach
1. Write tests for pagination behavior
2. Verify tests fail
3. Implement pagination logic
4. Run tests: `npm test`
5. If failures, fix and retry
6. Test edge cases manually

## Completion
When ALL of the following are true:
- All pagination tests pass
- All existing user tests pass
- Manual verification shows correct behavior
- Edge cases handled (returns empty for page beyond data)

Output: <promise>PAGINATION_DONE</promise>

## If Stuck
Document:
- Which tests are failing and why
- What pagination approach was tried
- Specific error messages
- Do NOT output false promise

Example 3: Refactoring Task

Input:

  • Task: Convert callbacks to async/await in database module
  • Verification: All DB tests pass, no callback patterns remain
  • Promise: ASYNC_REFACTOR_COMPLETE

Generated Prompt:

# Task: Convert Database Module to Async/Await

## Objective
Refactor all callback-based database operations in `src/db/` to use async/await pattern for improved readability and error handling.

## Context
The database module uses callback patterns from legacy code. Modern async/await improves code clarity and makes error handling more consistent.

## Requirements
1. Convert all callback-based functions to async/await
2. Replace callback error handling with try/catch
3. Update all callers to use await
4. Maintain identical external API behavior
5. No callback patterns remaining in db module

## Success Criteria
- [ ] All database functions use async/await
- [ ] No callback patterns in src/db/*.ts files
- [ ] All existing database tests pass
- [ ] All integration tests pass
- [ ] No TypeScript errors

## Verification Steps
1. Run tests: `npm test -- --grep "database"`
2. Search for callbacks: `grep -r "callback\|cb)" src/db/`
3. TypeScript check: `npm run typecheck`
4. Integration tests: `npm run test:integration`

## TDD Approach
1. Run all tests - ensure baseline passes
2. Convert one function at a time
3. Run tests after each conversion
4. If failures, fix before continuing
5. After all conversions, verify no callbacks remain

## Completion
When ALL of the following are true:
- All database tests passing
- grep for callbacks returns empty
- TypeScript compilation succeeds
- Integration tests pass

Output: <promise>ASYNC_REFACTOR_COMPLETE</promise>

## If Stuck
Document:
- Which function is causing issues
- The specific error or test failure
- What conversion approach was tried
- Do NOT output false promise

Best Practices

DO:

  • Use specific, measurable success criteria
  • Include actual test commands
  • Add verification steps for each criterion
  • Include TDD approach for self-correction
  • Set clear completion conditions
  • Provide "If Stuck" guidance

DON'T:

  • Use vague criteria ("make it work")
  • Skip verification commands
  • Forget edge cases
  • Make subjective success criteria
  • Allow escape without genuine completion

Integration with Ralph Loop

Run your generated prompt:

/ralph-wiggum:ralph-loop "[paste generated prompt]" --completion-promise "YOUR_PROMISE" --max-iterations 30

Recommended settings:

  • Bug fixes: --max-iterations 15-20
  • Features: --max-iterations 25-35
  • Refactoring: --max-iterations 20-30

Validation Checklist

Before using a generated prompt, verify:

  • Task has single, focused objective
  • Success criteria are measurable
  • Verification commands are specific and runnable
  • TDD approach is defined
  • Completion promise is clear and specific
  • "If Stuck" section provides guidance

For multi-task prompts, see ralph-prompt-multi-task. For project-level prompts, see ralph-prompt-project. For research/analysis prompts, see ralph-prompt-research.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

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

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

平台分布

github-copilot

27.03%
按下载量换算35

Claude Code

21.54%
按下载量换算28

mcpjam

18.18%
按下载量换算23

moltbot

11.03%
按下载量换算14

windsurf

6.96%
按下载量换算9

zencoder

3.6%
按下载量换算5

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

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

安装前确认

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

来源信息

继续浏览同类 Skills