Claude
Skills
Sign in
Back

dev

Included with Lifetime
$97 forever

MUST BE LOADED for any coding task: implementing features, fixing bugs, writing code, refactoring, or making changes. This skill provides the mandatory step-by-step SDLC (Software Development Lifecycle) workflow for orchestrating development using specialized skills and sub-agents. Load this skill when the user asks to 'add', 'create', 'build', 'fix', 'update', 'change', 'implement', or 'refactor' anything.

Productivityscripts

What this skill does


# Dev — SDLC Workflow Skill

This skill defines the **mandatory** workflow for all coding tasks. Follow these steps IN ORDER. Skipping steps is FORBIDDEN.

## CRITICAL RULES

**YOU MUST USE THE AGENT TOOL TO LAUNCH SUB-AGENTS FOR ALL WORK. Each sub-agent loads the appropriate skill via the Skill tool.**

### How to Launch Sub-Agents with Skills

Skills are NOT agent types. Launch a general-purpose sub-agent and instruct it to load the skill:

```
Agent tool:
  prompt: "Load the [skill-name] skill (Skill tool: skill='[skill-name]'), then:
           [task details]"
  description: "[3-5 word summary]"
```

**Do NOT use `subagent_type` for skills.** The `subagent_type` parameter is reserved for built-in agent types (Explore, Plan, etc.). Skills are loaded inside the sub-agent via the Skill tool.

### Coder Task Reporting (Sub-Agent Restriction)

**Sub-agents MUST NEVER send "idle" or "complete" states via `mcp__coder__coder_report_task`.** Only the main agent session (root conversation) is allowed to report "idle" or "complete". Sub-agents spawned via the Agent tool may only report `"state": "working"`. This prevents sub-agents from overwriting the coordinator's dashboard status and falsely signaling task completion.

- ❌ NEVER write code yourself
- ❌ NEVER create files yourself
- ❌ NEVER make commits yourself
- ❌ NEVER skip steps
- ❌ NEVER skip tests (`test.skip`, `it.skip`, `describe.skip` are FORBIDDEN)
- ❌ NEVER use `subagent_type` for skills — use `Skill tool` inside the sub-agent
- ✅ ALWAYS launch sub-agents via the Agent tool
- ✅ ALWAYS instruct sub-agents to load skills via the Skill tool
- ✅ ALWAYS verify each step before proceeding
- ✅ ALWAYS fix, replace, refactor, or remove tests - never skip them

**FAILURE TO USE SUB-AGENTS = WORKFLOW FAILURE**

### Test Policy

**⛔ NEVER skip tests.** If a test cannot pass:
- **Fix it** - Update assertions to match correct behavior
- **Replace it** - Write a new test that properly validates the behavior
- **Refactor it** - Restructure to test what's actually testable
- **Remove it** - Delete entirely if it tests something that no longer exists

If tests require infrastructure (auth, database, external services), SET UP that infrastructure. Do not skip tests because setup is hard.

---

## MANDATORY STEPS (Execute in Order)

### STEP 0: GitHub Authentication

**Execute FIRST before anything else.**

```bash
gh auth status
```

If fails: STOP. Tell user to run `gh auth login`. Do NOT proceed.

---

### STEP 1: Workspace Preparation

**Create clean feature branch BEFORE any implementation.**

#### 1.1 Check for uncommitted changes

```bash
git status
```

If uncommitted changes exist:
- Ask user: "Uncommitted changes found. Stash them or abort?"
- If stash: `git stash push -m "SDLC auto-stash"`
- If abort: STOP

#### 1.2 Sync and create branch

```bash
git fetch origin
git checkout main
git pull origin main
git checkout -b <type>/<short-description>
```

Branch types: `feat`, `fix`, `refactor`, `docs`, `test`, `chore`

**⛔ DO NOT PROCEED until branch is created**

---

### STEP 2: Requirements Analysis

**MANDATORY: Launch a sub-agent that loads the requirements-analyzer skill.**

```
Agent tool:
  prompt: "Load the requirements-analyzer skill (Skill tool: skill='fx-dev:requirements-analyzer'), then:

           Analyze requirements for: [TASK DESCRIPTION]

           - Analyze task/issue/error to understand requirements
           - Use WebSearch to research technologies
           - Use WebFetch for referenced URLs
           - Use AskUserQuestion for ambiguities
           - Analyze codebase for patterns

           Output: Complete requirements with acceptance criteria"
  description: "Analyze requirements"
```

For GitHub issues, fetch first:
```bash
gh issue view [NUMBER] --json title,body,labels,comments
```

**⛔ DO NOT PROCEED until requirements are complete**

---

### STEP 3: Planning

**MANDATORY: Launch a sub-agent that loads the planner skill.**

```
Agent tool:
  prompt: "Load the planner skill (Skill tool: skill='fx-dev:planner'), then:

           Create implementation plan for:

           [REQUIREMENTS FROM STEP 2]

           - Break into atomic steps
           - Identify files to modify
           - Determine test requirements
           - Flag if multiple PRs needed

           Output: Numbered implementation steps"
  description: "Plan implementation"
```

For GitHub issues, also update issue:
```
Agent tool:
  prompt: "Load the issue-updater skill (Skill tool: skill='fx-dev:issue-updater'), then:

           Update issue #[NUMBER] with plan. Add label: in-progress"
  description: "Update issue"
```

**⛔ DO NOT PROCEED until plan exists**

---

### STEP 4: Implementation

**MANDATORY: Launch a sub-agent that loads the coder skill.**

```
Agent tool:
  prompt: "Load the coder skill (Skill tool: skill='fx-dev:coder'), then:

           Implement this plan:

           [PLAN FROM STEP 3]

           Requirements:
           - Atomic commits (format: type(scope): message)
           - Follow existing patterns
           - Run tests
           - Do NOT create PR"
  description: "Implement changes"
```

Verify commits exist:
```bash
git log --oneline -5
git diff main --stat
```

**⛔ DO NOT PROCEED until commits exist on feature branch**

---

### STEP 4.5: Pre-PR Self-Review (simplify → review → CodeRabbit → Codex)

**MANDATORY: Self-review the changes locally BEFORE creating the PR. The PR is opened only once all four passes are clean against the final diff at the same time.** Run them in order, fixing and committing findings after each; because a later pass's fixes invalidate earlier passes, loop the whole sequence until a full pass yields no new commits (see "Re-run after fixes" below).

**1. `/simplify`** — reuse, quality, efficiency cleanup:

```
Skill tool: skill="simplify"
```

Reviews all changed code for **reuse** (duplicated logic), **quality** (copy-paste, leaky abstractions, nesting), and **efficiency** (redundant computation, missed concurrency).

**2. `/code-review`** — correctness bugs in the diff:

```
Skill tool: skill="code-review"
```

**3. CodeRabbit (local, via `cr`)** — run CodeRabbit's AI review on the local changes BEFORE the PR exists, so its feedback is resolved up front instead of churning the PR:

```
Skill tool: skill="fx-dev:coderabbit-review"
```

The skill runs `cr review --agent` against the working tree (Mode 1), resolves every actionable finding, and re-runs until clean. If `cr` is **unavailable**, fall back to the PR-level CodeRabbit gate in Step 6.3. If `cr` reports it is **not authenticated**, STOP and report to the user — NEVER run `cr auth login` (it is interactive; the workspace should already be authed).

**4. Codex (local, via `codex`)** — run OpenAI Codex's AI review one-shot on the branch BEFORE the PR exists. Codex and CodeRabbit are independent reviewers; each catches issues the other misses:

```
Skill tool: skill="fx-dev:codex-review"
```

The skill runs `codex review --base main` (read-only, one-shot, branch vs `main`), prints findings to stdout, and you resolve every actionable one before opening the PR. If the `codex` CLI is **unavailable or not authenticated**, report to the user once and proceed without this pass — NEVER run `codex login` (it is interactive; the workspace should already be authed).

Fix any issues found in each pass and commit the fixes. **Whenever a later pass commits a change, the earlier passes' clean results no longer cover the final diff — re-run the whole sequence (simplify → review → CodeRabbit → Codex) from the top.** Only proceed to PR creation once a complete pass through all four reviewers produces **no new commits** (every available reviewer is clean against the final diff at once).

**⛔ DO NOT PROCEED to Step 5 until simplify and review have run and all findings are addressed, AND each local AI reviewer has been resolved or correctly degraded:**

- **CodeRabbit** clean, OR — if `cr` is **not installed** — 
Files: 3
Size: 42.6 KB
Complexity: 54/100
Category: Productivity

Related in Productivity