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 darellchua2/opencode-config-template --skill fastapi-pydantic-orm-patterns-skillgit clone --depth 1 https://github.com/darellchua2/opencode-config-templateWrote 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/darellchua2/opencode-config-template/fastapi-pydantic-orm-patterns-skill)<a href="https://agentmods.dev/skills/darellchua2/opencode-config-template/fastapi-pydantic-orm-patterns-skill"><img src="https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/fastapi-pydantic-orm-patterns-skill/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/darellchua2/opencode-config-template/fastapi-pydantic-orm-patterns-skill"><img src="https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/fastapi-pydantic-orm-patterns-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00046 | $0.02395 |
| Opus 5.5 | $0.00018 | $0.00958 |
| Sonnet 5.5 | $0.00009 | $0.00479 |
| Haiku 4.5 | $0.00005 | $0.00239 |
Grade A, and why
fastapi-pydantic-orm-patterns-skill 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 3mo 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 — 311 lines — stays where its author put it; the contents beside it link to each section on GitHub.
What I do
I provide battle-tested patterns for FastAPI + Pydantic v2 + SQLAlchemy/asyncpg backends, extracted from production incidents across multiple repos. Each pattern caused a real bug and has a concrete fix.
When to use me
Use this skill when:
- Writing or reviewing FastAPI endpoints, especially with async sessions
- Configuring Pydantic v2 models, validators, or serializers
- Writing Alembic migrations (especially with asyncpg + JSONB)
- Auditing multi-tenant isolation or auth flows
- Debugging race conditions in state transitions
- Reviewing error handling in service-to-service calls
Related Skills
- python-backend-skill: Project scaffolding. This skill covers the runtime patterns python-backend-skill references.
- database-migration-skill: Migration workflow patterns. This skill covers the asyncpg-specific pitfalls.
- security-audit-skill: Security auditing. This skill covers the FastAPI-specific auth/encryption patterns.
A. Pydantic v2 Conventions
A1. Canonical Checklist
Use V2 APIs exclusively — the V1 compatibility layer is deprecated and hides bugs.
| Concern | V2 Correct | V1 Legacy (reject) |
|---|---|---|
| Config | model_config = ConfigDict(...) |
class Config: |
| Extra fields | extra="forbid" on API boundary, "ignore" on embedded spec |
Extra.ignore |
| Validators | @field_validator, @model_validator |
@validator |
| Serialization | .model_dump(), .model_validate() |
.dict(), .parse_obj() |
| Computed | @computed_field |
@property only |
| Immutable | model_config = ConfigDict(frozen=True) |
custom __setattr__ |
| Serializer | @field_serializer / @model_serializer |
json_encoders |
| Type adapter | TypeAdapter[T] for non-model validation |
custom parse_* |
| Polymorphism | SerializeAsAny[Base] |
manual discriminated unions |
| Rebuild | model_rebuild() after forward refs |
silent failure |
| Name mode | validate_by_name=True (v2.11+) |
Config.allow_population_by_field_name |
| Init hook | model_post_init() |
__init__ override |
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.
- 3mo ago First seen · 311 lines · 46 tokens per session scan A 1f3954a56ea4
fastapi-pydantic-orm-patterns-skill is a skill published in the GitHub repository darellchua2/opencode-config-template (6 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 46 tokens to every session and 2,395 once invoked, about $0.0002 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-09-03.
fastapi-pydantic-orm-patterns-skill compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| fastapi-pydantic-orm-patterns-skilldarellchua2/opencode-config-template | Skill | 6 | 2mo ago | Apache-2.0 | A | 46 | Claude Code, Codex |
| azure-postgres-tsmicrosoft/skills | Skill | 3.3k | yesterday | MIT | A | 94 | Claude Code |
| supabasesupabase/agent-skills | Skill | 3.2k | 3d ago | MIT | A | 185 | Claude Code, Codex |
| butterbasebutterbase-ai/butterbase | Skill | 3.0k | 5d ago | Apache-2.0 | A | 34 | Claude Code, Codex |
| supabase-clifcakyon/claude-codex-settings | Skill | 1.2k | yesterday | Apache-2.0 | A | 60 | Claude Code |
| supabase-jsfcakyon/claude-codex-settings | Skill | 1.2k | yesterday | Apache-2.0 | A | 64 | Claude Code |
| supabase-nodealinaqi/maggy | Skill | 712 | 8d ago | MIT | A | 14 | Claude Code |