admission-control
Use when the user asks to "write a validator", "add validation", "implement admission control", "write a mutating webhook", "add a mutation handler"…
Skill by stanfish06
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/stanfish06-admission-control
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/admission-control
What's inside
- Skill name
admission-control- Description
- Use when the user asks to "write a validator", "add validation", "implement admission control", "write a mutating webhook", "add a mutation handler", "validate incoming resources", "implement admission logic", "add admission webhooks", "write ingress validation", or asks how to validate or mutate resources before they are persisted in a grafana-app-sdk app. Provides guidance on implementing validation and mutation admission handlers for grafana-app-sdk apps.
- License
- Apache-2.0
- Instructions
- 184 lines in SKILL.md · view on GitHub
Files (3)
- SKILL.md
- openai.yaml · agents/
- admission-patterns.md · references/
SKILL.md (first lines)
# Admission Control
Admission control intercepts resource create/update requests before they are persisted. In grafana-app-sdk there are two types:
- **Validation** — accept or reject a request; cannot modify the resource
- **Mutation** — modify the resource before it is persisted (e.g. set defaults, normalize fields)
The app business logic for admission is identical whether the app runs as a standalone operator or inside `grafana/apps`. The only difference is the runtime: standalone apps stand up their own webhook server; `grafana/apps` apps have admission auto-registered as a Kubernetes plugin.
## Getting Stubs
For standalone apps, if `pkg/app/app.go` does not yet exist, a stub App can be generated with:
```bash
grafana-app-sdk project component add operator
```
This creates scaffolded `simple.App` which admission handlers can be added to for each kind in `ManagedKinds`.
## Validator Interface
```go
// Implement this interface for each kind you want to validate
type Validator interface {
Validate(ctx context.Context, request *app.AdmissionRequest) error
}
```
- Return `nil` to admit the request
- Return an error to reject it (the error message is returned to the API caller)
- `app.AdmissionRequest` provides access to the incoming object and operation type
- You can use `k8s.NewAdmissionError(err error, statusCode int, reason string)` (from `"github.com/grafana/grafana-app-sdk/k8s"`) to better control the returned error information
### Validator Example
```go
type MyKindValidator struct{}
func (v *MyKindValidator) Validate(ctx context.Context, req *app.AdmissionRequest) error {
obj, ok := req.Object.(*v1.MyKind)
if !ok {
return fmt.Errorf("admission request object was of invalid type %T (expected *v1.MyKind)", req.Object)
}
// Validate spec fields
if obj.Spec.Title == "" {
return fmt.Errorf("spec.title is required")
}
if obj.Spec.Count < 0 {
return fmt.Errorf("spec.count must be non-negative, got %d", obj.Spec.Count)
}
// Distinguish create vs update
if req.Action == resource.AdmissionActionUpdate && req.OldObject != nil {
old, ok := req.OldObject.(*v1.MyKind)
if !ok {
return fmt.Errorf("admission request old object was of invalid type %T (expected *v1.MyKind)", req.OldObject)
}
if old.Spec.Title != obj.Spec.Title {
return fmt.Errorf("spec.title is immutable after creation")
}
}
return nil
}
```
## Mutating Admission (Mutator)
```go
// Implement this interface to mutate resources before persistence
type Mutator interface {
Mutate(ctx context.Context, request *app.AdmissionRequest) (*app.MutatingResponse, error)
}
```
- Return a `MutatingResponse` containing the (optionally modified) object
- Return an error to reject the request entirely
- Best practice is to reject requests from validators, not mutators
### Mutating Handler Example
```go
type MyKindMutator struct{}
func (m *MyKindMutator) Mutate(
ctx context.Context,
req *app.AdmissionRequest,
) (*app.MutatingResponse, error) {
obj, ok := req.Object.(*v1.MyKind)
if !ok {
return nil, fmt.Errorf("admission request object was of invalid type %T (expected *v1.MyKind)", req.Object)
}
// Set defaults on create
if req.Action == resource.AdmissionActionCreate {
if obj.Spec.Description == "" {
obj.Spec.Description = "No description provided"
}
}
return &app.MutatingResponse{UpdatedObject: obj}, nil
}
```
## Registering Admission Handlers
Register validators and mutators when building the app in `pkg/app/app.go`:
```go
func New(cfg app.Config) (app.App, error) {
cfg.KubeConfig.APIPath = "/apis"
a, err := simple.NewApp(simple.AppConfig{
ManagedKinds: []simple.AppManagedKind{
{
Kind: v1.MyKindKind(),
Validator: &MyKindValidator{},
Mutator: &MyKindMutator{},From stanfish06/skillquarium, Apache-2.0.
More from stanfish06/skillquarium
- 0.628score
aeon
stanfish06
Use for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection, segmentation, and similarity…
SkillAFreshness: A★ 9Claude Code +9 - 0.628score
adding-dbt-unit-test
dbt-labs
Creates unit test YAML definitions that mock upstream model inputs and validate expected outputs.
SkillAFreshness: A★ 9Claude Code +9 - 0.593score
adaptive-metrics
stanfish06
Cut Grafana Cloud Metrics cost by shrinking active-series count with Adaptive Metrics aggregation rules — auto-recommendations from query history, custom…
SkillBFreshness: B★ 9Claude Code +9 - 0.588score
accessibility-and-inclusive-visualization
stanfish06
Make data visualizations accessible and inclusive.
SkillBFreshness: B★ 9Claude Code +9 - 0.583score
additive-manufacturing-engineer
stanfish06
Expert-thinking profile for Additive Manufacturing Engineer (LPBF / DED metal AM / qualification): Reasons from melt-pool physics, VED, and thermal history…
SkillBFreshness: B★ 9Claude Code +9 - 0.583score
adjusttext
stanfish06
Use the Python adjustText package to automatically move matplotlib text labels so they do not overlap each other, points, or other artists.
SkillBFreshness: B★ 9Claude Code +9 - 0.583score
aerodynamicist
stanfish06
Expert-thinking profile for Aerodynamicist (wind tunnel / CFD / flight vehicle external aerodynamics): Reasons from circulation, Cp distributions, and…
SkillBFreshness: B★ 9Claude Code +9 - 0.583score
acoustics-physicist
stanfish06
Expert-thinking profile for Acoustics Physicist (wave acoustics / ultrasonics & underwater / transducer & array / impedance tube & anechoic / standards (ISO…
SkillBFreshness: B★ 9Claude Code +9 - 0.583score
actuarial-scientist
stanfish06
Expert-thinking profile for Actuarial Scientist (life / health / P&C / valuation / capital & accounting): Reasons from mortality tables (qx, period/cohort…
SkillBFreshness: B★ 9Claude Code +9 - 0.583score
acoustical-engineer
stanfish06
Expert-thinking profile for Acoustical Engineer (noise control / building & environmental acoustics / NVH / standards (IEC 61672, ISO 9613-2)): Reasons from…
SkillBFreshness: B★ 9Claude Code +9 - 0.580score
accelerator-physicist
stanfish06
Expert-thinking profile for Accelerator Physicist (experimental / beam physics): Reasons from beam optics, RF cavities, emittance budgets, and loss maps while…
SkillBFreshness: B★ 9Claude Code +9 - 0.577score
agentic-workflows
stanfish06
Route gh-aw workflow design/create/debug/upgrade requests to the right prompts.
SkillBFreshness: B★ 9Claude Code +9
Signals
- Stars
- 9
- Forks
- 5
- Open issues
- 315
- Last commit (this folder)
- Aug 25, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/stanfish06/skillquarium
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from stanfish06
- 0.628score
aeon
stanfish06
Use for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection, segmentation, and similarity…
SkillAFreshness: A★ 9Claude Code +9 - 0.593score
adaptive-metrics
stanfish06
Cut Grafana Cloud Metrics cost by shrinking active-series count with Adaptive Metrics aggregation rules — auto-recommendations from query history, custom…
SkillBFreshness: B★ 9Claude Code +9 - 0.588score
accessibility-and-inclusive-visualization
stanfish06
Make data visualizations accessible and inclusive.
SkillBFreshness: B★ 9Claude Code +9 - 0.583score
acoustics-physicist
stanfish06
Expert-thinking profile for Acoustics Physicist (wave acoustics / ultrasonics & underwater / transducer & array / impedance tube & anechoic / standards (ISO…
SkillBFreshness: B★ 9Claude Code +9 - 0.583score
actuarial-scientist
stanfish06
Expert-thinking profile for Actuarial Scientist (life / health / P&C / valuation / capital & accounting): Reasons from mortality tables (qx, period/cohort…
SkillBFreshness: B★ 9Claude Code +9 - 0.583score
additive-manufacturing-engineer
stanfish06
Expert-thinking profile for Additive Manufacturing Engineer (LPBF / DED metal AM / qualification): Reasons from melt-pool physics, VED, and thermal history…
SkillBFreshness: B★ 9Claude Code +9
Cite this page
admission-control skill. Agent Mart. https://agentmart.dev/skills/stanfish06-admission-control (last updated 2026-10-24)