Xpersona
C

Codex Autopilot

CLAWHUB · Unverified

Multi-model AI coding automation system with intelligent task routing and built-in CI/CD. Watchdog-driven loop that orchestrates Codex (backend) and Gemini (... Skill: Codex Autopilot Owner: imwyvern Summary: Multi-model AI coding automation system with intelligent task routing and built-in CI/CD. Watchdog-driven loop that orchestrates Codex (backend) and Gemini (... Tags: latest:0.7.1 Version history: v0.7.1 | 2026-03-24T15:56:58.702Z | user Add test-agent CI/CD with auto-enqueue bugfix on failure, coverage ratchet, discord-notify retry, Gemini tmux as primary frontend rout

62
Rank
84
Safety
1.3k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.3K downloads reported by the source. Last updated 10/10/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s17as2pe33fqm26ag8dqnwe0gx83gd3q:codex-autopilot
  1. Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-imwyvern-codex-autopilot/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

152,980 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

code-review/SKILL.md

---
name: 代码评审
description: 系统性地进行代码评审,检查代码质量、安全性、性能和可维护性
version: 1.5.0
updated: 2026-01-19
---

# 代码评审 Skill

> 代码评审不是找茬,是知识共享和质量保障。

## 速查表

| 评审维度 | 核心检查 |
|---------|---------|
| 功能正确 [!] | 需求符合? 边界处理? 错误处理? |
| 代码质量 [!] | SOLID? 命名? 嵌套深度? |
| 安全性 [!] | SQL注入? XSS? 权限? 敏感信息? |
| 性能 [!] | N+1查询? 内存泄漏? 分页? |
| AI专项 [!] | Prompt注入? Token浪费? 降级? |
| 项目结构 | 文件位置? 组件拆分? 命名一致? |

**快速评审**: 只查 [!] 标记的 5 个核心维度
**评审结论**: [APPROVE] / [CHANGES] / [BLOCK]

---

## 关联 Skill

| Skill | 关系 | 说明 |
|-------|------|------|
| doc-writing | 前置 | 评审时对照需求文档 |
| doc-review | 前置 | 确保需求已评审通过 |
| development | 上一步 | 评审开发完成的代码 |

**工作流**: `requirement-discovery` -> `doc-writing` -> `doc-review` -> `development` -> `code-review`

---

## 使用场景

- "帮我 review 这个代码"
- "检查这个 PR"
- "看看这个实现有没有问题"

---

## 复杂评审的会话记录(可选)

当评审范围较大或涉及多处上下文时,可启用会话记录,避免遗漏与重复。
参考模板: `AIWorkFlowSkill/development/references/session-management.md`

---

## 评审模式

| 模式 | 场景 | 维度 | 时间 |
|------|------|------|------|
| **完整评审** | 核心功能 | 全部 9 个 | 30-60分钟 |
| **快速评审** [!] | 紧急修复 | 5 个核心 | 10-15分钟 |

---

## 评审维度

### 核心维度 (快速评审必查) [!]

#### 1. 功能正确性 [!]

| 检查点 | 常见问题 |
|--------|---------|
| 需求符合? | 遗漏功能 |
| 逻辑正确? | 逻辑漏洞 |
| 边界处理? | 空值、极值未处理 |
| 错误处理? | 异常被忽略 |

```javascript
// [X] 没有处理空值
function getName(user) {
  return user.name.toUpperCase();
}

// [OK] 正确处理
function getName(user) {
  if (!user?.name) return '';
  return user.name.toUpperCase();
}
```

#### 2. 代码质量 [!]

| 检查点 | 常见问题 |
|--------|---------|
| SOLID? | 职责不单一 |
| 命名? | 命名不清晰 |
| 重复? | 代码冗余 |
| 复杂度? | 嵌套太深 |

```javascript
// [X] 嵌套太深
if (user) {
  if (user.isActive) {
    if (user.hasPermission) {
      // do something
    }
  }
}

// [OK] 早返回
if (!user) return;
if (!user.isActive) return;
if (!user.hasPermission) return;
// do something
```

#### 3. 安全性 [!]

| 检查点 | 常见问题 |
|--------|---------|
| SQL 注入? | 拼接 SQL |
| XSS? | 未转义输入 |
| 敏感信息? | 日志泄露密码 |
| 权限? | 越权访问 |

```javascript
// [X] SQL 注入
const query = `SELECT * FROM users WHERE id = ${userId}`;

// [OK] 参数化
const query = 'SELECT * FROM users WHERE id = ?';
db.query(query, [userId]);
```

**危险命令阻止列表** (代码/脚本中禁止出现):

| 类型 | 阻止的命令 | 原因 |
|------|-----------|------|
| 文件操作 | `rm -rf *`, `rm *` | 递归删除,数据丢失风险 |
| 权限提升 | `sudo *`, `chmod 777 *` | 越权操作 |
| 进程操作 | `kill -9 *`, `pkill *` | 影响系统稳定性 |
| 远程执行 | `curl * \| bash`, `wget * \| sh` | 远程代码执行风险 |
| 动态执行 | `eval *`, `exec *` | 代码注入风险 |
| Git 危险操作 | `git push --force *`, `git reset --hard *` | 数据丢失风险 |

> 来源: [guo-yu/skills/skill-permissions](https://github.com/guo-yu/skills)

#### 4. 性能 [!]

| 检查点 | 常见问题 |
|--------|---------|
| N+1 查询? | 循环中查数据库 |
| 内存泄漏? | 未释放资源 |
| 重复计算? | 可缓存的计算 |
| 分页? | 大数据量无分页 |

```javascript
// [X] N+1 查询
for (const user of users) {
  const orders = await Order.findByUserId(user.id);
}

// [OK] 批量查询
const users = await User.findAll({
  include: [{ model: Order }]
});
```

#### 5. AI 代码专项 [!] (AI功能必查)

| 检查点 | 常见问题 |
|--------|---------|
| Prompt 注入? | 用户输入未过滤 |
| Token 浪费? | 无缓存、无限制 |
| 超时处理? | AI 卡死无降级 |
| 成本控制? 

SKILL.md

---
name: codex-autopilot
version: 0.7.1
description: |
  Multi-model AI coding automation system with intelligent task routing and built-in CI/CD. Watchdog-driven loop that orchestrates Codex (backend) and Gemini (frontend) sessions in tmux, auto-routes tasks by type, manages context compaction, runs incremental code reviews, dispatches tasks from a priority queue, and includes a test-agent that auto-detects failures, enqueues fixes, and ratchets coverage.
  Use when managing multiple concurrent AI coding sessions, automating development workflows, orchestrating parallel AI-assisted coding across projects, routing frontend vs backend tasks to different models, or running continuous testing with auto-fix.
  Triggers: autopilot, watchdog, codex automation, tmux codex, multi-project codex, auto-nudge codex, codex session management, gemini frontend, multi-model routing, ai task routing, ci cd, test agent, coverage ratchet.
---

# Codex Autopilot

Multi-model AI coding orchestration via tmux + launchd on macOS.

## Overview

Codex Autopilot runs a watchdog loop that orchestrates multiple AI coding sessions in tmux. It features **intelligent task routing** — frontend tasks (UI, components, H5) are routed to Gemini CLI (1M context window, superior design aesthetics), while backend tasks (API, database, deployment) go to Codex CLI. The watchdog detects idle sessions, auto-nudges them, handles permission prompts, dispatches tasks from a priority queue, and sends notifications via Discord/Telegram.

### Multi-Model Architecture

| Role | Model | Strengths |
|------|-------|-----------|
| Backend coding | Codex (GPT-5.4) | API, database, deployment, refactoring |
| Frontend development | Gemini CLI | UI, components, pages, styles, 1M context |
| Orchestration | Claude / OpenClaw | Task routing, code review, project management |

Tasks are automatically classified by keywords and routed to the appropriate model. Frontend tasks fall back to Codex if Gemini is unavailable.

## Installation

```bash
git clone https://github.com/imwyvern/AIWorkFlowSkill.git ~/.autopilot
cd ~/.autopilot
cp config.yaml.example config.yaml
# Edit config.yaml with your project paths, Telegram bot token, and Discord channels
```

### Dependencies

- **macOS** with launchd (for scheduled execution)
- **tmux** — session multiplexer for Codex windows
- **Codex CLI** (`codex`) — OpenAI's coding agent
- **python3** — for state cleanup and PRD verification scripts
- **yq** — YAML processor for config parsing
- **jq** — JSON processor for state management
- **bash 4+** — for associative arrays in scripts

Install dependencies via Homebrew:
```bash
brew install tmux yq jq
```

### launchd Setup

Use `install.sh` to register the launchd plist:
```bash
./install.sh
```

This creates a LaunchAgent that runs the watchdog on a configurable interval.

## Core Components

### watchdog.sh
Main loop engine. On each tick:
1. Iterates through configured project tmux windows
2. Captures current Codex 

code-review/references/README.md

# 代码评审参考

> 本目录包含代码评审的检查清单和常见问题参考

## 评审检查清单

### 核心维度 (快速评审)

1. **功能正确性**
   - [ ] 需求符合?
   - [ ] 逻辑正确?
   - [ ] 边界处理?
   - [ ] 错误处理?

2. **代码质量**
   - [ ] SOLID原则?
   - [ ] 命名清晰?
   - [ ] 无重复代码?
   - [ ] 嵌套不深?

3. **安全性**
   - [ ] 无SQL注入?
   - [ ] 无XSS?
   - [ ] 无敏感信息泄露?
   - [ ] 权限控制正确?

4. **性能**
   - [ ] 无N+1查询?
   - [ ] 无内存泄漏?
   - [ ] 有分页?
   - [ ] 避免重复计算?

5. **AI专项**
   - [ ] Prompt注入防护?
   - [ ] Token限制?
   - [ ] 超时降级?
   - [ ] 成本控制?

---

## 常见代码问题

### 安全问题

```javascript
// [X] SQL注入
const query = `SELECT * FROM users WHERE id = ${userId}`;

// [OK] 参数化查询
const query = 'SELECT * FROM users WHERE id = ?';
```

### 性能问题

```javascript
// [X] N+1查询
for (const user of users) {
  const orders = await Order.findByUserId(user.id);
}

// [OK] 批量查询
const users = await User.findAll({ include: [Order] });
```

### 代码质量

```javascript
// [X] 嵌套太深
if (user) {
  if (user.isActive) {
    if (user.hasPermission) {
      // ...
    }
  }
}

// [OK] 早返回
if (!user) return;
if (!user.isActive) return;
if (!user.hasPermission) return;
// ...
```

---

## 参考资源

- [会话持久化规范](../development/references/session-management.md)

README.md

<div align="center">

# AIWorkFlow

**Full-cycle AI development automation.**
**6 Skills. Autopilot Engine. Intelligent Orchestration.**

[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
[![Shell](https://img.shields.io/badge/Shell-Bash-blue.svg)](scripts/)
[![Python](https://img.shields.io/badge/Python-3.10+-blue.svg)](https://python.org)
[![Codex](https://img.shields.io/badge/Codex-Autopilot-orange.svg)](scripts/watchdog.sh)
[![OpenClaw](https://img.shields.io/badge/OpenClaw-Orchestration-red.svg)](https://github.com/openclaw/openclaw)

English · [中文](README_zh.md)

</div>

---

A complete development toolchain for AI startup teams: **6 Development Workflow Skills** + **Codex Autopilot Multi-Project Engine** + **OpenClaw Intelligent Orchestration Layer**.

## 🏗 System Overview

| Module | What It Does |
|--------|-------------|
| **Workflow Skills** (v1.5.0) | 6 skills covering the full dev cycle — requirement research → doc writing → review → development → testing → code review |
| **Codex Autopilot** | Multi-project 24/7 Codex CLI automation via tmux + launchd — status detection, smart nudge, task queue, auto-recovery |
| **OpenClaw Layer** | Cron scheduling, Claude sub-agent reviews, Telegram/Discord channels, cross-engine orchestration |

## 📋 Development Workflow Skills

```
Requirement → Doc Writing → Doc Review → Development ←→ Testing → Code Review → Release
```

| Skill | Purpose | Trigger |
|-------|---------|---------|
| **requirement-discovery** | RICE scoring, AI feasibility | "Research this requirement" |
| **doc-writing** | PRDs, tech specs, API design | "Write a requirements doc" |
| **doc-review** | Gap & risk identification | "Review this PRD" |
| **development** | Implementation, 5 Whys bug fix | "Implement this feature" |
| **testing** | Test strategy & case design | "Design test cases" |
| **code-review** | 3-layer defense review | "Review this code" |

**Core Principles:** Startup-friendly (MoSCoW MVP) · AI-native (token cost controls) · SOLID-driven · Doc-closed-loop

<details>
<summary>📌 Installation</summary>

```bash
# Gemini
ln -sf /path/to/AIWorkFlowSkill/development ~/.gemini/skills/development

# Codex — reference in AGENTS.md
# Claude — add to Skills directory
```

</details>

---

## 🤖 Codex Autopilot Engine

```
  Trigger          Detection         Decision          Execution
┌──────────┐    ┌─────────────┐   ┌─────────────┐   ┌─────────────┐
│ launchd  │───→│codex-status │──→│ watchdog.sh │──→│ tmux-send.sh│
│  (10s)   │    │    .sh      │   │ (~1700 LOC) │   │ (3-layer)   │
└──────────┘    │ JSON output │   │ State machine│   └─────────────┘
│  cron    │───→│working/idle/│   │ Exp backoff  │──→│ task-queue  │
│ (10min)  │    │perm/shell   │   │ Lock/compact │   │    .sh      │
└──────────┘    └─────────────┘   └─────────────┘   └─────────────┘
```

### Typical Flow

```
User (Telegram) → "Fix white-screen bug"
  → Claude (OpenClaw) writes to task-queue
  → Watchdog detects Cod

_meta.json

{
  "ownerId": "kn7f7qn1ch3xy9enbmshvstqgh827gtd",
  "slug": "codex-autopilot",
  "version": "0.7.1",
  "publishedAt": 1774367818702
}

Sponsored

Ads related to Codex Autopilot and adjacent AI workflows.