# reconciler-logic

> Claude/Codex skill by [@grafana](https://omgskills.com/library/grafana/index.md) · 286 stars · Updated 2026-10-17

Implement reconcilers and watchers for grafana-app-sdk apps — write \`TypedReconciler\[\*MyKind\]\` reconcile functions, apply generation-based skip patterns, do conflict-safe status updates via \`resource.UpdateObject\`, configure \`BasicReconcileOptions\` (namespace, label/field filters, finalizer management), use \`Watcher\` for event-style handling, reconcile \`UnmanagedKinds\` (resources your app doesn't own), and register the whole thing in \`app.go\`. Use when writing a reconciler, implementing the reconcile loop, adding async business logic, handling create/update/delete events, processing resource state changes, scheduling periodic resyncs with \`RequeueAfter\`, picking between Watcher and Reconciler, or wiring a controller into \`app.go\` — even when the user says "process this resource", "handle X events", or "write a controller" without saying "reconciler".

## Install

```sh
git clone https://github.com/grafana/skills /tmp/skills && ln -s /tmp/skills/skills/grafana-app-sdk/reconciler-logic ~/.claude/skills/reconciler-logic
```

## From README

Reconciler Logic Reconcilers are the async business-logic layer of a grafana-app-sdk app. The SDK enqueues a reconcile event when a resource is created, updated, or deleted; the reconciler observes the current state and drives the system toward the desired state. Common Workflows Implementing a new reconciler end-to-end If the operator starts but no reconcile events fire when you create a resource: Check BasicReconcileOptions.Namespace matches the resource's namespace Check BasicReconcileOptions.LabelFilters / FieldSelectors — most "no events" issues are filter mismatches (kubectl get -o yaml to see labels) Confirm the reconciler was attached to the right (latest) version of the kind TypedReconciler — preferred pattern operator.TypedReconciler handles type assertion and provides a strongly-typed ReconcileFunc: ReconcileAction values: ReconcileActionCreated, ReconcileActionUpdated, ReconcileActionDeleted, ReconcileActionResynced. To requeue after a delay (e.g.

## Links

- HTML page: https://omgskills.com/library/grafana/skills/reconciler-logic/
- GitHub: https://github.com/grafana/skills
- Author: [@grafana](https://omgskills.com/library/grafana/index.md)

## More from this repo

- [k6-docs](https://omgskills.com/library/grafana/skills/k6-docs/index.md) — Used to write or review k6 documentation across the three k6 repositories - k6-DefinitelyTyped (TypeScript types),...
   - [@grafana](https://omgskills.com/library/grafana/index.md) · 295 stars
- [adaptive-metrics](https://omgskills.com/library/grafana/skills/adaptive-metrics/index.md) — Cut Grafana Cloud Metrics cost by shrinking active-series count with Adaptive Metrics aggregation rules —...
   - [@grafana](https://omgskills.com/library/grafana/index.md) · 286 stars
- [admin](https://omgskills.com/library/grafana/skills/admin/index.md) — Used to manage Grafana Cloud accounts — organizations, stacks, RBAC roles and assignments, SSO/SAML/OAuth/GitHub auth,...
   - [@grafana](https://omgskills.com/library/grafana/index.md) · 286 stars
