Skills Agentes

Incremental Implementation

Entrega los cambios en fragmentos finos y verificables. Úsalo al implementar algo que toque más de un archivo, al retomar la siguiente tarea de un plan, tras un feature flag o cuando la tarea parece demasiado grande para un solo paso.

Estrellas
97.9k

en todo el repo

Actividad
56

0–100, la ruta de este skill

Actualizado
hace 2 meses

último commit aquí

Commits
4

últimos 90 días

Contexto
2.4k tok

86 tok en reposo

Paquete
1 archivo

9 KB

Instalar

Funciona con cualquier agente que lea SKILL.md

npx -y skills add addyosmani/agent-skills --skill incremental-implementation --agent claude-code

Se instala solo en este repositorio.

Este skill reads environment config.

Qué hace

  • Implementa cambios en fragmentos verticales pequeños: implementa, prueba, verifica y confirma cada uno antes de seguir con el siguiente
  • Divide funcionalidades grandes en slices verticales, por contrato o por riesgo, en vez de construir toda la base de datos, luego toda la API y luego toda la UI
  • Limita el alcance de cada cambio a lo que pide la tarea, sin "aprovechar" para refactorizar o limpiar código adyacente
  • Exige mantener el proyecto compilable y con los tests en verde entre incrementos, usando feature flags para trabajo incompleto
  • Marca banderas rojas como escribir más de 100 líneas sin probar o mezclar varios cambios no relacionados en un mismo incremento

Úsalo cuando

  • Al implementar cualquier cambio que toque más de un archivo
  • Al recoger la siguiente tarea de un plan
  • Al lanzar un cambio detrás de un feature flag
  • Cuando estás a punto de escribir mucho código de golpe o la tarea parece demasiado grande para un solo paso

No lo uses cuando

  • Cambios de un solo archivo y una sola función, donde el alcance ya es mínimo

Qué lo activa

Di cualquiera de estas frases y el agente debería cargar este skill.

  • “Vamos a implementar esta funcionalidad en pasos pequeños y verificables”
  • “Ayúdame a dividir este cambio grande en incrementos”
  • “Implementa esto detrás de un feature flag”
  • “Voy a tocar varios archivos, hagámoslo poco a poco”

SKILL.md

En inglés

Incremental Implementation

Overview

Build in thin vertical slices — implement one piece, test it, verify it, then expand. Avoid implementing an entire feature in one pass. Each increment should leave the system in a working, testable state. This is the execution discipline that makes large features manageable.

When to Use

  • Implementing any multi-file change
  • Building a new feature from a task breakdown
  • Refactoring existing code
  • Any time you're tempted to write more than ~100 lines before testing

When NOT to use: Single-file, single-function changes where the scope is already minimal.

The Increment Cycle

┌──────────────────────────────────────┐
│                                      │
│   Implement ──→ Test ──→ Verify ──┐  │
│       ▲                           │  │
│       └───── Commit ◄─────────────┘  │
│              │                       │
│              ▼                       │
│          Next slice                  │
│                                      │
└──────────────────────────────────────┘

For each slice:

  1. Implement the smallest complete piece of functionality
  2. Test — run the test suite (or write a test if none exists)
  3. Verify — confirm the slice works as expected (tests pass, build succeeds, manual check)
  4. Commit -- save your progress with a descriptive message (see git-workflow-and-versioning for atomic commit guidance)
  5. Move to the next slice — carry forward, don't restart

Slicing Strategies

Vertical Slices (Preferred)

Build one complete path through the stack:

Slice 1: Create a task (DB + API + basic UI)
    → Tests pass, user can create a task via the UI

Slice 2: List tasks (query + API + UI)
    → Tests pass, user can see their tasks

Slice 3: Edit a task (update + API + UI)
    → Tests pass, user can modify tasks

Slice 4: Delete a task (delete + API + UI + confirmation)
    → Tests pass, full CRUD complete

Each slice delivers working end-to-end functionality.

Contract-First Slicing

When backend and frontend need to develop in parallel:

Slice 0: Define the API contract (types, interfaces, OpenAPI spec)
Slice 1a: Implement backend against the contract + API tests
Slice 1b: Implement frontend against mock data matching the contract
Slice 2: Integrate and test end-to-end

Risk-First Slicing

Tackle the riskiest or most uncertain piece first:

Slice 1: Prove the WebSocket connection works (highest risk)
Slice 2: Build real-time task updates on the proven connection
Slice 3: Add offline support and reconnection

If Slice 1 fails, you discover it before investing in Slices 2 and 3.

