用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/heldernoid/agentic-build-templates --skill git-branch命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | git-branch |
| description | Manage, scan, and prune branches across multiple local Git repositories using git-branch-dashboard |
Use this skill when the user needs to:
read:repo) for PR statusread_api) for MR statusnpm install -g git-branch-dashboard
Or run from source:
git clone https://github.com/your-org/git-branch-dashboard
cd git-branch-dashboard
pnpm install
pnpm build
pnpm link --global
# Start the dashboard server (opens http://127.0.0.1:7654)
git-branch-dash start
# Add a local repository
git-branch-dash repo add /path/to/my-repo
# Set GitHub token for PR status
git-branch-dash config set github-token ghp_...
# Trigger a manual scan
git-branch-dash scan
Add each sub-package as a separate repository path if they are independent Git clones. If they share a single .git directory, add the root once.
git-branch-dash repo add /workspace/packages/api
git-branch-dash repo add /workspace/packages/web
git-branch-dash repo add /workspace/packages/shared
The prune command deletes local branches classified as stale or very stale. It never touches remote branches.
# Dry run first to preview what would be deleted
git-branch-dash prune --dry-run
# Prune a specific repo
git-branch-dash prune --repo my-app
# Prune all repos (prompts for confirmation per repo)
git-branch-dash prune --all
The dashboard server runs a background scanner on a configurable interval. The default is every 15 minutes. Change it in Settings or via environment variable:
GBDASH_SCAN_INTERVAL=5 git-branch-dash start
Set to 0 to disable automatic scanning.
All branch data is available via the REST API at http://127.0.0.1:7654/api/:
# All stale branches
curl http://127.0.0.1:7654/api/branches/stale
# Branches for a specific repo
curl http://127.0.0.1:7654/api/repos/{id}/branches
| Command | Description |
|---|---|
git-branch-dash start | Start the dashboard server |
git-branch-dash start --port 8080 | Start on a custom port |
git-branch-dash scan | Scan all configured repositories immediately |
git-branch-dash scan --repo <name> | Scan a single repository |
git-branch-dash prune | Interactive stale branch pruning |
git-branch-dash prune --repo <name> | Prune a specific repository |
git-branch-dash prune --dry-run | Preview branches to be pruned |
git-branch-dash prune --all | Prune all repos without prompting per-repo |
git-branch-dash repo add <path> | Add a local Git repository |
git-branch-dash repo list | List all tracked repositories |
git-branch-dash repo remove <name> | Remove a tracked repository |
git-branch-dash config set <key> <value> | Set a config value |
git-branch-dash config show | Show current configuration |
git-branch-dash --help | Show help |
git-branch-dash --version | Show version |
| Variable | Description | Default |
|---|---|---|
GBDASH_PORT | Dashboard port | 7654 |
GBDASH_HOST | Bind address | 127.0.0.1 |
GBDASH_DATA_DIR | SQLite and config directory | ~/.git-branch-dashboard |
GBDASH_GITHUB_TOKEN | GitHub token (overrides config file) | (from config) |
GBDASH_GITLAB_TOKEN | GitLab token (overrides config file) | (from config) |
GBDASH_SCAN_INTERVAL | Auto-scan interval in minutes | 15 |
GBDASH_STALE_DAYS | Days until a branch is stale | 31 |
GBDASH_VERY_STALE_DAYS | Days until a branch is very stale | 90 |
GBDASH_LOG_LEVEL | Log level: debug, info, warn, error | info |
| Tier | Age | Color |
|---|---|---|
| Fresh | 0-7 days | Green |
| Aging | 8-30 days | Yellow |
| Stale | 31-90 days | Orange |
| Very stale | 90+ days | Red |
Thresholds are configurable per-instance via Settings or environment variables. The default branch (main/master) is never classified as stale regardless of last commit date.
"No repositories tracked" - Add at least one repository with git-branch-dash repo add <path>. The path must be an absolute path to a local Git clone.
PR badges not showing - Configure a GitHub token: git-branch-dash config set github-token ghp_.... Verify the token has read:repo scope and the repository owner/slug are correct in the repository settings.
Scan fails with "not a git repository" - Verify the path passed to repo add contains a .git directory. Submodules must be added individually if they have separate remotes.
Stale thresholds not updating - After changing thresholds in Settings, trigger a manual scan with git-branch-dash scan so all branches are reclassified against the new values.
Port 7654 already in use - Start on a different port: GBDASH_PORT=7655 git-branch-dash start or set it in the config file.
Database locked error - Only one instance of git-branch-dash should run at a time. Stop any existing instance before starting a new one.