trunk-first-repo

Initialize a Git repository with trunk-based development and pull request workflows.

3|Updated Mar 15, 2026
One-click install
npx skills add https://github.com/codebeltnet/agentic --skill trunk-first-repo
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: trunk-first-repo
Source: https://github.com/codebeltnet/agentic/tree/main/skills/trunk-first-repo
Command: npx skills add https://github.com/codebeltnet/agentic --skill trunk-first-repo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill establishes a new project directory as a Git repository, enforcing a strict trunk-based development workflow from the very first commit to prevent direct commits to the main branch and ensure all code changes are reviewed via pull requests.

Core Features & Use Cases

  • Git Initialization: Sets up a new Git repository in the current directory.
  • Trunk-Based Workflow: Enforces a PR-first approach where main is sacred and only accepts changes through pull requests.
  • Versioned Feature Branches: Creates feature branches prefixed with project versioning (e.g., v0.1.0/my-feature).
  • Use Case: Use this skill when starting a new project or initializing an existing folder as a Git repository to immediately adopt best practices for collaborative development and maintain a stable main branch.

Quick Start

Initialize the current folder as a git repository using the trunk-first workflow, setting the version prefix to 'v0.1.0' and the branch context to 'init-project'.

Frequently Asked Questions about trunk-first-repo

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

FAQPage Schema
How do I initialize a Git repository for trunk-based development?▼

To initialize a Git repository for trunk-based development, run the skill in your project directory to establish an empty main branch and automatically enforce a pull request-first workflow for all code integrations.

How do I prevent direct commits to the main branch in a new project?▼

Preventing direct commits to the main branch requires enforcing a strict pull request-first workflow from the very first commit, which this Git initialization skill configures automatically in your new repository.

What is the best way to structure feature branches for versioned releases?▼

The best way to structure feature branches for versioned releases is using versioned prefixes like `v0.1.0/my-feature`, keeping the main branch stable and organizing changes by project version.

Do I need to configure anything before setting up a PR-first workflow?▼

Setting up a PR-first workflow requires no prior configuration; simply run the skill in an existing folder or new project directory to immediately adopt GitHub PR best practices for collaborative development.

Can I use this trunk-based initialization for an existing folder?▼

Yes, you can use this trunk-based initialization for an existing folder by running the skill in that directory to convert it into a Git repository with scaled trunk-based development principles enforced.