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.
npx skills add bendaamerahmed/backstage-idp-plugin --skill kubernetes-crd-authorgit clone --depth 1 https://github.com/bendaamerahmed/backstage-idp-pluginWrote 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.
[](https://agentmods.dev/skills/bendaamerahmed/backstage-idp-plugin/kubernetes-crd-author)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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:
PROJECTfile for the kubebuilder layout version,Makefilefor the pinnedcontroller-genversion,go.modforsigs.k8s.io/controller-runtime. These three move independently and a mismatch betweencontroller-genand 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-validationsCEL 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
kubectlormakecommand for authorization.
Procedure
- 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.
- Design the API before scaffolding. Group (
<team>.<company>.com), Kind, and aspec/statussplit wherespecis exclusively user intent andstatusis exclusively controller observation. Anything a user must set to make the object valid belongs inspec; anything the controller computes belongs instatusand must survive being recomputed from scratch. - Start at
v1alpha1. It signals instability and lets you break the schema without a conversion webhook. Promoting later is cheap; starting atv1and discovering the schema is wrong is not. - Scaffold rather than hand-roll.
kubebuilder init --domain <company.com> --repo <module path>thenkubebuilder 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. - Write the types with markers, not prose. On the root type,
+kubebuilder:object:root=trueand+kubebuilder:subresource:status. On fields,+kubebuilder:validation:*for bounds, enums, patterns and required,+kubebuilder:default=for defaults, and+optionalfor 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 pinnedcontroller-genversion — markers are added between minors. - Add printer columns.
+kubebuilder:printcolumn:name=...,type=...,JSONPath=...for the two or three fields an operator would want fromkubectl 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. - Model status as conditions. A
Readycondition of the standardmetav1.Conditionshape, withobservedGeneration, is what every other tool knows how to read. Ad-hoc status booleans are invisible tokubectl waitand to anything watching. - Generate, never edit generated files.
make manifests generateproduces the CRD YAML underconfig/crd/basesand 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. - 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. - 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.
- Keep RBAC markers next to the code that needs them.
+kubebuilder:rbac:groups=...above the reconciler, thenmake manifestsregenerates the role. Hand-written role YAML drifts from what the controller actually calls. - 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 testruns it. - 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.
- Then surface it in the portal. A CRD is only useful to a platform team if
people can see it — see
backstage-kubernetesfor declaring it underkubernetes.customResourcesand the RBAC that needs.
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.
- 11d ago First seen · 162 lines · 42 tokens per session scan A e48a42eb86d0
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.
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…
deploy
Builds and deploys a Power Apps code app to Power Platform. Use when deploying changes, redeploying an existing app, or pushing updates.
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.
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…
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.
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.