agentleFS
anmolnagpalanmolnagpal/devops-skills/templates/CLAUDE.md

devops-skills / templates

CLAUDE.md8 starsChanged 3 months agoMITView on GitHub

This file is auto-loaded by Claude Code every session. Keep it focused — only include what Claude can't infer from the code itself. --> When scaffolding or reviewing Terraform, always use these backend values. Always allowed (read-only, safe): - kubectl get/describe/logs - terraform plan/validate - git log/diff/status Always denied (destructive, require human confirmation): - kubectl delete — never auto-delete resources - kubectl exec — no shell access into pods - terraform apply — no auto-apply, always manual

The file

Show its rules and text

We split this CLAUDE.md into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    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:

    Remove sections that don't apply

    line 7
  2. Distinctive:

    Add to .gitignore: CLAUDE.local.md (for personal overrides)

    line 8
  3. Distinctive:

    Commit this file so the whole team benefits

    line 9
  4. Distinctive:

    Keep it focused — only include what Claude can't infer from the code itself.

    line 12
  5. Very specific:

    Never push directly to main / master / trunk.

    line 17
  6. Very specific:

    Use the repo's git config user.name / user.email.

    line 19
  7. Distinctive:

    Before pushing, summarize the commit + diff stat and ask the user to confirm.

    line 21
  8. Very specific:

    Never --force push to a shared branch.

    line 22
  9. Distinctive:

    When scaffolding or reviewing Terraform, always use these backend values.

    line 45
  10. Very specific:

    All Terraform resources must have tags: Name, Environment, Team, ManagedBy = "terraform"

    line 64
  11. Distinctive:

    Never hardcode AWS account IDs, ARNs, or region strings

    line 72
  12. Very specific:

    Never commit .tfstate, .tfvars with real values, or kubeconfig files

    line 73
  13. Very specific:

    Never use latest as an image tag in any Helm values file

    line 74
  14. Distinctive:

    Never merge to main without a passing pipeline

    line 75
  15. Distinctive:

    Always allowed (read-only, safe):

    line 81
  16. Distinctive:

    Always denied (destructive, require human confirmation):

    line 86

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md 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
CLAUDE.md

CLAUDE.md — Project Context

<!-- INSTRUCTIONS FOR SETUP: 1. Copy this file to the root of your project repo 2. Fill in all <PLACEHOLDER> values for your project 3. Remove sections that don't apply 4. Add to .gitignore: CLAUDE.local.md (for personal overrides) 5. Commit this file so the whole team benefits This file is auto-loaded by Claude Code every session. Keep it focused — only include what Claude can't infer from the code itself. -->

Git workflow (MUST follow)

  1. Never push directly to main / master / trunk. Always work on a branch and open a pull request.
  2. No Co-Authored-By trailers, no "🤖 Generated with …" footers, no AI attribution in commits or PR descriptions.
  3. Use the repo's git config user.name / user.email. Do not override per-commit identity.
  4. One logical change per branch / PR. No bundled unrelated edits.
  5. Before pushing, summarize the commit + diff stat and ask the user to confirm.
  6. Never --force push to a shared branch.

Project

  • Service: <SERVICE_NAME> — <one-line description>
  • Team: <TEAM_NAME>
  • Repo: https://github.com/<org>/<repo>

AWS

  • Primary region: eu-west-1
  • AWS profile (local): <AWS_PROFILE_NAME>
  • Account ID (staging): <STAGING_ACCOUNT_ID>
  • Account ID (prod): <PROD_ACCOUNT_ID>

Terraform

  • State backend bucket: <S3_BUCKET_NAME>
  • State lock table: <DYNAMODB_TABLE_NAME>
  • State key pattern: <service>/<environment>/terraform.tfstate
  • Required Terraform version: ~> 1.7
  • Required AWS provider: ~> 5.0

When scaffolding or reviewing Terraform, always use these backend values.

Kubernetes / EKS

  • Cluster name (staging): <EKS_CLUSTER_NAME_STAGING>
  • Cluster name (prod): <EKS_CLUSTER_NAME_PROD>
  • Default namespace: <NAMESPACE>
  • ECR registry: <ACCOUNT_ID>.dkr.ecr.eu-west-1.amazonaws.com

GitLab CI/CD

  • CI AWS variable (key): AWS_ACCESS_KEY_ID
  • CI AWS variable (secret): AWS_SECRET_ACCESS_KEY
  • Kubeconfig variable (staging): KUBECONFIG_STAGING
  • Kubeconfig variable (prod): KUBECONFIG_PROD
  • Default branch: main

Team Conventions

  • All Terraform resources must have tags: Name, Environment, Team, ManagedBy = "terraform"
  • Module versions pinned with ~> — never floating or git refs
  • No -auto-approve in any pipeline
  • Production jobs always require when: manual
  • Secrets via AWS Secrets Manager + external-secrets operator (never inline in values.yaml)

What NOT to do

  • Never hardcode AWS account IDs, ARNs, or region strings
  • Never commit .tfstate, .tfvars with real values, or kubeconfig files
  • Never use latest as an image tag in any Helm values file
  • Never merge to main without a passing pipeline

Claude Code Permissions

<!-- These are enforced via .claude/settings.json in this repo. Copy that file too. -->

Always allowed (read-only, safe):

  • kubectl get/describe/logs
  • terraform plan/validate
  • git log/diff/status

Always denied (destructive, require human confirmation):

  • kubectl delete — never auto-delete resources
  • kubectl exec — no shell access into pods
  • terraform apply — no auto-apply, always manual

Jira

  • Project key: <JIRA_PROJECT_KEY>
  • Board: https://<your-org>.atlassian.net/jira/software/projects/<JIRA_PROJECT_KEY>/boards

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.