From dx-core
Commit changes and optionally create an ADO pull request. Handles staging, commit messages with ADO work item IDs, rebasing onto the base branch, and PR creation via ADO MCP tools. Use when the user says "commit", "create PR", "open PR", "push changes", or any variation. This is the ONLY skill for commits and PRs — always use it instead of gh CLI or manual git workflows.
npx claudepluginhub easingthemes/dx-aem-flow --plugin dx-coreThis skill is limited to using the following tools:
You handle git commits and Azure DevOps pull requests.
Commits changes, pushes to branch, and opens pull request with adaptive description scaling to change complexity. Generates or updates PR descriptions standalone without git actions.
Creates local Git commits with conventional messages and GitHub issue references. Handles staging, pre-commit hooks, and automatic issue detection from changes.
Mandates invoking relevant skills via tools before any response in coding sessions. Covers access, priorities, and adaptations for Claude Code, Copilot CLI, Gemini CLI.
Share bugs, ideas, or general feedback.
You handle git commits and Azure DevOps pull requests.
Before anything else, read these two files:
shared/git-rules.md — all git/ADO conventions (base branch discovery, repo ID discovery, commit format, staging, rebase, PRs).ai/config.yaml — project config, preferences (Auto-Commit, Auto-PR)Follow every rule in git-rules.md. The steps below assume you have read it.
If .ai/me.md exists, read it. Use it to shape PR titles and descriptions. Commit message format (#<ID> <imperative>) is a structural constraint and always wins. If .ai/me.md doesn't exist, use defaults.
Parse the user's request and argument:
Run the context discovery script:
bash .ai/lib/gather-context.sh
This outputs CURRENT_BRANCH, BASE_BRANCH, and GITIGNORE_RULES. Use these values throughout — do NOT re-run discovery commands.
BASE_BRANCH value). If unknown, fall back to git-rules.md probing.feature/* or bugfix/* (check CURRENT_BRANCH above)Find it from (in priority order):
feature/#2416553-... or feature/2416553-... or bugfix/2416553-....ai/specs/<id>-*/ for the most recent specgit log -5 --oneline for #<digits> patternIf no ID found, ask the user.
Per git-rules.md — fetch, check if behind, rebase. Never merge.
Run git status. Stage files specifically per git-rules.md.
Before staging, determine which files are actually yours vs came from the base branch:
# Files changed only on this branch (yours)
git diff origin/$BASE_BRANCH...HEAD --name-only
# Compare with git status to spot foreign files
git status --short
If git status shows files NOT in the git diff ...HEAD --name-only output, those came from a merge or rebase — do NOT stage them.
implement.md status updatesgit status but not in your branch diffPresent the staged files to the user for confirmation before committing.
Craft message per git-rules.md format: #<ADO-ID> <imperative description>
If the user provided a message in the argument, use it (prepend the #<ID> if missing).
Commit and verify with git log -1 --oneline.
Only if the user asked for a PR.
Run all pre-flight checks from git-rules.md before creating:
git push -u origin $(git branch --show-current). If rejected after rebase, use --force-with-lease.Use mcp__ado__repo_create_pull_request per git-rules.md:
refs/heads/<current-branch>refs/heads/$BASE_BRANCH#<ID> <short description> (under 70 chars)<ADO-ID> to auto-link the work itemAfter creating the PR, verify merge status per git-rules.md. If conflicts detected, warn the user to rebase.
If the user asks, use mcp__ado__repo_update_pull_request with autoComplete: true.
/dx-pr-commit
Discovers work item ID from branch name, stages your changes (not base branch files), commits with #2435084 add language selector component.
/dx-pr-commit fix null check in hero component
Uses your message, prepends #<ID>: #2435084 fix null check in hero component.
/dx-pr-commit pr
Commits, pushes, creates ADO PR targeting the configured base branch with work item linked.
Cause: You're on development, main, or another protected branch.
Fix: Create a feature branch first: git checkout -b feature/<id>-<slug>.
Cause: After rebase, files from the base branch appear in git status.
Fix: The skill compares git status against git diff origin/<base>...HEAD --name-only to only stage YOUR changes.
Cause: An active PR already exists for this branch. Fix: The skill detects this and shows the existing PR URL. Update the existing PR instead.
After commit:
**Committed:** `#<ID> <message>`
**Files:** <count> files
**Hash:** `<short hash>`
**Branch:** <branch name>
After PR:
**PR #<pr-id>:** `<title>`
**Branch:** <source> → <$BASE_BRANCH>
**URL:** <PR web URL from ADO response>