本文へスキップ
Skillpedia
テスト48k · #5099

logic-lens

できること

コードを分析して、ほかのツールでは見落としがちなロジックやセキュリティ上のエラーを見つけるツールです。複雑な状況でも、コードが期待どおりに動作するかを確認します。

使う場面

  • ✓新しいコードを大きなプロジェクトに統合する前(PR レビュー)。
  • ✓バグが見つけにくく、通常のツールでは解決できないとき。
  • ✓ログイン機能や決済機能など、セキュリティに関わるコードをレビューするとき。

スキルのリンク

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/logic-lens/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/logic-lens/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“私のコードに、ロジックとセキュリティの欠陥がないかレビューしてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

ツールはコードを読み込み、データの流れを把握して、論理的なルールを当てはめながら問題を探します。計算の誤りやセキュリティ上の脆弱性など、9 種類以上のリスクを確認します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

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:

  1. Parse code structure and build a mental model of data flow
  2. Apply formal logic checks across 9 risk categories
  3. Trace execution paths for edge cases and boundary conditions
  4. Identify security anti-patterns (injection, privilege escalation, data leakage)
  5. 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 agentic-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-lens on authentication and payment code before every release
  • Combine with @lint-and-validate for full coverage: style + logic
  • Review the CRITICAL and HIGH findings first; LOW findings can be deferred
  • Use @logic-lens on 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

Limitations

…

よくある質問

このツールと「リンター」との違いは何ですか?

リンターはコードの書式や基本的な構文エラーをチェックします。このツールはさらに深く、内部のロジックやコードの動作を分析して、より複雑な問題を見つけます。

どのような問題を見つけられますか?

null 値の扱いの誤り、コードインジェクションなどのセキュリティ問題、並行処理(複数の処理が同時に起こる場合)の問題、計算ミスなどを見つけられます。

人間のレビュアーの代わりになりますか?

いいえ、強力なアシスタントです。特に重要な判断が必要な場合は、経験のあるプログラマーによるレビューと組み合わせて使うべきです。

詳細

作者による元の説明

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.

repo: sickn33/agentic-awesome-skills

人気

GitHubのスター
48k
ランキング
#5099
ライセンス
MIT
更新日
2026/10/15

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル