Codebelt

Trunk-First Repo

A repository-setup skill for teams that want healthy git habits and branch policy from the first commit onward.

Repository · Workflow 12 installs New repositories GitHub workflows CLI agents IDE agents

Overview

Trunk-First Repo is for the moment before a repository has accumulated bad habits. It initializes a new git repository around scaled trunk-based development, keeps main intentionally clean, and starts the work on a versioned feature branch so the normal path to trunk is through pull requests rather than direct pushes.

The skill is less about git commands in isolation and more about the operating model those commands establish. It gives a new repository a workflow shape that is ready for collaboration, review, and branch protection before the codebase grows.

Concepts

  • PR-first from day one: work is expected to reach main through reviewed pull requests instead of ad-hoc direct commits.
  • Seeded trunk, active branch: the repository starts with a minimal main branch and a feature branch that carries the first real work.
  • Policy through structure: branch names, repository initialization, and workflow expectations encode the collaboration model early.
  • Scaled trunk-based development: the skill is aimed at teams that want the speed of trunk with the safety of deliberate integration gates.

Usage guidance

Use this skill when creating a repository that should begin with disciplined git workflow instead of retrofitting branch policy later. It is especially helpful for greenfield projects, templates, and multi-person efforts where the first few commits often set the social contract for the repo.

Invoke it before the repository history becomes noisy. The earlier the workflow is established, the less cleanup is needed later when CI, review, and release expectations start to matter.