Kubernetes Deployment Refactoring Tool skill for Claude and Codex
Rewrites a working Deployment manifest to current best practice in the areas you pick, keeping behavior identical and listing every change so the diff is…
Install it once and Claude or Codex runs it for you. When your request matches, your AI loads the skill, asks for anything it is missing, and works through the template itself. Prefer to fill it in by hand? See the full prompt template.
Download the skill (.zip) · View SKILL.md
When it is used
Use when an existing Deployment YAML works but needs resource limits, pinned images, security contexts, or probes brought up to best practice without changing behavior. Do not use for documenting a manifest or producing a pass or fail validation report. Related topics: coding, kubernetes.
What it will ask you for
- Current Deployment YAML (longer free text)
- Target Kubernetes version (choose one: 1.24, 1.25, 1.26, 1.27)
- Refactoring focus (choose any: Resource limits, Image tags, Labels & annotations, Security contexts, Probes, Replica strategy)
- Preserve comments (choose one: Yes, No)
- Output format (choose one: YAML, JSON)
How it works
- Read the manifest and list which of the selected focus areas it already satisfies, so only real gaps get touched.
- Apply the fix for each selected area in turn, keeping the selector identical to the template labels and using only fields the target version supports.
- Pin every image to a tag or digest and add requests and limits to every container when those areas are selected, stating the values chosen.
- Re-read the result against the original to confirm nothing outside the focus areas changed and comments survived when requested.
- Deliver the manifest in the chosen format followed by a change list that names each field and its reason.
What you get
Two blocks: the refactored manifest as a single YAML or JSON code block, then a markdown bullet list with one entry per change naming the field, the old value, the new value, and the reason.
What it watches out for
- Changing spec.selector on an existing Deployment, which the API rejects because the selector is immutable after creation.
- Setting resource requests from guesswork and starving the pod, when a conservative request plus a note to measure is safer.
- Fixing things outside the selected focus areas, so the reviewer cannot tell intended changes from accidental ones.
- Adding a readinessProbe that hits an endpoint which calls downstream services, so one dependency outage removes every pod from the Service.
How to install
Claude.ai and the Claude desktop app
- Download the skill .zip.
- Open Settings, then Capabilities, and find Skills.
- Choose Upload skill and select the .zip.
- Ask Claude for help with the task. It loads the skill when your request matches.
Claude Code
- Download the skill .zip.
- Unzip it into ~/.claude/skills/ (or .claude/skills/ inside a project).
- Start a new session. Claude Code loads the skill when your request matches.
Codex
- Download the skill .zip.
- Unzip it into ~/.agents/skills/ (or .agents/skills/ inside a project).
- Codex picks it up on its own. Type $ and the skill name to use it, or just ask for the task.
Cursor
- Download the Cursor rule (.mdc).
- Save it in .cursor/rules/ inside your project.
- Cursor's agent applies the rule when your request matches its description.
AGENTS.md (Codex, Cursor, and other coding agents)
- Copy the AGENTS.md section.
- Paste it into AGENTS.md at the root of your repository, creating the file if needed.
- Coding agents that read AGENTS.md follow it when your request fits.