本文へ移動
cccskills
無料GitHub で公開

code-simplification

機能を保持したまま不要な複雑性を排除し、コードの簡潔性と可読性を向上させる。30行超の関数や3段以上のネスト検出時に使用。

インストール方法を見る

含まれるファイル(1)

  • SKILL.md1.9 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Code Simplification スキル

目的

機能を保持したまま、コードの簡潔性と可読性を向上させる。不要な複雑性を排除する。

分析対象

最近変更されたコードのみを対象とします。既存のコード(変更されていない部分)は対象外です。

簡潔化のルール

推奨する変更

  1. ネストの削減

    • ネストした三項演算子 → if/else文へ
    • 深いネスト → 早期リターンパターンへ
  2. 明確性の向上

    • 巧妙なコード → 分かりやすいコードへ
    • 暗黙的な動作 → 明示的な動作へ
  3. 冗長性の削除

    • 不要な変数の削除
    • 重複コードの統合
    • 使用されていないインポートの削除

禁止事項

  • 機能の変更
  • 新機能の追加
  • パフォーマンス最適化(明示的に要求されない限り)
  • テストの削除

コーディング規約

  • ES モジュール(正しいソート順とファイル拡張子付き)
  • function キーワードを優先(アロー関数より)
  • 明示的なリターン型注釈
  • 適切なエラーハンドリング

出力形式

# Code Simplification Results

## Simplification Opportunities

### [ファイル名:行番号]

**現在のコード:**
(コードブロック)

**提案:**
(簡潔化されたコードブロック)

**理由:** なぜこの変更が可読性を向上させるか

## Summary

- 簡潔化の提案数: X
- 影響を受けるファイル数: X

注意事項

  • 機能を絶対に変更しない
  • 最近変更されたコードのみに焦点を当てる
  • 簡潔性より明確性を優先する
  • 変更の理由を必ず説明する

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

code-review

無料日本語概要

プロジェクトガイドラインへの準拠をチェックし、バグ、スタイル違反、コード品質問題を検出する。PRレビュー時に使用。

feel-flow/ai-spec-driven-development72026年9月14日 更新

Enforces project coding standards during code review: naming conventions (PascalCase for classes, camelCase for methods/variables, UPPER_SNAKE_CASE for constants, kebab-case for files), standard file structure, anti-magic-number policy, file size limits (500/800 lines), security patterns, and design patterns. Use when reviewing code, writing new code, or checking adherence to project conventions.

日本語の概要は準備中です。原文の説明を表示しています。

feel-flow/ai-spec-driven-development72026年9月14日 更新

comment-analysis

無料日本語概要

コードコメントの正確性、完全性、長期的な保守性を分析する。JSDoc、コメント、README等のドキュメントが変更された場合に使用。

feel-flow/ai-spec-driven-development72026年9月14日 更新

error-handler-hunt

無料日本語概要

サイレント失敗を検出し、堅牢なエラーハンドリングを確保する。PRレビューでのエラーハンドリング検査時に使用。

feel-flow/ai-spec-driven-development72026年9月14日 更新

Enforces error handling standards: silent error prohibition, custom error class hierarchy (AppError base with category never-fallback / transient / permanent, cause preservation, ValidationError / UnauthorizedError / UpstreamError etc. — canonical definitions in PATTERNS.md), external-boundary normalization (normalizeExternalError), Result pattern (Result.ok/Result.fail), proper try-catch with error type checking, structured error logging with a single Logger contract, fallback prohibition categories (isNeverFallback), and HTTP status code mapping. Use when implementing error handling, reviewing catch blocks, or designing error responses.

日本語の概要は準備中です。原文の説明を表示しています。

feel-flow/ai-spec-driven-development72026年9月14日 更新

Creates and reviews agent skills safely by enforcing deletion-prevention harness rules: no fixed absolute temp paths, no cwd-dependent cleanup, no wildcard deletes, no workspace-external file operations, no silent cleanup failures, and mandatory temp-root validation before any destructive command. Use when creating a new skill, updating an existing SKILL.md, or reviewing prompts/runbooks that include temp files, extraction, cleanup, PowerShell, bash, rm, del, Remove-Item, or archive expansion.

日本語の概要は準備中です。原文の説明を表示しています。

feel-flow/ai-spec-driven-development72026年9月14日 更新

feel-flow のスキルをすべて見る

このスキルの問題を報告する