Guides TypeScript code structure: imports, exports, module organization. Use when organizing code, setting up project structure, or resolving circular dependencies. Triggers: "import", "export", "模块", "文件结构", "barrel", "循环依赖".
Guides TypeScript code organization with naming conventions, barrel files, and path aliases. Triggers on import/export keywords, "barrel", "循环依赖", or when setting up project structure to resolve circular dependencies.
/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.
| 规范 | 项目选择 |
|---|---|
| 导出方式 | 命名导出(禁止 default) |
| 类型导入 | import type { } |
| 重导出 | 显式列出(禁止 export *) |
| 目录组织 | 按功能(不按类型) |
// tsconfig.json
{
"compilerOptions": {
"baseUrl": ".",
"paths": { "@/*": ["src/*"] }
}
}
// ✗ import { User } from '../../../types/user'
// ✓ import { User } from '@/types/user'
src/
├── features/ # 按功能组织
│ ├── user/
│ │ ├── user.types.ts
│ │ ├── user.service.ts
│ │ └── index.ts
│ └── order/
└── shared/ # 共享代码
// types/index.ts
export type { User, UserRole } from './user'
export type { Order } from './order'
// ✗ export * from './user' // 影响 tree-shaking
何时用:小型模块、公共 API 入口 何时避免:大型项目深层目录
# 检测
npx madge --circular --extensions ts src/
解决:提取共享类型到独立文件。
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 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 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.