build-and-ci-gates
Skill28 starsChanged 3 months agoApache-2.0View on GitHub
Implements linters, code formatters, and automated build pipelines (CI/CD) to prevent syntax errors, enforce style consistency, and prevent failing builds from being merged. Use this skill when asked to add linters, configure docker builds, or set up GitHub Actions workflows.
In this repository34 other files it gives its agents.
- bigquery-query-optimizationSkill
- cdc-scd-patternsSkill
- code-implementerSkill
- code-smells-expertSkill
- commit-expertSkill
- compliance-verifierSkill
- context-captureSkill
- context-restoreSkill
- database-migration-expertSkill
- design-spec-expertSkill
- documentation-expertSkill
- flutter-architecture-decisionsSkill
- flutter-performance-profilingSkill
- flutter-release-engineeringSkill
- flutter-review-checklistSkill
- flutter-senior-orchestrationSkill
- flutter-test-strategySkill
- flutter-upgrade-migrationSkill
- gcp-data-engineeringSkill
- guidelines-karpathySkill
- loop-engineeringSkill
- performance-scalabilitySkill
- product-analystSkill
- pull-request-expertSkill
- python-expertSkill
- qa-testerSkill
- refactoring-code-expertSkill
- repo-researchSkill
- security-auditSkill
- senior-architect-engineeringSkill
- senior-dev-orchestratorSkill
- sql-query-optimizationSkill
- test-driven-developmentSkill
- testing-expertSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
Before submitting code changes or opening PRs, execute automated formatting and lint checks:
- Very specific: line 30
If formatting or linting checks fail, immediately fix them using automated tools (e.g., ruff format, black ., eslint --fix).
- Very specific: line 35
Containerization: Use multi-stage Dockerfile builds to produce minimal, non-root runner images.
- Distinctive: line 44
Ensure the hook fails closed—aborting the commit immediately if any check fails.
- Very specific: line 62
Claude Code: Run run_checks.py in the workspace terminal before generating pull requests.
- Distinctive: line 63
Antigravity: Verify that CI gate checks pass prior to declaring build completion.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Build and CI Gates Skill
Overview
This skill establishes automated build pipelines, code quality gates, and Continuous Integration (CI/CD) workflows. It acts as a Build Automation and CI/CD Engineer, ensuring that code styling, linting, typing, and test suites are enforced deterministically by automated systems rather than subjective human debate, blocking defective code before it ever merges.
When to Use
Trigger Scenarios
- Running comprehensive local code quality, formatting, and linting checks before committing.
- Configuring or updating CI/CD pipelines (e.g., GitHub Actions workflows).
- Installing local git pre-commit hooks to block defective commits fail-closed.
- Designing containerized multi-stage Docker builds with minimal security attack surface.
When NOT to Use
- Authoring unit tests and mocks: Route to
test-driven-development. - Writing application feature code: Route to
python-expertorcode-implementer. - Stand-alone security penetration reviews: Route to
security-audit. - Diagnosing code design smells: Route to
code-smells-expert.
Process
Phase 1: Local Code Verification
Before submitting code changes or opening PRs, execute automated formatting and lint checks:
python3 ./skills/build-and-ci-gates/scripts/run_checks.pyIf formatting or linting checks fail, immediately fix them using automated tools (e.g., ruff format, black ., eslint --fix).
Phase 2: Pipeline Integration (CI/CD)
Configure pipeline definitions using pinned versions and deterministic environments:
- GitHub Actions: Scaffold or update
.github/workflows/ci.ymlusing the CI template reference. - Containerization: Use multi-stage
Dockerfilebuilds to produce minimal, non-root runner images. - Configuration Pinning: Pin all linter and formatter settings (
pyproject.toml,.eslintrc.json,pubspec.yaml) in repository root.
Phase 3: Git Hook Automation (Pre-Commit Gate)
Install the automated pre-commit gate to intercept syntax errors, failing tests, or secret leaks locally:
- Symlink or copy the hook script to
.git/hooks/pre-commit:python3 ./skills/build-and-ci-gates/scripts/pre_commit_quality_gate.py - Ensure the hook fails closed—aborting the commit immediately if any check fails.
Usage
Commands & Automation Scripts
# Run local code verification checks (lint, format, basic tests)
python3 ./skills/build-and-ci-gates/scripts/run_checks.py
# Run pre-commit quality gate check directly
python3 ./skills/build-and-ci-gates/scripts/pre_commit_quality_gate.pyExample Prompts
- "Set up a GitHub Actions workflow that runs linting, type checks, and tests on every pull request."
- "Configure pre-commit hooks to prevent unformatted code or secret leaks from being committed."
- "Create a multi-stage Dockerfile for our Python service that runs as a non-root user."
Host Execution Instructions
- Claude Code: Run
run_checks.pyin the workspace terminal before generating pull requests. - Antigravity: Verify that CI gate checks pass prior to declaring build completion.
Red Flags
- Committing code without running local linter and formatter gates.
- Configuring pre-commit hooks that fail open (allowing broken commits when tools are missing).
- Building Docker images running as root or leaving compilers and build tools in production images.
- Bypassing CI quality gates with force-pushes or
--no-verifyflags.
Verification
- Automated check runner passes cleanly with zero errors:
python3 ./skills/build-and-ci-gates/scripts/run_checks.py - Pre-commit hook executes and blocks defective commits:
python3 ./skills/build-and-ci-gates/scripts/pre_commit_quality_gate.py - CI configuration passes schema validation and triggers on pull requests.
- Production containers build using multi-stage non-root images.
References
For workflow templates, Dockerfiles, and pre-commit configurations:
- CI/CD & Lint Templates Reference
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

