juanigalan91/skill-rails
Deterministic, testable YAML rails for AI agent skills, in GitHub Actions syntax.
Changelog
0.6.0
- Allow fixed test answers to replace YAML
runsteps and TypeScriptshcalls, including nested runs, repeated answers, file effects, and failures. Scoped keys keep nested shell overrides separate from bare agent answers. - Generate CLI continuation commands using the current installed build through Node, while preserving the
SKILL_RAILS_COMMANDoverride and npx fallback. - Recognize quoted executable paths in question-hook completion checks.
- Update benchmark results and document the effect of moving mechanical agent work into scripts.
0.5.0
- Add TypeScript and JavaScript rails files with
defineRails, typed inputs and outputs, shell helpers, prompts, skills, conditional questions, and nested YAML or TypeScript runs. - Replay code-based runs using saved step results, with failure handling, recording, tracing, and fixed-answer tests. Empty conditional question groups are skipped.
- Add
skill-rails benchand the benchmark API to compare variants through repeated fixed-answer or live agent runs, with median summaries, CSV export, optional transcripts, and agent usage metrics. - Add
SKILL_RAILS_COMMANDto select the command used in generated CLI continuation reports. - Keep the README focused on advantages and the open-PR example; preserve the walkthrough, architecture, CLI/API reference, tradeoffs, and benchmarks in dedicated documentation.
0.4.0
settakes one expression that gives an object: each key becomes an output.- The question hook (
hooks/hooks.json,skill-rails hook,skill-rails hooks): records native question-tool answers on Claude Code and Codex, guards supported completion calls, and rejects changed answers. Hooks must be enabled and trusted; they are not a security boundary. - Breaking: "flow" becomes "rails" everywhere, with no alias.
The expression context
flowisrails:${{ rails.name }}and${{ rails.dir }}. Theflowfield of the reports and of the trace lines israils. The MCP tools arerails_start,rails_done,rails_status,rails_resetandrails_check, and theirflowparameter israils. The CLI takes<rails>in place of<flow>. In a test file,flow:israils:andflow-outputsisrails-outputs.$FLOW_OUTPUTand$FLOW_DIRare$RAILS_OUTPUTand$RAILS_DIR.schema/flow.schema.jsonisschema/rails.schema.json. The API takesrailsin place offlow, for exampledone({ rails, id, output }), and exportsloadRails,validateRailsandRailsError. - Upgrade: restart runs saved by 0.3.x and update plugin/MCP commands to
skill-rails@0.4; old saved states and renamed fields have no compatibility aliases. - Relative Markdown links in prompts point to files next to the prompt: the runner makes them absolute, and
checkreports broken links. runargstakes one value in place of a list:args: ${{ item.dir }}.withonpromptsteps: named values that the agent gets as a YAML block after the instructions. Askillstepwithcan also be a map, which the agent gets as YAML arguments.
0.3.1
- Add schema-aware YAML linting through ESLint, using the existing workflow schema to reject unknown keys and invalid types.
- Run linting in CI and before npm publication; recommend YAML/ESLint editor extensions and configure local schema completion.
0.3.0
- Add the
repeatstep: it runs its steps again until a condition is true, for example to show more context and ask again until the user decides.steps.<id>.outputs.lastholds the results of the last iteration. - Breaking:
prompt-fileis removed.prompttakes the instructions, or the path of a Markdown file: one word that ends with.md, relative to the flow file. - Standalone skill calls resolve in the explicitly selected project, including CLI/MCP
--cwdexecution. uses: skill:<plugin>:<skill>runs the flow of a skill in another plugin: the runner finds it inSKILL_RAILS_SKILLS_PATH, a plugin checkout above the flow, or the Claude Code plugin installs.- Flow
outputs: the values that a flow gives back, in thedoneandfailedreports, and directly insteps.<id>.outputsof ausesstep. runsteps:args(quoted arguments, a list adds its items, an empty value adds nothing), andstdout(text,env,jsonorjsonl) to read the outputs from what the command prints.- The
scripts/folder of the plugin that holds the flow is inPATH, after thescripts/folder of the flow. WARNING: <text>lines on stderr become notes, as::warning::lines on stdout do.- A failed
runstep givessteps.<id>.exitCodeandsteps.<id>.error, the last lines of its stderr. - The
notestep shows a message to the user, and the flow goes on. listinputs: a list, a JSON list, or one item per line or per comma.- The CLI adds
nextto eachstepreport: the exact command that reports the step. - The CLI adds
protocolto thestartreport: how the agent acts on each result, so that aSKILL.mdholds no copy of it. argsmaps add flags:--name: true,--name: <value>, or--name: [a, b]; an empty value adds nothing.continue-on-errortakes a list of exit codes.- An
askoption with avalueputs the value in the step output in place of the label. migrate-to-skill-railsfirst assesses whether the skill should stay Markdown: it lists the files outside the skill that name its Markdown files, and keeps the skill when code or CI reads its text, when the runner cannot run there, or when the skill is reference text or too short. It keeps the files that a partial migration names.askcan be an expression that gives the questions, withmaxandextra-options; a question withother: truealso accepts typed text.loop.previousholds the step results of the last iteration of aforeachor arepeat.usessteps:forward-stop: trueends the caller with the stop of the other flow;continue-on-erroralso catches a--failof an agent step inside it.promptandskillsteps takecontinue-on-error: a--failthen fails only the step.- The
$FLOW_OUTPUTfiles are in the state folder of the runner, out of theTMPDIRof the flow. - Tests: the
pathfolders come before thescripts/folders, and an answer key or anexpect.stepskey can be<uses id>/<step id>. - The short output form:
output: { title: string, kind: fix | skip, files: [string], note?: string }. - The check refuses an output schema with an unknown keyword, the sign of a YAML text split at a comma.
- Inputs take
enum, for the input or for each item of a list input. fail: <message>, the short form of a stop with outcome failure.- An ask option can be a plain label, and its description is optional.
- Expression functions:
length,split,listandwhere. - A scenario plugin in
test/scenarios/tests the flow patterns of real skills. - The
setstep computes values with expressions, with their types. on-failuresteps run when a flow fails, withfailure.message.working-directoryonrun,uses,promptandskillsteps; an agent step in another folder hasdirectoryin its report.loop.number(from 1) andloop.parent, the loop around the current one.skill-rails test --quietshows only the failures and the count, for a whole repository.- Tests: live steps (
liveor{ $live: <guidance> }inanswers) send one step to a real agent command, withskill-rails test --liveand--agent <command>; without--live, these tests are skipped. - Tests:
expect.judgegrades a step output with a rubric and a real agent;judge-runsruns the test several times. - Tests:
mode: agentgives arequestto the agent command and checks the saved state of the flow, with thestartedandtranscriptexpectations. - Each agent step result keeps its
requestand itsanswer, including iterations unwound by failures or stops. skill-rails record <flow>writes a test file from a real run.skill-rails trace <flow>prints one JSON line per agent step of a run, as eval cases.- Tests:
flow-outputschecks the outputs of the flow, anoutputskey can be a longer path,setupgets{{cwd}}and{{dir}}, and a test can expectstatus: error.
0.2.3
- Run the bundled create and migrate skills as YAML flows, with shared scaffolding, deterministic validation/tests, and repair and failure gates.
- Migrate existing skills in place without generating backups or sibling copies.
- Use
rails.yamlthroughout skills, examples, documentation, and CLI help. - Add flow scenarios and a rule-preservation audit; retain the runner skill as the Markdown bootstrap.
0.2.2
- Add native Codex plugin packaging: portable manifests, a Codex compatibility manifest, and a repository marketplace sharing the existing skills and MCP runner.
- Include the plugin metadata and marketplace in the npm package, with a packaging regression check and installation guide.
0.2.1
-
Portable runner, creation, migration and generated skill instructions, with chat fallbacks for questions.
-
Setup guides and a live verification checklist for Codex, Cursor, Copilot in VS Code, Gemini CLI and OpenCode v2.
-
--cwdselects the project for CLI and MCP commands; saved-state reports include the project directory. -
Polling uses 20-second slices by default, bounds individual checks to the remaining slice, and preserves the next check time in a
retryAtwait report. Slow polling checks may now time out; adjustSKILL_RAILS_WAIT_SLICE_SECONDSif needed. -
Fix: under
npxornpm exec, the CLI and the MCP server ran in the nearest folder with apackage.json. They now useINIT_CWD, the folder where the command started, for the flow paths, therunsteps and the state.
0.2.0
The first public release.
Flows
- A flow is a YAML file in the GitHub Actions syntax:
steps,if: ${{ }},run,envand$FLOW_OUTPUT. - Step types:
run,skill,prompt(orprompt-file),ask,stop,foreach,breakanduses. runsteps can poll withuntil,interval-secondsandtimeout-minutes, and give control back to the agent in time slices.askquestions have validated options, option previews, multi-select, and free-text answers.- Agent outputs are validated against a JSON Schema.
- Expressions are evaluated by
@actions/expressions, so they behave as in GitHub Actions. - A
runcommand cannot hold${{ }}: values go throughenv.
Tools
- CLI:
start,done,status,reset,check,testandmcp. - MCP server with the tools
flow_start,flow_done,flow_status,flow_resetandflow_check. skill-rails test: deterministic flow tests with fixed agent answers, fixtures, setup commands and stub commands.- A Node API with TypeScript types.
Claude Code plugin
run-skill-rails,create-skill-railsandmigrate-to-skill-railsskills.- The repository is its own plugin marketplace.