kubernetes-crd-author

kubernetes-crd-author is a skill for Claude Code from bendaamerahmed/backstage-idp-plugin. It costs 42 tokens per session (2,467 once invoked), scanned A, original, MIT.

A Kubernetes CRD authoring guide covers custom resource definitions and the controllers that manage them. A CRD adds a new object type to Kubernetes, while a controller makes the cluster act on those objects.

In plain words
What is it for?
Use it to build Kubernetes APIs and controllers in Go with kubebuilder or by hand, including types, validation, manifests, reconcile loops, and CRD versioning.
Why use it?
It helps you design stable schemas, validation, generated files, reconciliation logic, and version changes before deploying an API that is difficult to change later.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter.

Part of the backstage-idp plugin — 15 skills, 1 agent shipped together

Good fit Use it to build Kubernetes APIs and controllers in Go with kubebuilder or by hand, including types, validation, manifests, reconcile loops, and CRD versioning.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bendaamerahmed/backstage-idp-plugin/kubernetes-crd-author
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add bendaamerahmed/backstage-idp-plugin --skill kubernetes-crd-author
Clone the repo
git clone --depth 1 https://github.com/bendaamerahmed/backstage-idp-plugin

Made for: Claude Code.

Or install backstage-idp, the plugin that ships this one along with the rest of its 15 skills, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for kubernetes-crd-author

