Analyze git changes to determine release scope (marketplace/plugin/variants)
View on GitHubjayteealao/agent-skills
release-automation
plugins/release-automation/skills/detect-release-scope/SKILL.md
February 1, 2026
Select agents to install to:
npx add-skill https://github.com/jayteealao/agent-skills/blob/main/plugins/release-automation/skills/detect-release-scope/SKILL.md -a claude-code --skill detect-release-scopeInstallation paths:
.claude/skills/detect-release-scope/# Detect Release Scope
## Purpose
Analyzes git changes (modified, staged, and untracked files) to intelligently determine which release scope should be targeted: marketplace-level, per-plugin, or variants. This skill is the foundation for the release workflow, ensuring the correct versioning context is used.
## Input Context
The skill expects to be invoked in a git repository with changes to analyze. It will examine:
- Modified files (staged and unstaged)
- Newly created files
- Deleted files
- Current git branch
## Workflow
### 1. Gather Git Status
Use `git status --porcelain` to get a machine-readable list of all changed files:
```bash
git status --porcelain
```
Parse the output to categorize files by path patterns.
### 2. Categorize Files by Scope
Analyze each changed file path and increment counters for each scope:
**Marketplace Scope Indicators:**
- `.claude-plugin/marketplace.json`
- Root `README.md` (when marketplace.json also changed)
- Root `CHANGELOG.md`
**Plugin Scope Indicators:**
- `plugins/{plugin-name}/.claude-plugin/plugin.json`
- `plugins/{plugin-name}/skills/**/*`
- `plugins/{plugin-name}/commands/**/*`
- `plugins/{plugin-name}/README.md`
- `plugins/{plugin-name}/CHANGELOG.md`
**Variants Scope Indicators:**
- `variants/variants.json`
- `variants/*/CLAUDE.md`
- `variants/CHANGELOG.md`
- `variants/README.md`
### 3. Determine Primary Scope
Apply the following logic:
**Single Plugin Dominance:**
- If 70%+ of changes are within a single plugin directory → `plugin:<name>`
**Variants Dominance:**
- If 70%+ of changes are within `variants/` → `variants`
**Marketplace Changes:**
- If marketplace.json is modified AND no plugin dominance → `marketplace`
**Ambiguous Cases:**
- If changes are split across multiple scopes with no clear majority:
- Return all detected scopes with file counts
- Set confidence level to "ambiguous"
- Command will prompt user to choose
### 4. Validate Current Branch
Check if the current branch is `master`