dd-git-health

Evaluates Git branch health using staleness, conflict, scale, and mergeability metrics.

Updated Jun 11, 2026
One-click install
npx skills add https://github.com/marcocpt/trae_skills --skill dd-git-health-marcocpt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dd-git-health
Source: https://github.com/marcocpt/trae_skills/tree/main/dd-git-health
Command: npx skills add https://github.com/marcocpt/trae_skills --skill dd-git-health-marcocpt

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Long-lived feature branches cause merge conflicts that grow exponentially over time. This Skill quantifies branch health with a scoring model so AI agents and developers know exactly when to sync, merge, or intervene before conflicts become unmanageable. ## Core Features & Use Cases - Four-Dimension Health Metrics: Measures staleness (days since last develop sync), conflict difficulty (conflicting files via git merge-tree), change scale (files changed vs develop), and mergeability (merge-tree exit status). - Weighted Scoring Model: Computes a 0-100 total score (staleness 30%, conflict 30%, scale 20%, mergeability 20%) and maps it to health grades: healthy, watch, warning, or dangerous. - Daily Sync Enforcement: Promotes a "must merge daily" policy where agents pull upstream changes and push mergeable work back to develop every day. - Use Case: Before merging a feature branch into develop, run the branch-health check; if the total score is below 60 or the grade is dangerous, the merge is blocked and the agent is prompted to sync develop and resolve conflicts first. ## Quick Start Ask the AI to run a branch health check on the current feature branch against develop and report the health grade and recommended action.

Frequently Asked Questions about dd-git-health

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

FAQPage Schema
How do I check if a Git feature branch is healthy before merging?

Run the branch-health check script against your base branch, which outputs a BranchHealthReport JSON with staleness, conflict count, changed files, and mergeability. A total score of 60 or above is required before merging into develop.

What metrics indicate a stale or risky Git branch?

Four metrics are tracked: days since last sync with develop, number of conflicting files detected by git merge-tree, files changed relative to develop, and whether the branch can merge cleanly. Thresholds are more than 1 day stale, over 5 conflict files, or over 20 changed files.

How is the Git branch health score calculated?

Each metric is scored 0-100 and weighted: staleness 30%, conflict difficulty 30%, change scale 20%, and mergeability 20%. The weighted average maps to grades: 80+ healthy, 60-79 watch, 40-59 warning, and below 40 dangerous.

Why merge back to develop daily instead of just syncing?

Syncing only pulls upstream changes without returning work to the mainline, so the branch still diverges. Merging completed, self-verified work back to develop daily prevents conflict growth that compounds with branch lifetime.

What happens when a branch health grade is dangerous?

A dangerous grade (score below 40) requires immediate intervention, such as splitting the branch or resolving conflicts before any merge attempt. Callers reading the BranchHealthReport must prompt for intervention and block merges when the total score is under 60.