Implementation Rules

Rule 0: Simplicity First

Before writing any code, ask: "What is the simplest thing that could work?"

After writing code, review it against these checks:

  • Can this be done in fewer lines?
  • Are these abstractions earning their complexity?
  • Would a staff engineer look at this and say "why didn't you just..."?
  • Am I building for hypothetical future requirements, or the current task?
SIMPLICITY CHECK:
✗ Generic EventBus with middleware pipeline for one notification
✓ Simple function call

✗ Abstract factory pattern for two similar components
✓ Two straightforward components with shared utilities

✗ Config-driven form builder for three forms
✓ Three form components

Three similar lines of code is better than a premature abstraction. Implement the naive, obviously-correct version first. Optimize only after correctness is proven with tests.

Rule 0.5: Scope Discipline

Touch only what the task requires.

Do NOT:

  • "Clean up" code adjacent to your change
  • Refactor imports in files you're not modifying
  • Remove comments you don't fully understand
  • Add features not in the spec because they "seem useful"
  • Modernize syntax in files you're only reading

If you notice something worth improving outside your task scope, note it — don't fix it:

NOTICED BUT NOT TOUCHING:
- src/utils/format.ts has an unused import (unrelated to this task)
- The auth middleware could use better error messages (separate task)
→ Want me to create tasks for these?

Rule 1: One Thing at a Time

Each increment changes one logical thing. Don't mix concerns:

Bad: One commit that adds a new component, refactors an existing one, and updates the build config.

Good: Three separate commits — one for each change.

Rule 2: Keep It Compilable

After each increment, the project must build and existing tests must pass. Don't leave the codebase in a broken state between slices.

Rule 3: Feature Flags for Incomplete Features

If a feature isn't ready for users but you need to merge increments:

// Feature flag for work-in-progress
const ENABLE_TASK_SHARING = process.env.FEATURE_TASK_SHARING === 'true';

if (ENABLE_TASK_SHARING) {
  // New sharing UI
}

This lets you merge small increments to the main branch without exposing incomplete work.

Rule 4: Safe Defaults

New code should default to safe, conservative behavior:

// Safe: disabled by default, opt-in
export function createTask(data: TaskInput, options?: { notify?: boolean }) {
  const shouldNotify = options?.notify ?? false;
  // ...
}

Rule 5: Rollback-Friendly

Each increment should be independently revertable:

  • Additive changes (new files, new functions) are easy to revert
  • Modifications to existing code should be minimal and focused
  • Database migrations should have corresponding rollback migrations
  • Avoid deleting something in one commit and replacing it in the same commit — separate them

Working with Agents

When directing an agent to implement incrementally:

"Let's implement Task 3 from the plan.

Start with just the database schema change and the API endpoint.
Don't touch the UI yet — we'll do that in the next increment.

After implementing, run the repository's test and build commands to
verify nothing is broken."

Be explicit about what's in scope and what's NOT in scope for each increment.

Increment Checklist

