返回顶部
o

oneshot-ship一键部署

Ship code with oneshot CLI. One command that plans, executes, reviews, and opens a PR. Runs over SSH or locally. Use when the user wants to ship code changes, automate PRs, or run a coding pipeline with Claude and Codex.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.2.1
安全检测
已通过
357
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

oneshot-ship

oneshot CLI

一条命令即可交付代码。oneshot 运行完整的流水线:规划(Claude)→ 执行(Codex)→ 审查(Codex)→ PR(Claude)。支持通过 SSH 连接到远程服务器,或使用 --local 在本地运行。

何时使用此技能

  • - 用户希望无需手动编码即可向仓库交付代码变更
  • 用户希望自动化规划/实现/审查/PR 工作流
  • 用户提到 oneshot 或希望委托编码任务
  • 用户希望在远程服务器或本地运行任务

安装

bash
bun install -g oneshot-ship

设置

运行 oneshot init 配置 SSH 主机、工作空间路径、API 密钥和模型偏好。配置保存在 ~/.oneshot/config.json。

服务器上的仓库应位于工作空间路径下的 <组织>/<仓库> 格式:

~/projects/
my-org/my-app/
my-org/my-api/

服务器前提条件

用法

bash
oneshot <仓库> <任务> # 交付一个任务
oneshot <仓库> # 从 Linear 工单交付
oneshot <仓库> <任务> --bg # 触发后即忘
oneshot <仓库> <任务> --local # 本地运行,不使用 SSH
oneshot <仓库> <任务> --deep-review # 强制全面审查
oneshot <仓库> <任务> --model sonnet # 覆盖 Claude 模型
oneshot <仓库> <任务> --branch dev # 指定不同分支
oneshot <仓库> --dry-run # 仅验证
oneshot init # 配置
oneshot stats # 最近运行记录 + 耗时

流水线

  1. 1. 验证:检查仓库是否存在,从源拉取最新代码
  2. 工作树:从目标基础分支创建临时 git 工作树
  3. 分类:通过启发式规则 + LLM 将任务分类为 fast 或 deep
  4. 规划:Claude 读取代码库和 CLAUDE.md 约定,输出实现计划
  5. 执行:Codex 实现计划。如果超时且仅完成部分更改,流水线继续执行
  6. 草稿 PR:Claude 创建分支、提交、推送并打开草稿 PR
  7. 审查:Codex 审查差异。在 deep 模式下,对正确性、安全性和代码质量进行全面审查
  8. 完成:推送审查修复并将 PR 标记为就绪

每次运行后清理工作树。

配置

~/.oneshot/config.json:

json
{
host: user@100.x.x.x,
basePath: ~/projects,
anthropicApiKey: sk-ant-...,
linearApiKey: linapi...,
claude: { model: opus, timeoutMinutes: 180 },
codex: {
model: gpt-5.4-mini,
reasoningEffort: xhigh,
reviewModel: gpt-5.4-mini,
reviewReasoningEffort: xhigh,
timeoutMinutes: 180
},
stepTimeouts: {
planMinutes: 20,
executeMinutes: 60,
reviewMinutes: 20,
deepReviewMinutes: 20,
prMinutes: 20
}
}

SSH 运行仅需 host 字段。本地模式无需配置文件。

标志

标志缩写描述
--model-m覆盖 Claude 模型
--branch
-b | 基础分支(默认:main) | | --deep-review | | 强制全面审查模式 | | --local | | 本地运行而非通过 SSH | | --bg | | 后台运行,返回 PID + 日志路径 | | --dry-run | -d | 仅验证 | | --events-file | | 将 JSONL 事件镜像到额外文件 | | --help | -h | 帮助 | | --version | -v | 版本 |

自定义

  • - 在任何仓库根目录放置 CLAUDE.md。oneshot 会在每个步骤将其传递给 Claude 和 Codex
  • 编辑 prompts/plan.txt、execute.txt、review.txt、pr.txt 以更改流水线行为

提示

  • - 使用 --bg 触发后即忘长时间运行的任务
  • Linear 集成将工单移至审查中状态并评论 PR 链接
  • 每步超时防止进程失控(规划 20 分钟,执行 60 分钟,审查 20 分钟,PR 20 分钟)
  • 工作树隔离确保主分支永远不会被触及
  • 任务分类自动选择 fast 或 deep 模式。使用 --deep-review 强制深度模式
  • 耗时估算来自每个仓库的历史运行记录(~/.oneshot/history.json)

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 oneshot-ship-1776282261 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 oneshot-ship-1776282261 技能

通过命令行安装

skillhub install oneshot-ship-1776282261

下载

⬇ 下载 oneshot-ship v0.2.1(免费)

文件大小: 2.68 KB | 发布时间: 2026-4-16 18:42

v0.2.1 最新 2026-4-16 18:42
- Updated version info and description for clarity and accuracy
- Added new flags: `--deep-review`, `--branch`, and `--events-file`
- Improved pipeline description: now includes a classification step (`fast` or `deep`) and detailed review/finalization process
- Enhanced usage examples and configuration details, including support for deep review and different base branches
- Clarified that local mode works without a config file and worktree remains isolated

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部