agentleFS
dariopalminiodariopalminio/agile-sddf-extension/skills/git-tbd-custom-use/SKILL.md

git-tbd-custom-use

Skill0 starsChanged 3 months agoMITView on GitHub

Use this skill when managing git branches, releases, or hotfixes according to the Trunk-Based Development (TBD). It enforces naming conventions and synchronization policies.

  • Reads credentials

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 11 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    All CI/CD is oriented toward validating and deploying from main.

    line 22
  2. Distinctive:

    Only changes from the main branch can be merged into a release branch.

    line 27
  3. Distinctive:

    Branch convention: Follow the recommended "Branch Convention" Conventional Branches.

    line 63
  4. Distinctive:

    Commit convention: Use Conventional Commit to keep a clear, structured commit history, which makes it easier to generate changelogs and …

    line 64
  5. Very specific:

    Semantic Versioning: Use Semantic Versioning 2.0.0 for batch strategies and update the version (in package.json) before merging to main.

    line 68
  6. Distinctive:

    Always update your source branch (main) with git pull before creating a new branch or opening a PR to avoid conflicts.

    line 69
  7. Distinctive:

    Ephemeral branch cleanup: Delete feat/ branches after merging them and release/ branches after publishing.

    line 70
  8. Very specific:

    NEVER commit secrets (.env, credentials.json, private keys).

    line 75
  9. Distinctive:

    NEVER update git config

    line 76
  10. Distinctive:

    NEVER run destructive commands (--force, hard reset) without explicit request

    line 77
  11. Distinctive:

    NEVER skip hooks (--no-verify) unless user asks

    line 78
  12. Distinctive:

    NEVER force push to main/master

    line 79
  13. Distinctive:

    If commit fails due to hooks, fix and create NEW commit (don't amend)

    line 80

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Using Git TBD (Branching Strategy)

Using Git branching with the Trunk-Based Development (TBD) strategy.

Overview

Trunk-Based Development is a branching model in which developers make frequent commits to the main branch, which is always release-ready. There are several styles of trunk-based development, either committing directly to the main branch or using short-lived feature branches. It relies on continuous integration and continuous delivery (CI/CD) to validate that builds succeed and that developers don't break the build process.

The characteristics of Trunk-Based Development are:

  • There is a single main branch (main) that acts as the trunk.
  • Developers integrate changes into main frequently.
  • Feature branches, when they exist, are very short-lived.
  • All CI/CD is oriented toward validating and deploying from main.
  • Small, incremental commits are encouraged.
  • There are no develop or release branches that get merged into main.
  • Developers do not commit to release branches.
  • Release branches are cut from the main branch.
  • Only changes from the main branch can be merged into a release branch.

TBD Branch Flow Diagram

    main
     |
     * ---> feature/login (development)
     * <---- feature/login * (merge)
     |
     * ---> feature/payment (development) 
     * <---- feature/payment * (merge)
     |
     * ---------> release/1.0 (cut) --> (validate) --> tag v1.0
     |           (not merged back)
     |
     * ---> hotfix/auth (cut from main)
     |           |
     |           * (fix) 
     * <---- hotfix/auth (merge to main)
     |
     * ---------> cherry-pick to release/1.0 --> tag v1.0.1

Release Strategies

There are different release strategies within trunk-based development. We can release directly from the main branch or by using release branches. How you work depends directly on your release cadence.

  1. Strategy 1 (continuous): Release from trunk (Continuous Deployment): "Teams with a higher release cadence do the former [release from trunk]." (references/release-from-trunk.md)
  2. Strategy 2 (batch): Release from a release branch (Branch for Release): "Teams with a lower release cadence do the latter [branch for release]." (references/release-branches.md)

Choosing between one and the other is not a matter of taste, but a technical decision based on your delivery cycle. Let's look at each one in detail.

Best Practices

  • Branch convention: Follow the recommended "Branch Convention" Conventional Branches.
  • Commit convention: Use Conventional Commit to keep a clear, structured commit history, which makes it easier to generate changelogs and trace changes.
  • Branch protection: Configure rules in GitHub to require PRs and successful CI on main.
  • Atomic commits: Each commit should have a clear purpose and pass all tests locally.
  • Small Pull Requests: A story or PR should be atomic (fewer than 200 lines of change).
  • Semantic Versioning: Use Semantic Versioning 2.0.0 for batch strategies and update the version (in package.json) before merging to main.
  • Always update your source branch (main) with git pull before creating a new branch or opening a PR to avoid conflicts.
  • Ephemeral branch cleanup: Delete feat/ branches after merging them and release/ branches after publishing.
  • Purpose-driven Branch Names: Each branch name clearly indicates its purpose, making it easy for all developers to understand what the branch is for.

Git Safety Protocol

  • NEVER commit secrets (.env, credentials.json, private keys).
  • NEVER update git config
  • NEVER run destructive commands (--force, hard reset) without explicit request
  • NEVER skip hooks (--no-verify) unless user asks
  • NEVER force push to main/master
  • If commit fails due to hooks, fix and create NEW commit (don't amend)

References

For more details, consult these reference files (loaded on demand):

TopicReferenceLoad When
Feature Development (Short-Lived Feature Branches)references/features.mdCreating feature branches, committing feature changes, merging them into main
Releases (Branch for Release)references/release-branches.mdCutting a release branch (Release Branches), tagging a release, deploying to production
Release from Trunk (Continuous Deployment)references/release-from-trunk.mdPublishing directly from main, high release frequency
Bugfix / Hotfix Resolutionreferences/hotfixes.mdCutting a hotfix branch, resolving a hotfix, merging a hotfix into main, applying the fix to the release branch (Cherry-pick)
Conventional Commitsreferences/conventional-commit.mdFollowing the commit convention to keep a clear, structured history
Semantic Versioningreferences/semantic-versioning.mdWhen following semantic versioning principles
Pull Requestreferences/pull-request.mdCreating and managing Pull Requests on GitHub

External references:

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.