ralphmode

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Ralphmode

Ralphmode

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是适用于长时间运行的
ralph
jeo
工作流的跨平台权限配置文件。它降低了审批阻力,但并非“允许所有位置的所有操作”。核心规则很简单:仅在有边界的项目或一次性沙箱内扩大自动化范围,同时明确阻断机密信息和破坏性命令。

When to use this skill

何时使用该技能

  • You want
    ralph
    to iterate without repeated approval popups.
  • You are setting up the same repo for Claude Code, Codex CLI, and Gemini CLI.
  • You need a shared safety model: repo-only writes, no secrets reads, no destructive shell by default.
  • You want a stronger separation between day-to-day automation and true YOLO mode.
  • 你希望
    ralph
    可以迭代运行,无需重复弹出审批窗口
  • 你正在为Claude Code、Codex CLI和Gemini CLI配置同一个代码仓库
  • 你需要一套共享的安全模型:默认仅支持仓库内写入、禁止读取机密、禁止运行破坏性shell命令
  • 你希望在日常自动化和完全无限制模式(YOLO mode)之间实现更强的隔离

Instructions

使用说明

Step 1: Define the automation boundary first

步骤1:先定义自动化边界

Before changing any permission mode:
  • Pick one project root and keep automation scoped there.
  • List files and commands that must stay blocked:
    .env*
    ,
    secrets/**
    , production credentials,
    rm -rf
    ,
    sudo
    , unchecked
    curl | sh
    .
  • Decide whether this is a normal repo or a disposable sandbox.
If the answer is "disposable sandbox," you may use the platform's highest-autonomy mode. If not, use the repo-scoped preset instead.
在修改任何权限模式之前:
  • 选定一个项目根目录,将自动化的作用范围限定在该目录内
  • 列出必须阻断的文件和命令:
    .env*
    secrets/**
    、生产环境凭证、
    rm -rf
    sudo
    、未校验的
    curl | sh
  • 确定当前是普通代码仓库还是一次性沙箱
如果是“一次性沙箱”,你可以使用平台的最高自治模式;否则请使用仓库范围的预设配置。

Step 2: Choose one preset per platform

步骤2:为每个平台选择一个预设

Use only the section that matches the current tool:
  • Claude Code: everyday preset first,
    bypassPermissions
    only for isolated sandboxes.
  • Codex CLI: use the current official approval and sandbox model first; treat older
    permissions.allow
    and
    permissions.deny
    snippets as compatibility-only.
  • Gemini CLI: trust only the project root; there is no true global YOLO mode.
Detailed templates live in references/permission-profiles.md.
仅使用与当前工具匹配的部分:
  • Claude Code:优先使用日常预设,仅当使用隔离沙箱时才开启
    bypassPermissions
  • Codex CLI:优先使用当前官方的审批和沙箱模型,将旧的
    permissions.allow
    permissions.deny
    代码片段仅作为兼容方案使用
  • Gemini CLI:仅信任项目根目录,不存在真正的全局无限制模式
详细模板位于references/permission-profiles.md

Step 3: Apply the profile locally, not globally, unless the workspace is disposable

步骤3:本地应用配置文件而非全局应用,除非工作区是一次性的

Prefer project-local configuration over user-global defaults.
  • Claude Code: start with project
    .claude/settings.json
    .
  • Codex CLI: start with project config and repo instructions or rules files.
  • Gemini CLI: trust the current folder, not
    ~/
    or broad parent directories.
If you must use a user-global default, pair it with a stricter denylist and a sandbox boundary.
优先使用项目本地配置而非用户全局默认配置:
  • Claude Code:从项目的
    .claude/settings.json
    开始配置
  • Codex CLI:从项目配置、仓库说明或规则文件开始配置
  • Gemini CLI:仅信任当前文件夹,不要信任
    ~/
    或范围宽泛的父目录
如果你必须使用用户全局默认配置,请搭配更严格的拒绝列表和沙箱边界使用。

Step 4: Run Ralph with an explicit verification loop

步骤4:运行Ralph时搭配显式的验证循环

After permissions are configured:
  1. Confirm the task and acceptance criteria.
  2. Run
    ralph
    or the
    jeo
    plan-execute-verify loop.
  3. Verify outputs before claiming completion.
  4. If the automation profile was temporary, revert it after the run.
Recommended execution contract:
text
boundary check -> permission profile -> ralph run -> verify -> cleanup or revert
权限配置完成后:
  1. 确认任务和验收标准
  2. 运行
    ralph
    jeo
    的计划-执行-验证循环
  3. 验证输出后再确认任务完成
  4. 如果自动化配置是临时的,运行完成后将其恢复
推荐的执行约定:
text
boundary check -> permission profile -> ralph run -> verify -> cleanup or revert

Step 5: Keep "skip" and "safe" separate

步骤5:将“跳过审批”和“安全”分开

Treat these as different modes:
  • Repo automation: minimal prompts inside a bounded workspace.
  • Sandbox YOLO: promptless execution in a disposable environment only.
Do not collapse them into one shared team default.
将以下模式视为不同的模式:
  • 仓库自动化:在有边界的工作区内仅弹出最少提示
  • 沙箱无限制模式:仅在一次性环境中实现无提示执行
不要将它们合并为一个共享的团队默认配置。

Examples

示例

Example 1: Claude Code sandbox run

示例1:Claude Code沙箱运行

Use the Claude sandbox preset from references/permission-profiles.md, then run Ralph only inside that isolated repo:
bash
/ralph "fix all failing tests" --max-iterations=10
使用references/permission-profiles.md中的Claude沙箱预设,然后仅在该隔离仓库内运行Ralph:
bash
/ralph "fix all failing tests" --max-iterations=10

Example 2: Codex CLI repo-scoped Ralph run

示例2:Codex CLI仓库范围的Ralph运行

Apply the Codex repo preset from references/permission-profiles.md, then run the task. The current official model uses config file settings, not CLI flag overrides:
toml
approval_policy = "never"
sandbox_mode = "workspace-write"
Place this in
~/.codex/config.toml
(or a project-local override) and restart Codex before running Ralph.
应用references/permission-profiles.md中的Codex仓库预设,然后运行任务。当前官方模型使用配置文件设置,而非CLI标志覆盖:
toml
approval_policy = "never"
sandbox_mode = "workspace-write"
将该配置放在
~/.codex/config.toml
(或项目本地覆盖配置)中,重启Codex后再运行Ralph。

Example 3: Gemini CLI trust-only setup

示例3:Gemini CLI仅信任设置

Trust the current project folder, keep explicit file selection, then run the Ralph workflow for that repo only.
信任当前项目文件夹,保留显式文件选择,然后仅为该仓库运行Ralph工作流。

Best practices

最佳实践

  • Default to the least-permissive preset that still lets Ralph finish end-to-end.
  • Keep secret denylists and destructive command denylists even when approvals are reduced.
  • Use full bypass only in disposable environments with a clear project boundary.
  • Record which preset was applied so teammates can reproduce or revert it.
  • Re-check platform docs when upgrading CLI versions because permission models change faster than skill content.
  • 默认选择可支持Ralph端到端完成任务的最低权限预设
  • 即使减少了审批,也要保留机密拒绝列表和破坏性命令拒绝列表
  • 仅在具有明确项目边界的一次性环境中使用完全绕过权限的配置
  • 记录所应用的预设,以便团队成员可以复现或恢复配置
  • 升级CLI版本时重新查阅平台文档,因为权限模型的更新速度快于本技能内容的更新速度

References

参考资料