Loading...
Loading...
Ship a change via a feature branch and pull request — never directly to the default branch. Use after any code change, fix, refactor, or docs update that needs to land on main. Branches are named `<card-number>` from the FluentBoards card. Commits go through the husky pre-commit hook (lint-staged); pushes go to the feature branch only; the PR body links back to the card. Hard refuses any push to main / master / trunk.
npx skill4agent add wpdevelopers/essential-addons-for-elementor-lite pr-workflowsrc/git status # working-tree state
git branch --show-current # current branch
gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name' # default branch (don't assume "main")
gh auth status # confirm gh CLI logged in<card-number>| Example | Valid? |
|---|---|
| ✅ |
| ❌ slug not allowed |
| ❌ prefix not allowed |
# If currently on default branch → create feature branch
git checkout -b <number>
# If already on a feature branch matching the card → continue
# If on a different feature branch → stop, ask the user which branch this work belongs togit diff # review all unstaged changes
git diff --stat # file list with line counts
git add <specific-file> ... # stage by name — never `-A` or `.`
git diff --cached # confirm staged diff matches intent.env*.keycredentials*.DS_Storesrc/npm run buildassets/front-end/**/*.min.{css,js}languages/*.pot<type>: <imperative summary, ≤72 chars>
<body — explain WHY, not WHAT (the diff already shows what)>
Refs: #<card-number>fixfeatrefactordocschoreperfteststylenpx lint-staged--no-verifygit commit --amendgit push -u origin <number> # first push
git push # subsequent pushesREFUSED: Cannot push to default branch (<name>).
This skill enforces feature-branch-only workflow. Create a feature branch first.git push --force--force-with-leasegh pr create --title "<type>: <summary>" --body "$(cat <<'EOF'
## Summary
- <1–3 bullets — what changed and why>
## Test Plan
- [ ] <manual test step on http://localhost:8888>
- [ ] `npm run test:e2e` green
- [ ] Visually verified <widget / area> on test site
## Breaking Changes
<None — OR list with migration notes if hooks / control ids / rendered classes changed>
## Pro Repo Coordination
<None — OR: shared trait/class/hook touched. Pro PR: #XXXX>
## Related
- FluentBoards card: https://projects.startise.com/wp-admin/admin.php?page=fluent-boards#/boards/30 (card #<card-number>)
EOF
)"| ❌ Never do | Why |
|---|---|
| Skill's primary contract — feature-branch only |
| Destructive, history rewrite for others |
| Pre-commit hooks exist for a reason; failure = real lint/format issue |
| Sensitive file leak risk |
| Rewrites shared history |
| Per CLAUDE.md, never touch git config |
Skip | Repo tracks compiled assets |
| Bundle unrelated changes into one PR | Hard to review, hard to revert |
| Situation | Handling |
|---|---|
| User-uncommitted unrelated changes | Stop. List them. Ask: stash / commit-to-different-branch / abandon |
| Branch already exists on remote | Ask: continue on existing, or new branch with |
| Pre-commit hook fails | Show output, fix lint root cause, re-stage, new commit |
| Merge conflict during rebase | Stop. Show conflict files. User resolves manually — never auto-pick a side |
| |
| Card number unknown / not given | Refuse to create branch — ask the user; the FluentBoards link is the source of truth |
| Diff > 500 lines, mixed concerns | Suggest splitting into multiple atomic PRs before pushing |
Related