# Subtask Code Execution

Implements a subtask from its JSON file against the acceptance criteria.

- Repository: https://github.com/darrenhinde/OpenAgentsControl (4967 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-10-26
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add darrenhinde/OpenAgentsControl --skill code-execution -g -a claude-code -y`
Codex: `npx skills add darrenhinde/OpenAgentsControl --skill code-execution -g -a codex -y`
Cursor: `npx skills add darrenhinde/OpenAgentsControl --skill code-execution -g -a cursor -y`
Gemini CLI: `npx skills add darrenhinde/OpenAgentsControl --skill code-execution -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add darrenhinde/OpenAgentsControl`

## Description

Use when a subtask is ready to implement and has a subtask JSON file with acceptance criteria and deliverables.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Code Execution

## Overview
Execute coding subtasks with self-review and quality validation. Runs in isolated coder-agent context with pre-loaded standards.

**Announce at start:** "I'm using the code-execution skill to implement [subtask title]."

## The Process

### Step 1: Read Subtask JSON

Load the subtask file specified in $ARGUMENTS:

```bash
Read: .tmp/tasks/{feature}/subtask_{seq}.json
```

Extract:
- `title`, What to implement
- `acceptance_criteria`, What defines success
- `deliverables`, Files/endpoints to create
- `context_files`, Standards to apply
- `reference_files`, Existing code to study

### Step 2: Load Context Files

Read each file in `context_files`:

```bash
Read: .opencode/context/core/standards/code-quality.md
Read: .opencode/context/core/standards/security-patterns.md
```

Understand:
- Project coding standards
- Naming conventions
- Security patterns
- Code quality requirements

### Step 3: Load Reference Files

Read each file in `reference_files`:

```bash
Read: src/middleware/auth.middleware.ts
```

Study:
- Existing patterns
- Code structure
- Conventions in use

### Step 4: Update Status to In Progress

Edit subtask JSON:

```json
"status": "in_progress",
"agent_id": "coder-agent",
"started_at": "2026-02-16T00:00:00Z"
```

### Step 5: Implement Deliverables

For each deliverable:
- Create or modify the specified file
- Follow acceptance criteria EXACTLY
- Apply standards from context_files
- Use patterns from reference_files
- Write clean, modular, functional code

### Step 6: Run Self-Review (MANDATORY)

**Type & Import Validation:**
- ✅ Function signatures match usage
- ✅ All imports/exports exist
- ✅ No missing type annotations
- ✅ No circular dependencies

**Anti-Pattern Scan:**
```bash
grep "console.log" deliverables  # NO debug statements
grep "TODO\|FIXME" deliverables  # NO unfinished work
grep "api[_-]key\|secret" deliverables  # NO hardcoded secrets
```

The rest: https://github.com/darrenhinde/OpenAgentsControl/blob/HEAD/plugins/claude-code/skills/code-execution/SKILL.md
