foryourhealth111-pixel/Vibe-Skills / bundled/skills/cancel-ralph
cancel-ralph
VerifiedCodex-compatible cancel command for Ralph loop state, preserving the original command name.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 988 B |
| scripts/cancel-ralph.ps1 | script | 2.0 KB |
scripts/cancel-ralph.ps1
View on GitHub[CmdletBinding()]
param(
[Parameter(ValueFromRemainingArguments = $true)]
[string[]]$CliArgs
)
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
if ($null -eq $CliArgs) {
$CliArgs = @()
}
function Resolve-AbsolutePath {
param([Parameter(Mandatory = $true)][string]$PathText)
if ([System.IO.Path]::IsPathRooted($PathText)) {
return [System.IO.Path]::GetFullPath($PathText)
}
return [System.IO.Path]::GetFullPath((Join-Path (Get-Location) $PathText))
}
function Show-Help {
@(
'cancel-ralph (Codex compatibility mode)',
'',
'Usage:',
' cancel-ralph.ps1 [--state-file PATH]',
'',
'Options:',
' --state-file PATH Override state path (default: .claude/ralph-loop.local.md)',
' -h, --help Show this help'
) | ForEach-Object { Write-Host $_ }
}
$stateFile = '.claude/ralph-loop.local.md'
$stateFileFromCli = $false
for ($i = 0; $i -lt $CliArgs.Count; $i++) {
$arg = $CliArgs[$i]
switch ($arg.ToLowerInvariant()) {
'--help' { Show-Help; exit 0 }
'-h' { Show-Help; exit 0 }
'--state-file' {
if ($i + 1 -ge $CliArgs.Count) {
throw '--state-file requires a path'
}
$i += 1
$stateFile = $CliArgs[$i]
$stateFileFromCli = $true
continue
}
default {
throw "Unknown argument: $arg"
}
}
}
$resolvedStatePath = Resolve-AbsolutePath -PathText $stateFile
if (-not $stateFileFromCli) {
$fallbackPath = Resolve-AbsolutePath -PathText '.codex/ralph-loop.local.md'
if (-not (Test-Path -LiteralPath $resolvedStatePath) -and (Test-Path -LiteralPath $fallbackPath)) {
$resolvedStatePath = $fallbackPath
}
}
if (-not (Test-Path -LiteralPath $resolvedStatePath)) {
Write-Host 'No active Ralph loop found.'
exit 0
}
$raw = Get-Content -LiteralPath $resolvedStatePath -Raw
$iteration = if ($raw -match '(?m)^iteration:\s*([0-9]+)\s*$') { $Matches[1] } else { 'unknown' }
Remove-Item -LiteralPath $resolvedStatePath -Force
Write-Host "Cancelled Ralph loop (was at iteration $iteration)"
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |