---
name: scorpio-edit
description: A write-capable assistant that guides small, focused code changes end-to-end. Use when you need to make a targeted edit — add a function, fix a typo, update a config, refactor a block — without running a full task pipeline.
---

# Make an Edit

A lightweight skill for making focused code changes. Unlike the full scorpio-execute pipeline, this skill is designed for quick, ad-hoc edits that don't need formal task files or QA gates.

> **Model role — implement.** This skill runs the pipeline's **implement** phase, so it targets the configured `{models.implement}` (model + optional `effort`) when `scorpio.config.json` sets it — falling back to `{models.default}` → the harness's main-session model. Per-role model selection is a **declaration honored to the granularity the harness supports** (the `modelSelection` capability): on Claude Code it's advisory (the Agent tool can't pick a model per dispatch from config) — state the intended model and apply it via agent frontmatter `model:` or `CLAUDE_CODE_SUBAGENT_MODEL`; the Claude Agent SDK honors it per agent-definition. See [docs/CONFIG.md](../../docs/CONFIG.md#per-role-models).

## When to Use

- Small code changes (add/modify/delete a function, fix a bug, update config)
- Refactoring a specific block or module
- Applying a known fix from a QA report or code review
- Any edit where you know what needs to change but want guided execution

## Prerequisites

- A clear description of what to change (from the user, router, or upstream skill)
- The target project directory must be accessible

## Workflow

### Phase 1: Understand

1. Read the user's edit request
2. If `{docs.planning}/` exists, scan it for relevant context (PRD, MVP scope, etc.)
3. Identify the target file(s) and the specific change needed
4. If the request is ambiguous, ask one clarifying question — then proceed

### Phase 2: Locate

1. Find the file(s) to edit using search tools (Glob, Grep)
2. Read the relevant sections — not the entire file if it's large (use line offsets for 500+ line files)
3. Understand the surrounding code context (imports, types, callers)

### Phase 3: Edit

1. Make the change using the Edit tool (prefer Edit over Write for existing files)
2. Keep changes minimal — only modify what's necessary
3. Follow existing code style and conventions (indentation, naming, patterns)
4. Do not add unrelated improvements, comments, or refactors

### Phase 4: Verify

1. Run the relevant quality gate(s) for the project:
   - TypeScript: `npx tsc --noEmit` + `npm test`
   - Bash: `shellcheck` + `./scripts/test.sh`
   - General: whatever test/lint command the project uses
2. If tests fail, fix the issue and re-run
3. Report the result to the user or parent session

## Scope Rules

- **One logical change per invocation.** If the user asks for multiple unrelated edits, do them sequentially.
- **No broad exploration.** Read only files relevant to the edit.
- **No task file creation.** This skill is for direct execution, not planning.
- **Respect existing patterns.** Match the codebase's style, not your preferences.

## Output

Return a brief summary:
- What was changed
- Files modified (full paths)
- Quality gates: pass/fail

## Integration

- Routable from the Layer 2 AI router via chat commands
- Can load project planning context from `{docs.planning}/` when present
- Pairs with `scorpio-explore` for read-then-write workflows
