>
Open Source

What a SKILL.md actually does for a Claude DevOps session

The case for using Claude for DevOps work is not “AI writes my code now.” The case is that the slow parts of the job, the parts where you lose an hour to a cryptic Kubernetes error or to figuring out which Terraform flag you have been misreading for three months, get faster when the AI has been told how you want it to think. Out of the box, Claude gives you general-purpose answers. With a structured instruction file telling it how to approach a specific task, it gives you a deterministic workflow instead of a guess.

That instruction file is a SKILL.md, and it lives inside a .claude/skills/ directory at the root of your project. The file is plain markdown, and when you ask Claude something that matches a skill’s trigger phrases, Claude picks up the skill’s workflow instead of defaulting to its baseline behavior. Think of it as the difference between asking a new hire a question and asking the person who has already written the runbook for it. Same knowledge, different depth, very different reliability.

This article covers both sides: the SKILL.md mechanics, and what changes in your session when you have one in place. The setup here is Claude Code running inside VS Code on Sonnet 4.6, but the same idea transfers to Claude in a terminal or in any other AI tool that picks up structured instruction files.

What a SKILL.md actually is

A SKILL.md is a markdown file that tells Claude how to approach one specific task. The file has a name (the task) and a body (the structured workflow Claude should follow when that task comes up). When you ask Claude something that matches the skill’s trigger phrases, Claude uses the structured workflow instead of its default behavior. When you ask something that does not match, Claude ignores the skill and answers normally.

The difference that matters in DevOps work is reliability. The default Claude response to “my pod is in CrashLoopBackOff” is a generic list of common causes. The response with an error-decoding skill is structured: it pulls the specific root cause from the kubectl output, gives the exact fix command, tells you what a successful rollout looks like, and gives the next diagnostic step if the fix does not work. The skill did not give Claude new knowledge. It gave Claude structure, and structure is the difference between a useful answer and a generic one.

The skills folder structure for a typical setup looks like this:

.claude/
└── skills/
    ├── error-decoder/
    │   └── SKILL.md
    ├── bash-auditor/
    │   └── SKILL.md
    ├── k8s-manifest-reviewer/
    │   └── SKILL.md
    ├── format-converter/
    │   └── SKILL.md
    ├── runbook-drafter/
    │   └── SKILL.md
    ├── terraform-explainer/
    │   └── SKILL.md
    ├── api-tester/
    │   └── SKILL.md
    └── cicd-auditor/
        └── SKILL.md

Each skill is a folder, each skill has exactly one SKILL.md, and Claude reads the file when the trigger phrases match. Skills do not need to be exhaustive. A skill that covers the 80% case is more useful than a skill that tries to cover every case and ends up vague.

The single biggest thing that improved my results across all eight skills: treating Claude like a knowledgeable colleague who needs to be briefed, not a search engine. The skill enforces this by requiring full context before proceeding. That is a deliberate design choice, and it is the reason the skills produce better answers than a vanilla prompt.

Why the same question gets a different answer with a skill

The clearest way to see the difference is to run the same question with and without a skill and compare the responses. The terraform-explainer skill is a clean example because the inputs and outputs are easy to compare side by side.

The prompt I send is the same in both cases: “Explain what this Terraform module does. I specifically want to understand what resources it creates, what the required vs optional variables are, whether anything here creates a public-facing resource, and anything that might be surprising in a production AWS account.” I paste the module body underneath.

Without the skill, the response is accurate but generic. It walks through the resources in the order they appear in the file, names the variables it can see, and stops there. The information is correct, but it is not organized around the questions I actually asked. I have to do the work of mapping the answer back to my four specific questions.

With the skill applied, the response follows the skill’s output format. It answers my four questions in order, with the resources grouped by category, the variables labeled required/optional/default, and a dedicated section for “things that might surprise you in production” that calls out public-facing resources, missing tags, and missing encryption settings. The skill did not add knowledge Claude did not have. It added structure and focus, and it forces Claude to organize its answer around the questions I asked instead of the order of the file.

That organization is the part that actually changes how you work. The generic answer ends at “here is a tour of the file.” The skill-based answer ends at “here is the answer to the four things you wanted to know, in the order you wanted them.” The structure is what turns a hint into an answer.

The eight skills I keep in the toolbox

