Skip to content

Add Skill to validate k8s CRDs.#188

Open
Julian Gutierrez Oschmann (juli4n) wants to merge 1 commit into
agent-substrate:mainfrom
juli4n:api_conventions_skills
Open

Add Skill to validate k8s CRDs.#188
Julian Gutierrez Oschmann (juli4n) wants to merge 1 commit into
agent-substrate:mainfrom
juli4n:api_conventions_skills

Conversation

@juli4n
Copy link
Copy Markdown
Collaborator

Include a verbatim copy of the k8s conventions into the skill. I tried the skill locally and it generated a pretty decent summary of findings. I hope this will help to catch violations to the KRM style guide as we evolve our k8s APIs.

Include a vebatim copy of the k8s conventions into the skill. I tried
the skill locally and it generated a pretty decent summary of findings.
I hope this will help to catch violations to the KRM style guide as we
evolve our k8s APIs.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mtaufen
Copy link
Copy Markdown
Collaborator

We can add both, it's good for the agents to have an understanding of the conventions while working.

@@ -0,0 +1,23 @@
---
name: review-crds
description: Guides the agent to follow Kubernetes API conventions for OSS standards.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: "Reviews CRDs for compliance with Kubernetes API conventions" would be more tool-centric language. Whether this guides the agent depends on if the agent is triggered to open the skill.


# Kubernetes API Conventions Skill

## Purpose
Copy link
Copy Markdown
Collaborator

@mtaufen Michael Taufen (mtaufen) Jun 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Purpose may be best left to the description in frontmatter as it's somewhat redundant. Since we want a structured response, recommend asking for JSON. We could format the SKILL something like this:

Task

Review any CRDs in Agent Substrate to ensure they follow the conventions in references/api-conventions.md.

Output Format

Your output should be a list of violations conforming to the following JSON format:

[ 
  {
    "location":"",
    "rule": "",
    "fix": ""
  }
]
  • location: file path and line range that violated the rule, formatted like this: path/to/file/under/review:1-10. The path is relative to the repo root.
  • rule: Exact quote of violated rule from references/api-conventions.md. If there is no rule, this should be set to the string OPINION.
  • fix: Your suggestion of how to fix the issue.

Hints

  • Most CRDs are defined in pkg/api/v1alpha1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/api User-facing API changes area/api-machinery

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants