AgentSkillsCN

Global Conventions

遵循项目整体的开发规范,涵盖项目结构、文档编写、版本控制、代码审查、环境配置、依赖管理以及安全实践。在搭建新项目、组织文件结构、编写项目文档、创建Git分支与提交、配置环境变量、管理依赖项、设置CI/CD流水线,或落实安全实践时,可使用此技能。适用于处理项目搭建任务、创建文档文件(README.md、ARCHITECTURE.md、DATABASE_SCHEMA.md、API_REFERENCE.md、SETUP.md)、Git工作流程操作、.env文件、package.json/bun.lockb、Docker配置,或任何涉及项目全局性的事务。此技能确保混合式的代码组织方式(按类型划分全局共享代码,同时以嵌套子目录存放特定功能的代码),要求完备的文档(README、ARCHITECTURE、DATABASE_SCHEMA、API_REFERENCE、SETUP——在编码前即完成撰写,并在后续不断更新),采用GitHub Flow工作流程(main分支面向生产,功能分支用于开发,必须通过PR流程),遵循常规的提交消息格式(feat/fix/docs/style/refactor/test/chore,需明确指定作用域),妥善管理敏感信息(.env.example随代码一同提交,真实密钥存储于Google Cloud Secret Manager,启动时通过Zod进行验证),严格执行代码审查制度(即使是单人项目,所有非 trivial 的变更也需经过PR审查,且应在48小时内完成评审),落实全面的安全实践(Firestore/Storage规则、CORS、速率限制、请求大小限制、参数化查询、HTTPS、杜绝硬编码密钥),并遵循性能标准(Lighthouse Performance得分≥70,Accessibility得分≥90,API p95响应时间<1秒)。

SKILL.md
--- frontmatter
name: Global Conventions
description: Follow project-wide development conventions for project structure, documentation, version control, code review, environment configuration, dependency management, and security practices. Use this skill when setting up new projects, organizing file structures, writing project documentation, creating Git branches and commits, configuring environment variables, managing dependencies, setting up CI/CD pipelines, or implementing security practices. Apply when working on project setup tasks, creating documentation files (README.md, ARCHITECTURE.md, DATABASE_SCHEMA.md, API_REFERENCE.md, SETUP.md), Git workflow operations, .env files, package.json/bun.lockb, Docker configurations, or any cross-cutting project concerns. This skill ensures hybrid code organization (global shared code by type + feature-specific code with nested subdirectories), required documentation (README, ARCHITECTURE, DATABASE_SCHEMA, API_REFERENCE, SETUP - written before coding then updated), GitHub Flow workflow (main branch production-ready, feature branches for work, PR required), conventional commit messages (feat/fix/docs/style/refactor/test/chore with scope), proper secrets management (.env.example committed, real secrets in Google Cloud Secret Manager, Zod validation on startup), disciplined code review (PRs for all non-trivial changes even on solo projects, 48h turnaround), comprehensive security practices (Firestore/Storage rules, CORS, rate limiting, request size limits, parameterized queries, HTTPS, no hardcoded secrets), and performance standards (Lighthouse Performance 70+, Accessibility 90+, API p95 <1s).

Global Conventions

When to use this skill:

  • When initializing new projects or setting up project structure (hybrid organization)
  • When organizing code into folders (src/components, src/hooks, src/services, src/features)
  • When writing or updating project documentation (README, docs/ARCHITECTURE.md, docs/DATABASE_SCHEMA.md)
  • When creating Git branches (feature/, fix/, chore/, docs/, refactor/) or writing commit messages
  • When setting up environment variables (.env.example, .env.development) and secrets
  • When managing project dependencies (bun add, npm install, pip install)
  • When configuring Docker and containerization for Cloud Run deployment
  • When setting up CI/CD pipelines with GitHub Actions (lint, type-check, test, build)
  • When implementing security practices (Firestore rules, CORS, rate limiting, auth)
  • When performing code reviews or creating pull requests with checklists
  • When documenting architectural decisions in docs/ARCHITECTURE.md
  • When working on any project-wide configuration or setup tasks
  • When validating environment variables with Zod schemas on startup
  • When choosing between writing code yourself vs using a library (bundlephobia.com for size)

This Skill provides Claude Code with specific guidance on how to adhere to coding standards as they relate to how it should handle global conventions.

Instructions

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