# Cc Main Implement

> Use when a coding task is medium or high-risk and Claude Code should do the main implementation work. Pass -Tier to select model preference: medium uses Sonnet 4.6 first, high-risk uses Opus 4.6 first. Codex reviews, verifies, and applies only short follow-up patches.

- Skill: `xukai-ye/cc-main-implement` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add xukai-ye/cc-main-implement`
- Raw SKILL.md: https://api.skillmd.com/api/skills/xukai-ye/cc-main-implement/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: Xukai-YE (https://skillmd.com/u/xukai-ye)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/xukai-ye/cc-main-implement

---


# CC Main Implement

This skill makes Claude Code the primary implementation worker for medium and high-risk tasks.

Codex remains the orchestrator and final reviewer.

## When to Use

Use this skill when:

- the task is classified as **medium** or **high-risk** by the 3-tier classifier
- multiple files are likely involved
- a meaningful implementation flow already exists
- the user wants Claude Code to do the majority of coding

Do not use it for tiny tasks.

## Tier-Aware Model Preference

| Tier | Model Order |
|------|-------------|
| **medium** | `claude-sonnet-4-6` -> `claude-opus-4-6` -> `sonnet` -> `opus` |
| **high-risk** | `claude-opus-4-6` -> `claude-sonnet-4-6` -> `opus` -> `sonnet` |

Pass `-Tier medium` or `-Tier high-risk` to the invocation script. Default is `high-risk` if omitted.

## Responsibility Split

Claude Code:

- performs the main implementation
- edits the majority of files
- runs focused checks when appropriate
- performs a brief self-review before returning
- returns output in the required structured format

Codex:

- classifies the task tier
- supplies the plan and scope
- reviews Claude Code output and diffs
- fixes issues Claude Code missed
- keeps follow-up edits short and targeted when possible
- runs final verification
- explains final results to the user

## Workflow

1. If the task is tiny, skip this skill.
2. If the task is high-risk, do plan review first with `cc-opus-review-loop -Tier high-risk`.
3. Then invoke the bundled script:

```powershell
powershell -NoProfile -ExecutionPolicy Bypass -File "scripts/invoke-cc-main-implement.ps1" `
  -UserRequest "$ARGUMENTS" `
  -WorkingDirectory "$PWD" `
  -Tier "medium"
```

4. If specific files or plan files are already known, pass them:

```powershell
powershell -NoProfile -ExecutionPolicy Bypass -File "scripts/invoke-cc-main-implement.ps1" `
  -UserRequest "$ARGUMENTS" `
  -WorkingDirectory "$PWD" `
  -Tier "high-risk" `
  -ContextPaths "task_plan.md","src/app.ts","src/auth.ts"
```

5. After Claude Code finishes, Codex must:
- inspect the changed files and diff
- run focused verification
- optionally run `cc-opus-review-loop` at a checkpoint
- make only necessary follow-up patches

## Failure Handling

If Claude Code is unavailable, not authenticated, or fails:

- note it briefly
- if Claude fails **twice consecutively** during the same task, note "degraded mode" and continue locally in Codex for the rest of that task; do not retry Claude Code again for that task
- do not block the task solely because Claude Code could not run

## Required Claude Output Format

Claude Code must return exactly these sections:

1. **Decision** - what was implemented and why this approach
2. **Changed Files** - list of modified or created files
3. **Patch Summary** - concise description of each change
4. **Why This Way** - rationale for key design choices
5. **Tests** - tests added, modified, or suggested
6. **Known Risks** - remaining risks or limitations
7. **Rollback Point** - how to revert if needed

Treat that output as an implementation report. The real source of truth is still the repo diff and test results.

