agentleFS
antoniodiaz02antoniodiaz02/opencode-devops-skills/devops-pr/SKILL.md

devops-pr

Skill4 starsChanged 9 months agoMITView on GitHub

Pull Request templates and best practices for DevOps workflows. Trigger: When creating PR templates, reviewing code, or setting up PR workflows.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Do not allow bypassing the above settings

    line 436
  2. Distinctive:

    Small PRs: Keep PRs focused and under 400 lines

    line 468
  3. Distinctive:

    Clear titles: Use conventional commits format

    line 469
  4. Distinctive:

    Documentation: Update docs alongside code

    line 473
  5. Distinctive:

    No secrets: Never commit secrets or credentials

    line 474
  6. Distinctive:

    Status checks: Ensure all CI/CD checks pass

    line 477

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Purpose

You are a specialist in DevOps PR workflows. You help create PR templates, review checklists, and enforce quality standards.

PR Template

# .github/PULL_REQUEST_TEMPLATE.md

## Description

<!-- Provide a brief description of the changes -->

## Type of Change

- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
- [ ] ✨ New feature (non-breaking change which adds functionality)
- [ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] 📝 Documentation update
- [ ] 🔧 Configuration change
- [ ] ♻️ Refactoring (no functional changes)
- [ ] 🚀 Performance improvement
- [ ] 🧪 Test updates

## Related Issues

Closes #(issue number)
Related to #(issue number)

## Changes Made

<!-- List the main changes made in this PR -->

- 
- 
- 

## Infrastructure Changes

<!-- If applicable, describe infrastructure changes -->

- [ ] Terraform changes
- [ ] Kubernetes manifests changes
- [ ] Helm chart updates
- [ ] CI/CD pipeline changes
- [ ] Environment variables added/modified
- [ ] Secrets management changes

## Testing

<!-- Describe the testing you've done -->

### Unit Tests
- [ ] Unit tests added/updated
- [ ] All unit tests passing

### Integration Tests
- [ ] Integration tests added/updated
- [ ] All integration tests passing

### Manual Testing
- [ ] Tested locally
- [ ] Tested in dev environment
- [ ] Tested in staging environment

## Deployment Plan

<!-- Describe how this will be deployed -->

- [ ] Can be deployed during business hours
- [ ] Requires maintenance window
- [ ] Requires feature flag
- [ ] Requires database migration
- [ ] Requires infrastructure changes

### Rollback Plan

<!-- How to rollback if something goes wrong -->

## Screenshots (if applicable)

<!-- Add screenshots for UI changes -->

## Checklist

- [ ] My code follows the project's style guidelines
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published

## DevOps Checklist

- [ ] Terraform changes formatted (`terraform fmt`)
- [ ] Terraform changes validated (`terraform validate`)
- [ ] Helm charts linted (`helm lint`)
- [ ] Docker image builds successfully
- [ ] CI/CD pipeline passes
- [ ] Security scan passes (Trivy/Snyk)
- [ ] No secrets committed
- [ ] Environment variables documented
- [ ] Monitoring/alerts configured if needed
- [ ] Runbook updated if needed

## Reviewers

<!-- Tag specific reviewers if needed -->

@devops-team
@infrastructure-team

## Additional Notes

<!-- Any additional information for reviewers -->

Infrastructure PR Template

# .github/PULL_REQUEST_TEMPLATE/infrastructure.md

## Infrastructure Change Request

### Environment

- [ ] Development
- [ ] Staging
- [ ] Production
- [ ] All environments

### Change Type

- [ ] 🏗️ New infrastructure
- [ ] 🔧 Configuration change
- [ ] 🔄 Update existing resource
- [ ] 🗑️ Delete resource
- [ ] 🔐 Security update
- [ ] 💰 Cost optimization

## Terraform Changes

### Resources Modified

<!-- List resources being added/modified/deleted -->

```hcl
# Example output from terraform plan

Plan Output

# Paste relevant terraform plan output
Plan: X to add, Y to change, Z to destroy.

State Impact

  • No state changes
  • State migration required
  • State backup verified

Cost Impact

<!-- Estimate cost changes -->
  • Current monthly cost: $XXX
  • Estimated new cost: $XXX
  • Delta: $XXX (increase/decrease)

Security Considerations

  • No new security groups/rules
  • Security groups reviewed and minimal
  • No public access unless required
  • Encryption enabled
  • IAM roles follow least privilege
  • Secrets managed securely (Key Vault/Secrets Manager)

Testing

  • terraform fmt passed
  • terraform validate passed
  • terraform plan reviewed
  • Tested in dev environment
  • No drift detected

Deployment Plan

Pre-deployment

Deployment Steps

Post-deployment Verification

Rollback Plan

Downtime

  • Zero downtime deployment
  • Requires maintenance window
  • Estimated downtime: XXX minutes

Dependencies

<!-- List any dependencies -->
  • Requires approval from:
  • Depends on PR: #XXX
  • Requires manual steps:

Monitoring & Alerts

  • CloudWatch/Azure Monitor alerts configured
  • Dashboard updated
  • Runbook created/updated

Documentation

  • README updated
  • Architecture diagram updated
  • Runbook updated
  • Confluence/Notion page updated

Compliance

  • Meets security compliance requirements
  • Meets data privacy requirements
  • Audit logging enabled
  • Backup/DR strategy defined

Reviewers

@infrastructure-team @security-team

Additional Context

<!-- Any additional information -->

## PR Review Checklist

```markdown
# DevOps PR Review Checklist

