Applies TypeScript naming conventions for variables, functions, classes, types, and files. Use when writing new code or reviewing naming patterns. Triggers: "命名规范", "怎么命名", "变量名", "naming convention".
Applies TypeScript naming conventions for variables, functions, classes, types, and files. Triggers when you ask about naming patterns, variable names, or naming conventions in Chinese or English.
/plugin marketplace add 15195999826/LomoMarketplace/plugin install typescript-style@LomoMarketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
| 类型 | 规则 | 示例 |
|---|---|---|
| 变量/函数 | camelCase | userName, fetchUser |
| 类/类型 | PascalCase | UserService, ApiResponse |
| 常量 | UPPER_SNAKE | MAX_RETRY, API_URL |
| 布尔 | 前缀 | isActive, hasPermission |
| 数组 | 复数 | users, items |
| 文件 | kebab-case | user-service.ts |
| 前缀 | 语义 | 示例 |
|---|---|---|
is | 状态 | isActive, isLoading |
has | 拥有 | hasPermission, hasError |
can | 能力 | canEdit, canSubmit |
should | 建议 | shouldRefresh, shouldRetry |
will | 将要 | willUpdate, willExpire |
did | 已发生 | didMount, didChange |
// UPPER_SNAKE: 编译时确定、不可变
const MAX_RETRY = 3
const API_URL = 'https://api.example.com'
// camelCase: 运行时计算
const currentUser = fetchUser()
| 缩写 | 全称 |
|---|---|
ctx | Context |
cfg | Configuration |
req/res | Request/Response |
err | Error |
fn | Function |
ref | Reference |
prev/next | Previous/Next |
idx | Index |
避免:单字母变量(除 i/j/k 和 T/K/V)
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.