specralph-prompts
Author, install, and validate custom prompt files for specralph (the ralph CLI agentic loop runner). Use this skill whenever creating or editing ralph prompt files, preparing tasks to run with ralph run, writing prompts that must stop the loop via the completion signal, or debugging a ralph loop that never stops or stops too early.
- License 许可
- MIT
- 所属仓库
- iyaki/specralph
- 最近更新
- 2026-11-05
- Stars
- ★ 6
- Forks
- 0
01 前言 Front Matter
- name
- specralph-prompts
- description
- Author, install, and validate custom prompt files for specralph (the ralph CLI agentic loop runner). Use this skill whenever creating or editing ralph prompt files, preparing tasks to run with ralph run, writing prompts that must stop the loop via the completion signal, or debugging a ralph loop that never stops or stops too early.
02 资源文件 18
- 脚本cmd_config_test.go3.7 KB
- 脚本cmd_test.go10.3 KB
- 脚本cmd.go1.8 KB
- 参考文档guide.md2.1 KB
- 脚本init_helpers_test.go28.8 KB
- 脚本init_integration_test.go5.0 KB
- 脚本init_internal_test.go20.1 KB
- 脚本init_test.go1.1 KB
- 脚本init.go23.4 KB
- 脚本prompts_test.go17.9 KB
- 脚本prompts.go10.3 KB
- 脚本run_internal_test.go8.4 KB
- 脚本run_test.go14.5 KB
- 脚本run.go10.9 KB
- 脚本skill_test.go6.0 KB
- 脚本skill.go2.2 KB
- 脚本version_test.go864 B
- 脚本version.go444 B
03 SKILL.md 正文
Specralph Prompt Authoring
Ralph sends a prompt to an AI agent and loops until the agent's output contains the completion signal. A prompt file is plain Markdown living in the configured prompts directory; its filename (without .md) is how it is invoked. Getting the file right means the loop does exactly one task and stops cleanly.
The one rule that matters
Every prompt must tell the agent to output the completion signal when the work is done. Without it, the loop only stops at max iterations — wasted runs and half-finished work. Either form works:
<COMPLETION_SIGNAL>— ralph replaces it at runtime with the real tag<promise>COMPLETE</promise>— the literal tag, case-sensitive
Put it in the prompt's stop condition, for example:
## Stop Condition
- After completing the selected task, stop. Do NOT start another task.
- If everything is complete, reply with: `<COMPLETION_SIGNAL>`
Workflow
- Study the conventions from the binary itself:
ralph prompts listshows available prompts;ralph prompts show build(orplan) shows the built-in structure worth imitating. Newer ralph versions also provideralph prompts guide(the full authoring contract) andralph prompts validate <name>(static checks on a prompt file) — prefer them when available. - Write the prompt as
<name>.mdin the prompts directory (config fieldprompts-dir, default$HOME/.ralph). An optional YAML frontmatterdescription:field givesralph prompts lista useful summary. - Structure it like the built-ins: objective, study inputs (specs, implementation plan), single-task steps, validation, stop condition with the signal. One task per run — ralph loops, the agent picks one task, validates, commits.
- Run it:
ralph run <name>, or the aliasralph <name>when<name>is not a registered subcommand. Ralph prints the resolved prompt, then enters the loop. - Verify the loop stops: the agent's output must contain the literal signal. A run that never stops means the prompt is missing the signal — fix the prompt file, not the config.
Notes
- The
scopeargument (ralph plan my-feature) only affects built-in prompts today; custom prompts must inline whatever context they need. - Distribute this skill into a project with
ralph skill install [dir](default.agents/skills) so agents working there discover these conventions; the installed skill always matches the ralph binary version that installs it.
04 同仓库更多 Skills
commands
暂无简介
specralph-prompts
暂无简介
spec-creator
Create, update, or review engineering-grade technical specifications for a codebase, following spec-driven development (SDD) conventions. Use whenever the user asks for a spec, requirements or design doc, feature specification, API contract, data model, or wants a feature planned on paper before implementation — including phrases like "write a spec for X", "draft the spec first", "update the specs", or any spec-first workflow (e.g. with Ralph). Produces implementation-ready, testable specs using the bundled SPEC_TEMPLATE.md.
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
agent-spec-creation
Create or update agent integration specs before implementation. Use this whenever a request is about defining how a new or existing agent should behave in Ralph.
agent-implementation
Implement or update support for an underlying agent CLI in Ralph after specs are defined, including factory wiring and tests.