Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions .github/workflows/validate-skills.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,17 @@ jobs:
python - <<'PY'
import pathlib, subprocess, sys
validator = pathlib.Path.home() / '.agents' / 'skills' / 'skill-creator' / 'scripts' / 'quick_validate.py'
root = pathlib.Path('codex-cross-provider-session-repair')
if validator.exists():
subprocess.check_call([sys.executable, str(validator), str(root)])
else:
text = (root / 'SKILL.md').read_text(encoding='utf-8')
assert text.startswith('---\n') and '\nname: codex-cross-provider-session-repair\n' in text
roots = sorted(path.parent for path in pathlib.Path('.').glob('*/SKILL.md'))
assert roots, 'no skill directories found'
for root in roots:
if validator.exists():
subprocess.check_call([sys.executable, str(validator), str(root)])
else:
text = (root / 'SKILL.md').read_text(encoding='utf-8')
assert text.startswith('---\n') and '\nname:' in text and '\ndescription:' in text
PY
- name: Run offline tests
run: python -m unittest discover -s codex-cross-provider-session-repair/tests -v
run: |
for tests in */tests; do
python -m unittest discover -s "$tests" -v
done
37 changes: 37 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Skills 集合项目约定

## 仓库边界

- 本仓库保存可独立安装、测试和发布的 Agent Skill;每个 Skill 位于根目录下独立的 kebab-case 目录。
- Skill 入口必须命名为大写 `SKILL.md`,以 YAML frontmatter 开头,并包含与目录/用途一致的 `name` 和可触发的 `description`。
- 根 README 只做目录、安装和兼容性导航;完整工作流放对应 `SKILL.md`,大段背景、示例和实现细节按需放 `references/`、README 或脚本。
- 不为同一 Skill 在多个位置维护漂移副本。安装目录是发布结果,不是本仓库事实源。

## Skill 设计与实现

- 规则只保留模型无法可靠推断的流程、安全边界和完成标准;不要堆叠通用礼貌、重复全局约定或用提示词模拟 CI/权限。
- 新增或修改 Skill 时核对触发条件、输入、输出、失败模式、恢复方式和平台兼容性;危险操作必须默认收窄目标并在写入前备份。
- 优先让脚本承担确定性解析、校验和批量处理。脚本应可从 Skill 目录运行,避免硬编码个人路径,并提供 `--help` 或清晰入口。
- 测试保持离线、确定性和无真实副作用;不得包含真实会话、令牌、密钥、备份、用户名数据或完整诊断内容。
- 面向多个系统的 Skill 要明确共用部分和平台差异,不能声称在未测试的 agent、OS 或版本上已验证。

## 版本与发布

- `VERSION` 是规范版本;发布时同步 `SKILL.md` 元数据、README 徽章/目录、`CHANGELOG.md` 和 `vMAJOR.MINOR.PATCH` 标签。
- 用户可见行为、默认写入范围或安全语义变化需要更新文档与测试;破坏性变化按语义化版本处理。
- 公开发布前分别检查源码、安装包/归档、第三方许可证和最终 Release 附件;普通提交检查不能替代 Release 验收。
- 不把本地已安装副本、测试通过或标签存在单独当成发布完成证据。

## 修改与验证

- 先完整读取目标 Skill 的 `SKILL.md` 及其直接引用,再修改;不要只根据目录名推断行为。
- 元数据检查以 `.github/workflows/validate-skills.yml` 为准,至少验证 frontmatter、`name`、`description` 和大写入口名。
- 运行单个 Skill 测试:`python -m unittest discover -s <skill>/tests -v`;涉及公共校验逻辑时运行所有现有 `*/tests`。
- 脚本、备份、跨平台或修复逻辑变化还要运行对应 `--help`、dry-run/预览和失败路径测试;真实写入结果必须单独验证。
- 修改根目录索引或安装说明时同步 `README.md` 与 `README.zh-CN.md`,并检查链接和版本是否指向现存文件。

## 当前入口

- 集合说明:`README.md`、`README.zh-CN.md`
- CI 校验:`.github/workflows/validate-skills.yml`
- 各 Skill 的行为、测试和发布细节:对应目录中的 `SKILL.md` 与 README
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@AGENTS.md
27 changes: 24 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@ Focused, versioned, open-source skills for agent workflows.

## What this repository is

This repository is a collection of self-contained skills for AI agents and developer workflows. Each skill lives in its own kebab-case directory and includes its instructions, scripts, tests, documentation, license, and version metadata. Individual skills may target one agent or work across several agents; their compatibility is documented in each skill's README and `SKILL.md`.
This repository is a collection of self-contained skills for AI agents and developer workflows. Each skill lives in its own kebab-case directory and includes a `SKILL.md`; scripts, tests, references, documentation, licenses, and version metadata are added when the skill needs them. Individual skills may target one agent or work across several agents; their compatibility is documented in each skill's `SKILL.md` and any linked references.

