.codex/skills/premerge/SKILL.md
Complete all doc updates on feature branch, then hand off PR to user for merge
npx skillsauth add harshanandak/forge .codex/skills/premergeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Prepare the pull request for merge by completing ALL documentation updates on the feature branch, then hand off to the user.
The actual merge is always done by the user in the GitHub UI — never by this command.
This command makes the PR 100% complete: code + tests + docs in one unit. After this, the user merges once and there are no follow-up doc PRs needed.
/premerge <pr-number>
gh pr checks <pr-number>
All checks must be green before proceeding. If any fail, run /review <pr-number> first.
gh pr view <pr-number> --json baseRefName,headRefName
git fetch origin master
git status
If the feature branch is behind master, tell the user to rebase first:
⚠️ Branch is behind master — rebase before updating docs to avoid conflicts:
git rebase origin/master
git push --force-with-lease
Check each of the following and update if the feature affects it. Be selective — only update what genuinely changed.
A. CHANGELOG.md (always):
## [Unreleased] heading (create heading if not present)## [Unreleased]
### Added
- Authentication refresh tokens (PR #89, forge-a3f8)
B. README.md (if user-facing changes):
C. docs/reference/API_REFERENCE.md (if API changes):
D. Architecture docs (if structural changes):
docs/architecture/ diagrams, decision records (ADRs)E. CLAUDE.md — USER section only (if project conventions changed):
<!-- USER:START - Add project-specific learnings here as you work -->
...update only between these markers...
<!-- USER:END -->
⚠️ NEVER touch other managed blocks (e.g., <!-- AGENT:START/END -->).
F. AGENTS.md (if agent config, skills, or cross-agent workflow changed):
Commit doc updates to feature branch:
git add CHANGELOG.md README.md docs/ AGENTS.md CLAUDE.md
git commit -m "docs: update documentation for <feature-name>
- Updated: [list files changed]
- Reason: [brief explanation]"
git push
⚠️ After pushing: CI will re-trigger (Greptile, SonarCloud, etc.). Poll for up to 60 seconds. If checks are still pending after that, stop and ask the user to return to /premerge <pr-number> later. If new Greptile comments appear on the doc changes, run /review <pr-number> again.
bd sync
DO NOT run gh pr merge. Present the PR and wait for the user to merge.
Output:
✅ PR #<number> is ready to merge
All checks: ✓ passing
Documentation: ✓ updated on feature branch
Beads: ✓ synced
👉 Please merge in the GitHub UI:
https://github.com/<owner>/<repo>/pull/<number>
Recommended: Squash and merge (keeps main history clean)
After you merge, run /verify to confirm everything landed correctly.
bash scripts/beads-context.sh validate <id>
bash scripts/beads-context.sh stage-transition <id> premerge verify \
--summary "<docs updated, CI green, PR ready>" \
--artifacts "<updated doc files, PR URL>" \
--next "<merge instructions for user>"
<HARD-GATE: /premerge exit>
Do NOT run gh pr merge.
Do NOT suggest merging.
/premerge ends here. Output the PR URL and status. Wait for user.
"After you merge, run /verify to confirm everything landed correctly."
</HARD-GATE>
✓ CI checks: All passing
✓ Branch: Up to date with master
✓ Documentation updated:
- CHANGELOG.md: Entry added under [Unreleased]
- README.md: Features list updated
- CLAUDE.md: USER section updated with new pattern
- Committed: docs: update documentation for auth-refresh
✓ CI re-triggered after doc push — checks passed within the 60 second poll window
✓ Beads synced
✅ PR #89 is ready to merge
👉 Please merge in the GitHub UI:
https://github.com/harshanandak/forge/pull/89
After you merge, run /verify
gh pr merge — blocked by PreToolUse hook in .claude/settings.jsonUtility: /status → Understand current context before starting
Stage 1: /plan → Design intent → research → branch + worktree + task list
Stage 2: /dev → Implement each task with subagent-driven TDD
Stage 3: /validate → Type check, lint, tests, security — all fresh output
Stage 4: /ship → Push + create PR
Stage 5: /review → Address GitHub Actions, Greptile, SonarCloud
Stage 6: /premerge → Update docs, hand off PR to user (you are here)
Stage 7: /verify → Post-merge CI check on main
development
Pull issues, metrics, quality gates, and analysis data from SonarCloud. ALWAYS use this skill when the user mentions SonarCloud, asks about code quality metrics, wants to check PR quality gates, or needs to review security vulnerabilities and technical debt from static analysis. Also trigger during /review workflow when SonarCloud issues need addressing. Trigger on phrases like "SonarCloud", "quality gate", "code quality metrics", "technical debt", "coverage report", "static analysis issues", "security vulnerabilities from scan".
tools
Produces comprehensive research reports that go far beyond what built-in web search can achieve. Sends research tasks to Parallel AI's pro/ultra processors which spend 3-25 minutes autonomously crawling, reading, and synthesizing dozens of sources — returning structured reports with citations. Built-in WebSearch can only run a few queries; this skill runs an entire research pipeline externally. No binary install — requires PARALLEL_API_KEY in .env.local. ALWAYS use this skill instead of doing multiple WebSearch calls when the user needs a comprehensive report, market analysis, competitive landscape, industry deep-dive, strategic recommendations, or multi-source synthesis. This is the RIGHT tool for any research task that would require more than 3-4 web searches to answer properly. Also trigger during /plan Phase 2 research and /research workflows.
testing
Test content
testing
Test content