home / skills / mattpocock / course-video-manager / do-work

do-work skill

/.claude/skills/do-work

This skill guides end-to-end feature implementation, validates with typecheck and tests, and ensures clean commits through a structured workflow.

npx playbooks add skill mattpocock/course-video-manager --skill do-work

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
938 B
---
name: do-work
description: "End-to-end implementation workflow. Use when user wants to implement a feature, fix a bug, or make changes and have everything validated and committed."
---

# Do Work

Complete implementation workflow from exploration to commit.

## Workflow

### Phase 1: Explore & Plan

### Phase 2: Implement

If you're touching code that interacts with the database, follow the [DB TDD workflow](DB-TDD.md).

If you're touching frontend code with complex state (creating/modifying reducers, complex state transitions, non-trivial state management), follow the [Frontend TDD workflow](FRONTEND-TDD.md).

### Phase 3: Feedback Loops

Run each check, fix issues, and re-run until clean. Do these sequentially:

1. **Type checking**: `npm run typecheck`
2. **Tests**: `npm test`

If a check fails, fix the issue and re-run that check before moving to the next one. Do not move on with failing checks.

### Phase 4: Commit

Overview

This skill provides an end-to-end implementation workflow for TypeScript projects, guiding you from exploration through validation and commit. It ensures changes are fully vetted with type checks and tests before committing. Use it to implement features, fix bugs, or make codebase changes with repeatable safety checks.

How this skill works

The workflow runs sequential validation phases: plan the change, implement code, and run automated checks. It enforces type checking (npm run typecheck) and unit/integration tests (npm test), requiring each check to pass before proceeding. Failures must be fixed and re-run until all checks are clean, then commit the validated changes.

When to use it

  • Adding a new feature in a TypeScript codebase.
  • Fixing bugs that require code changes and validation.
  • Refactoring code that must preserve type safety and test coverage.
  • Preparing a change for a pull request or release.

Best practices

  • Plan the change and outline required code and tests before editing files.
  • Run type checks locally (npm run typecheck) frequently during implementation.
  • Write or update tests before finalizing implementation, then run npm test.
  • Fix failing checks immediately; do not proceed with known failing type checks or tests.
  • Keep commits focused and descriptive after all validations pass.

Example use cases

  • Implementing a new API endpoint with request/response types and unit tests.
  • Refactoring a module to improve maintainability while preserving existing behavior and tests.
  • Fixing a customer-reported bug, verifying fix with targeted tests and type checks.
  • Adding typing to previously untyped code and validating with the test suite.

FAQ

What if a test intermittently fails?

Investigate root cause, add deterministic assertions or stabilize the test, and re-run until consistent. Do not commit with flaky tests.

Can I skip type checks for small changes?

No. Type checks prevent regressions in TypeScript projects. Run npm run typecheck and resolve issues before moving on.