Install any skill in seconds. Free to start, no credit card required.
Get Started Free →This skill covers the creation and management of Generation and GenerationEvent ORM models. Trigger: When working with generation data in the backend.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -51% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -38% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -40% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -25% | 0% |
| case-05 | ✗→✓ | ▲ Improved | -55% | 0% |
<!-- L1:START -->
This skill covers the creation and management of Generation and GenerationEvent ORM models.
Trigger: When working with generation data in the backend. <!-- L1:END -->
<!-- L2:START -->
| Task | Pattern | |------|---------| | Create a Generation | create-generation | | Log a GenerationEvent | log-generation-event |
<!-- L2:END -->
<!-- L3:START -->
This pattern demonstrates how to create a new Generation record using the Generation model.
pythonfrom apps.server.app.models.generation import Generation from uuid import uuid4 from datetime import datetime new_generation = Generation( id=uuid4(), created_at=datetime.utcnow(), updated_at=datetime.utcnow() )
This pattern shows how to log a GenerationEvent related to a specific Generation.
pythonfrom apps.server.app.models.generation import GenerationEvent from uuid import uuid4 from datetime import datetime event = GenerationEvent( id=uuid4(), generation_id=new_generation.id, event_time=datetime.utcnow(), description="Generation created" )
bashpython -m apps.server.app.models.generation
Creating a Generation without proper validation can lead to data integrity issues.
python# BAD new_generation = Generation(id=None) # Missing required fields
<!-- L3:END -->
Other measured skills in the registry, with their headline benchmark lift.