Agent skill
file-op
Execute FileOpsREQ protocol requests. Handles autoflow domain ops for .ccb/ state management.
Install this agent skill to your Project
npx add-skill https://github.com/bfly123/claude_code_bridge/tree/main/codex_skills/file-op
SKILL.md
FileOps Executor (Codex Side)
You receive FileOpsREQ JSON from Claude and must return FileOpsRES JSON only. No markdown, no prose.
Protocol Reference
See ~/.claude/skills/docs/protocol.md for full FileOpsREQ/FileOpsRES schema.
Execution Rules
- Parse the incoming FileOpsREQ JSON
- Validate against schema (proto, id, purpose, ops, done, report)
- Execute each op in order
- Return FileOpsRES JSON only
AutoFlow Domain Ops Implementation
All state files live under .ccb/ directory relative to repo root.
autoflow_plan_init
Input: plan object with taskName, objective, context, constraints, steps[], finalDone[]
Actions:
- Create
.ccb/directory if not exists - Build
state.jsonfrom plan:json{ "taskName": plan.taskName, "objective": plan.objective, "context": plan.context, "constraints": plan.constraints, "current": { "type": "step", "stepIndex": 1, "subIndex": null }, "steps": [ { "index": i+1, "title": title, "status": "todo" (first="doing"), "attempts": 0, "substeps": [] } ], "finalDone": plan.finalDone } - Write
.ccb/state.json - Generate
.ccb/todo.mdfrom state (see formats.md) - Generate
.ccb/plan_log.mdwith initial plan entry
autoflow_state_preflight
Input: path (default .ccb/state.json), maxAttempts (default 2)
Actions:
- Read
.ccb/state.json - If file missing → return fail status with "No plan. Use /tp first."
- Validate
currentpointer - If
current.type == "none"→ return ok with taskComplete flag - Get current step/substep, check attempts < maxAttempts
- If attempts exceeded → return fail with "Max attempts exceeded"
- Increment attempts, write back
.ccb/state.json - Return ok with
data.state(current pointer) anddata.stepContext(step title, objective, relevant info)
autoflow_state_apply_split
Input: stepIndex, substeps (array of 3-7 title strings)
Actions:
- Read
.ccb/state.json - Find step by stepIndex
- Set step.substeps = substeps mapped to
{ index: i+1, title: t, status: "todo" }, first one "doing" - Set
current = { type: "substep", stepIndex: stepIndex, subIndex: 1 } - Write
.ccb/state.json - Regenerate
.ccb/todo.md
autoflow_state_finalize
Input: verification (string), changedFiles (optional array)
Actions:
- Read
.ccb/state.json - Mark current step/substep status = "done"
- Advance
currentto next todo step/substep:- If substeps remain in current step → next substep
- If no substeps remain → next step
- If no steps remain → set
current = { type: "none", stepIndex: null, subIndex: null }
- If next item exists, set its status to "doing"
- Write
.ccb/state.json - Regenerate
.ccb/todo.md - Append completion entry to
.ccb/plan_log.md
autoflow_state_mark_blocked
Input: reason (string)
Actions:
- Read
.ccb/state.json - Mark current step/substep status = "blocked"
- Write
.ccb/state.json - Regenerate
.ccb/todo.md
autoflow_state_append_steps
Input: steps (array of 1-2 title strings), maxAllowed (default 2)
Precondition: current.type == "none" (task completed)
Actions:
- Read
.ccb/state.json - If steps.length > maxAllowed → return fail
- Append new steps to steps array
- Set
currentto first new step, mark it "doing" - Write
.ccb/state.json - Regenerate
.ccb/todo.md - Append to
.ccb/plan_log.md
Output Format
Always return pure JSON matching FileOpsRES schema. Never wrap in markdown code blocks.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
ask
Async via ask, end turn immediately; use when user explicitly delegates to any AI provider (gemini/codex/opencode/droid); NOT for questions about the providers themselves.
file-op
Delegate file I/O to Codex via FileOpsREQ protocol. Use when Claude needs Codex to modify files.
cping
Test connectivity with AI provider (gemini/codex/opencode/droid/claude).
continue
Attach the newest context-transfer Markdown from the current project's ./.ccb/history/ into Claude using @file. Use when the user types /continue or asks to resume with the latest transfer file in this project.
mounted
Report which CCB providers are mounted (session exists AND daemon is online). Outputs JSON.
review
Dual review with Claude and Codex for quality verification. Use for step or task review.
Didn't find tool you were looking for?