cli/templates/skills/project-standards/SKILL.md
Core coding standards, SOLID principles, Clean Code, and naming conventions. Use this skill for any coding task to ensure consistency.
npx skillsauth add binhtranquoc/agent-kit-skill project-standardsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill provides the foundational coding standards that apply to ALL projects regardless of tech stack.
Before applying any rules, READ the dependency files:
package.json (Node/TS projects)composer.json (PHP/Laravel)go.mod (Go projects)requirements.txt / pyproject.toml (Python)Principle: Respect legacy. If the project already uses a specific library, USE IT.
A class/function must have ONE and only ONE reason to change.
UserService that handles DB queries AND sends Emails.UserRepository and EmailNotificationService.Open for extension, closed for modification. Use Interfaces/Abstract classes.
Subtypes must be substitutable for their base types.
Clients should not be forced to depend on interfaces they do not use. Split large interfaces.
Depend on abstractions, not concretions.
new Class() inside business logic.createUser(isSuperAdmin: boolean).| Category | JS/TS | Python | Go | PHP |
|---|---|---|---|---|
| Files | kebab-case | snake_case | snake_case | PascalCase |
| Classes | PascalCase | PascalCase | PascalCase | PascalCase |
| Functions | camelCase | snake_case | camelCase | camelCase |
| Variables | camelCase | snake_case | camelCase | $camelCase |
| Constants | SCREAMING_SNAKE | SCREAMING_SNAKE | PascalCase | SCREAMING_SNAKE |
modules/<name>/helpers/src/common/ or src/shared/Service, Handler, or UseCase.user.dto.ts, order_response.go).// Fast calculation function// Uses binary search for O(log n) complexity.// Bad: Redundant
/**
* Adds two numbers.
* @param a First number
* @param b Second number
* @returns The sum
*/
const add = (a: number, b: number) => a + b;
// Good: Necessary context only
/**
* Calculates tax based on local VAT rules (2024 reform).
*/
const calculateTax = (price: number, region: string) => { ... }
GET - Read (Idempotent, Safe)POST - CreatePUT - Full UpdatePATCH - Partial UpdateDELETE - Remove200 OK - Success (Read/Update)201 Created - Success (Create)204 No Content - Success (Delete)400 Bad Request - Validation Error401 Unauthorized - Auth missing403 Forbidden - No permission404 Not Found - Resource not exist500 Internal Server Error - App crash{
"success": true,
"data": {},
"meta": { "page": 1, "limit": 10, "total": 100 },
"error": { "code": "ERROR_CODE", "message": "...", "details": [] },
"timestamp": "2024-01-20T10:00:00Z"
}
/users (Plural, kebab-case)/users/123/users/123/orderssnake_case for tables/columns.created_at, updated_at, deleted_at mandatory.src/
├── features/
│ ├── auth/
│ │ ├── components/
│ │ ├── hooks/
│ │ ├── api/
│ │ └── index.ts
│ └── dashboard/
src/
├── components/
├── pages/
├── services/
├── utils/
└── hooks/
development
Activate Code Reviewer mode for code review and quality assurance. Use when reviewing code for bugs, security issues, or optimization opportunities.
development
Default Implementer mode for writing production code. Use for general coding tasks following project conventions.
development
Activate Debugger mode for systematic bug fixing. Use when debugging errors, investigating issues, or fixing bugs.
testing
Activate Architect mode for system design and architecture decisions. Use when planning features, designing systems, or making architectural choices.