CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

fastapi-patterns

FastAPI best practices covering project structure, Pydantic v2 schemas, dependency injection, async handlers, authentication, authorization, transactional service layers, and testing with httpx and pytest. Use when building or reviewing FastAPI apps — Pydantic schemas, dependencies, async handlers, auth, or tests.

Quality

83%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Quality

Content

78%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

The body is a highly actionable, near-fully-executable FastAPI reference with excellent logical organization and demonstrated error handling. Its main weakness is structure: everything lives in one monolithic SKILL.md with no bundled reference files, so progressive disclosure suffers, and a few prose bullets could be tightened.

Suggestions

Split the complete-app material into bundled reference files (e.g., references/testing.md for the httpx/pytest fixtures and references/service-layer.md for the full service implementation), keeping SKILL.md as a concise overview with clearly signaled one-level-deep links.

Tighten the 'Best Practices' bullets into concrete, imperative statements (e.g., replace 'Wrap database mutation boundaries gracefully within transactions...' with 'Commit and roll back inside service methods; map IntegrityError to DuplicateUserError').

Show or link the two omitted modules (app/database.py and app/models/user.py, including the unique index on User.email referenced by the database-design note) so the example app is fully self-contained.

DimensionReasoningScore

Conciseness

The body is almost entirely executable code with lean, purposeful comments (e.g., 'Rely on atomic DB constraints rather than race-prone application-level prechecks'), but a few 'Best Practices' bullets are padded or awkwardly worded ('Wrap database mutation boundaries gracefully within transactions') and could be trimmed.

4 / 5

Actionability

Complete, copy-paste-ready modules cover the common cases end to end — app factory, config, Pydantic v2 schemas, dependencies, router, transactional service layer, and httpx/pytest fixtures. The only omitted modules (database.py, models/user.py) are trivial boilerplate, which does not breach the anchor.

5 / 5

Workflow Clarity

Sections build logically from project structure through factory, config, schemas, DI, router, service, to tests, and error feedback loops are demonstrated in code (IntegrityError -> rollback -> raise DuplicateUserError). It is a patterns reference rather than a step-by-step workflow, so no explicit validation checkpoints are required, keeping it at anchor 4 rather than 5.

4 / 5

Progressive Disclosure

No bundle files exist; the entire skill — including full test fixtures, the complete service layer, and a whole reference app — is inlined in a single ~500-line SKILL.md. Section headers are clear, but substantial content that belongs in separate reference files (e.g., a testing guide, full app example) is inline, matching anchor 3.

3 / 5

Total

16

/

20

Passed

Description

83%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A strong description that explicitly covers what the skill does and when to use it, with a well-scoped FastAPI niche and concrete trigger terms. Its main weaknesses are topic-style rather than action-verb phrasing and trigger lists that omit common synonyms such as 'endpoints', 'JWT', or 'REST API'.

DimensionReasoningScore

Specificity

Lists many specific capabilities ('Pydantic v2 schemas, dependency injection, async handlers, authentication, authorization, transactional service layers, and testing with httpx and pytest') with comprehensive domain coverage, but they are framed as topics ('best practices covering...') rather than concrete action verbs like the anchor-5 examples.

4 / 5

Completeness

Explicitly answers both what ('FastAPI best practices covering project structure, Pydantic v2 schemas, ... testing with httpx and pytest') and when ('Use when building or reviewing FastAPI apps — Pydantic schemas, dependencies, async handlers, auth, or tests') with concrete trigger phrases, matching the anchor-5 example structure.

5 / 5

Trigger Term Quality

Natural user phrasings are present ('building or reviewing FastAPI apps', 'Pydantic schemas', 'dependencies', 'auth', 'tests'), but common variations like 'endpoints', 'routes', 'JWT', 'SQLAlchemy', or 'REST API' are missing, so coverage is good rather than comprehensive.

4 / 5

Distinctiveness Conflict Risk

The 'Use when building or reviewing FastAPI apps' clause anchors a clear niche, but the bare triggers that follow ('Pydantic schemas', 'auth', 'tests') could independently overlap a generic Pydantic or auth skill, indicating minor overlap risk with closely related skills.

4 / 5

Total

17

/

20

Passed

Validation

87%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 14 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

skill_md_line_count

SKILL.md is long (515 lines); consider splitting into references/ and linking

Warning

metadata_version

'metadata.version' is missing

Warning

Total

14

/

16

Passed

Repository

affaan-m/ECC

Path

skills/fastapi-patterns/SKILL.md

Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.