logic-lens
ما الذي تفعله
تحلل هذه المهارة الكود لتجد أخطاء المنطق والأمان التي قد تفوتها أدوات أخرى. تتحقق مما إذا كان الكود يتصرف كما هو متوقع، حتى في المواقف المعقدة.
متى تستخدمها
- ✓قبل دمج كود جديد في مشروع أكبر (مراجعة PR).
- ✓عندما يكون الخطأ صعب الإيجاد ولا تساعد الأدوات العادية.
- ✓عند مراجعة أجزاء الكود الحساسة أمنيًا، مثل تسجيل الدخول أو المدفوعات.
رابط المهارة
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/logic-lens/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“راجع الكود الخاص بي وابحث عن عيوب في المنطق والأمان.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
تقرأ المهارة الكود وتفهم تدفق البيانات، وتطبق قواعد منطقية لإيجاد المشكلات. تفحص أكثر من 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:
- 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 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-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
…
الأسئلة الشائعة
ما الفرق بين هذه المهارة و«linter»؟
تفحص أدوات linter التنسيق وأخطاء الصياغة الأساسية. أما هذه المهارة فتتعمق في تحليل المنطق الداخلي وسلوك الكود لتجد مشكلات أعقد.
ما أنواع المشكلات التي تستطيع إيجادها؟
تستطيع إيجاد أخطاء في التعامل مع القيم الفارغة (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.
الشعبية
- نجوم GitHub
- 48k
- الترتيب
- #5099
- الترخيص
- MIT
- آخر تحديث
- 15/10/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
00-andruia-consultant
48kيساعد وكيلك على بدء مشاريع الذكاء الاصطناعي أو تحسينها. يحلل الكود ويقترح الأدوات ويُعد خطط عمل بالإسبانية.
007
48kيتيح لوكيلك إجراء تدقيقات أمنية ونمذجة التهديدات. مفيد لحماية المشاريع من الهجمات والثغرات الأمنية.
10-andruia-skill-smith
48kيساعد وكيلك على إنشاء أدوات الذكاء الاصطناعي أو تحسينها. يحدد طريقة عملها، ويكتب توثيقها، ويتحقق من بنيتها.
20-andruia-niche-intelligence
48kيتيح لوكيلك إعداد ملخص عن صناعة محددة. مفيد لفهم السياق والقواعد وأنماط الاستخدام والمخاطر لمشروع ما، باستخدام مصادر موثوقة.
مهارات مشابهة
test-driven-development
311kيعلّم وكيلك كتابة اختبار فاشل أولًا، ثم رؤيته يفشل، ثم كتابة أصغر شيفرة تنجحه، قبل بناء أي ميزة أو إصلاح.
verification-before-completion
311kيعلّم وكيلك تشغيل فحوصات حقيقية وقراءة نتائجها قبل أن يقول إن المهمة أو الإصلاح أو البناء مكتمل أو ناجح.
migrate-to-shoehorn
310kيستبدل تأكيدات النوع الخطرة في ملفات الاختبار بمكتبة shoehorn، حتى تتمكن الاختبارات من استخدام بيانات جزئية وتجتاز فحوص الأنواع.