commands
暂无简介
- License 许可
- MIT
- 所属仓库
- iyaki/specralph
- 最近更新
- 2026-11-14
- Stars
- ★ 6
- Forks
- 0
02 资源文件 6
- 参考文档help.md5.1 KB
- 参考文档init.md10.0 KB
- 参考文档prompts-authoring.md7.3 KB
- 参考文档prompts.md7.6 KB
- 参考文档run.md4.9 KB
- 参考文档version.md3.3 KB
03 SKILL.md 正文
Skill Command
Status: Proposed
Overview
Purpose
Distribute the bundled prompt-authoring skill (specralph-prompts) into projects, so AI agents working there can discover specralph prompt conventions (file location, structure, completion signal) without external documentation.
Goals
- Specify the
ralph skill install [dir]subcommand. - Specify the skill source: embedded in the binary at build time from repository source files, so an installation always matches the installing binary's version.
- Specify overwrite behavior and output.
Non-Goals
- Network downloads (GitHub fetches, version pinning, update checks) — the binary is the single source.
- Skill management beyond install: no
list,uninstall, or per-agent format conversion. - Lock-file integration with external skill managers (
.skill-lock.jsonfiles are not modified). - Changes to prompt resolution or authoring behavior (see prompts-authoring.md).
Scope
- In scope:
skillcommand group with a singleinstallsubcommand. - Out of scope: prompt authoring contract content (owned by the skill file itself).
Architecture
Module/package layout (tree format)
.agents/
skills/
specralph-prompts/
SKILL.md (canonical skill source, committed)
internal/
cli/
skill.go (command; embeds the skill at build time)
Data flow summary
- Build embeds
.agents/skills/specralph-prompts/SKILL.mdinto the binary (build-time step; the exact embedding mechanism is an implementation detail — Go'sembedcannot read dot-directories, so the build may copy or relocate the file into the embedding package). ralph skill install [dir]writes the embedded skill to<dir>/specralph-prompts/SKILL.md.
Data model
Core Entities
- None beyond the skill file itself: one embedded asset, one output path.
Workflows
Install the skill (happy path)
- User invokes
ralph skill install [dir]. <dir>defaults to.agents/skillswhen omitted.- Target path is
<dir>/specralph-prompts/SKILL.md. - If the target exists and
--forceis not set, return an error:skill already exists at <target> (use --force to overwrite). - Create intermediate directories as needed (
0755). - Write the embedded skill content (
0644). - Print to stdout:
Installed specralph-prompts skill to <target>. Exit code 0.
Overwrite an existing installation
- User invokes
ralph skill install [dir] --force. - Existing target file is overwritten with the embedded content. No backup is kept (the binary is the source of truth; local edits are intentionally discarded).
Install failure
- Target directory cannot be created or written (permissions, read-only path).
- Command returns an error wrapping the cause; exit code non-zero. No partial file is left behind.
APIs
- None. Local file operation only.
Configuration
- None. The command is config-independent: it does not load
ralph.toml, and the prompts-dir setting is unrelated to the install target.
Command Collision
skill is a registered subcommand, so it shadows a prompt file named skill.md: invoking ralph skill runs the subcommand, and the prompt requires ralph run skill. This follows the collision rules defined in run.md.
Permissions
- Write access to the target directory.
Security Considerations
- The installed content is the static, embedded skill text; no user input is reflected into the file path beyond
<dir>. - Path arguments are used as given; no upward-traversal sanitization beyond what
filepath.Joinsemantics provide (the user already has filesystem write access to wherever they point the command).
Dependencies
- Standard library plus the build-time embedding of the skill asset. No new external dependencies.
Open Questions / Risks
- Should a successful install print a hint about which agents read
.agents/skills(e.g. "supported by skills-aware agents")? Deferred until an agent-support matrix exists. - Repos using an external skill manager may prefer registering the skill manually; the lock files of those tools are intentionally untouched.
Verifications
ralph skill installcreates.agents/skills/specralph-prompts/SKILL.mdin the working directory and prints the install path.ralph skill install /tmp/xcreates/tmp/x/specralph-prompts/SKILL.md.- Installing twice without
--forcefails withskill already exists at <target> (use --force to overwrite), leaving the original file untouched. - Installing twice with
--forcesucceeds and replaces the content with the embedded version. - The installed file passes
skill-creatorvalidation (quick_validate.py): valid frontmatter, kebab-case namespecralph-prompts, description without angle brackets and under 1024 characters. ralph skill --helplists theinstallsubcommand.
Related Specifications
- prompts-authoring.md — the authoring workflow the skill teaches (
prompts guide,prompts validate). - run.md — command/prompt name collision rules.
- help.md — command discoverability.
04 同仓库更多 Skills
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.
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.