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

devops-notion

Skill4 starsChanged 9 months agoMITView on GitHub

Notion templates and documentation patterns for DevOps teams. Trigger: When creating DevOps documentation, runbooks, or knowledge bases.

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
  1. Distinctive:

    Add diagrams where helpful

    line 426
  2. Distinctive:

    Use templates for consistency

    line 428
  3. Distinctive:

    Keep runbooks in version control

    line 436
  4. Distinctive:

    Use consistent naming conventions

    line 439
  5. Distinctive:

    Create tables for structured data

    line 441
  6. Distinctive:

    Use relation properties to link pages

    line 442

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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 documentation and Notion organization. You help create structured documentation, runbooks, and knowledge bases for DevOps teams.

Notion Workspace Structure

📁 DevOps Team
├── 🏠 Home / Dashboard
├── 📚 Documentation
│   ├── Architecture
│   ├── Infrastructure
│   ├── Runbooks
│   ├── Postmortems
│   └── Onboarding
├── 🚀 Projects
├── 📋 Sprint Planning
├── 🎯 OKRs & Goals
├── 🔧 Tools & Resources
├── 📊 Metrics & Dashboards
└── 🎓 Learning & Development

Home Dashboard Template

# DevOps Team Dashboard

## Quick Links
- [AWS Console](https://console.aws.amazon.com)
- [Azure Portal](https://portal.azure.com)
- [GitHub Organization](https://github.com/myorg)
- [Grafana Dashboards](https://grafana.example.com)
- [PagerDuty](https://myorg.pagerduty.com)
- [Jira Board](https://myorg.atlassian.net)

## 🚨 Current Incidents
<!-- Link to incident tracker -->

## 📅 On-Call Schedule
| Week | Primary | Secondary |
|------|---------|-----------|
| Current | @person1 | @person2 |
| Next | @person3 | @person4 |

## 🚀 Active Deployments
| Service | Environment | Version | Status | Deployer |
|---------|-------------|---------|--------|----------|
| API | Production | v1.2.3 | ✅ Live | @person |
| Frontend | Staging | v2.0.0 | 🔄 In Progress | @person |

## 📊 Key Metrics (Last 7 Days)
- **Uptime**: 99.95%
- **MTTR**: 15 minutes
- **Deployment Frequency**: 12 deployments
- **Failed Deployments**: 1 (8.3%)
- **Open Incidents**: 0

## 📝 Recent Updates
- 2024-03-09: Migrated database to Azure SQL
- 2024-03-08: Implemented auto-scaling for API service
- 2024-03-07: Updated monitoring dashboards

## 🎯 This Week's Priorities
- [ ] Complete Kubernetes migration
- [ ] Update disaster recovery documentation
- [ ] Reduce database query latency
- [ ] Security audit review

Infrastructure Documentation Template

# Infrastructure Documentation: [Service/Component Name]

## Overview
**Purpose**: Brief description of what this infrastructure does
**Owner**: @team-name
**Last Updated**: 2024-03-09

## Architecture Diagram
<!-- Embed diagram or link to Lucidchart/Draw.io -->
![Architecture](link-to-diagram)

## Components

### Frontend
- **Technology**: React 18 + TypeScript
- **Hosting**: Azure Static Web Apps
- **CDN**: Azure CDN
- **Domain**: app.example.com

### Backend API
- **Technology**: Node.js 20 + Express
- **Hosting**: Azure Kubernetes Service (AKS)
- **Replicas**: 3 (min), 10 (max)
- **Endpoint**: api.example.com

### Database
- **Type**: PostgreSQL 15
- **Hosting**: Azure Database for PostgreSQL
- **Size**: General Purpose, 4 vCores, 32 GB RAM
- **Backup**: Daily, 7-day retention

### Cache
- **Type**: Redis 7
- **Hosting**: Azure Cache for Redis
- **Size**: Standard C2 (2.5 GB)

## Infrastructure as Code

### Terraform
- **Repository**: [github.com/myorg/infrastructure](https://github.com/myorg/infrastructure)
- **Directory**: `/terraform/production/app`
- **State**: S3 bucket `myorg-terraform-state`

### Helm Charts
- **Repository**: [github.com/myorg/helm-charts](https://github.com/myorg/helm-charts)
- **Chart**: `my-app`
- **Version**: v1.2.3

## Environments

| Environment | URL | Purpose | Auto-deploy |
|-------------|-----|---------|-------------|
| Development | dev.example.com | Feature testing | Yes (develop branch) |
| Staging | staging.example.com | Pre-production | Yes (main branch) |
| Production | app.example.com | Live users | Manual approval |

## Resource Groups (Azure)

| Name | Purpose | Region |
|------|---------|--------|
| myapp-prod-rg | Production resources | East US |
| myapp-staging-rg | Staging resources | East US |
| myapp-shared-rg | Shared services (ACR, Key Vault) | East US |

## Networking

### VPC/VNet Configuration
- **CIDR**: 10.0.0.0/16
- **Subnets**:
  - Public: 10.0.1.0/24, 10.0.2.0/24
  - Private: 10.0.10.0/24, 10.0.11.0/24
  - Database: 10.0.20.0/24, 10.0.21.0/24

### Security Groups / NSGs
- **app-sg**: Allow 80, 443 from ALB
- **db-sg**: Allow 5432 from app-sg only

## Monitoring & Alerts

### Dashboards
- [Grafana - Application Metrics](https://grafana.example.com/d/app)
- [Azure Monitor - Infrastructure](https://portal.azure.com/monitoring)

### Alerts
| Alert | Threshold | Channel |
|-------|-----------|---------|
| High CPU | > 80% for 5 min | PagerDuty |
| High Memory | > 85% for 5 min | PagerDuty |
| Error Rate | > 5% for 1 min | Slack #alerts |
| Response Time | > 2s p95 for 5 min | Slack #alerts |

## Access & Credentials

### Required Access
- Azure Subscription: `Production`
- GitHub Team: `@myorg/devops`
- Kubernetes Cluster: `myapp-prod-aks`

### Secrets Location
- **Azure Key Vault**: `myapp-prod-kv`
- **GitHub Secrets**: Organization level + Repository level

## Cost

**Monthly Cost (estimated)**: $2,500
- AKS: $1,200
- Database: $800
- Cache: $200
- Storage: $100
- Network: $200

## Disaster Recovery

### RTO (Recovery Time Objective)
4 hours

### RPO (Recovery Point Objective)
1 hour

### Backup Strategy
- Database: Automated daily backups, 7-day retention
- Configuration: Stored in Git
- Secrets: Backed up in separate Key Vault

## Related Documentation
- [Runbook: API Deployment](/runbooks/api-deployment)
- [Runbook: Database Failover](/runbooks/db-failover)
- [Architecture Decision Records](/docs/adrs)

Runbook Template

# Runbook: [Task Name]

## Metadata
- **Owner**: @person
- **Last Updated**: 2024-03-09
- **Frequency**: Ad-hoc / Daily / Weekly
- **Duration**: ~30 minutes
- **Risk Level**: 🟢 Low / 🟡 Medium / 🔴 High

## Purpose
Brief description of when and why to run this runbook.

## Prerequisites
- [ ] Access to Azure Portal
- [ ] kubectl configured for production cluster
- [ ] VPN connected
- [ ] Database backup verified

## Steps

### 1. Pre-deployment Checks
```bash
# Check current deployment status
kubectl get deployments -n myapp-prod

# Verify pod health
kubectl get pods -n myapp-prod

# Check recent logs for errors
kubectl logs -n myapp-prod deployment/myapp --tail=100

2. Deploy New Version

# Login to Azure
az login

# Get AKS credentials
az aks get-credentials --resource-group myapp-prod-rg --name myapp-prod-aks

# Deploy with Helm
helm upgrade --install myapp ./helm/my-app \
  --namespace myapp-prod \
  --values ./helm/my-app/values-prod.yaml \
  --set image.tag=v1.2.3 \
  --wait

3. Verify Deployment

# Check rollout status
kubectl rollout status deployment/myapp -n myapp-prod

# Test health endpoint
curl https://api.example.com/health

# Check recent logs
kubectl logs -n myapp-prod deployment/myapp --tail=50

4. Monitor

  • Check Grafana dashboard for anomalies
  • Monitor error rates in CloudWatch/Azure Monitor
  • Watch Slack #alerts channel

Rollback Procedure

Quick Rollback

# Rollback to previous version
helm rollback myapp -n myapp-prod

# Verify rollback
kubectl rollout status deployment/myapp -n myapp-prod

Manual Rollback

# List releases
helm list -n myapp-prod

# Rollback to specific revision
helm rollback myapp 5 -n myapp-prod

Troubleshooting

Issue: Pods not starting

Symptoms: Pods stuck in CrashLoopBackOff

Steps:

  1. Check pod logs: kubectl logs -n myapp-prod <pod-name>
  2. Describe pod: kubectl describe pod -n myapp-prod <pod-name>
  3. Check image exists in ACR
  4. Verify secrets are present

Issue: High error rate after deployment

Symptoms: Error rate > 5% in Grafana

Steps:

  1. Immediately rollback
  2. Check application logs
  3. Verify database connectivity
  4. Check external API dependencies

Success Criteria

  • All pods running and healthy
  • Health endpoint returns 200 OK
  • Error rate < 1%
  • Response time p95 < 500ms
  • No alerts triggered

Post-deployment Tasks

  • Update deployment log in Notion
  • Post in Slack #deployments
  • Monitor for 30 minutes
  • Update version in documentation

Related Runbooks

  • Database Migration
  • Incident Response
  • Scaling Guide

Notes

Any additional context, gotchas, or important information.


## Postmortem Template

```markdown
# Postmortem: [Incident Title]

## Incident Summary
**Date**: 2024-03-09
**Duration**: 2 hours 15 minutes
**Severity**: 🔴 Critical / 🟡 Major / 🟢 Minor
**Impact**: 100% of users unable to access service
**Incident Commander**: @person
**Status**: Resolved

## Timeline (UTC)

| Time | Event |
|------|-------|
| 14:00 | Alert triggered: High error rate |
| 14:02 | On-call engineer acknowledged |
| 14:05 | Incident escalated to team lead |
| 14:10 | Root cause identified: database connection pool exhausted |
| 14:15 | Applied fix: increased connection pool size |
| 14:30 | Service partially restored |
| 15:00 | Full service restored |
| 16:15 | Monitoring confirmed stable |

## Root Cause
The database connection pool was configured with a maximum of 10 connections, which was insufficient for the increased traffic after the marketing campaign launch. This caused the application to be unable to serve requests, resulting in 500 errors.

## Impact
- **Users Affected**: 100% of users
- **Duration**: 2 hours 15 minutes
- **Revenue Impact**: Estimated $5,000
- **SLA Breach**: Yes, 99.9% uptime SLA

## What Went Well
✅ Alert triggered immediately when error rate exceeded threshold
✅ On-call engineer responded within 2 minutes
✅ Root cause identified quickly (10 minutes)
✅ Communication with stakeholders was clear and timely
✅ Rollback plan was ready but not needed

## What Went Wrong
❌ Database connection pool not sized for expected load
❌ Load testing did not include realistic traffic patterns
❌ No alerts for connection pool exhaustion
❌ Documentation didn't mention connection pool configuration

## Action Items

| Action | Owner | Deadline | Status |
|--------|-------|----------|--------|
| Increase database connection pool to 50 | @dev1 | 2024-03-10 | ✅ Done |
| Add CloudWatch alarm for connection pool usage | @dev2 | 2024-03-12 | 🔄 In Progress |
| Update load testing scenarios | @qa1 | 2024-03-15 | ⏳ Pending |
| Document connection pool configuration | @dev1 | 2024-03-11 | ✅ Done |
| Implement connection pool monitoring dashboard | @dev3 | 2024-03-20 | ⏳ Pending |
| Review capacity planning process | @lead | 2024-03-25 | ⏳ Pending |

## Lessons Learned
1. **Load testing must match production patterns**: Our load tests didn't account for the spike in traffic from the marketing campaign
2. **Monitor resource limits**: We should have alerts for connection pool, memory, CPU, and other constrained resources
3. **Document critical configurations**: Connection pool size is a critical configuration that wasn't documented
4. **Capacity planning**: Need better process for anticipating and planning for traffic increases

## Related Incidents
- [2024-02-15: Database Timeout](/postmortems/2024-02-15-db-timeout)
- [2024-01-20: High Latency](/postmortems/2024-01-20-latency)

## Attachments
- [Grafana Dashboard Screenshot](link)
- [Slack Thread](link)
- [PagerDuty Incident](link)

Best Practices

Documentation Standards

  1. Keep documentation up-to-date
  2. Include "Last Updated" dates
  3. Use consistent formatting
  4. Add diagrams where helpful
  5. Link related documents
  6. Use templates for consistency

Runbook Best Practices

  1. Make runbooks executable (copy-paste commands)
  2. Include verification steps
  3. Document rollback procedures
  4. Add troubleshooting section
  5. Include success criteria
  6. Keep runbooks in version control

Notion Organization

  1. Use consistent naming conventions
  2. Tag pages appropriately
  3. Create tables for structured data
  4. Use relation properties to link pages
  5. Set up automated reminders for reviews
  6. Archive outdated content

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.