Breaks down ANY work into 1-3 hour micro-steps with zero downtime. Use for large refactorings, technical improvements, debugging, research, migrations, or any work that feels too big or risky. Automatically applies expand-contract pattern for risky changes. Forces smallest safe increments for all work types. Use when: - Work feels too big or risky (refactoring, migrations, performance fixes) - Database schema changes, API changes, service replacements - User asks "how do I implement" after deciding what to build - Work will take more than 1 day Do NOT use when: - User is still deciding WHAT to build (use story-splitting or hamburger-method first) - Work is already small (< 3 hours) - User asks for architectural review (use complexity-review instead)
Help you divide ANY work into the smallest, safest, most valuable steps possible — ideally 1-3 hours each.
Core belief: Risk grows faster than the size of the change.
This skill applies to ALL types of work:
Ask clarifying questions:
🚨 Identify if this is a risky/breaking change:
Red flags for risky changes:
If risky change detected → Apply Expand-Contract Pattern
See "Quick Reference: Risky Changes" below and REFERENCE.md for detailed examples.
Identify 3-5 major phases, each independently valuable:
Example: "Improve API performance"
Example: "Migrate from SendGrid to AWS SES" (risky change)
For EACH phase, force division into tiny steps.
Mandatory criteria for each step:
If a step fails these criteria, it's too big.
Flag steps by type:
Learning steps (time-boxed research/investigation):
Earning steps (deliver value):
Key principle: Learning before earning. Don't build before you understand.
Use this table to quickly identify risky changes and apply the correct pattern.
| Change Type | Example | Expand-Contract Phases | Typical Duration |
|-------------|---------|----------------------|------------------|
| Rename DB column | email → email_address | 1. Add new column + dual-write<br>2. Switch reads to new<br>3. Drop old column | 2-3 weeks |
| Change data type | String → JSON object | 1. Add new column + parse/backfill<br>2. Switch to new format<br>3. Drop old column | 2-4 weeks |
| API field rename | userName → username | 1. Return both fields<br>2. Deprecate old, notify consumers<br>3. Remove old field | 2-3 months |
| Replace service | SendGrid → AWS SES | 1. Add new service + dual-call<br>2. Route traffic % to new<br>3. Remove old service | 1 month |
| Replace library | Lodash → Native JS | 1. Add new code alongside old<br>2. Migrate callers incrementally<br>3. Remove old library | 1-2 weeks |
| Refactor logic | calculate_v1 → calculate_v2 | 1. Implement new alongside old<br>2. Compare outputs, migrate callers<br>3. Remove old function | 1-2 weeks |
For detailed step-by-step examples, see REFERENCE.md.
When you detect a risky/breaking change, use the Expand-Contract pattern to maintain zero downtime:
Goal: System supports BOTH old and new
Pattern:
Key principle: Zero users are affected yet. System continues working with old.
Goal: Gradually migrate reads/usage from old to new
Pattern:
Key principle: System now uses new, but still maintains old as backup.
Goal: Clean up by removing old implementation
Pattern:
Key principle: Only remove after old path has ZERO usage for days/weeks.
✅ Before MIGRATE phase:
✅ Before CONTRACT phase:
| Work Type | Primary Pattern | Phases | Key Considerations | |-----------|----------------|--------|-------------------| | Refactoring | Expand-Contract | Add new → Dual-call → Migrate → Remove old | Compare outputs if possible | | Performance | Baseline → Fix → Verify | Measure → Identify → Implement → Measure again | Always measure before optimizing | | Migration | Expand-Contract | Add new → Route % → Remove old | Use feature flags for gradual rollout | | Debugging | Linear investigation | Reproduce → Log → Analyze → Fix → Verify | Time-box investigation steps | | Research/Spike | Time-boxed learning | Define questions → Evaluate options → Decide | Max 2h per option, document findings | | DB Schema | Expand-Contract | Add column → Dual-write → Migrate reads → Drop old | Never drop columns immediately | | API Changes | Expand-Contract | Return both → Deprecate → Remove | Long migration period (months) |
For detailed examples of each pattern, see REFERENCE.md.
Watch for these signs:
When you spot these, force more slicing.
This skill works in sequence with other skills:
Typical workflow:
Use this skill when:
Integration examples:
Do NOT use this skill when:
After applying this skill, verify:
If any checkbox fails, revisit the breakdown.
Red flags that I didn't do this right:
Risk grows faster than the size of the change
Every step must be deployable
Every step must be reversible
Zero downtime is non-negotiable
Learning before earning
1-3 hours per step, no exceptions
For detailed step-by-step examples of expand-contract pattern across different contexts (database changes, API migrations, service replacements, refactorings), see REFERENCE.md in this skill directory.
Examples included:
Author: Eduardo Ferro (expand-contract pattern applied to micro-steps) Source: https://www.eferro.net/
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer