Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问许可证需确认审计异常

grey-haven-code-style灰色天堂代码风格

Agent Skill

grey-haven-code-style 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

233

周安装

10

GitHub Stars

24

下载量

82
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:grey-haven-code-style(灰色天堂代码风格)
来源仓库:https://github.com/greyhaven-ai/claude-code-config
仓库路径:skills/grey-haven-code-style
安装命令:
npx skills add https://github.com/greyhaven-ai/claude-code-config --skill grey-haven-code-style
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/greyhaven-ai/claude-code-config --skill grey-haven-code-style

简介

用于处理 GitHub 仓库、Issue 和 Pull Request 信息,协助代码协作管理。

  • 它支持分析仓库状态、变更历史和协作事项,辅助开发流程。
  • 使用方式包括查询特定 Issue 或 PR 详情,需明确目标仓库和分支。
  • 安装命令:npx skills add https://github.com/greyhaven-ai/claude-code-config --skill grey-haven-code-style。
  • 建议确认 API 权限和仓库访问范围,避免越权请求或频繁调用。

SKILL.md

Grey Haven Code Style Standards

Actual coding standards from Grey Haven Studio production templates.

Follow these exactly when working on Grey Haven codebases. This skill provides navigation to detailed examples, reference configs, and templates.

Supporting Documentation

Quick Reference

TypeScript/React (Frontend)

Based on cvi-template - TanStack Start + React 19

Key Settings:

  • Line width: 90 characters
  • Tab width: 2 spaces
  • Quotes: Double quotes
  • Semicolons: Required
  • Trailing commas: Always
  • ESLint: Pragmatic (allows any, unused vars)
  • Path alias: ~/ maps to ./src/*

Naming Conventions:

  • Variables/Functions: camelCase (getUserData, isAuthenticated)
  • Components: PascalCase (UserProfile, AuthProvider)
  • Constants: UPPER_SNAKE_CASE (API_BASE_URL, MAX_RETRIES)
  • Types/Interfaces: PascalCase (User, AuthConfig)
  • Database fields: snake_case (user_id, created_at, tenant_id) ⚠️ CRITICAL

Project Structure:

src/
├── routes/              # File-based routing (TanStack Router)
├── lib/
│   ├── components/      # UI components (grouped by feature)
│   ├── server/          # Server functions and DB schema
│   ├── config/          # Environment validation
│   ├── hooks/           # Custom React hooks (use-* naming)
│   ├── utils/           # Utility functions
│   └── types/           # TypeScript definitions
└── public/              # Static assets

Python/FastAPI (Backend)

Based on cvi-backend-template - FastAPI + SQLModel

Key Settings:

  • Line length: 130 characters
  • Indent: 4 spaces
  • Type hints: Required on all functions
  • Auto-fix: Ruff fixes issues automatically

Naming Conventions:

  • Functions/Variables: snake_case (get_user_data, is_authenticated)
  • Classes: PascalCase (UserRepository, AuthService)
  • Constants: UPPER_SNAKE_CASE (API_BASE_URL, MAX_RETRIES)
  • Database fields: snake_case (user_id, created_at, tenant_id) ⚠️ CRITICAL
  • Boolean fields: Prefix with is_ or has_ (is_active, has_access)

Project Structure:

app/
├── config/              # Application settings
├── db/
│   ├── models/          # SQLModel entities
│   └── repositories/    # Repository pattern (tenant isolation)
├── routers/             # FastAPI endpoints
├── services/            # Business logic
├── schemas/             # Pydantic models (API contracts)
└── utils/               # Utilities

Database Field Convention (CRITICAL)

ALWAYS use snake_case for database column names - this is non-negotiable in Grey Haven projects.

Correct:

// TypeScript - Drizzle schema
export const users = pgTable("users", {
  id: uuid("id").primaryKey(),
  created_at: timestamp("created_at").defaultNow(),
  tenant_id: uuid("tenant_id").notNull(),
  email_address: text("email_address").notNull(),
  is_active: boolean("is_active").default(true),
});
# Python - SQLModel
class User(SQLModel, table=True):
    id: UUID = Field(default_factory=uuid4, primary_key=True)
    created_at: datetime = Field(default_factory=datetime.utcnow)
    tenant_id: UUID = Field(foreign_key="tenants.id", index=True)
    email_address: str = Field(unique=True, index=True)
    is_active: bool = Field(default=True)

Wrong:

// DON'T use camelCase in database schemas
export const users = pgTable("users", {
  id: uuid("id"),
  createdAt: timestamp("createdAt"),      // WRONG!
  tenantId: uuid("tenantId"),             // WRONG!
  emailAddress: text("emailAddress"),     // WRONG!
});

See EXAMPLES.md for complete examples.

Multi-Tenant Architecture

Every database table must include tenant isolation:

  • Field name: tenant_id (snake_case in DB) or tenantId (camelCase in TypeScript code)
  • Type: UUID foreign key to tenants table
  • Index: Always indexed for query performance
  • RLS: Use Row Level Security policies for tenant isolation
  • Repository pattern: All queries filter by tenant_id

See EXAMPLES.md for implementation patterns.

Virtual Environment (Python Projects)

⚠️ ALWAYS activate virtual environment before running Python commands:

source .venv/bin/activate

Required for:

  • Running tests (pytest)
  • Running pre-commit hooks
  • Using task commands (task test, task format)
  • Any Python script execution

When to Apply This Skill

Use this skill when:

  • ✅ Writing new TypeScript/React or Python/FastAPI code
  • ✅ Reviewing code in pull requests
  • ✅ Fixing linting or formatting errors
  • ✅ Setting up new projects from templates
  • ✅ Configuring Prettier, ESLint, or Ruff
  • ✅ Creating database schemas
  • ✅ Implementing multi-tenant features
  • ✅ User mentions: "code standards", "linting rules", "Grey Haven style", "formatting"

Template References

These standards come from actual Grey Haven production templates:

  • Frontend: cvi-template (TanStack Start + React 19 + Drizzle)
  • Backend: cvi-backend-template (FastAPI + SQLModel + PostgreSQL)

When in doubt, reference these templates for patterns and configurations.

Critical Reminders

  1. Line lengths: TypeScript=90, Python=130 (NOT 80/88)
  2. Database fields: ALWAYS snake_case (both TypeScript and Python schemas)
  3. any type: ALLOWED in Grey Haven TypeScript (pragmatic approach)
  4. Double quotes: TypeScript uses double quotes (singleQuote: false)
  5. Type hints: REQUIRED in Python (disallow_untyped_defs: true)
  6. Virtual env: MUST activate before Python commands
  7. Multi-tenant: Every table has tenant_id/tenantId
  8. Path aliases: Use ~/ for TypeScript imports from src/
  9. Trailing commas: ALWAYS in TypeScript (trailingComma: "all")
  10. Pre-commit hooks: Run before every commit (both projects)

Next Steps

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.27%
按下载量换算30

Claude

28.44%
按下载量换算23

Cursor

19.18%
按下载量换算16

Gemini CLI

8.98%
按下载量换算7

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills