clean-branch

Rebases the clean branch onto dev and strips domain-specific code to maintain a generic boilerplate.

4|Updated Jul 30, 2026
One-click install
npx skills add https://github.com/gabriellst/codm --skill clean-branch-gabriellst
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-branch
Source: https://github.com/gabriellst/codm/tree/main/.claude/skills/clean-branch
Command: npx skills add https://github.com/gabriellst/codm --skill clean-branch-gabriellst

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Maintaining a reusable generic boilerplate branch that stays in sync with an actively developed monorepo is error-prone: architectural improvements on the dev branch must be inherited while all domain-specific code (contexts, routes, enums, schemas) must be removed without breaking the build. ## Core Features & Use Cases - Guided Rebase and Strip Workflow: Walks through rebasing the clean branch onto dev, then systematically deleting domain-specific backend contexts, Drizzle schemas, enums, events, and frontend routes. - Keep vs. Strip Reference Tables: Explicit lists of what stays (shared, auth, ui contexts, generic enums, landing/auth pages) versus what gets removed (domain contexts, events, domain routes and components). - Build Verification and Checklist: Regenerates the TanStack Router route tree, creates a fresh Drizzle migration, and enforces type-check, lint, and test passes before committing. - Use Case: After adding a new bounded context and infrastructure improvements on dev, run this workflow to propagate the architectural gains to the clean boilerplate branch while stripping all business logic. ## Quick Start Ask the agent to update the clean branch from dev and strip all domain-specific code so the boilerplate stays current.

Frequently Asked Questions about clean-branch

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I keep a boilerplate branch in sync with my main development branch?

Rebase the boilerplate branch onto the dev branch, then strip all domain-specific code while keeping generic infrastructure. This skill guides the process: delete domain contexts, clean DI registrations and barrel exports, regenerate the route tree and migrations, then verify with type checks and tests.

How to remove a bounded context from a DDD TypeScript monorepo?

Delete the context directory, then remove its router imports from the routers map and CONTEXTS manifest, unregister its repositories and use cases from the DI container, and clean its schemas, enums, events, and error mapper entries. All references must be fixed atomically or the build fails.

When should I not rebase the clean branch onto dev?

Skip the sync when dev changes are purely domain-specific with no architectural value, when the clean branch does not exist yet, or when you only need a small bug fix on clean. In those cases, fix clean directly or create it with a full initial strip.

Why does the build fail after deleting backend contexts?

Failures usually come from dangling imports in the DI container, missing entries in the exhaustive GlobalErrorMapper, stale route tree references, or empty files that are not modules. Run the route tree generator, add export statements to empty files, and fix all references before committing.

What code should a generic fullstack boilerplate keep?

Keep shared infrastructure like the DI container, error handling, and OpenAPI setup, plus auth, ui contexts, generic enums, landing and auth pages, and base components. Strip all domain contexts, events, domain routes, and project-specific documentation.