Hi - I answer from the OpenSmartRoute documentation: routing, the API, plans and quotas, self-hosting. Ask away, or open a support ticket if you need a person.
Grounded in the docs - follow a source before acting on it.
service - Skill - OpenSmartRoute
Skillv1.0.0
service
Use this rule when generating a backend service class for a SQLAlchemy model. It ensures consistent service structure, method naming, and database handling across the codebase. Apply this pattern when
Instruction file imported from tesserahq/chrona (.cursor/rules/service.mdc). Copyright stays with the author.
This rule defines how to generate service classes in the backend:
In the services directory:
Always define services as Service classes
Accept a SQLAlchemy Session instance in the constructor
Include the following methods:
get_(id: UUID) - fetch a single instance
get_(skip=0, limit=100) - fetch a list with pagination
create_(data: Create) - create a new instance using Pydantic schema
update_(id: UUID, data: Update) - update fields using exclude_unset=True
delete_(id: UUID) - delete the instance and return a boolean
search(filters: dict) - apply filters with apply_filters(query, Model, filters)
Use model names in lowercase for variable names and method prefixes
Use .model_dump() on Pydantic objects for instantiation
Always commit and refresh updated or created objects
Reference: WorkspaceService in services/workspace.py
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/tesserahq-chrona-service-rule/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.
tesserahq-chrona-service-rule.ocm.jsonjson
{
"ocm": "1",
"id": "tesserahq-chrona-service-rule",
"kind": "skill",
"name": "service",
"description": "Use this rule when generating a backend service class for a SQLAlchemy model. It ensures consistent service structure, method naming, and database handling across the codebase. Apply this pattern whenever a new model-specific service needs to be created or updated in the services directory.",
"publisher": "tesserahq",
"version": "1.0.0",
"capabilities": {
"domains": [
"coding"
],
"tags": [
"skill-md",
"github-cursor-rules"
],
"languages": [
"en"
]
},
"quality_prior": 0.6,
"examples": [
"Use this rule when generating a backend service class for a SQLAlchemy model. It ensures consistent service structure, method naming, and database handling across the codebase. Apply this pattern whenever a new model-specific service needs to be created or updated in the services directory."
],
"primary": false,
"metadata": {
"source": {
"provider": "github-cursor-rules",
"repository": "https://github.com/tesserahq/chrona",
"path": ".cursor/rules/service.mdc",
"ref": "791f5f518a37cc6ab31dce139c872cd9e5121362",
"url": "https://github.com/tesserahq/chrona/blob/791f5f518a37cc6ab31dce139c872cd9e5121362/.cursor/rules/service.mdc",
"key": "tesserahq/chrona/.cursor/rules/service.mdc"
}
},
"instructions": "This rule defines how to generate service classes in the backend:\n\nIn the services directory:\n* Always define services as <Model>Service classes\n* Accept a SQLAlchemy Session instance in the constructor\n* Include the following methods:\n* get_<model>(id: UUID) - fetch a single instance\n* get_<models>(skip=0, limit=100) - fetch a list with pagination\n* create_<model>(data: <Model>Create) - create a new instance using Pydantic schema\n* update_<model>(id: UUID, data: <Model>Update) - update fields using exclude_unset=True\n* delete_<model>(id: UUID) - delete the instance and return a boolean\n* sear",
"cost": {
"context_tokens": 228
}
}
Fetch it by URL: GET /api/v1/registry/tesserahq-chrona-service-rule/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.