Coding Standards
/install coding-standards
Coding Standards & Best Practices
Universal standards for maintainable, scalable TypeScript/JavaScript code.
Quick Start
- Readability First — Clear names, self-documenting code
- Type Safety — Avoid
any, use explicit interfaces - Error Handling — Try-catch with specific error types
- Immutability — Use spread operator, never direct mutation
- Test Structure — AAA pattern (Arrange, Act, Assert)
Core Principles
KISS — Simplest solution that works. No premature optimization.
DRY — Extract common logic into reusable functions and components.
YAGNI — Don't build before it's needed. Start simple, refactor when needed.
Readability — Code is read 10x more than written. Clarity over cleverness.
Naming Standards
Variables
// Good: Descriptive, type-hinted by name
const marketSearchQuery = 'election'
const isUserAuthenticated = true
const totalRevenue = 1000
// Bad: Single-letter, unclear
const q = 'election'
const flag = true
const x = 1000
Functions
// Good: Verb-noun pattern
async function fetchMarketData(id: string) { }
function calculateSimilarity(a: number[], b: number[]) { }
function isValidEmail(email: string): boolean { }
// Bad: Unclear or noun-only
async function market(id: string) { }
function similarity(a, b) { }
function email(e) { }
References
references/typescript.md— type safety, immutability, async patternsreferences/react.md— component structure, hooks, state managementreferences/api-design.md— REST conventions, validation, error responsesreferences/file-org.md— project structure, file namingreferences/testing.md— test patterns, AAA structure, test namingreferences/code-smells.md— anti-patterns, long functions, deep nesting, magic numbers
Adapted from everything-claude-code by @affaan-m (MIT)
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install coding-standards - 安装完成后,直接呼叫该 Skill 的名称或使用
/coding-standards触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Coding Standards 是什么?
Universal coding standards for TypeScript, JavaScript, React, and Node.js. Principles: readability first, KISS, DRY, YAGNI. Covers naming, type safety, error... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 218 次。
如何安装 Coding Standards?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install coding-standards」即可一键安装,无需额外配置。
Coding Standards 是免费的吗?
是的,Coding Standards 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Coding Standards 支持哪些平台?
Coding Standards 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(linux, darwin, win32)。
谁开发了 Coding Standards?
由 Deonte Cooper(@djc00p)开发并维护,当前版本 v1.0.0。