backend-style

Enforces backend code style conventions for formatting, validation, error handling, and database queries.

3|Updated May 2, 2026
One-click install
npx skills add https://github.com/JuanTrujilloDev/agent-config-template --skill backend-style-juantrujillodev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: backend-style
Source: https://github.com/JuanTrujilloDev/agent-config-template/tree/main/plugin/skills/backend-style
Command: npx skills add https://github.com/JuanTrujilloDev/agent-config-template --skill backend-style-juantrujillodev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Backend codebases drift into inconsistent formatting, scattered validation, swallowed errors, and slow queries when reviewers lack a shared style reference. This Skill gives the AI a concrete set of backend conventions to apply when writing or reviewing code. ## Core Features & Use Cases - Formatting and Organization Rules: Enforces 100-char line length, top-of-file imports, one class per file, and consistent naming conventions. - Validation and Error Handling Standards: Validates at boundaries only, raises specific exceptions, and forbids silent error swallowing. - Database and Testing Guidance: Requires ORM usage with eager loading, bulk operations for large writes, one assertion per test, and an 80% coverage target. - Use Case: When asked to add a new API endpoint, the AI writes the serializer-level validation, specific exception handling, and optimized ORM queries that match the project's stated conventions. ## Quick Start Review this backend service code and rewrite it to follow the project's backend style conventions.

Frequently Asked Questions about backend-style

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce consistent backend code style in a project?▼

Define explicit conventions for line length, formatting, imports, and naming, then apply them during code writing and review. This Skill encodes rules like 100-char lines, top-of-file imports, and one class per file so the AI follows them automatically.

Where should input validation happen in a backend application?▼

Validate at the boundary, such as the request handler, serializer, or schema layer, and never re-validate downstream. Internal code and framework guarantees should be trusted once data passes the boundary.

What error handling practices does this style guide recommend?▼

Raise specific exceptions instead of generic Exception or Error types, catch only what you can handle, and let unexpected errors propagate. Bare except clauses and silently swallowed errors are explicitly forbidden.

Does this style guide work for both Python and JavaScript backends?▼

Yes, the conventions cover both ecosystems, specifying snake_case for Python and camelCase for JS/TS, plus docstring or JSDoc requirements. Formatter and linter commands are placeholders you adapt to your project's toolchain.

When should I avoid raw SQL in backend database code?▼

Always prefer the project's ORM or query builder, using raw SQL only with a documented specific reason. Optimize with select_related or eager loading for foreign keys and bulk operations for more than 10 writes.