Below are the eight skills in my current project. Each one covers a workflow I run often enough that having a structured prompt template saves more time than it costs to maintain. None of them are the only way to do the task. They are the way that produces the most useful answer on the first try.

  • error-decoder for diagnosing cryptic errors from Kubernetes, Terraform, Helm, Docker, and similar tools. DevOps tooling is bad at error messages. The skill enforces full context before analysis, which is the difference between a useful answer and a guess.
  • bash-auditor for writing and reviewing Bash scripts. Bash is one of the most footgun-prone languages in active use. The skill flags quoting mistakes, missing set -e, race conditions, and portability problems before they hit production.
  • k8s-manifest-reviewer for explaining and auditing Kubernetes YAML. The skill walks through the manifest section by section and audits against a production-readiness checklist, calling out missing limits, missing probes, and other silent misconfigurations.
  • format-converter for converting between DevOps formats (Compose to Helm, Bash to Ansible, JSON to YAML). The skill enforces that constraints are explicit before generating output, which cuts cleanup time afterwards.
  • runbook-drafter for turning stream-of-consciousness incident notes into structured runbook sections. The skill turns “here is what I did” into something a teammate could actually follow at 2 AM.
  • terraform-explainer for understanding Terraform modules you did not write. The skill reads the module, names the resources it creates, flags anything that creates a public-facing resource, and surfaces the things that might be surprising in a production AWS account.
  • api-tester for generating cURL and API test commands. JWT headers, JSON body formatting, the right Content-Type. The skill is fast at this and avoids the trial-and-error of hand-building each command.
  • cicd-auditor for auditing GitHub Actions, GitLab CI, and Jenkins pipelines. The skill catches the silent misconfigurations that pass syntax checks but break at runtime: missing timeouts, missing secret scoping, missing matrix expansion.

The size of each skill file is roughly 5 KB. That is the part that surprised me. I expected structured instruction files to be long, and most of mine are not. The structure matters more than the length, and a tight 5 KB file with a clear output format beats a 30 KB file with a vague one every time.

Two patterns that show up across every skill

Once you have written a few skills, two patterns show up repeatedly. Both are worth surfacing because they generalize cleanly to skills I have not written yet.

The first pattern is the require-full-context-before-analysis rule. Every skill that diagnoses a problem starts by listing what context it needs. The error-decoder skill wants the full error plus a one-sentence description of what changed recently. The k8s-manifest-reviewer skill wants the manifest plus a description of the cluster and the expected traffic profile. The terraform-explainer skill wants the module plus a list of what you specifically want to understand. The rule is the same in every case: do not start the analysis until the context is complete. The single biggest reason generic Claude gives a generic answer is that it answers the question it wishes you had asked instead of waiting for the question you actually asked.

The second pattern is the separate-root-cause-from-proximate-cause rule. The error-decoder skill enforces this explicitly. Most DevOps errors have a proximate cause (the container exited) and a root cause (the env var was not set). The generic answer often stops at the proximate cause. The skill-based answer walks both layers, which is the difference between a fix and a workaround.

Both patterns transfer to skills I have not written yet. When I sit down to write a new skill, I start by writing the context requirements and the root-cause-vs-proximate-cause enforcement into the body. The rest of the skill is task-specific.

Trade-offs

Using SKILL.md files is not free in setup time. Each skill takes about thirty minutes to write the first version, and you will iterate on the wording three or four times before the output stops feeling generic. For a skill you use once a week, the setup pays back in the second month. For a skill you use once a quarter, it does not, and you are better off writing a one-shot prompt.

Skills also do not replace domain knowledge. The terraform-explainer skill flags resources that create public-facing endpoints, but it does not tell you whether that endpoint should be public in your specific account. That is a judgment call that lives with you, not with the skill. The same goes for the runbook-drafter skill. It structures the runbook, but the lessons-learned section still has to come from the person who was on call.

If you run a small DevOps workload and you have a clear set of recurring tasks, writing eight skills is a clean win. If you have a one-off project with no recurring workflows, the upfront cost is real and the payoff is small.

Bottom line

Start with one skill for the task you run most often. Run it against a real prompt you would actually send. Compare the output to what you got without the skill. If the difference is meaningful, keep the skill and write the next one. If the difference is marginal, drop the skill and try a different task.

If I only do one thing from this article, I write the error-decoder skill first. It is the one I reach for most often, and the difference between the generic and skill-based answers is large enough that the setup cost pays back in the first week.

Leave a comment