AgentSkillsCN

Global Coding Style

在整个代码库中,遵循一致的代码格式、命名规范、TypeScript标准,以及Astro组件结构模式。在编写任何代码文件时使用此技能,以确保格式整齐、命名规范、缩进统一,风格保持一致。在处理TypeScript文件(.ts、.tsx)、Astro组件(.astro)、React/Vue/Svelte组件、配置文件、实用函数、类型定义、导入语句、Props接口,或任何需要使用Prettier格式化,或通过ESLint进行代码检查的代码时使用此技能。

SKILL.md
--- frontmatter
name: Global Coding Style
description: Follow consistent code formatting, naming conventions, TypeScript standards, and Astro component structure patterns across the entire codebase. Use this skill when writing any code file to ensure proper formatting, naming, indentation, and style consistency. When working on TypeScript files (.ts, .tsx), Astro components (.astro), React/Vue/Svelte components, configuration files, utility functions, type definitions, import statements, prop interfaces, or any code that requires formatting with Prettier or linting with ESLint.

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.

When to use this skill

  • When writing or editing any TypeScript (.ts, .tsx) or JavaScript (.js, .jsx) files
  • When creating or modifying Astro component files (.astro)
  • When structuring component frontmatter (imports, props, logic order)
  • When naming files, components, functions, variables, or constants
  • When defining TypeScript interfaces, types, or prop definitions
  • When organizing import statements (framework imports, components, utilities)
  • When applying code formatting rules (indentation, quotes, semicolons, line length)
  • When ensuring TypeScript strict mode compliance and avoiding any types
  • When using Prettier for auto-formatting or ESLint for code quality
  • When writing DRY code and extracting reusable utilities or components
  • When removing dead code, unused imports, or commented-out code blocks

Instructions

For details, refer to the information provided in this file: global coding style