🛠️ Logic Lens
AIが形式論理と推論を使い、
📺 まず動画で見る(YouTube)
▶ 【衝撃】最強のAIエージェント「Claude Code」の最新機能・使い方・プログラミングをAIで効率化する超実践術を解説! ↗
※ jpskill.com 編集部が参考用に選んだ動画です。動画の内容と Skill の挙動は厳密には一致しないことがあります。
📜 元の英語説明(参考)
AI-powered Claude Code skill that performs deep code review using formal logic and reasoning frameworks to detect bugs, anti-patterns, and security risks beyond what linters catch.
🇯🇵 日本人クリエイター向け解説
AIが形式論理と推論を使い、
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o logic-lens.zip https://jpskill.com/download/3111.zip && unzip -o logic-lens.zip && rm logic-lens.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/3111.zip -OutFile "$d\logic-lens.zip"; Expand-Archive "$d\logic-lens.zip" -DestinationPath $d -Force; ri "$d\logic-lens.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
logic-lens.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
logic-lensフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-17
- 取得日時
- 2026-05-17
- 同梱ファイル
- 1
💬 こう話しかけるだけ — サンプルプロンプト
- › Logic Lens を使って、最小構成のサンプルコードを示して
- › Logic Lens の主な使い方と注意点を教えて
- › Logic Lens を既存プロジェクトに組み込む方法を教えて
これをClaude Code に貼るだけで、このSkillが自動発動します。
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Logic Lens
概要
Logic Lens は、形式的な推論フレームワークを使用して、深く、ロジックに基づいたコードレビューを実行する Claude Code スキルです。構文やスタイルをチェックする従来のリンターとは異なり、Logic Lens は、コードの動作を推論したときにのみ現れる論理エラー、競合状態、セキュリティ脆弱性、型不一致、アルゴリズムの欠陥についてコードを分析します。
構造化された AI 分析によって強化された Logic Lens は、null/undefined 処理、型安全性、並行処理、リソース管理、セキュリティインジェクション、境界条件、アルゴリズムの正確性、状態管理、API 契約違反の 9 つのリスクカテゴリにわたって体系的な論理検査を適用します。
このスキルを使用するタイミング
- PR をマージする前に徹底的なロジックレビューを行いたい場合に使用します。
- バグが見つけにくく、標準のリンターが役に立たない場合に使用します。
- セキュリティ上重要なコードパス(認証、支払い、ファイルアクセス)をレビューする場合に使用します。
- 複雑なビジネスロジックをリファクタリングする場合に使用します。
- 新しいコードベースにオンボーディングし、リスク領域を理解する必要がある場合に使用します。
仕組み
Logic Lens は、Claude Code の推論機能を使用して次のことを行います。
- コード構造を解析し、データフローのメンタルモデルを構築します。
- 9 つのリスクカテゴリにわたって形式的なロジックチェックを適用します。
- エッジケースと境界条件の実行パスをトレースします。
- セキュリティアンチパターン(インジェクション、特権昇格、データ漏洩)を特定します。
- 重大度レベルと実行可能な修正提案を含む調査結果を報告します。
インストール
# Claude Code プラグインマーケットプレイスからインストール
# 検索: Claude Code > Extensions で "logic-lens" を検索
# または NPX (Antigravity) からインストール
npx antigravity-awesome-skills --claude
# その後、@logic-lens を呼び出す
例
例 1: 単一ファイルのレビュー
@logic-lens review src/auth/login.ts for security issues
Logic Lens の出力:
[CRITICAL] SQL Injection risk at line 42: user input concatenated into query string
[HIGH] Missing rate limiting on login attempts
[MEDIUM] Password comparison uses == instead of timing-safe comparison
[LOW] Error messages may leak valid usernames (user enumeration)
例 2: リポジトリ全体のスキャン
@logic-lens scan the entire codebase and prioritize by severity
例 3: PR 前のレビュー
@logic-lens review all files changed in this branch before I open a PR
9 つのリスクカテゴリ
| カテゴリ | チェック内容 |
|---|---|
| Null/Undefined | null チェックの欠落、オプショナルチェイニングのギャップ |
| Type Safety | 暗黙的な型強制、any 型の境界 |
| Concurrency | 競合状態、共有可能なミュータブルな状態 |
| Resource Management | 未クローズのハンドル、メモリリーク |
| Security Injection | SQL/XSS/コマンドインジェクション、パス横断 |
| Boundary Conditions | オフバイワンエラー、整数オーバーフロー |
| Algorithm Correctness | 誤った複雑性、誤った仮定 |
| State Management | 一貫性のない状態、ロールバックの欠落 |
| API Contracts | ドキュメント化されていない副作用、壊れたインターフェース |
ベストプラクティス
- リリース前に、認証コードと支払いコードに対して毎回
@logic-lensを実行します。 - 完全なカバレッジ(スタイル + ロジック)のために
@lint-and-validateと組み合わせます。 - CRITICAL および HIGH の調査結果を最初にレビューし、LOW の調査結果は後回しにできます。
- リスク領域を理解するために、変更しようとしているレガシーコードに対して
@logic-lensを使用します。
ベンチマーク結果
Logic Lens は実際のコードベースに対してテストされ、ESLint、TypeScript strict mode、Snyk が見逃した問題を検出しました。
- 発見された重大なバグの 47% はリンターには見えませんでした。
- 静的解析が見逃した非同期コードの競合状態を検出しました。
- CI パイプラインでデプロイ前にセキュリティ脆弱性を特定しました。
関連スキル
@lint-and-validate— 補完的: logic-lens の後にスタイル/構文のために実行します。@security-auditor— 特化したセキュリティ専用のディープスキャンです。@debugging-strategies— logic-lens の調査結果のトレースが必要な場合に使用します。
その他のリソース
制限事項
このスキルは、上記で説明した範囲(コードレビューとロジック分析)にタスクが明確に一致する場合にのみ使用してください。Logic Lens は AI を活用した分析を提供しますが、本番環境で重要な決定を下す際には人間のレビューと組み合わせる必要があります。出力は、環境固有のテストやセキュリティ監査の代わりとして扱わないでください。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Logic Lens
Overview
Logic Lens is a Claude Code skill that performs deep, logic-driven code review using formal reasoning frameworks. Unlike traditional linters that check syntax and style, Logic Lens analyzes your code for logical errors, race conditions, security vulnerabilities, type mismatches, and algorithmic flaws that only appear when you reason through the code's behavior.
Powered by structured AI analysis, Logic Lens applies systematic logical inspection across 9 risk categories: null/undefined handling, type safety, concurrency, resource management, security injection, boundary conditions, algorithm correctness, state management, and API contract violations.
When to Use This Skill
- Use when you want a thorough logic review before merging a PR
- Use when a bug seems hard to find and standard linters aren't helping
- Use when reviewing security-sensitive code paths (auth, payments, file access)
- Use when refactoring complex business logic
- Use when onboarding to a new codebase and need to understand risk areas
How It Works
Logic Lens uses Claude Code's reasoning capabilities to:
- Parse code structure and build a mental model of data flow
- Apply formal logic checks across 9 risk categories
- Trace execution paths for edge cases and boundary conditions
- Identify security anti-patterns (injection, privilege escalation, data leakage)
- Report findings with severity levels and actionable fix suggestions
Installation
# Install via Claude Code plugin marketplace
# Search: "logic-lens" in Claude Code > Extensions
# Or install via NPX (Antigravity)
npx antigravity-awesome-skills --claude
# Then invoke: @logic-lens
Examples
Example 1: Review a Single File
@logic-lens review src/auth/login.ts for security issues
Logic Lens output:
[CRITICAL] SQL Injection risk at line 42: user input concatenated into query string
[HIGH] Missing rate limiting on login attempts
[MEDIUM] Password comparison uses == instead of timing-safe comparison
[LOW] Error messages may leak valid usernames (user enumeration)
Example 2: Full Repository Scan
@logic-lens scan the entire codebase and prioritize by severity
Example 3: Pre-PR Review
@logic-lens review all files changed in this branch before I open a PR
The 9 Risk Categories
| Category | What It Checks |
|---|---|
| Null/Undefined | Missing null checks, optional chaining gaps |
| Type Safety | Implicit coercions, any-typed boundaries |
| Concurrency | Race conditions, shared mutable state |
| Resource Management | Unclosed handles, memory leaks |
| Security Injection | SQL/XSS/Command injection, path traversal |
| Boundary Conditions | Off-by-one errors, integer overflow |
| Algorithm Correctness | Wrong complexity, incorrect assumptions |
| State Management | Inconsistent state, missing rollbacks |
| API Contracts | Undocumented side effects, broken interfaces |
Best Practices
- Run
@logic-lenson authentication and payment code before every release - Combine with
@lint-and-validatefor full coverage: style + logic - Review the CRITICAL and HIGH findings first; LOW findings can be deferred
- Use
@logic-lenson legacy code you are about to modify to understand risk surface
Benchmark Results
Logic Lens was tested against real-world codebases and caught issues missed by ESLint, TypeScript strict mode, and Snyk:
- 47% of critical bugs found were invisible to linters
- Race conditions detected in async code that static analysis missed
- Security vulnerabilities identified before deployment in CI pipeline
Related Skills
@lint-and-validate— Complementary: run after logic-lens for style/syntax@security-auditor— Specialized security-only deep scan@debugging-strategies— Use when logic-lens findings need tracing
Additional Resources
- GitHub Repository
- Dev.to Article: Why AI Code Review Misses the Most Dangerous Bugs
- Claude Code Skills Documentation
Limitations
Use this skill only when the task clearly matches the scope described above (code review and logic analysis). Logic Lens provides AI-powered analysis and should be combined with human review for production-critical decisions. Do not treat the output as a substitute for environment-specific testing or security audits.