The first skill in the collection is Codex-specific: it helps recover an old Codex Desktop conversation after a provider switch, import, or fork.
The collection currently includes a Codex-specific session repair skill, public repository/release gates, and a framework-agnostic test-scope routing skill.

| Skill | Purpose | Version | Documentation |
| --- | --- | --- | --- |
| [`codex-cross-provider-session-repair`](codex-cross-provider-session-repair/) | Diagnose and repair provider mismatches and remote compaction `404 Item with id 'rs_...' not found` errors without deleting the Codex home. | `0.4.0` | [English](codex-cross-provider-session-repair/README.md) · [简体中文](codex-cross-provider-session-repair/README.zh-CN.md) |
| [`codex-cross-provider-session-repair`](codex-cross-provider-session-repair/) | Diagnose and repair provider mismatches and remote compaction `404 Item with id 'rs_...' not found` errors without deleting the Codex home. | `0.7.5` | [English](codex-cross-provider-session-repair/README.md) · [简体中文](codex-cross-provider-session-repair/README.zh-CN.md) |
| [`public-release-gate`](public-release-gate/) | Review public repository releases, final artifacts, third-party notices, deployment headers, and GitHub Release attachments. | `0.1.0` | [SKILL.md](public-release-gate/SKILL.md) |
| [`public-repo-git-gate`](public-repo-git-gate/) | Check public repository content and branch/remote/PR state across commit, push, and pull request workflows. | `0.1.0` | [SKILL.md](public-repo-git-gate/SKILL.md) |
| [`test-scope-routing`](test-scope-routing/) | Route validation by change risk and affected boundaries instead of defaulting to the full test suite. | `0.1.0` | [SKILL.md](test-scope-routing/SKILL.md) |

## Install

Expand Down Expand Up @@ -101,8 +104,26 @@ The skill preserves visible messages and tool history. It does not delete the wh
│ ├── evals/
│ ├── VERSION
│ ├── CHANGELOG.md
│ ├── CONTRIBUTING.md
│ ├── SECURITY.md
│ └── LICENSE
├── public-release-gate/
│ ├── SKILL.md
│ ├── agents/
│ └── VERSION
├── public-repo-git-gate/
│ ├── SKILL.md
│ ├── agents/
│ ├── assets/
│ ├── references/
│ ├── scripts/
│ ├── tests/
│ └── VERSION
├── test-scope-routing/
│ ├── SKILL.md
│ ├── agents/
│ ├── references/
│ └── VERSION
├── LICENSE
└── README.md
~~~
Expand Down
27 changes: 24 additions & 3 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@

## 这是一个什么仓库

这是一个面向 AI agent 和开发者工作流的自包含 Skill 集合。每个 Skill 都位于独立的 kebab-case 目录中,并包含自己的指令、脚本、测试、文档、许可证和版本元数据。不同 Skill 可以只支持某一个 agent,也可以跨多个 agent 使用;具体兼容性请以各 Skill 的 README 和 `SKILL.md` 为准
这是一个面向 AI agent 和开发者工作流的自包含 Skill 集合。每个 Skill 都位于独立的 kebab-case 目录中,并包含自己的 `SKILL.md`;脚本、测试、references、文档、许可证和版本元数据按需要加入。不同 Skill 可以只支持某一个 agent,也可以跨多个 agent 使用;具体兼容性请以各 Skill 的 `SKILL.md` 和直接引用的资源为准

当前集合中的第一个 Skill 专门用于 Codex:它可以修复切换模型供应商、导入或分叉旧会话后无法继续的 Codex Desktop 对话
当前集合包含一个 Codex 会话修复 Skill、公开仓库/Release 闸门,以及一个跨框架的测试范围路由 Skill

| Skill | 用途 | 版本 | 文档 |
| --- | --- | --- | --- |
| [`codex-cross-provider-session-repair`](codex-cross-provider-session-repair/) | 在不删除 Codex 目录的前提下,诊断并修复供应商不一致,以及远程上下文压缩出现 `404 Item with id 'rs_...' not found` 的问题。 | `0.4.0` | [English](codex-cross-provider-session-repair/README.md) · [简体中文](codex-cross-provider-session-repair/README.zh-CN.md) |
| [`codex-cross-provider-session-repair`](codex-cross-provider-session-repair/) | 在不删除 Codex 目录的前提下,诊断并修复供应商不一致,以及远程上下文压缩出现 `404 Item with id 'rs_...' not found` 的问题。 | `0.7.5` | [English](codex-cross-provider-session-repair/README.md) · [简体中文](codex-cross-provider-session-repair/README.zh-CN.md) |
| [`public-release-gate`](public-release-gate/) | 审核公开仓库的 Release、最终产物、第三方许可证、部署响应头和 GitHub Release 附件。 | `0.1.0` | [SKILL.md](public-release-gate/SKILL.md) |
| [`public-repo-git-gate`](public-repo-git-gate/) | 覆盖 commit、push 和 Pull Request 的公开内容、分支、远程仓库和 PR 状态检查。 | `0.1.0` | [SKILL.md](public-repo-git-gate/SKILL.md) |
| [`test-scope-routing`](test-scope-routing/) | 根据改动风险和受影响边界选择验证范围,避免默认运行全量测试。 | `0.1.0` | [SKILL.md](test-scope-routing/SKILL.md) |

