devops-pipeline

Implement pre-commit hooks and GitHub Actions for quality assurance. Use when asked to "setup CI/CD", "add pre-commit hooks", "create GitHub Actions", "setup quality gates", "automate testing", "add linting to CI", "setup code quality checks", "configure CI pipeline", "add automated checks", or any DevOps automation for code quality. Detects project type and configures appropriate tools. Trigger this skill whenever the user mentions CI, CD, pre-commit, GitHub Actions, linting automation, or quality gates — even if they don't use those exact terms.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "devops-pipeline" with this command: npx skills add montimage/skills/montimage-skills-devops-pipeline

DevOps Pipeline

Implement comprehensive DevOps quality gates adapted to project type.

Repo Sync Before Edits (mandatory)

Before making any changes, sync with the remote to avoid conflicts:

branch="$(git rev-parse --abbrev-ref HEAD)"
git fetch origin
git pull --rebase origin "$branch"

If the working tree is dirty, stash first, sync, then pop. If origin is missing or conflicts occur, stop and ask the user before continuing.

Workflow

0. Create Feature Branch

Before making any changes:

  1. Check the current branch — if already on a feature branch for this task, skip
  2. Check the repo for branch naming conventions (e.g., feat/, feature/, etc.)
  3. Create and switch to a new branch following the repo's convention, or fallback to: feat/devops-pipeline

1. Analyze Project

Detect project characteristics:

# Check for package files and configs
ls -la package.json pyproject.toml Cargo.toml go.mod pom.xml build.gradle *.csproj 2>/dev/null
ls -la .eslintrc* .prettierrc* tsconfig.json mypy.ini setup.cfg ruff.toml 2>/dev/null
ls -la .pre-commit-config.yaml .github/workflows/*.yml 2>/dev/null

Identify:

  • Languages: JS/TS, Python, Go, Rust, Java, C#, etc.
  • Frameworks: React, Next.js, Django, FastAPI, etc.
  • Build system: npm, yarn, pnpm, pip, poetry, cargo, go, maven, gradle
  • Existing tooling: Linters, formatters, type checkers already configured

2. Configure Pre-commit Hooks

Install pre-commit framework:

pip install pre-commit  # or brew install pre-commit

Create .pre-commit-config.yaml based on detected stack. See references/precommit-configs.md for language-specific configurations.

Install hooks:

pre-commit install
pre-commit run --all-files  # Test on existing code

3. Create GitHub Actions Workflows

Create .github/workflows/ci.yml mirroring pre-commit checks. See references/github-actions.md for workflow templates.

Key principles:

  • Mirror pre-commit checks for consistency
  • Use caching for dependencies
  • Run on push and pull_request
  • Add matrix testing for multiple versions if needed

4. Verify Pipeline

# Test pre-commit locally
pre-commit run --all-files

# Commit and push to trigger CI
git add .pre-commit-config.yaml .github/
git commit -m "ci: add pre-commit hooks and GitHub Actions"
git push

Check GitHub Actions tab for workflow status.

Tool Selection by Language

LanguageFormatterLinterSecurityTypes
JS/TSPrettierESLintnpm auditTypeScript
PythonBlack/RuffRuffBanditmypy
Gogofmtgolangci-lintgosecbuilt-in
RustrustfmtClippycargo-auditbuilt-in
Javagoogle-java-formatCheckstyleSpotBugs-

Resources

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

devops-pipeline

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

code-review

No summary provided by upstream source.

Repository SourceNeeds Review
Security

skill-auditor

No summary provided by upstream source.

Repository SourceNeeds Review