jmservera/aithena/ci-pr-gates
Claude Code and agent skill by jmservera/aithena
- community
Checking that the SKILL.md file is still in the repository.
CI gate patterns, PR integration checks, branch protection handling, milestone review gates, and release validation
Install
npx vskill@latest install jmservera/aithena/ci-pr-gatesSKILL.md
The same SKILL.md was published earlier as jmservera/aithena/ci-pr-gates.
Context
Apply when designing CI workflows, reviewing PRs, handling branch protection, auditing milestones, or validating releases. Covers the full gate lifecycle from PR creation through release approval.
Pattern 1: Tiered CI Merge Gates
Tier 1 — Auto-Merge (Low Risk)
Trigger: Dependabot patch/minor updates
- Gate on trusted actors:
if: github.actor == 'dependabot[bot]' - Checkout with explicit SHA:
ref: ${{ github.event.pull_request.head.sha }} - Disable credential persistence:
persist-credentials: false - All unit tests + linting must pass across all services
- Auto-merge via
actions/github-scriptwith squash strategy - Label:
dependabot:auto-merge
Tier 2 — Manual Review (Medium Risk)
Trigger: Major version bumps, breaking changes
- Label:
dependabot:manual-review - Reviewer checks changelog, test coverage, rollback plan
- Approval required before merge
Tier 3 — Security Scan (High Risk)
Trigger: Changes to auth, crypto, secrets, serialization
- Static security scanning (Bandit, npm audit)
- No new HIGH/CRITICAL vulnerabilities without baseline exception
- Security lead review required
pull_request_target Safety Checklist
- [ ] Gate on trusted actors only
- [ ] Explicit SHA checkout (never branch name)
- [ ] Disabled credential persistence
- [ ] No arbitrary code from PR
- [ ] Concurrency controlled
Pattern 2: PR Integration Checks
Before merging any PR to dev:
Frontend PRs (aithena-ui/):
Backend PRs (Python services):
Infrastructure PRs (compose, nginx):
Until CI covers all paths, the reviewing agent must run these manually.
Container registry/transient bootstrap failures
If a container workflow fails before repository build steps while pulling BuildKit or base images (for example Docker Hub context deadline exceeded) and the same workflow later passes on the PR branch, treat it as non-code-related CI noise, not a PR blocker. Open a resiliency follow-up only if the timeout repeats across runs or services; then evaluate BuildKit image mirroring, retry wrappers around bootstrap pulls, or runner/network health.
Pattern 3: Branch Protection Strict Mode
When branch protection requires "up to date before merging":
- Use `gh pr merge --admin --merge` to bypass "branch is not up to date" after checks pass
- Merge in dependency order — if PR B depends on PR A, merge A first
- Expect cascading BEHIND states — normal after merging PR 1 of N
- Retry with 5–10s delays between sequential merges
- Batch independent PRs with
--adminto avoid waiting for CI re-runs
Warning: --admin bypasses ALL protection rules — only use when checks passed and reviews approved.
Pattern 4: Milestone Gate Review
Before closing a milestone, audit every merged issue:
Security checks:
- Scan for
# noqa: S608(SQL injection suppression) — justify each instance - Look for dynamic SQL construction, auth bypass paths
- Verify input validation on public endpoints
Performance checks:
- Flag sequential batch operations on >100 items
- Check for N+1 query patterns
- Verify Redis uses
scan_iter()/mget(), notKEYS/per-key loops - Look for missing pagination on list endpoints
Architecture checks:
- New endpoints follow existing patterns (FastAPI, Pydantic)
- New config uses dataclass-based
config.pywith env vars - Docker health checks in
docker-compose.yml, not Dockerfiles
Verdict: APPROVE or BLOCK with specific findings.
Pattern 5: Release Gate (Dev → Main)
Owner: Newt (PM) — no release without explicit approval.
Quality Gate
- ✅ Milestone clear: 0 open issues (check BOTH milestone AND issue labels)
- ✅ All tests pass:
uv run pytest -vper service +npx vitest runfor frontend - ✅ Frontend builds clean:
npm run build - ✅ Docker Compose validates:
python3 -c "import yaml; yaml.safe_load(open('docker-compose.yml'))"
Documentation Gate (REQUIRED — blocks release)
- ✅ Release notes:
docs/release-notes/vX.Y.Z.md - ✅ Test report:
docs/test-reports/vX.Y.Z.md - ✅ User manual updated
- ✅ Admin manual updated
- ✅ CHANGELOG.md updated (Keep a Changelog format)
- ✅ README.md current
Test Count Baseline
Typical range: 467–628 tests total. Significant drops are red flags.
Anti-Patterns
- ❌ Using
pull_request_targetwithout actor guards - ❌ Checking out branch name instead of SHA
- ❌ Auto-merging major version bumps
- ❌ Merging frontend PRs without
npm run build - ❌ Skipping
--legacy-peer-depsfor npm install - ❌ Approving release without docs committed
- ❌ Merging dev→main without Newt's sign-off
- ❌ Rubber-stamping milestone reviews — read the diffs
- ❌ Blocking milestone gate on style issues (save for PR review)
- ❌ Rebasing each PR onto updated base when using
--adminmerge
References
.github/workflows/ci.yml,.github/workflows/dependabot-automerge.yml- PR #412 (Dependabot auto-merge), PR #432 (v1.4.0)
docs/security/baseline-exceptions.md
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.squad/skills/ci-pr-gates/SKILL.md
Popularity
- Repository stars
- 1
- Repository forks
- 1
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/jmservera/aithena/ci-pr-gates)