Skip to content

Changhochien/micro-edit-skill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Micro-Edit Skill

Break large coding tasks into small, reviewable micro-edits that smaller subagents can execute from focused context packets.

Quick Start

# Activate the skill
/skill:micro-edit

# Or describe your task
"I need to extract duplicated code from 4 files into a shared helper"

What This Skill Does

  1. Analyzes your request and identifies micro-tasks
  2. Breaks large changes into independent units
  3. Packages each task with exact files, examples to imitate, constraints, and validation
  4. Executes tasks independently, preferably in parallel with smaller subagents
  5. Falls back to sequential execution when subagents are unavailable
  6. Validates each change independently
  7. Aggregates results and reports impact

When to Use

Trigger Phrase Example
"break into tasks" "We need to refactor this - break it into tasks"
"micro-edit" "Do a micro-edit to extract this helper"
"parallel workers" "Use parallel workers to update these files"
"small changes" "Make these small changes across 10 files"
Multiple files "Update all 5 adapters to use the new pattern"

Model Strategy

Use the strongest available main agent as a token-efficient planner and validator. The main agent should inspect only enough code to create small, self-contained task packets for cheaper or less capable worker agents.

Each worker task should answer:

  • What is the single objective?
  • Which files should be read first?
  • Which files may be modified?
  • What existing pattern/example should be copied?
  • How should the change be validated?

Example Sessions

Extract Shared Helper

User: Extract the duplicated base64 parsing from all 4 gateway adapters

Agent:
├── Planning: Identified 4 adapters with ~80 lines of duplicated parsing
├── Tasks:
│   ├── [H] Extract parse_data_url() to shared module
│   └── [H] Update all 4 adapters to use shared function
├── Execute: 2 parallel workers
├── Validate: cargo check passes
└── Result: -80 lines duplicated, single point of maintenance

Rename Refactor Across Files

User: Rename 'safe_text' to 'safe_value' across the codebase

Agent:
├── Planning: Found 8 files with field references
├── Tasks (6 parallel):
│   ├── [H] Update policy.rs
│   ├── [H] Update desktop_shell.rs
│   ├── [M] Update test_file_1.rs
│   └── ...
├── Execute: 6 parallel workers
├── Validate: cargo test passes
└── Result: Clean rename across all files

Configuration

No skill-specific configuration is required. The agent should infer project-specific validation commands from repository docs and configuration files.

Requirements

  • pi or another coding agent with Agent Skills support
  • Optional subagent delegation for parallel execution
  • A strong main agent for planning/context packing and optional smaller worker agents for focused edits
  • Language-appropriate verification commands discovered from the target repository (npm test, cargo test, swift test, etc.)

Anti-Patterns

❌ Don't batch 50 changes into one subagent ❌ Don't skip validation ❌ Don't hide failures from user ❌ Don't send vague, open-ended prompts to smaller workers

✅ Keep tasks <5 minutes each ✅ Give workers exact files and examples to follow ✅ Validate each change ✅ Fall back to sequential execution when parallelism is unavailable or unsafe ✅ Report clearly

About

Break large coding tasks into micro-edits with parallel subagents

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors