0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【Claude Code Skills】UCES - 品質を強制するproduction-grade拡張フレームワーク

0
Posted at

はじめに

Claude Code用のSkillsを探していて「品質を自動で担保したい」と思ったことはありませんか?

今回紹介するUCES(Universal Claude Enhancement System)は、hooks機能を活用してコード品質を強制的に担保するフレームワーク型のSkillsです。

従来のSKILL.md形式ではなく、8つの専門モジュール + 7つのhookスクリプトという独自構成で、Zero-toleranceモード(any型・TODO・console.log禁止)やSession Memory(セッション間コンテキスト保持)など、本番環境を意識した機能が揃っています。

評価スコア: 49/50 (Rank S)

基本情報

項目 内容
リポジトリ https://github.com/eticmedya/uces
作者 eticmedya
Star数 94
作成日 2026-02-04
形式 フレームワーク型(hooks + モジュール)

ファイル構成

uces/
├── README.md           # 概要・インストール手順
├── CLAUDE.md           # コア指令・ルーティングテーブル(171行)
├── CONVENTIONS.md      # TypeScript/React/API規約(371行)
├── config.json         # Claude Code hooks設定
├── setup.sh            # インストールスクリプト
├── hooks/
│   ├── init.sh         # セッション開始時の初期化
│   ├── validate.sh     # 編集前バリデーション
│   ├── format.sh       # 編集後フォーマット + 品質チェック
│   ├── memory.sh       # セッションメモリ永続化
│   ├── prompt-guard.sh # プロンプトインジェクション防御
│   ├── commit-check.sh # コミット前チェック
│   └── statusline.sh   # ステータスライン表示
└── skills/
    ├── ui/MODULE.md      # React/Next.js/Tailwind(255行)
    ├── api/MODULE.md     # REST API/Server Actions(443行)
    ├── debug/MODULE.md   # テスト・デバッグ(329行)
    ├── guard/MODULE.md   # セキュリティ・認証(407行)
    ├── architect/MODULE.md # システム設計(355行)
    ├── native/MODULE.md  # Expo/React Native(387行)
    ├── data/MODULE.md    # SQLアナリティクス(345行)
    └── devops/MODULE.md  # CI/CD・デプロイ(476行)

主要機能

1. 動的ルーティング

CLAUDE.mdに定義されたルーティングテーブルにより、ユーザーの発話内容から適切なモジュールに自動振り分けされます。

キーワード モジュール 内容
component, page, form, button, modal ui React/Next.js/Tailwind
API, endpoint, route, database, REST api REST API/Server Actions
bug, error, fix, debug, test, failing debug テスト・デバッグ
auth, login, security, permission guard セキュリティ・認証
plan, design, architecture, PRD architect システム設計
Expo, React Native, mobile, iOS native モバイル開発
SQL, analytics, query, dashboard data データ分析
deploy, CI/CD, Docker, GitHub Actions devops インフラ・デプロイ

2. Zero-toleranceモード

format.shにより、以下のコード品質違反を自動検出します。

# format.shの品質チェック部分(概要)
grep -n "any" "$file" && echo "ERROR: 'any' type detected"
grep -n "TODO" "$file" && echo "ERROR: TODO found"
grep -n "console.log" "$file" && echo "ERROR: console.log found"
  • any型禁止
  • TODO/FIXME禁止
  • console.log禁止

これにより「後で直す」が許されない環境を強制的に作り出します。

3. Session Memory

memory.shにより、プロジェクトごとにハッシュを生成し、セッション間でコンテキストを保持します。

# プロジェクトハッシュの生成
PROJECT_HASH=$(echo "$PWD" | md5sum | cut -d' ' -f1)
MEMORY_FILE="$HOME/.claude/memory/$PROJECT_HASH.md"

保存先: ~/.claude/memory/

4. コミット前検証

commit-check.shで以下を自動チェック:

  • TypeScriptコンパイルエラー
  • シークレット(API_KEY、SECRET等)の混入
  • 大容量ファイル(1MB以上)の検出

5. プロジェクトタイプ自動検出

init.shにより、以下のプロジェクトタイプを自動検出:

  • expo(app.json + expo)
  • nextjs(next.config.*)
  • react(package.json + react)
  • node(package.json)
  • python(requirements.txt / pyproject.toml)
  • go(go.mod)
  • rust(Cargo.toml)

hooks設定(config.json)

{
  "permissions": { "defaultMode": "dontAsk" },
  "hooks": {
    "SessionStart": [
      { "matcher": "*", "hooks": [
        { "type": "command", "command": "bash ~/.claude/hooks/init.sh" },
        { "type": "command", "command": "UCES_EVENT=SessionStart bash ~/.claude/hooks/memory.sh" }
      ]}
    ],
    "PreToolUse": [
      { "matcher": "Edit|Write", "hooks": [
        { "type": "command", "command": "bash ~/.claude/hooks/validate.sh" }
      ]},
      { "matcher": "Bash(rm -rf*)", "hooks": [
        { "type": "prompt", "prompt": "Destructive operation detected." }
      ]},
      { "matcher": "Bash(git commit*)", "hooks": [
        { "type": "command", "command": "bash ~/.claude/hooks/commit-check.sh" }
      ]}
    ],
    "PostToolUse": [
      { "matcher": "Edit|Write", "hooks": [
        { "type": "command", "command": "bash ~/.claude/hooks/format.sh" }
      ]}
    ]
  }
}

各モジュールの特徴

uiモジュール

  • Server Component vs Client Componentの判定基準
  • TanStack Query / Zustand / React Hook Formの使い分け
  • shadcn/ui、Aceternity UI、Preline UIの推奨
  • Accessibility Checklist

apiモジュール

  • 完全なCRUD実装テンプレート(GET/POST/PATCH/DELETE)
  • Server Actions パターン
  • Webhook処理(Stripe例)
  • Next.js 15のasync params対応

guardモジュール

  • NextAuth.js v5設定
  • RBAC(Role-Based Access Control)実装
  • OWASP Top 10対策
  • Zod入力バリデーション

インストール方法

git clone https://github.com/eticmedya/uces.git
cd uces
./setup.sh

または手動で~/.claude/に設定をコピー。

注意点

  • bashスクリプト前提: WSL環境でない場合は動作しない可能性あり
  • フレームワーク型: 従来のSKILL.md形式とは異なる構造
  • Next.js/Expo特化: 他のフレームワークには追加カスタマイズが必要

評価詳細

評価項目 点数 コメント
明確な目的定義 5/5 Production-grade frameworkとして明確
ファイル構成の論理性 5/5 hooks/とskills/で責務分離
ワークフロー設計 5/5 トリガーキーワードによる動的ルーティング
参照ファイルの有用性 5/5 8モジュール計3000行以上の実践的コード
記法・フォーマットの一貫性 5/5 MODULE.mdフォーマット統一
再利用性 5/5 プロジェクトタイプ自動検出
エラーハンドリング 4/5 validate/commit-checkあり
ドキュメント品質 5/5 Red Flags表・チェックリスト完備
拡張性 5/5 モジュール追加容易
実用性 5/5 Zero-toleranceモード即座に使える

合計: 49/50 (Rank S)

まとめ

UCESは「品質を妥協しない」という強い意志を持ったフレームワークです。

  • hooks統合でコード品質を自動チェック
  • 8つの専門モジュールで各領域のベストプラクティスを提供
  • Zero-toleranceモードでany/TODO/console.logを排除
  • Session Memoryでセッション間コンテキストを保持

Next.js/Expoでプロダクション開発をしている方には特におすすめです。

参考リンク

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?