## 安装

Expand Down Expand Up @@ -101,8 +104,26 @@ cd skills/codex-cross-provider-session-repair
│ ├── evals/
│ ├── VERSION
│ ├── CHANGELOG.md
│ ├── CONTRIBUTING.md
│ ├── SECURITY.md
│ └── LICENSE
├── public-release-gate/
│ ├── SKILL.md
│ ├── agents/
│ └── VERSION
├── public-repo-git-gate/
│ ├── SKILL.md
│ ├── agents/
│ ├── assets/
│ ├── references/
│ ├── scripts/
│ ├── tests/
│ └── VERSION
├── test-scope-routing/
│ ├── SKILL.md
│ ├── agents/
│ ├── references/
│ └── VERSION
├── LICENSE
├── README.md
└── README.zh-CN.md
Expand Down
92 changes: 92 additions & 0 deletions codex-cross-provider-session-repair/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,98 @@

All notable changes to this skill are documented here.

## [0.7.5] - 2026-08-15

### Fixed

- Close the dedicated Terminal repair window after the final Enter prompt. The
previous implementation sent `close` to a Terminal tab object, which macOS
Terminal rejects with error `-1708`; the new path matches the window title
and closes it only when it contains one tab.

## [0.7.4] - 2026-08-15

### Fixed

- Give each macOS repair tab a session-specific custom title and close only
that tab after the final Enter prompt, instead of relying on the Terminal
profile's completed-window behavior.
- Use Terminal's raw `do script` event for launcher compatibility and keep a
shell-exit fallback when Terminal automation is unavailable.

## [0.7.3] - 2026-08-15

### Fixed

- Make the macOS Terminal launcher exit its outer shell after the final Enter
prompt, so the Terminal tab/window actually closes instead of leaving an
idle shell open.

## [0.7.2] - 2026-08-14

### Changed

- Reworked the macOS Terminal launcher to use a readable 120×36 Terminal
tab/window and run
the worker through a short temporary runner, so long shell arguments no
longer wrap into an unreadable block.
- Added a separated bilingual header and final result panel around the worker
output.

## [0.7.1] - 2026-08-14

### Added

- Added a bilingual wait-limit announcement and reminders at approximately 60,
180, and 240 seconds during the default 300-second Codex shutdown wait.
- Added `wait_timeout_seconds`, `wait_phase`, `conversation_notice`, and
`wait_timed_out` status fields so the current conversation and Terminal can
explain the same state.
- Added an explicit timeout message that says no files were changed and Codex
must remain closed before retrying.

## [0.7.0] - 2026-08-13

### Added

- Added `scripts/start_repair.py` as the recommended consent-to-repair entry
point. It opens a visible Terminal on macOS, keeps the final result visible,
and safely handles Codex being closed before or after the worker starts.
- Added bilingual terminal and JSON status fields, including
`Verified / 已验证`, `can_reopen`, and `next_action`.
- Added explicit support for starting the approved repair job after Codex is
already stopped, while retaining a stable process-free safety window.

## [0.6.0] - 2026-08-12

### Added

- Added target-scoped repair for sessions pinned to an unsupported saved model,
including structured rollout settings and the root `threads.model` snapshot.
- Added `--remove-reasoning none` to the process-aware wrapper and independent
verification that model repairs agree in both JSONL and SQLite.
- Added detection for the bundled `codex` app-server and Codex Framework service
processes, which can keep the rollout and SQLite WAL open after the main window exits.

## [0.5.0] - 2026-08-10

### Added

- Added `scripts/wait_and_repair.py`, a process-aware wrapper that waits for a
stable Codex Desktop shutdown, detects rollout races, applies the existing
target-scoped repair, and independently verifies the result.
- Added atomic JSON status reporting with `diagnosed`, `waiting`, `stopped`,
`applying`, `verified`, and `failed` states.
- Added offline tests for process restart races, rollout changes, status files,
and end-to-end apply/verify behavior.

### Changed

- Made the documented order explicit: quit Codex before writing, and reopen it
only after verification.
- Labeled log-derived stale IDs as historical so they are not confused with
local reasoning items that would still be submitted.

## [0.3.0] - 2026-08-03

### Added
Expand Down
Loading
Loading