agentleFS
anmolnagpalanmolnagpal/devops-skills/CLAUDE.md

devops-skills

CLAUDE.md8 starsChanged 3 months agoMITView on GitHub

These rules apply to every push originating from this repo. They override default agent behavior. This repo distributes reusable Claude Code skills, plugins, and MCP servers to the team. Skills are markdown files that encode DevOps best practices; they ship as the clouddrove plugin (this repo is also its own marketplace), installed via claude plugin install clouddrove@devops-skills, alongside the team plugins and MCP servers wired by the install scripts. Run these locally before pushing — they are the same checks…

  • Deletes or force-pushes
  • Installs packages

The file

Show its rules and text

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

17 rules. About 0 are common, 7 are distinctive, and 10 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 10

    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. Very specific:

    Never push directly to main: Always create a branch (feat/<name>, fix/<name>, chore/<name>) and open a pull request.

    line 9
  2. Very specific:

    Use the repo's git config user.name / user.email: Do not set or override identity per-commit.

    line 11
  3. Distinctive:

    One logical change per branch / PR: Don't bundle unrelated edits.

    line 12
  4. Distinctive:

    Confirm before pushing: If the agent (Claude / Cursor / Codex) is about to push, list the commit summary + diff stat and ask "OK to push?" …

    line 20
  5. Distinctive:

    Never use em dash (—) or literal double-hyphen (--) in output, code comments, commit messages, docs, or skill content.

    line 25
  6. Distinctive:

    Never use common AI filler words: delve, leverage, robust, seamless, utilize, foster, tapestry, testament, boasts, elevate, unlock, …

    line 26
  7. Distinctive:

    Run these locally before pushing — they are the same checks CI runs:

    line 37
  8. Distinctive:

    Every skill is a markdown file with YAML frontmatter:

    line 98
  9. Distinctive:

    All review skills produce output in this format:

    line 188
  10. Very specific:

    Create skills/<name>/SKILL.md following the frontmatter format above (one directory per skill.

    line 202
  11. Very specific:

    Use /clouddrove:skill-creator to iteratively develop and eval the skill

    line 204
  12. Very specific:

    Add eval cases under skills/<name>/evals/cases/ — copy validate.sh verbatim from an existing skill (e.g.

    line 205
  13. Very specific:

    Run bash scripts/generate.sh to refresh .cursor/rules/<name>.mdc, AGENTS.md, index.json, FRAMEWORKS.md

    line 206
  14. Very specific:

    Add an entry to the skill table in README.md (the plugin auto-discovers any skills/<name>/SKILL.md)

    line 207
  15. Very specific:

    Commit skills/, rules/rule-ids.yaml, .cursor/rules/, AGENTS.md — teammates pull and re-run ./scripts/install.sh --all

    line 208
  16. Very specific:

    Add an interactive block to scripts/mcp.sh using the _ask and _mcp_installed helpers already defined there.

    line 212
  17. Very specific:

    All plugins are in config/plugins.txt, installed by install.sh.

    line 216

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

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Git workflow (MUST follow)

These rules apply to every push originating from this repo. They override default agent behavior.

  1. Never push directly to main. Always create a branch (feat/<name>, fix/<name>, chore/<name>) and open a pull request.
  2. No Co-Authored-By trailers. No "🤖 Generated with Claude Code" footers. No AI attribution of any kind in commit messages or PR bodies. Commits read as authored solely by the user.
  3. Use the repo's git config user.name / user.email. Do not set or override identity per-commit. If unset, ask the user before configuring.
  4. One logical change per branch / PR. Don't bundle unrelated edits.
  5. Commit message format — imperative subject (≤72 chars), blank line, body explaining the why. Example:
    Pin Bun install to the oven-sh tap
    
    Bare `brew install bun` resolves to wrong formula on some Homebrew
    versions. Use the official tap explicitly so installs are deterministic.
  6. Confirm before pushing. If the agent (Claude / Cursor / Codex) is about to push, list the commit summary + diff stat and ask "OK to push?" first.
  7. Never --force push to a shared branch. Force-push only to your own short-lived feature branches, and only after confirming with the user.
  8. PR before merge. Even for your own commits — open a PR, let CI run, then merge.

Writing style

  • Never use em dash (—) or literal double-hyphen (--) in output, code comments, commit messages, docs, or skill content. Use commas, periods, or parentheses instead.
  • Never use common AI filler words: delve, leverage, robust, seamless, utilize, foster, tapestry, testament, boasts, elevate, unlock, unleash, dive in, game-changer, in today's world, it's important to note. Use plain direct words instead.

Dependency / tool versions

  • Before adding or pinning any dependency, package, tool version, or base image (Python, Go, Rust, Bash tooling, npm, Docker images, GitHub Actions, Terraform providers/modules, etc), check GitHub releases/tags or the official registry for the latest stable version first, then use that version. Do not guess or use a remembered/training-data version.

Purpose

This repo distributes reusable Claude Code skills, plugins, and MCP servers to the team. Skills are markdown files that encode DevOps best practices; they ship as the clouddrove plugin (this repo is also its own marketplace), installed via claude plugin install clouddrove@devops-skills, alongside the team plugins and MCP servers wired by the install scripts.

Validation commands

Run these locally before pushing — they are the same checks CI runs:

pip3 install --break-system-packages pyyaml   # one-time dep; --break-system-packages required on macOS Homebrew Python

bash scripts/check-skills.sh             # lint: name/description frontmatter
bash scripts/check-agentskills.sh        # every skill conforms to the agentskills.io standard
bash scripts/check-rule-ids.sh           # every rule ID in skills/ exists in rules/rule-ids.yaml
bash scripts/check-evals.sh              # eval fixtures reference only known rule IDs
bash scripts/generate.sh --check         # .cursor/rules/ + AGENTS.md are up to date

CI also runs ShellCheck on scripts/ and a full Docker-based install harness (_test/test.sh).

Installing / Updating

# Fresh install or update — pick tool(s) via flags
/bin/bash -c "$(curl -fsSL .../bootstrap.sh)" -- --all       # claude + cursor + codex
/bin/bash -c "$(curl -fsSL .../bootstrap.sh)" -- --claude    # Claude only (legacy)

# Manual after clone
./scripts/install.sh --all
./scripts/install.sh --claude --no-mcp --no-plugins          # skills only
./scripts/install.sh --cursor --project ~/work/repo          # per-project Cursor

# Switch AWS profile for MCP servers (eks-mcp-server, billing-mcp-server)
./scripts/set-aws-profile.sh [profile-name]

install.sh is idempotent — already-installed plugins, MCP servers, and symlinks are reused. Edit skills/<name>/SKILL.md → run bash scripts/generate.sh → commit .cursor/rules/, AGENTS.md, index.json, FRAMEWORKS.md.

Repository Structure

.claude-plugin/  ← plugin.json (clouddrove plugin) + marketplace.json (this repo = its own marketplace)
skills/          ← Canonical skill sources, one dir per skill (edit here)
  <name>/SKILL.md   ← the skill body
  <name>/evals/     ← static eval fixtures + validate.sh (review skills)
  owasp/*.md        ← reference docs loaded on-demand by the owasp skill
  docker/, finops/  ← references + scripts, co-located with the skill
  specs/         ← Backlog spec drafts (not active; no SKILL.md, not generated)
.cursor/rules/   ← Generated Cursor .mdc rules (do not hand-edit)
AGENTS.md        ← Generated Codex skill doc (do not hand-edit)
index.json       ← Generated machine-readable skill catalog (do not hand-edit)
FRAMEWORKS.md    ← Generated MITRE ATT&CK / NIST CSF 2.0 / D3FEND coverage doc (do not hand-edit)
agents/          ← Reserved for Claude agents (currently empty)
scripts/         ← bootstrap, install (dispatcher), install-{claude,cursor,codex}, generate, generate-index, mcp, set-aws-profile
config/          ← plugins.txt, marketplaces.txt (external team plugins, not clouddrove)
templates/       ← CLAUDE.md template to copy into project repos
_docs/           ← CHEATSHEET.md with example prompts
_test/           ← Dockerfile + test.sh for Docker-based install testing

Skills install as the clouddrove plugin served from this repo's own marketplace (.claude-plugin/marketplace.json). install-claude.sh runs claude plugin marketplace add <repo> + claude plugin install clouddrove@devops-skills, so skills are namespaced /clouddrove:<skill> natively — no per-skill symlinks.

Skill Architecture

File Format

Every skill is a markdown file with YAML frontmatter:

---
name: skill-name          # Invocation: /skill-name
description: "..."        # When/why to trigger (shown to Claude for selection)
metadata:
  version: X.Y.Z
  author: Name
  category: devops
  updated: YYYY-MM-DD
frameworks:               # Optional: security/compliance mappings (surfaced in index.json + FRAMEWORKS.md)
  mitre_attack:           # real ATT&CK Enterprise technique IDs (T####[.###])
    - T1190
  nist_csf:               # NIST CSF 2.0 subcategory IDs (e.g. PR.PS-06, DE.CM-01)
    - PR.PS-06
  d3fend:                 # MITRE D3FEND technique names
    - Input Validation
paths:                    # Optional: auto-trigger on these file patterns
  - "**/*.tf"
allowed-tools:            # Optional: restrict available tools
  - Glob
  - Read
---
# Skill content...

Three-Tier Loading

  1. Metadata (name + description) — Always in context; used for skill selection
  2. Skill body — Loaded when skill triggers; target <500 lines
  3. Reference files (e.g., skills/owasp/) — Loaded on-demand by the skill itself

Current Skills

Skill (Claude slash)SourceAuto-triggers on
/clouddrove:tfskills/tf/SKILL.md**/*.tf, **/*.tfvars
/clouddrove:k8sskills/k8s/SKILL.md**/values*.yaml, **/Chart.yaml, Helm templates
/clouddrove:ciskills/ci/SKILL.md**/.gitlab-ci.yml
/clouddrove:github-actionsskills/github-actions/SKILL.md**/.github/workflows/*.yml
/clouddrove:githubskills/github/SKILL.md**/CODEOWNERS, **/.github/dependabot.yml
/clouddrove:owaspskills/owasp/SKILL.mdManual only
/clouddrove:appsecskills/appsec/SKILL.mdManual only
/clouddrove:dockerskills/docker/SKILL.md**/Dockerfile, **/docker-compose*.yml
/clouddrove:finopsskills/finops/SKILL.mdManual only
/clouddrove:deployskills/deploy/SKILL.mdManual only
/clouddrove:adrskills/adr/SKILL.md**/docs/adr/*.md
/clouddrove:wrapper-tfskills/wrapper-tf/SKILL.md_modules/**/*.tf, environments/**/*.tf
/clouddrove:tf-planskills/tf-plan/SKILL.md**/tfplan*.json, **/*.tfplan.json
/clouddrove:gitopsskills/gitops/SKILL.md**/argocd/**/*.yaml, **/flux-system/**/*.yaml, **/*helmrelease*.yaml
/clouddrove:observabilityskills/observability/SKILL.md**/prometheus*.yaml, **/alertmanager*.yaml, **/servicemonitor*.yaml
/clouddrove:incidentskills/incident/SKILL.md**/docs/runbooks/*.md, **/docs/incidents/*.md, **/RUNBOOK.md
/clouddrove:loggingskills/logging/SKILL.md**/audit-policy*.yaml, **/kube-apiserver*.yaml
/clouddrove:skill-creatorskills/skill-creator/SKILL.mdManual only

Backlog spec drafts (not active): skills/specs/ — aws-cost, aws-security, azure-cost, azure-security, gcp-cost, gcp-security, kubernetes-cost, kubernetes-security.

Rule ID registry

rules/rule-ids.yaml is the canonical vocabulary for every finding ID a skill can emit. Format: DOMAIN-CATEGORY-NNN. Any new rule ID used in a skills/<name>/SKILL.md Rule Catalog must be registered here first — check-rule-ids.sh (and CI) will reject unknown IDs. Framework/compliance IDs (SOC2-*, CIS-*, NIST-*, etc.) are exempt and pass without a registry entry.

Eval cases

Review skills can ship a skills/<name>/evals/ folder to prove correctness without a model:

evals/
  cases/
    <case-name>/
      <fixture file>    ← input (e.g. .tf, Dockerfile)
      expected.txt      ← one rule ID per line the skill MUST report; empty = clean pass
  validate.sh           ← static consistency check (copy verbatim from any existing skill)

validate.sh asserts every ID in expected.txt exists in the skill's Rule Catalog, and that clean-* cases have an empty expected.txt. Run it with bash skills/<name>/evals/validate.sh.

Multi-tool adapters

Sources in skills/<name>/SKILL.md generate per-tool artifacts via scripts/generate.sh:

  • .cursor/rules/<name>.mdc — Cursor (globs: derived from paths:, auto-attach)
  • AGENTS.md — Codex (one file, all skills concatenated)
  • index.json — machine-readable skill catalog (name, description, safety, paths, frameworks) via scripts/generate-index.py
  • FRAMEWORKS.md — MITRE ATT&CK / NIST CSF 2.0 / D3FEND coverage table, inverted from each skill's frameworks: block

Install per tool: ./scripts/install.sh --claude|--cursor|--codex|--all. See README.md Quick Start.

Standard Review Output Format

All review skills produce output in this format:

BLOCKING — Must fix before [MR/deploy/merge]
[file:line] Issue → recommendation

ADVISORY — Should fix
[file:line] Issue → recommendation

Summary: X blocking issue(s), Y advisory issue(s).

Adding a New Skill

  1. Create skills/<name>/SKILL.md following the frontmatter format above (one directory per skill; co-locate evals/, references, scripts)
  2. Register any new rule IDs in rules/rule-ids.yaml under the appropriate domain before using them in the skill
  3. Use /clouddrove:skill-creator to iteratively develop and eval the skill
  4. Add eval cases under skills/<name>/evals/cases/ — copy validate.sh verbatim from an existing skill (e.g. skills/tf/evals/validate.sh)
  5. Run bash scripts/generate.sh to refresh .cursor/rules/<name>.mdc, AGENTS.md, index.json, FRAMEWORKS.md
  6. Add an entry to the skill table in README.md (the plugin auto-discovers any skills/<name>/SKILL.md)
  7. Commit skills/, rules/rule-ids.yaml, .cursor/rules/, AGENTS.md — teammates pull and re-run ./scripts/install.sh --all

Adding a New MCP Server

Add an interactive block to scripts/mcp.sh using the _ask and _mcp_installed helpers already defined there. The block should call claude mcp add-json to register the server.

Plugins

All plugins are in config/plugins.txt, installed by install.sh. Two line formats:

  • name@marketplace — installed via claude plugin install
  • hub:github-org/repo — installed via npx claudepluginhub (for plugins not on the official marketplace)

Non-default marketplaces go in config/marketplaces.txt.

Key Conventions

  • Skills restrict tools via allowed-tools — review skills use only Glob and Read (no writes)
  • mcp.sh is sourced (not executed directly) by install.sh — it must not use #!/bin/bash exit semantics that break the parent shell
  • scripts/set-aws-profile.sh uses inline Python to patch ~/.claude/settings.json; it updates AWS_PROFILE for eks-mcp-server and billing-mcp-server
  • The templates/CLAUDE.md is a template to copy into project repos for always-on team context — it is not this repo's own CLAUDE.md
  • The plugin ships two hooks via hooks/hooks.json (referenced from plugin.json): a SessionStart banner and a PreToolUse bash-guard that blocks destructive patterns (force-push, git reset --hard, DROP TABLE, aws rds delete-db-*, etc.). When adding new dangerous patterns to block, extend hooks/bash-guard.sh.

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.