coding-standards
Enforces consistent coding standards across the codebase including naming conventions, code organization, and documentation requirements. Use when writing new code, reviewing pull requests, or refactoring existing code.
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
Coding Standards
Enforces consistent naming conventions, code organization, and documentation across the codebase.
When to use this skill
- Writing new code
- Reviewing pull requests
- Refactoring existing code
- Onboarding to a new codebase
Skill Contents
Sections
- When to use this skill (L16-L22)
- Quick Start (L51-L63)
- Naming Conventions (L64-L74)
- Available Scripts (L75-L86)
- References (L87-L94)
- Assets (L95-L100)
- Related Skills (L101-L104)
Available Resources
📚 references/ - Detailed documentation
🔧 scripts/ - Automation scripts
📦 assets/ - Templates and resources
Quick Start
Run naming convention checks:
# Via skills CLI
node .scripts/skills-cli.ts coding-standards validate
# Programmatically
import { codingStandards } from './.scripts/lib/skills/index.ts';
const result = await codingStandards.validate('./src');
Naming Conventions
| Language | Convention | Example |
|---|---|---|
| Java | PascalCase for classes | UserService.java |
| Python | snake_case for modules | user_service.py |
| TypeScript/JS | kebab-case or camelCase | user-service.ts |
| Shell | kebab-case | run-tests.sh |
For complete rules, see references/naming-conventions.md.
Available Scripts
Scripts are implemented in .scripts/lib/skills/coding-standards.ts:
| Function | Description |
|---|---|
validate(dir) |
Run all naming convention checks |
checkNamingConventions(dir) |
Check file naming |
checkJavaClass(path) |
Validate Java class name |
checkPythonModule(path) |
Validate Python module name |
checkTypeScriptFile(path) |
Validate TS/JS file name |
References
| Reference | Description |
|---|---|
| references/naming-conventions.md | Naming rules by language |
| references/code-organization.md | Project structure patterns |
| references/documentation-standards.md | Documentation requirements |
Assets
| Asset | Description |
|---|---|
| assets/templates/file-header-template.txt | Standard file header |
Related Skills
-
quality-gateway- Orchestrates coding standards with other quality checks -
doc-sync- Documentation synchronization
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-01-20
- 索引更新时间
- 2026-01-28
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!