Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add aps08/fullstack-clean-architecture --skill database_managementgit clone --depth 1 https://github.com/aps08/fullstack-clean-architectureWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/aps08/fullstack-clean-architecture/database_management)<a href="https://agentmods.dev/skills/aps08/fullstack-clean-architecture/database_management"><img src="https://agentmods.dev/badge/skills/aps08/fullstack-clean-architecture/database_management/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/aps08/fullstack-clean-architecture/database_management"><img src="https://agentmods.dev/badge/skills/aps08/fullstack-clean-architecture/database_management.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00025 | $0.00897 |
| Opus 5.5 | $0.00010 | $0.00359 |
| Sonnet 5.5 | $0.00005 | $0.00179 |
| Haiku 4.5 | $0.00003 | $0.00090 |
Grade A, and why
database-management scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 18d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Database Management Skill
1. SQLAlchemy Base Class & Models
All database models (except system/internal models where not applicable) must inherit from BaseModel defined in server/app/models/base.py.
Automatically Handled by BaseModel
- Table Names: Automatically converted from
PascalCaseclass names tosnake_case(e.g.,Todos->todos,Attachments->attachments). - Primary Keys: Defined as a native PostgreSQL UUID using
PG_UUID(as_uuid=True)with database-side generatorserver_default=text("gen_random_uuid()"). - Audit Fields: All models inherit these auditing and metadata fields:
id: Mapped[UUID] primary key.is_active: Boolean status defaulting totrueon the server.is_deleted: Soft-delete status defaulting tofalseon the server.created_at/updated_at: Timezone-aware UTC timestamps withserver_default=func.now()(andonupdate=func.now()for updates).created_by/updated_by: VARCHAR(100) auditing fields.
Best Practices for Custom Models
- Inheritance: Always subclass
BaseModel. - Use Database Defaults: Lean on PostgreSQL for default values as much as possible using
server_default(e.g.server_default=text("true")rather than Python-leveldefault=True). - Type Annotations: Use SQLAlchemy 2.0
Mapped[...]andmapped_column()syntax. - Foreign Keys:
- Explicitly define
ondeletebehavior (e.g.ondelete="CASCADE"). - Add
index=Truefor foreign key columns to ensure performant joins.
- Explicitly define
- Timezones: Always use timezone-aware datetime objects (
TIMESTAMP(timezone=True)) or Pydantic UTC validation. - Relationships: Define back-populates and lazy loading modes explicitly (e.g.,
lazy="selectin"for eager loading without Cartesian products).
2. Database Queries & Transactions
- Async Execution: All database interactions must be executed asynchronously using
AsyncSession. - Eager Loading: Always declare eager relationships where expected to avoid N+1 queries. Specify
eagerslist on models if supported by the service repository. - Optimistic Concurrency: Use auditing columns or version fields if concurrent updates are expected on highly mutated resources.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 18d ago Changed · +21 lines ddd793758191
- 1mo ago First seen · 49 lines · 25 tokens per session scan A dba8dcad4796
database-management is a skill published in the GitHub repository aps08/fullstack-clean-architecture (2 stars, last pushed 18d ago), licensed Apache-2.0. It adds 25 tokens to every session and 897 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
alembic-migration
Create, review, and apply database schema changes with Alembic. Use whenever a SQLAlchemy model is added or changed, a column/index/constraint needs to change, or a data backfill is required — anything that alters the PostgreSQL schema.
new-entity
Create a backend entity with EF Core configuration and migration.
SQLAlchemy ORM Expert
Comprehensive SQLAlchemy skill for customer support tech enablement, covering ORM patterns, session management, query optimization, async operations, and PostgreSQL integration.
explorer
Build and modify Studio Explorer surfaces, including notebooks, chats, SQL snippets, query cells, and their shared toolbar patterns.
jpa-patterns
JPA/Hibernate patterns and common pitfalls (N+1, lazy loading, transactions, queries). Use when user has JPA performance issues, LazyInitializationException, or asks about entity relationships and fetching strategies.
Drizzle ORM Testing
Testing patterns for Drizzle ORM covering migration testing, query builder testing, transaction testing, and database integration testing with PostgreSQL, SQLite, and MySQL.