---
name: Technical Standards
slug: technical-standards
category: Quality
description: Technical Standards defines naming, code organization, error handling, and test expectations for consistent TypeScript code. Use it when setting team conventions or reviewing code quality.
github: "https://github.com/echoVic/boss-skill/tree/main/skill/skills/tech-lead/technical-standards"
language: TypeScript
stars: 548
forks: 50
install: "npx degit https://github.com/echoVic/boss-skill/tree/main/skill/skills/tech-lead/technical-standards ~/.claude/skills/technical-standards"
installs_to: ~/.claude/skills/technical-standards
source_path: skill/skills/tech-lead/technical-standards/SKILL.md
collection_size: 25
category_size: 1354
collection_url: "https://dirskills.com/collections/echoVic/boss-skill"
added: 2026-08-26T05:11:11.898Z
last_synced: 2026-08-26T05:11:11.898Z
canonical_url: "https://dirskills.com/skills/technical-standards"
---

# Technical Standards

Technical Standards defines naming, code organization, error handling, and test expectations for consistent TypeScript code. Use it when setting team conventions or reviewing code quality.

**Install:**

```bash
npx degit https://github.com/echoVic/boss-skill/tree/main/skill/skills/tech-lead/technical-standards ~/.claude/skills/technical-standards
```

## README

# 技术规范与最佳实践

## 命名规范

| 类型 | 规范 | 示例 |
|------|------|------|
| 变量 | camelCase | `userName`, `isActive` |
| 常量 | UPPER_SNAKE_CASE | `MAX_COUNT`, `API_URL` |
| 函数 | camelCase | `getUserById`, `calculateTotal` |
| 类 | PascalCase | `UserService`, `OrderController` |
| 文件 | kebab-case | `user-service.ts`, `order-controller.ts` |

## 代码组织

- **单一职责**：每个函数/类只做一件事
- **DRY原则**：不要重复代码
- **KISS原则**：保持简单
- **YAGNI原则**：不要过度设计

## 错误处理

- 使用try-catch捕获异常
- 提供有意义的错误信息
- 记录错误日志
- 优雅降级

## 测试要求

- 单元测试覆盖率 ≥ 70%
- 关键路径必须有测试
- 测试要独立、可重复
