global-coding-style
使用一致的命名约定、正确的格式、集中的小函数和 DRY 原则编写干净、可读的代码。在项目中编写任何代码时,无论语言或框架如何,都可以使用此技能。命名变量、函数、类或文件时。在构造函数并决定其大小和范围时。删除死代码、未使用的导入或注释掉的块时。当应用DRY原则提取通用逻辑时。确保整个代码库的缩进和格式一致。
📖 中文导读:使用一致的命名约定、正确的格式、集中的小函数和 DRY 原则编写干净、可读的代码。在项目中编写任何代码时,无论语言或框架如何,都可以使用此技能。命名变量、函数、类或文件时。在构造函数并决定其大小和范围时。删除死代码、未使用的导入或注释掉的块时。当应用DRY原则提取通用逻辑时。确保整个代码库的缩进和格式一致。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
name: Global Coding Style description: Write clean, readable code with consistent naming conventions, proper formatting, small focused functions, and DRY principles. Use this skill when writing ANY code in the project regardless of language or framework. When naming variables, functions, classes, or files. When structuring functions and deciding on their size and scope. When removing dead code, unused imports, or commented-out blocks. When applying the DRY principle to extract common logic. When ensuring consistent indentation and formatting across the codebase.
When to use this skill:
- When writing any new code in the project
- When modifying existing code files
- When naming variables, functions, classes, constants, or files
- When deciding how to structure a function or method
- When a function is getting too long and needs to be split
- When removing dead code, unused variables, or imports
- When deleting commented-out code blocks
- When extracting duplicate logic into reusable functions
- When applying consistent indentation (spaces or tabs)
- When formatting code for readability
- When reviewing code for style consistency
- When choosing descriptive names that reveal intent
Global Coding Style
This Skill provides Claude Code with specific guidance on how to adhere to coding standards as they relate to how it should handle global coding style.
Instructions
For details, refer to the information provided in this file: global coding style