c2c-router
Skill2 starsChanged 2 months agoMITView on GitHub
Run the C2C router before you start a request that will change code in the current workspace (implement, fix, refactor, debug, add or change a feature), whenever a test/build/typecheck/lint command fails during that task, and before you report that task done. Not for explicit "使用 Codex with ChatGPT …" requests (the codex-with-chatgpt skill handles those), and not for questions, explanations, or just running a command.
In this repositoryOne other file it gives its agents.
- codex-with-chatgptSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
If intake fails, times out, prints invalid JSON, or returns "enabled": false or "ok": false: work normally without the hooks below, and …
- Very specific: line 24
Never request elevated permissions for c2c route.
- Very specific: line 27
If say is a string, tell the user exactly that one line (at most one routing line per turn).
- Very specific: line 42
Add --thread-chat open only if you already saved a ChatGPT chat URL earlier in THIS thread.
- Distinctive: line 81
If the user pastes an API key into chat: do not repeat it, do not use it, and tell them to run setup in their terminal and rotate that key.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
C2C router
Decides whether you work alone or bring in ChatGPT (web).
- CLI:
node "<ACTUAL_CHECKOUT_PATH>/bin/c2c.js" route …(installer replaces this path; below,<checkout>means that path andc2cmeansnode "<checkout>/bin/c2c.js"). Always pass--json, and-w <workspace root>to every command exceptprefs(machine-wide). - If intake fails, times out, prints invalid JSON, or returns
"enabled": falseor"ok": false: work normally without the hooks below, and never mention ChatGPT or routing to the user. A later call that fails that way: ignore it and continue. - Never request elevated permissions for
c2c route. Never runc2c route setup(the user runs it in their own terminal). Never ask for or read the TypeSafe key. Never show route JSON to the user. - If
sayis a string, tell the user exactly that one line (at most one routing line per turn). Then donext.nextis authoritative. - Once
nextsends you to the codex-with-chatgpt skill, follow that skill for the rest of the task.
1. Intake — once per new coding request, before editing
Skip for messages that continue a task you are already doing in this thread.
c2c route intake -w <ws> --request "<the whole user message, verbatim>" --jsonPass the whole message, not a prefix: the router looks for 保密 / 别找 ChatGPT
anywhere in it and sends at most 1500 chars, after redaction. Quote it safely
for the shell; if it is long or contains quotes, $ or backticks, write it to a
temp file and pass --request-file <tmp> instead.
Add --thread-chat open only if you already saved a ChatGPT chat URL earlier in
THIS thread. Keep the returned taskId for every later call.
| route | do |
| codex_solo | Do it yourself. Use the hooks in §2. |
| codex_then_review | Do it yourself; do not commit or stage. Then §2 review-gate. |
| chatgpt_plan | Read the codex-with-chatgpt skill and follow next. |
| ask_user | Ask (the say line, or your own one question for goal_unclear), wait, then follow next. |
| active_task | Ask the say question; follow next (it covers resuming the open task). |
2. Hooks for work you do yourself
- A test/build/typecheck/lint command failed: save its full output to a temp
file, then
c2c route failure -w <ws> --task <taskId> --command "<cmd>" --output-file <tmp> --exit-code <n> --json.keep_fixing→ fix and continue; anything else → follownext. - About to tell the user it is done:
c2c route review-gate -w <ws> --task <taskId> --tests passed|failed|not_run [--tests-summary "27 passed"] --json.close_local→ summarize;fix_first→ fix, then run it again; anything else (send_review,ask_user,continue_loop,active_task) → follownext.
3. User phrases (any time)
<id> is the current taskId. If there is no task yet, a "让 ChatGPT 来规划" or
"别找 ChatGPT" request goes through intake instead (it recognizes both).
| user says | run |
| 这次/这个任务 让 ChatGPT 来规划 | c2c route pin -w <ws> --task <id> --route chatgpt --json, follow next |
| 别找 ChatGPT / 不用 ChatGPT,你自己做 | c2c route pin -w <ws> --task <id> --route codex --json |
| 让 ChatGPT 看看 / 复核一下 | c2c route review-gate -w <ws> --task <id> --tests <status> --user-asked-review --json, follow next |
| 以后优先省 Codex 额度 / 优先快一点 | c2c route prefs set --bias economy --json / --bias speed |
| 关闭 / 开启自动切换 | c2c route prefs set --mode off --json / --mode auto (if it fails, follow next) |
| 这个项目别自动找 ChatGPT | c2c route disable -w <ws> --json |
| 刚才不该找 ChatGPT / 刚才应该找 ChatGPT | c2c route feedback -w <ws> --last --verdict wrong --json |
| 开启智能切换 / 设置 TypeSafe | Tell the user (with the real path): 「请在你自己的终端里运行:node "<checkout>/bin/c2c.js" route setup(Key 只在终端里输入,不经过聊天)」 |
If the user pastes an API key into chat: do not repeat it, do not use it, and tell them to run setup in their terminal and rotate that key.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

