Use a domain-specific `enum.StrEnum` for a closed, server-owned set of string values that is used in backend logic or persisted as data. Keep enum members named for the domain rather than sharing one
Imported from ubcdiscovery/ubc-discovery (backend/AGENTS.md). Install upstream with npx skills add ubcdiscovery/ubc-discovery --skill backend. Copyright stays with the author.
Backend-specific guidance
Closed string domains
Use a domain-specific enum.StrEnum for a closed, server-owned set of string
values that is used in backend logic or persisted as data. Keep enum members
named for the domain rather than sharing one broad enum across unrelated
audit or lifecycle concepts.
For persisted closed sets, use a VARCHAR column with an explicit SQLAlchemy
CheckConstraint and a matching Alembic migration. Keep the enum values stable
once they are written to audit history; adding a value requires updating the
enum, model constraint, migration, and tests together.
Use it
Copy one of these into your project. Installing also returns the manifest and these snippets.
yaml
targets:
- https://api.opensmartroute.ai/api/v1/registry/ubcdiscovery-ubc-discovery-backend/manifest # or paste the manifest below
Manifest
An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.
ubcdiscovery-ubc-discovery-backend.ocm.jsonjson
{
"ocm": "1",
"id": "ubcdiscovery-ubc-discovery-backend",
"kind": "skill",
"name": "backend",
"description": "Use a domain-specific `enum.StrEnum` for a closed, server-owned set of string values that is used in backend logic or persisted as data. Keep enum members named for the domain rather than sharing one broad enum across unrelated audit or lifecycle concepts.",
"publisher": "ubcdiscovery",
"version": "1.0.0",
"capabilities": {
"domains": [
"general"
],
"tags": [
"skill-md",
"github-agents"
],
"languages": [
"en"
]
},
"quality_prior": 0.6,
"examples": [
"Use a domain-specific `enum.StrEnum` for a closed, server-owned set of string values that is used in backend logic or persisted as data. Keep enum members named for the domain rather than sharing one broad enum across unrelated audit or lifecycle concepts."
],
"primary": false,
"metadata": {
"source": {
"provider": "github-agents",
"repository": "https://github.com/ubcdiscovery/ubc-discovery",
"path": "backend/AGENTS.md",
"ref": "438a8b263602e0d0a776b61a130cc6fbb02a6622",
"url": "https://github.com/ubcdiscovery/ubc-discovery/blob/438a8b263602e0d0a776b61a130cc6fbb02a6622/backend/AGENTS.md",
"key": "ubcdiscovery/ubc-discovery/backend/AGENTS.md"
}
},
"instructions": "# Backend-specific guidance\n\n## Closed string domains\n\nUse a domain-specific `enum.StrEnum` for a closed, server-owned set of string\nvalues that is used in backend logic or persisted as data. Keep enum members\nnamed for the domain rather than sharing one broad enum across unrelated\naudit or lifecycle concepts.\n\nFor persisted closed sets, use a `VARCHAR` column with an explicit SQLAlchemy\n`CheckConstraint` and a matching Alembic migration. Keep the enum values stable\nonce they are written to audit history; adding a value requires updating the\nenum, model constraint, migration, and tests togethe",
"cost": {
"context_tokens": 150
}
}
Fetch it by URL: GET /api/v1/registry/ubcdiscovery-ubc-discovery-backend/manifest?version=1.0.0
Reviews
Star ratings from people who tried it. One review per account; edit yours any time.
No reviews yet. Install it, try it, and be the first to rate it.