complexity
について
このスキルは、関数ごとの循環的複雑度を6未満に抑えることで、コードの複雑さを管理するためのガイドラインを提供します。大規模なswitch文のような複雑な分岐ロジックは、ストラテジーパターンやディスパッチテーブルに置き換えることを推奨します。複雑な条件ロジックを持つ関数を記述またはリファクタリングする際にご活用ください。
クイックインストール
Claude Code
推奨/plugin add https://github.com/majiayu000/claude-skill-registrygit clone https://github.com/majiayu000/claude-skill-registry.git ~/.claude/skills/complexityこのコマンドをClaude Codeにコピー&ペーストしてスキルをインストールします
ドキュメント
Code Complexity Guidelines
Apply these guidelines to keep code complexity manageable.
Cyclomatic Complexity
Keep the cyclomatic complexity of each function below 6.
- If you have a large switch case, consider using the strategy pattern or dispatch table instead
GitHub リポジトリ
関連スキル
content-collections
メタThis skill provides a production-tested setup for Content Collections, a TypeScript-first tool that transforms Markdown/MDX files into type-safe data collections with Zod validation. Use it when building blogs, documentation sites, or content-heavy Vite + React applications to ensure type safety and automatic content validation. It covers everything from Vite plugin configuration and MDX compilation to deployment optimization and schema validation.
creating-opencode-plugins
メタThis skill provides the structure and API specifications for creating OpenCode plugins that hook into 25+ event types like commands, files, and LSP operations. It offers implementation patterns for JavaScript/TypeScript modules that intercept and extend the AI assistant's lifecycle. Use it when you need to build event-driven plugins for monitoring, custom handling, or extending OpenCode's capabilities.
polymarket
メタThis skill enables developers to build applications with the Polymarket prediction markets platform, including API integration for trading and market data. It also provides real-time data streaming via WebSocket to monitor live trades and market activity. Use it for implementing trading strategies or creating tools that process live market updates.
cloudflare-turnstile
メタThis skill provides comprehensive guidance for implementing Cloudflare Turnstile as a CAPTCHA-alternative bot protection system. It covers integration for forms, login pages, API endpoints, and frameworks like React/Next.js/Hono, while handling invisible challenges that maintain user experience. Use it when migrating from reCAPTCHA, debugging error codes, or implementing token validation and E2E tests.
