Ent

From openmeterio/openmeter · View interactive version

Ent is an AI agent skill from the GitHub repository openmeterio/openmeter. Work with Ent ORM schemas and generated code. Use when modifying ent schemas, debugging ent query issues, or dealing with Postgres type mappings.

How to use this skill

Skill file

Ent ORM

Guidance for working with Ent in the OpenMeter codebase.

Schema Location

After any schema change, regenerate with make generate before running tests.

Database migration downgrades are best effort. Prioritize correctness and

validation of forward migrations.

Postgres Array Columns (`text[]`)

Custom Selects & Joins

Common Patterns

Regeneration

Depending on the change, the generators need to be re-run. For schema changes, edit files under openmeter/ent/schema/ and run the repo generation target:

# Regenerate all generated Go code, including Ent
make generate

During local iteration, you can use the narrower Ent-only command when you intentionally want to avoid a full generation run:

# Regenerate Ent only after schema changes
go generate ./openmeter/ent/...
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.