# General

> General development guidelines prioritizing readability over performance, with rules for meaningful comments. Use when writing any code in this project.

- Skill: `majiayu000/general` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add majiayu000/general`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/general/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/majiayu000/general

---


# General Development Guidelines

Apply these general guidelines to all code.

## Priorities

Focus 80% on readability and 20% on performance.

In order of importance:
1. Correctness and functionality
2. Readability & Maintainability
3. Performance

## Comments

Add comments only when they explain WHY, not WHAT. The code itself should be readable enough to show WHAT it does.

### DO NOT comment obvious operations

```typescript
// Bad
// increment counter
counter++;
```

### DO comment

- Business logic reasoning
- Non-obvious decisions
- Workarounds or edge cases
- Complex algorithms (brief summary of approach)

### Example of a good comment

```typescript
// Using ceil() here because partial units must be charged as full units per billing policy
const billableUnits = Math.ceil(usage / unitSize);
```