README.md
[![agentmods](https://agentmods.dev/badge/skills/bendaamerahmed/backstage-idp-plugin/kubernetes-crd-author/github.svg)](https://agentmods.dev/skills/bendaamerahmed/backstage-idp-plugin/kubernetes-crd-author)
Your own site
<a href="https://agentmods.dev/skills/bendaamerahmed/backstage-idp-plugin/kubernetes-crd-author"><img src="https://agentmods.dev/badge/skills/bendaamerahmed/backstage-idp-plugin/kubernetes-crd-author/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for kubernetes-crd-author

Your own site · 80×15
<a href="https://agentmods.dev/skills/bendaamerahmed/backstage-idp-plugin/kubernetes-crd-author"><img src="https://agentmods.dev/badge/skills/bendaamerahmed/backstage-idp-plugin/kubernetes-crd-author.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,467 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00042 $0.02467
Opus 5 $0.00021 $0.01234
Sonnet 5 $0.00008 $0.00493
Haiku 4.5 $0.00004 $0.00247

Measured 11d ago against content hash e48a42eb86d0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

kubernetes-crd-author scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/backstage-idp/skills/kubernetes-crd-author/SKILL.md · 162 lines

How it starts

The opening of the file, as written. The whole thing — 162 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Authoring Kubernetes CRDs and controllers

A CRD is a published API. Once someone has stored an object in it you cannot change your mind cheaply, so the schema and the versioning decision matter more than the controller does. Design the API first, generate everything else.

Preconditions

  • This is Go and Kubernetes work, usually in a different repository from the Backstage portal. Confirm which repository you are in before writing anything; a controller does not belong in a Backstage monorepo.
  • Toolchain versions read from the repository, not assumed: PROJECT file for the kubebuilder layout version, Makefile for the pinned controller-gen version, go.mod for sigs.k8s.io/controller-runtime. These three move independently and a mismatch between controller-gen and the runtime is a common source of "generation produces something that will not compile".
  • The target cluster's Kubernetes minor, because CRD schema features (x-kubernetes-validations CEL rules, in particular) gate on it.
  • Whether this API is new or already deployed. Everything about versioning and field changes below turns on that answer, and it is not recoverable later.
  • Applying a CRD or an operator to a shared cluster is external mutation: prepare the manifests, stop, and return the exact kubectl or make command for authorization.

Procedure

  1. Decide whether a CRD is the right shape at all. A CRD earns its place when something must be declaratively reconciled toward a desired state and observed by others. Configuration nobody reconciles is a ConfigMap. A one-off action is a Job. An operator that only templates YAML is a chart with extra failure modes.
  2. Design the API before scaffolding. Group (<team>.<company>.com), Kind, and a spec/status split where spec is exclusively user intent and status is exclusively controller observation. Anything a user must set to make the object valid belongs in spec; anything the controller computes belongs in status and must survive being recomputed from scratch.
  3. Start at v1alpha1. It signals instability and lets you break the schema without a conversion webhook. Promoting later is cheap; starting at v1 and discovering the schema is wrong is not.
  4. Scaffold rather than hand-roll. kubebuilder init --domain <company.com> --repo <module path> then kubebuilder create api --group <group> --version v1alpha1 --kind <Kind>. It wires the scheme registration, the manager, RBAC markers, the Makefile targets and a test harness that are tedious and easy to get subtly wrong by hand.
  5. Write the types with markers, not prose. On the root type, +kubebuilder:object:root=true and +kubebuilder:subresource:status. On fields, +kubebuilder:validation:* for bounds, enums, patterns and required, +kubebuilder:default= for defaults, and +optional for genuinely optional fields. Markers are the schema; validation written only in the controller is validation that runs after the object was already accepted. Read the marker set from the pinned controller-gen version — markers are added between minors.
  6. Add printer columns. +kubebuilder:printcolumn:name=...,type=...,JSONPath=... for the two or three fields an operator would want from kubectl get. Without them the CR prints only name and age, which makes it useless at the terminal and is the most common complaint about a first CRD.
  7. Model status as conditions. A Ready condition of the standard metav1.Condition shape, with observedGeneration, is what every other tool knows how to read. Ad-hoc status booleans are invisible to kubectl wait and to anything watching.
  8. Generate, never edit generated files. make manifests generate produces the CRD YAML under config/crd/bases and the deepcopy functions. A hand-edited CRD is silently reverted on the next generation, and the symptom arrives later as a schema that does not match the types.
  9. Write the reconcile loop to be idempotent and level-triggered. Reconcile reads current state and moves toward spec; it must produce the same result called once or twenty times, and must never depend on having seen the previous event. Return a requeue rather than sleeping. Set owner references so garbage collection cleans up what you created.
  10. Add a finalizer only if there is external state to clean up. A finalizer with a bug makes objects undeletable, which is a worse failure than leaking the resource it was protecting. If you add one, make its removal path unconditional on the external system being reachable.
  11. Keep RBAC markers next to the code that needs them. +kubebuilder:rbac:groups=... above the reconciler, then make manifests regenerates the role. Hand-written role YAML drifts from what the controller actually calls.
  12. Test the reconcile loop with envtest, which runs a real API server, so schema validation and defaulting are exercised rather than mocked. Cover: the object is created and reaches Ready; a mutated child is corrected; deletion cleans up. make test runs it.
  13. Plan the next version before you need it. Adding an optional field with a default is safe. Removing a field, tightening validation, or changing a type is breaking and needs a new version plus a conversion webhook, with exactly one storage version. Decide the hub-and-spoke conversion shape when you add the second version, not the third.
  14. Then surface it in the portal. A CRD is only useful to a platform team if people can see it — see backstage-kubernetes for declaring it under kubernetes.customResources and the RBAC that needs.

Read the full file on GitHub · 162 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 162 lines · 42 tokens per session scan A e48a42eb86d0

Subscribe to this mod's changes

kubernetes-crd-author is a skill published in the GitHub repository bendaamerahmed/backstage-idp-plugin (1 stars, last pushed 1mo ago), licensed MIT. It adds 42 tokens to every session and 2,467 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

django-storages-s3

Use when configuring Django to store static and media files on AWS S3 with django-storages. Invoke when working with the STORAGES setting, S3 buckets, presigned URLs, CloudFront, or boto3-backed file storage in settings.py. Configures the Django 4.2+ STORAGES dict, public/private custom backends, presigned GET/POST…

Jeffallan/claude-skills · 138 tokens

deploy

Builds and deploys a Power Apps code app to Power Platform. Use when deploying changes, redeploying an existing app, or pushing updates.

microsoft/power-platform-skills · 32 tokens

sns

AWS SNS notification service for pub/sub messaging. Use when creating topics, managing subscriptions, configuring message filtering, sending notifications, or setting up mobile push.

itsmostafa/aws-agent-skills · 32 tokens

deploy-to-connect

Deploy or publish Python and R content to a Posit Connect server using rsconnect-python or the R rsconnect package. Handles interactive apps and dashboards, web APIs, rendered documents, and prepared bundles/manifests. Use whenever the user asks to deploy, publish, or redeploy content to Posit Connect, or mentions…

posit-dev/skills · 81 tokens

ash-framework

Ash Framework — resources, actions, policies, aggregates, calculations, AshPhoenix.Form, LiveView, migrations. Use when generating resources via mix ash.codegen, editing changes, checks, types, validations, or domain code interfaces.

oliver-kriska/claude-elixir-phoenix · 48 tokens

liveview-patterns

Build LiveView: async data (assignasync), PubSub (check connected?), phx-change events, form components/modals/uploads, streams for lists, livepatch. Use when handling interactions, debugging events, or tracking Presence.

oliver-kriska/claude-elixir-phoenix · 51 tokens