## Code Quality

- [ ] Code is clean and readable
- [ ] No commented-out code
- [ ] No debug/console statements
- [ ] Error handling is appropriate
- [ ] Logging is meaningful and appropriate level

## Infrastructure as Code

### Terraform

- [ ] Resources properly named with consistent naming convention
- [ ] Variables used instead of hardcoded values
- [ ] Outputs defined for important values
- [ ] Tags applied to all resources
- [ ] Follows existing module structure
- [ ] State backend configured
- [ ] Locking enabled
- [ ] Remote state used for dependencies
- [ ] Data sources used where appropriate
- [ ] No provider version drift

### Kubernetes/Helm

- [ ] Resource limits set
- [ ] Resource requests set
- [ ] Health checks configured (liveness/readiness)
- [ ] Labels and annotations follow standards
- [ ] Secrets not hardcoded
- [ ] ConfigMaps used for configuration
- [ ] RBAC properly configured
- [ ] Network policies defined if needed
- [ ] Pod security context defined
- [ ] Horizontal Pod Autoscaler configured if needed

### Docker

- [ ] Multi-stage build used if applicable
- [ ] Base image from trusted registry
- [ ] Base image version pinned
- [ ] Non-root user used
- [ ] Minimal layers
- [ ] .dockerignore present
- [ ] No secrets in image
- [ ] Health check defined
- [ ] Proper logging to stdout/stderr

## CI/CD

- [ ] Pipeline runs successfully
- [ ] Tests pass
- [ ] Linting passes
- [ ] Security scan passes
- [ ] Build artifacts generated
- [ ] Version/tag strategy clear
- [ ] Deployment stages logical
- [ ] Rollback strategy defined

## Security

- [ ] No secrets committed
- [ ] No hardcoded credentials
- [ ] Sensitive data encrypted
- [ ] Least privilege principle followed
- [ ] Security groups minimal and specific
- [ ] HTTPS/TLS enforced
- [ ] Dependencies scanned for vulnerabilities
- [ ] Container images scanned

## Observability

- [ ] Appropriate logging added
- [ ] Metrics/monitoring configured
- [ ] Alerts defined if needed
- [ ] Tracing implemented if needed
- [ ] Dashboard updated

## Documentation

- [ ] README updated
- [ ] Inline comments for complex logic
- [ ] Architecture diagrams current
- [ ] Runbook updated
- [ ] Environment variables documented
- [ ] Migration steps documented

## Testing

- [ ] Unit tests added/updated
- [ ] Integration tests considered
- [ ] Test coverage adequate
- [ ] Edge cases tested
- [ ] Error scenarios tested

## Performance

- [ ] No obvious performance issues
- [ ] Resource sizing appropriate
- [ ] Caching used where beneficial
- [ ] Database queries optimized
- [ ] Indexes considered

## Cost

- [ ] Cost impact understood
- [ ] Right-sizing applied
- [ ] Reserved instances considered
- [ ] Auto-scaling configured appropriately
- [ ] Resources cleaned up properly

CODEOWNERS

# .github/CODEOWNERS

# Global owners
* @devops-team

# Infrastructure
/terraform/ @infrastructure-team @devops-team
/helm/ @kubernetes-team @devops-team
*.tf @infrastructure-team
*.tfvars @infrastructure-team

# CI/CD
/.github/workflows/ @devops-team @ci-cd-team
Dockerfile @devops-team
docker-compose.yml @devops-team

# Kubernetes
/k8s/ @kubernetes-team
*.yaml @kubernetes-team
*.yml @kubernetes-team

# Documentation
/docs/ @tech-writers @devops-team
README.md @tech-writers
CONTRIBUTING.md @tech-writers

# Security
/security/ @security-team
*.pem @security-team
*.key @security-team

Branch Protection Rules

Main Branch

  • Require pull request reviews before merging (2 approvals)
  • Require status checks to pass before merging
    • CI pipeline
    • Security scan
    • Terraform validate
    • Helm lint
  • Require branches to be up to date before merging
  • Require conversation resolution before merging
  • Require signed commits
  • Do not allow bypassing the above settings
  • Restrict who can push to matching branches
  • Require linear history

Auto-merge Configuration

# .github/workflows/auto-merge.yml
name: Auto Merge Dependabot PRs

on:
  pull_request:
    types: [opened, synchronize, reopened]

permissions:
  pull-requests: write
  contents: write

jobs:
  auto-merge:
    runs-on: ubuntu-latest
    if: github.actor == 'dependabot[bot]'
    steps:
      - name: Enable auto-merge
        run: gh pr merge --auto --squash "$PR_URL"
        env:
          PR_URL: ${{ github.event.pull_request.html_url }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Best Practices

  1. Small PRs: Keep PRs focused and under 400 lines
  2. Clear titles: Use conventional commits format
  3. Descriptive: Explain WHY, not just WHAT
  4. Self-review: Review your own PR before requesting reviews
  5. Tests: Include tests for all changes
  6. Documentation: Update docs alongside code
  7. No secrets: Never commit secrets or credentials
  8. Clean history: Squash commits when merging
  9. Reviewers: Tag appropriate teams/individuals
  10. Status checks: Ensure all CI/CD checks pass

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.