After each increment, verify with the repository's own commands (see the test-driven-development skill's Discover the Stack First section):

  • The change does one thing and does it completely
  • All existing tests still pass (the repository's test command: npm test, ./gradlew test, pytest, ...)
  • The build succeeds (the repository's build command)
  • Type checking passes, where the stack has one (npx tsc --noEmit, mypy, ...)
  • Linting passes (the repository's lint command)
  • The new functionality works as expected
  • The change is committed with a descriptive message

Note: Run each verification command after a change that could affect it. After a successful run, don't repeat the same command unless the code has changed since — re-running on unchanged code adds no information.

Common Rationalizations

Rationalization Reality
"I'll test it all at the end" Bugs compound. A bug in Slice 1 makes Slices 2-5 wrong. Test each slice.
"It's faster to do it all at once" It feels faster until something breaks and you can't find which of 500 changed lines caused it.
"These changes are too small to commit separately" Small commits are free. Large commits hide bugs and make rollbacks painful.
"I'll add the feature flag later" If the feature isn't complete, it shouldn't be user-visible. Add the flag now.
"This refactor is small enough to include" Refactors mixed with features make both harder to review and debug. Separate them.
"Let me run the build command again just to be sure" After a successful run, repeating the same command adds nothing unless the code has changed since. Run it again after subsequent edits, not as reassurance.

Red Flags

  • More than 100 lines of code written without running tests
  • Multiple unrelated changes in a single increment
  • "Let me just quickly add this too" scope expansion
  • Skipping the test/verify step to move faster
  • Build or tests broken between increments
  • Large uncommitted changes accumulating
  • Building abstractions before the third use case demands it
  • Touching files outside the task scope "while I'm here"
  • Creating new utility files for one-time operations
  • Running the same build/test command twice in a row without any intervening code change

Verification

After completing all increments for a task:

  • Each increment was individually tested and committed
  • The full test suite passes
  • The build is clean
  • The feature works end-to-end as specified
  • No uncommitted changes remain

See Also

Per-increment verification is the local check. Before declaring a task done, apply the project-wide Definition of Done as the final gate, the standing bar every increment clears regardless of the task. See ../../references/definition-of-done.md.

Reproducido de addyosmani/agent-skills bajo licencia MIT. Leer esta página en markdown.

Archivos

1 archivo en el paquete. Solo se lee SKILL.md al activarse — las referencias se cargan si el skill decide que las necesita.

Antes de instalar

Variables de entorno:FEATURE_TASK_SHARING

Detalles

Creador
addyosmani
Licencia
MIT
Recursos incluidos
Solo SKILL.md
Código fuente
Ver SKILL.md

Etiquetas

Más de addyosmani/agent-skills

Este repo incluye 25 skills. Si instalas uno, normalmente ya tienes los demás. Ver el pack agent-skills entero y su comando de instalación

Crea especificaciones antes de programar: al empezar un proyecto o cambio significativo sin spec, al redactar un PRD con objetivos y alcance, o cuando un requisito agrupa varias capacidades testeables que exigen un mapa de módulos.

Costo de contexto al activarse
3.1k tok
Tamaño del paquete
1 archivo
Última actualización
hace 18 días
herramientas desarrollo

Optimiza la configuración del contexto del agente. Úsalo al iniciar una sesión nueva, cuando la calidad del agente empeora, al cambiar de tarea o al configurar archivos de reglas y contexto de un proyecto.

Costo de contexto al activarse
3.9k tok
Tamaño del paquete
1 archivo
Última actualización
hace 23 días
herramientas desarrollo

Instrumenta el código para que el comportamiento en producción sea visible y diagnosticable. Úsalo al añadir logs, métricas, trazas o alertas, al lanzar algo a producción, o cuando hay problemas y no se sabe qué pasó.

Costo de contexto al activarse
3.5k tok
Tamaño del paquete
1 archivo
Última actualización
hace 22 días
devops infraestructura

Optimiza el rendimiento de la aplicación en frontend, backend, consultas y bases de datos. Úsalo cuando hay requisitos de rendimiento, se sospecha una regresión, hace falta mejorar Core Web Vitals o el profiling revela cuellos de botella.

Costo de contexto al activarse
5.4k tok
Tamaño del paquete
1 archivo
Última actualización
el mes pasado
herramientas desarrollo

Divide el trabajo en tareas ordenadas. Úsalo cuando hay un spec que hace falta trocear en tareas implementables, cuando una tarea parece demasiado grande, para estimar alcance, o cuando es posible trabajar en paralelo.

Costo de contexto al activarse
2.6k tok
Tamaño del paquete
1 archivo
Última actualización
el mes pasado
herramientas desarrollo

Refuerza el código frente a vulnerabilidades: entradas de usuario, autenticación, almacenamiento de datos, integraciones externas, el OWASP Top Ten, auditoría de dependencias y cumplimiento de privacidad (GDPR, CCPA).

Costo de contexto al activarse
7k tok
Tamaño del paquete
1 archivo
Última actualización
hace 2 meses
seguridad

Skills relacionados

Optimiza la configuración del contexto del agente. Úsalo al iniciar una sesión nueva, cuando la calidad del agente empeora, al cambiar de tarea o al configurar archivos de reglas y contexto de un proyecto.

Costo de contexto al activarse
3.9k tok
Tamaño del paquete
1 archivo
Última actualización
hace 23 días
herramientas desarrollo

Gestiona la baja y migración de sistemas: retirar APIs o funciones antiguas, migrar usuarios a una nueva implementación, migrar un esquema de BD en producción (expand/contract) sin downtime, o decidir si mantener o retirar código.

Costo de contexto al activarse
3.2k tok
Tamaño del paquete
1 archivo
Última actualización
hace 29 días
herramientas desarrollo

Estructura las prácticas de flujo de trabajo en git: commits, ramas, resolver conflictos, dividir trabajo sin confirmar en commits atómicos, PRs, push, trabajo en paralelo, releases, versión semántica, tags y changelog.

Costo de contexto al activarse
3.5k tok
Tamaño del paquete
1 archivo
Última actualización
hace 2 meses
herramientas desarrollo