.agents/skills/ralphmode/SKILL.md
Configure Claude Code, Codex CLI, and Gemini CLI for Ralph-style automation with fewer approval prompts while keeping project boundaries, secret denylists, and sandbox-first safety rules intact.
npx skillsauth add Reinasboo/Bountylab ralphmodeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Ralphmode is a cross-platform permission profile for long-running ralph or jeo workflows.
It reduces approval friction, but it is not "allow everything everywhere."
The core rule is simple: widen automation only inside a bounded project or disposable sandbox, and keep secrets plus destructive commands explicitly blocked.
ralphmode keyword detection)The following steps are commands, not descriptions. Execute them in order immediately when
ralphmodeis invoked. Do not skip steps.
Parse the user's invocation:
MODE=sandboxMODE=repo (default, safer)The setup script auto-detects your git root, applies the preset to .claude/settings.json, and creates the safety hook.
# Find the script (checks installed locations)
_RALPHMODE_SCRIPT=""
for _candidate in \
"$(git rev-parse --show-toplevel 2>/dev/null)/.agent-skills/ralphmode/scripts/apply-ralphmode.sh" \
"$HOME/.agent-skills/ralphmode/scripts/apply-ralphmode.sh" \
"$HOME/.claude/skills/ralphmode/scripts/apply-ralphmode.sh" \
"$(pwd)/.agent-skills/ralphmode/scripts/apply-ralphmode.sh"; do
if [[ -f "$_candidate" ]]; then
_RALPHMODE_SCRIPT="$_candidate"
break
fi
done
if [[ -n "$_RALPHMODE_SCRIPT" ]]; then
bash "$_RALPHMODE_SCRIPT" --mode "$MODE"
else
echo "⚠️ apply-ralphmode.sh not found — applying inline (Claude Code only)"
fi
If the script is not found, fall through to STEP 2 (inline application for Claude Code).
Only run this if the script from STEP 1 was not found.
Repo preset (default — for normal development):
python3 - <<'EOF'
import json, os, subprocess
try:
root = subprocess.check_output(['git', 'rev-parse', '--show-toplevel'],
stderr=subprocess.DEVNULL, text=True).strip()
except Exception:
root = os.getcwd()
target = os.path.join(root, '.claude', 'settings.json')
os.makedirs(os.path.dirname(target), exist_ok=True)
try:
existing = json.loads(open(target).read()) if os.path.exists(target) else {}
except Exception:
existing = {}
existing['_ralphmode_previous_permissions'] = existing.get('permissions')
existing['permissions'] = {
'defaultMode': 'acceptEdits',
'allow': [
'Bash(npm *)', 'Bash(pnpm *)', 'Bash(bun *)', 'Bash(yarn *)',
'Bash(python3 *)', 'Bash(pytest *)',
'Bash(git status)', 'Bash(git diff)', 'Bash(git add *)',
'Bash(git commit *)', 'Bash(git log *)', 'Bash(git push)',
'Read(*)', 'Edit(*)', 'Write(*)'
],
'deny': [
'Read(.env*)', 'Read(./secrets/**)',
'Bash(rm -rf *)', 'Bash(sudo *)',
'Bash(git push --force*)', 'Bash(git reset --hard*)'
]
}
with open(target, 'w') as f:
json.dump(existing, f, ensure_ascii=False, indent=2)
print(f'✓ Repo preset applied to {target}')
EOF
Sandbox preset (only for disposable environments):
python3 - <<'EOF'
import json, os, subprocess
try:
root = subprocess.check_output(['git', 'rev-parse', '--show-toplevel'],
stderr=subprocess.DEVNULL, text=True).strip()
except Exception:
root = os.getcwd()
target = os.path.join(root, '.claude', 'settings.json')
os.makedirs(os.path.dirname(target), exist_ok=True)
try:
existing = json.loads(open(target).read()) if os.path.exists(target) else {}
except Exception:
existing = {}
existing['_ralphmode_previous_permissions'] = existing.get('permissions')
existing['permissions'] = {'defaultMode': 'bypassPermissions'}
with open(target, 'w') as f:
json.dump(existing, f, ensure_ascii=False, indent=2)
print(f'✓ Sandbox preset applied to {target}')
EOF
HOOK="$HOME/.claude/hooks/ralph-safety-check.sh"
if [[ ! -f "$HOOK" ]]; then
mkdir -p "$(dirname "$HOOK")"
cat > "$HOOK" << 'HOOKEOF'
#!/usr/bin/env bash
CMD=$(echo "$CLAUDE_TOOL_INPUT" | python3 -c \
"import sys,json; print(json.load(sys.stdin).get('command',''))" 2>/dev/null)
TIER1='(rm[[:space:]]+-rf|git[[:space:]]+reset[[:space:]]+--hard|git[[:space:]]+push.*--force|DROP[[:space:]]+TABLE|[[:space:]]sudo[[:space:]]|chmod[[:space:]]+777|\.env|secrets/)'
if echo "$CMD" | grep -qE "$TIER1"; then
echo "BLOCKED: Tier 1 dangerous command detected." >&2
echo "Command: $CMD" >&2
exit 2
fi
HOOKEOF
chmod +x "$HOOK"
echo "✓ Safety hook created: $HOOK"
else
echo "✓ Safety hook exists: $HOOK"
fi
After applying, tell the user:
repo or sandbox).claude/settings.json path)rm .claude/settings.json (project-local) or restore ~/.claude/settings.json (global)ralph to iterate without repeated approval popups.Before changing any permission mode:
.env*, secrets/**, production credentials, rm -rf, sudo, unchecked curl | sh.If the answer is "disposable sandbox," you may use the platform's highest-autonomy mode. If not, use the repo-scoped preset instead.
Use only the section that matches the current tool:
bypassPermissions only for isolated sandboxes.permissions.allow and permissions.deny snippets as compatibility-only.Detailed templates live in references/permission-profiles.md.
Prefer project-local configuration over user-global defaults.
.claude/settings.json.~/ or broad parent directories.If you must use a user-global default, pair it with a stricter denylist and a sandbox boundary.
After permissions are configured:
ralph or the jeo plan-execute-verify loop.Recommended execution contract:
boundary check -> permission profile -> ralph run -> verify -> cleanup or revert
Treat these as different modes:
Do not collapse them into one shared team default.
Static permission profiles (Steps 2–3) reduce friction before a run starts, but they do not stop dangerous operations that arise during execution. Add dynamic checkpoints so that Tier 1 actions are blocked or flagged at the moment they are attempted.
| Tier | Action | Platform response |
|------|--------|------------------|
| Tier 1 (always block) | rm -rf, git reset --hard, git push --force, DROP TABLE, sudo, .env*/secrets/** access, production environment changes | Block immediately, require explicit user approval |
| Tier 2 (warn) | npm publish, docker push, git push (non-force), DB migrations | Output warning, continue only with confirmation |
| Tier 3 (allow) | File reads/edits, tests, local builds, lint | Allow automatically |
| Platform | Hook | Blocking | Recommended pattern |
|----------|------|----------|-------------------|
| Claude Code | PreToolUse (Bash) | Yes — exit 2 | Shell script pattern-matches command; blocks Tier 1 |
| Gemini CLI | BeforeTool | Yes — non-zero exit | Shell script blocks tool; stderr fed to next turn |
| Codex CLI | notify (post-turn) | No | approval_policy="unless-allow-listed" + prompt contract |
| OpenCode | None | No | Prompt contract in opencode.json instructions |
Principle: Combine static profiles (Steps 2–3) with dynamic checkpoints (this step).
approval_policy and explicit prompt contracts that instruct the agent to output CHECKPOINT_NEEDED: <reason> and wait before proceeding with Tier 1 actions.See references/permission-profiles.md for full hook script templates per platform.
Use the Claude sandbox preset from references/permission-profiles.md, then run Ralph only inside that isolated repo:
/ralph "fix all failing tests" --max-iterations=10
For sandbox ralph runs, use the CLI flags directly:
codex -c model_reasoning_effort="high" --dangerously-bypass-approvals-and-sandbox -c model_reasoning_summary="detailed" -c model_supports_reasoning_summaries=true
For repo-scoped (non-sandbox) runs, use the config file approach from references/permission-profiles.md:
approval_policy = "never"
sandbox_mode = "workspace-write"
Place this in ~/.codex/config.toml (or a project-local override) and restart Codex before running Ralph.
For sandbox ralph runs, use --yolo mode:
gemini --yolo
For normal repo automation, trust the current project folder with explicit file selection and run the Ralph workflow for that repo only. See references/permission-profiles.md for details.
development
Security code review for vulnerabilities. Use when asked to "security review", "find vulnerabilities", "check for security issues", "audit security", "OWASP review", or review code for injection, XSS, authentication, authorization, cryptography issues. Provides systematic review with confidence-based reporting.
development
Implement security best practices for web applications and infrastructure. Use when securing APIs, preventing common vulnerabilities, or implementing security policies. Handles HTTPS, CORS, XSS, SQL Injection, CSRF, rate limiting, and OWASP Top 10.
development
Create responsive web designs that work across all devices and screen sizes. Use when building mobile-first layouts, implementing breakpoints, or optimizing for different viewports. Handles CSS Grid, Flexbox, media queries, viewport units, and responsive images.
content-media
Produce programmable videos with Remotion using scene planning, asset orchestration, and validation gates for automated, brand-consistent video content.