fabrico-implementing-ci-cd
Skill2 starsChanged 4 months agoMITView on GitHub
CI/CD pipeline design patterns and deployment strategies. Use when designing pipelines, implementing deployment strategies, or setting up automated delivery.
In this repository42 other files it gives its agents.
- docs/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- fabrico-architecture-designingSkill
- fabrico-building-admin-dashboardsSkill
- fabrico-building-admin-resourcesSkill
- fabrico-building-lean-applicationsSkill
- fabrico-codebase-analysingSkill
- fabrico-code-reviewingSkill
- fabrico-creating-agentsSkill
- fabrico-creating-instructionsSkill
- fabrico-creating-promptsSkill
- fabrico-creating-skillsSkill
- fabrico-designing-multi-cloud-architectureSkill
- fabrico-e2e-testingSkill
- fabrico-engineering-promptsSkill
- fabrico-ensuring-accessibilitySkill
- fabrico-implementation-gap-analysingSkill
- fabrico-implementing-backendSkill
- fabrico-implementing-formsSkill
- fabrico-implementing-frontendSkill
- fabrico-implementing-kubernetesSkill
- fabrico-implementing-observabilitySkill
- fabrico-implementing-terraform-modulesSkill
- fabrico-improving-codebasesSkill
- fabrico-improving-uiSkill
- fabrico-jira-task-formattingSkill
- fabrico-managing-secretsSkill
- fabrico-optimizing-cloud-costSkill
- fabrico-optimizing-frontendSkill
- fabrico-planning-migrationSkill
- fabrico-preparing-applications-for-aiSkill
- fabrico-preparing-applications-for-saasSkill
- fabrico-reverse-engineering-specSkill
- fabrico-reviewing-frontendSkill
- fabrico-sql-and-database-understandingSkill
- fabrico-task-analysingSkill
- fabrico-task-extractingSkill
- fabrico-task-quality-reviewingSkill
- fabrico-technical-context-discoveringSkill
- fabrico-transcript-processingSkill
- fabrico-ui-verifyingSkill
- fabrico-writing-hooksSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Check which CI/CD platform the project uses:
- Very specific: line 24
Use the context7 MCP server (tools mcp__context7__*) to look up platform-specific syntax for the detected platform.
- Very specific: line 54
Rule: Prefer OIDC federation over long-lived access keys.
- Distinctive: line 104
Rule: Never use local state in CI/CD.
- Distinctive: line 132
Rule: Always use OIDC federation.
- Distinctive: line 172
No plan artifact between plan and apply jobs
- Distinctive: line 175
Not posting plan output to PR for review
≈ “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
CI/CD Pipeline Patterns
When to Use
- Designing new CI/CD pipelines
- Implementing deployment strategies (rolling, blue-green, canary)
- Setting up GitOps workflows
- Configuring secure CI/CD credentials
Platform Detection
Check which CI/CD platform the project uses:
.github/workflows/*.yml→ GitHub Actionsbitbucket-pipelines.yml→ Bitbucket Pipelines.gitlab-ci.yml→ GitLab CIazure-pipelines.yml→ Azure PipelinesJenkinsfile→ Jenkins
Use the context7 MCP server (tools mcp__context7__*) to look up platform-specific syntax for the detected platform.
Pipeline Structure
Lint → Test → Build → Deploy (staging) → Deploy (production)
↓
Artifacts & CachingRule: Each stage should be independent and cacheable.
Deployment Strategy Decision
| Strategy | Use When | Rollback | Risk |
| Rolling | Stateless apps, can tolerate mixed versions | Slow | Low |
| Blue-Green | Need instant rollback, DB migrations | Instant | Low |
| Canary | High traffic, want gradual validation | Instant | Very Low |
| Recreate | Dev/test, breaking changes only | Slow | High |
Credentials Strategy Decision
| Scenario | Approach |
| AWS from GitHub/GitLab | OIDC federation (no long-lived keys) |
| AWS from Bitbucket | Repository variables + IAM role |
| Multi-cloud | HashiCorp Vault with CI/CD auth |
| Simple/small team | Platform native secrets |
Rule: Prefer OIDC federation over long-lived access keys. Use the fabrico-managing-secrets skill (.claude/skills/fabrico-managing-secrets/SKILL.md) for implementation details.
Monorepo Strategy
| Tool | Detection | Approach |
| Nx | nx.json | nx affected --target=build |
| Turborepo | turbo.json | turbo run build --filter=...[origin/main] |
| None | - | Path filtering in CI config |
Process
- Discover context → Use the
fabrico-technical-context-discoveringskill (.claude/skills/fabrico-technical-context-discovering/SKILL.md) to find existing CI patterns - Detect platform → Check for CI config files listed above
- Look up syntax → Use the context7 MCP server (tools
mcp__context7__*) for platform-specific YAML syntax - Choose deployment strategy → Use decision table above
- Configure credentials → Use the
fabrico-managing-secretsskill (.claude/skills/fabrico-managing-secrets/SKILL.md) - Validate → Run pipeline in dry-run/plan mode first
Checklist
- Secrets stored in platform secret manager (not in code)
- Caching configured for dependencies
- Branch protection enabled on main/master
- Environment approvals required for production
- Rollback procedure documented
- Pipeline uses pinned versions (not
@latest)
Anti-Patterns
- Storing secrets in code or logs
- Skipping tests for "quick fixes"
- Using
latesttags in production images - Deploying without artifact verification
- Direct pushes to main/master
Infrastructure as Code Pipelines
Terraform/Terragrunt Pipeline Structure
Lint (fmt) → Validate → Security Scan → Plan → [Manual Approval] → Apply
↓
Save Plan Artifact
↓
PR Comment with DiffRule: Never use local state in CI/CD. Always configure remote backend before pipeline runs.
Required Elements
| Element | Implementation | Why |
| AWS Credentials | aws-actions/configure-aws-credentials@v4 with OIDC | No long-lived secrets |
| State Backend | S3 + DynamoDB locking | Persistent state, concurrent access protection |
| Plan Artifact | terraform plan -out=tfplan + upload artifact | Ensure apply matches reviewed plan |
| PR Comment | actions/github-script or terraform-pr-commenter | Reviewers see changes before merge |
| Security Scan | aquasecurity/tfsec-action or bridgecrewio/checkov-action | Catch misconfigurations early |
| Production Guard | environment: production with required reviewers | Human approval before infra changes |
| Cache | actions/cache for .terraform directory | Faster init, reduced API calls |
GitHub Actions OIDC for AWS
permissions:
id-token: write
contents: read
steps:
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-arn: ${{ secrets.AWS_ROLE_ARN }}
aws-region: ${{ vars.AWS_REGION }}Rule: Always use OIDC federation. Never store AWS access keys as secrets.
Environment Protection
apply:
runs-on: ubuntu-latest
needs: plan
environment: production # Requires manual approval
if: github.ref == 'refs/heads/main' && github.event_name == 'push'Configure in GitHub: Settings → Environments → production → Required reviewers.
Plan Artifact Pattern
plan:
steps:
- run: terraform plan -out=tfplan
- uses: actions/upload-artifact@v4
with:
name: tfplan
path: tfplan
apply:
steps:
- uses: actions/download-artifact@v4
with:
name: tfplan
- run: terraform apply tfplanRule: Apply must use the exact plan that was reviewed, not regenerate it.
IaC Anti-Patterns
apply -auto-approvewithout environment protection gates- Repeating
terraform initin every job without cache - Missing remote state backend configuration
- No plan artifact between plan and apply jobs
- Skipping security scanning (tfsec, checkov, trivy)
- Using
latestprovider versions instead of pinned versions - Not posting plan output to PR for review
IaC Checklist
- Remote state backend configured (S3/GCS/Azure Blob)
- State locking enabled (DynamoDB/native)
- OIDC federation for cloud credentials
- Security scanning in pipeline (tfsec/checkov)
- Plan artifact saved and reused in apply
- Plan diff posted as PR comment
- Environment protection on production
- Provider versions pinned in
versions.tf .terraformdirectory cached between runs
Related Skills
fabrico-managing-secrets- For credential configurationfabrico-technical-context-discovering- For finding existing patterns
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.

