aif-best-practices

Provides code quality guidelines covering naming, structure, error handling, testing, and review.

Updated Jun 5, 2026
One-click install
npx skills add https://github.com/1t1sCooL/zazyvala-bot --skill aif-best-practices-1t1scool
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aif-best-practices
Source: https://github.com/1t1sCooL/zazyvala-bot/tree/main/.cursor/skills/aif-best-practices
Command: npx skills add https://github.com/1t1sCooL/zazyvala-bot --skill aif-best-practices-1t1scool

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developers often lack consistent, shared standards for writing clean and maintainable code, leading to inconsistent naming, bloated functions, swallowed errors, and weak tests across a codebase. ## Core Features & Use Cases - Naming and Structure Guidelines: Enforces descriptive naming conventions, single-responsibility functions, and feature-based module organization with concrete good/bad examples. - Error Handling and Testing Standards: Promotes specific error classes, proper logging with context, AAA-pattern tests, and coverage priorities for critical business logic. - Code Review Checklists: Supplies pre-review and reviewer checklists plus guidance on writing constructive review comments. - Use Case: When refactoring a TypeScript service or reviewing a pull request, invoke this skill to check naming, function size, error handling, and test quality against universal standards, with project-specific overrides from skill-context files. ## Quick Start Ask the assistant to review this function against best practices for naming, error handling, and testing.

Frequently Asked Questions about aif-best-practices

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

FAQPage Schema
How do I apply clean code naming conventions?

Use descriptive names that reveal intent, prefix booleans with is/has/can/should, name functions as verb plus noun, and use SCREAMING_SNAKE_CASE for constants. Avoid abbreviations except universally known ones like id, url, and api.

What are best practices for error handling in TypeScript?

Create specific error classes for domain errors, never swallow exceptions without logging, and include context like user or request IDs in log messages. Error messages should state exactly what failed, such as which email already exists.

How should I structure unit tests using the AAA pattern?

Arrange inputs, Act on the function under test, then Assert the expected outcome in three distinct phases. Write descriptive test names stating expected behavior and conditions, and test behavior rather than implementation details.

Does this skill override project-specific coding conventions?

No, project-specific rules take priority. If a skill-context file exists under .ai-factory/skill-context, its rules override the general guidelines whenever they conflict, and both apply when there is no conflict.

What are the limits of these code review guidelines?

The skill is advisory and reference-only; it does not modify project files or enforce rules automatically. It provides checklists and examples, but applying them still requires human judgment during writing and review.