Lightweight task mode for bug fixes, config changes, and small features. Supports --no-review and --discuss flags.
Scanned 5/27/2026
Install via CLI
openskills install OrodruinLabs/nazgul---
name: nazgul:patch
description: "Lightweight task mode for bug fixes, config changes, and small features. Supports --no-review and --discuss flags."
context: fork
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, Agent
metadata:
author: Jose Mejia
version: 1.2.2
---
# Nazgul Patch
## Examples
- `/nazgul:patch "fix CORS headers on API"` — Quick patch with single reviewer
- `/nazgul:patch --no-review "update README badges"` — Skip review, just implement
- `/nazgul:patch --discuss "add rate limiting"` — Discuss gray areas first, then patch
- `/nazgul:patch` — Interactive mode, prompts for description
## Arguments
$ARGUMENTS
## Current State
- Config: !`cat nazgul/config.json 2>/dev/null | head -3 || echo "NOT_INITIALIZED"`
- Existing patches: !`ls nazgul/tasks/patches/PATCH-*.md 2>/dev/null | wc -l || echo "0"`
- Active reviewers: !`jq -r '.agents.reviewers // [] | join(", ")' nazgul/config.json 2>/dev/null || echo "none"`
## Instructions
### Pre-flight
1. Check if `nazgul/config.json` exists. If not: "Nazgul not initialized. Run `/nazgul:init` first." and STOP.
2. Parse `$ARGUMENTS` for flags:
- `--no-review` → skip review step
- `--discuss` → run gray area discussion before planning
- Remaining text → patch description
3. If no description after parsing, ask interactively: "What do you want to patch?"
### Display Banner
Output per references/ui-brand.md:
```
─── ◈ NAZGUL ▸ PATCHING ────────────────────────────────
```
### Step 1: Create Patch Task
1. Scan `nazgul/tasks/patches/` for next available PATCH-NNN number (create directory if needed)
2. Create `nazgul/tasks/patches/PATCH-NNN.md`:
```markdown
# PATCH-NNN: [description]
## Metadata
- **Status**: IN_PROGRESS
- **Created**: [ISO 8601 timestamp]
- **Source**: /nazgul:patch
- **Flags**: [--no-review, --discuss, or none]
## Description
[full description from user]
## Subtasks
[Generated by planner in Step 3]
## Implementation Log
[Filled during execution]
```
### Step 2: Discuss (if --discuss flag)
Only if `--discuss` was passed:
1. Analyze the patch description for gray areas based on domain:
- Code changes → scope, backwards compatibility, edge cases
- Config changes → environments affected, rollback plan
- Bug fixes → root cause, regression test needed
2. Ask the user about each gray area (one at a time)
3. Lock decisions into the patch task manifest under `## Decisions`
### Step 3: Plan
Use the planner agent to generate 1-3 subtasks for the patch:
- Dispatch planner with a simplified prompt: "Generate 1-3 small subtasks for this patch. No research, no docs. Just implementation steps."
- Planner reads the patch description (and decisions if --discuss was used)
- Subtasks are written into the patch manifest under `## Subtasks`
### Step 4: Implement
Use the implementer agent to execute each subtask:
- Dispatch implementer with the patch manifest
- Implementer follows existing patterns (reads CLAUDE.md, follows conventions)
- Each subtask gets an atomic git commit with prefix: `patch(PATCH-NNN):`
- Update patch manifest with implementation log
### Step 5: Review (unless --no-review)
If `--no-review` was NOT passed:
1. Auto-select a single reviewer based on file types changed:
- `.ts/.tsx/.js/.jsx` → frontend-reviewer (if available) or code-reviewer
- `.py` → code-reviewer
- `.md/.json/.yaml` → skip review (docs/config only)
- Mixed → code-reviewer
2. Run the selected reviewer on the changed files
3. If APPROVED: mark patch DONE
4. If CHANGES_REQUESTED: show feedback, implementer fixes, re-review (max 2 retries)
If `--no-review` was passed:
- Mark patch DONE immediately after implementation
### Step 6: Complete
1. Update patch manifest status to DONE
2. Append to `nazgul/plan.md` under `## Patches` section (create section if it doesn't exist):
```
- [x] PATCH-NNN: [description] (sha: [commit])
```
3. Display completion with Next Up block per ui-brand.md:
```
─── ◈ NAZGUL ▸ COMPLETE ✦ ──────────────────────────────
✦ PATCH-NNN: [description]
Commits: [N] | Files changed: [N] | Review: [approved/skipped]
─── ◈ NEXT ─────────────────────────────────────────────
/nazgul:start to continue main objective
/nazgul:patch for another quick fix
────────────────────────────────────────────────────────
```
### Error Handling
- If planner fails to generate subtasks: "Could not plan this patch. Try providing more detail or use `/nazgul:start` for a full task."
- If implementer fails: Mark patch BLOCKED with error details
- If reviewer rejects after max retries: Mark patch BLOCKED, show consolidated feedback
No comments yet. Be the first to comment!