# Coding Standards (coding-standards)

> Gives baseline cross-project coding conventions for naming, readability, immutability, error handling and code-smell review.

- Category: [Code Standards](https://www.myskills.tools/en/categories/code-standards/)
- Source: Community · Affaan Mustafa
- Repository: https://github.com/affaan-m/ECC/tree/main/skills/coding-standards (commit d29cf65)
- SKILL.md: https://github.com/affaan-m/ECC/blob/main/skills/coding-standards/SKILL.md
- Install command: `npx skills add affaan-m/ECC --skill coding-standards`
- License: MIT
- Compatible with: Claude Code, Codex, Cursor, Copilot, OpenCode
- Permissions: read-repo ✓, write-files ✓, shell ✗, network ✗
- Status: Scan passed
- A rule scan cannot catch every risk. Read this skill's SKILL.md and check its permissions before installing.

## Core rule

Always create new objects and arrays with the spread operator; never mutate directly.

## Execution Phases

1. **Check scope** — This skill is the shared floor; for React, backend architecture or API design, prefer the narrower dedicated skill.
2. **Core principles** — Put readability first and follow KISS, DRY and YAGNI, avoiding over-engineering and premature optimisation.
3. **TS/JS standards** — Use descriptive variable names and verb-noun function names, stay immutable, handle errors, parallelise with Promise.all, and avoid any.
4. **Structure and tests** — Follow REST and a consistent response shape, validate input with zod, name files by convention, comment the why, and write AAA tests with descriptive names.
5. **Detect code smells** — Look for functions over 50 lines, nesting 5+ levels deep and magic numbers; fix with smaller functions, early returns and named constants.

## Permissions (summarised from SKILL.md)

| Capability | Needed | Details |
|---|---|---|
| File writes | Required | Writes or refactors project code to follow these conventions. |
| Command execution | Not required | A conventions reference; it does not call for running commands. |
| Network outbound | Not required | No network access needed. |

## SKILL.md frontmatter (YAML)

```yaml
---
name: coding-standards
description: Baseline cross-project coding conventions for naming, readability, immutability, and code-quality review. Use detailed frontend or backend skills for framework-specific patterns. Use when reviewing code quality or naming with no framework-specific skill that applies.
metadata:
  origin: ECC
---
```

Home: https://www.myskills.tools/en/ · URL: https://www.myskills.tools/en/skills/coding-standards/
