/logic-health
Sweep a directory, module, or full codebase for logic correctness and produce a scored health dashboard with systemic patterns. Trigger when the user requests a health view — "audit the whole codebase", "health check", "health overview", "logic health overview", "audit src/",
$ npx -y skills add hyhmrright/logic-lens --skill logic-health --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/logic-health
Context preview
The summary Claude sees to decide when to auto-load this skill.
Sweep a directory, module, or full codebase for logic correctness and produce a scored health dashboard with systemic patterns. Trigger when the user requests a health view — "audit the whole codebase", "health check", "health overview", "logic health overview", "audit src/",
SKILL.md
logic-health.SKILL.mdname: logic-health
description: >
Sweep a directory, module, or full codebase for logic correctness and
produce a scored health dashboard with systemic patterns. Trigger when
the user requests a health view — "audit the whole codebase",
"health check", "health overview", "logic health overview",
"audit src/", "audit auth and payments modules",
"where should I focus testing", "onboarding review",
"logic overview before we ship", "give me a health overview of this module".
SCOPE RULE: prefer multi-file; also trigger for a single module when
the user explicitly uses "health check", "health overview", or
"logic health" — a concrete failure uses logic-locate; two versions
uses logic-diff; explaining a path uses logic-explain; "fix
everything" uses logic-fix-all.
Do NOT trigger for: style/architecture-only audits, security-only
scans, performance-only audits.
Logic-Lens — Logic Health
Setup
Use lazy loading per `../_shared/common.md` §13: 1. Read `../_shared/common.md` only for language, Iron Law, Logic Score, scope routing, Remedy discipline, config fields, and loading budget. 2. Read only the relevant step in `logic-health-guide.md` as you reach it. 3. Load `../_shared/logic-risks.md`, `../_shared/semiformal-guide.md`, `../_shared/semiformal-checklist.md`, `../_shared/report-template.md`, and `../logic-review/logic-review-guide.md` on demand when the current module trace needs them.
Process
**Step 0. Language + scope routing.** Detect language per `common.md` §1. Proceed for multi-file scopes and for single-module scopes when the user explicitly uses "health check", "health overview", or "logic health". If scope is one file and none of those health phrases appear, switch to logic-review.
**Step 1. Enumerate modules and plan the sweep** (guide Step 1) — prioritize public API surfaces, recently changed files, and user-flagged modules. Read `.logic-lens.yaml` only for `ignore:`, `focus:`, `disable:`, `severity:`, `custom_risks`, and `trace.*` fields. For broad scopes, build a ranked worklist before opening files.
**Step 2. Run focused logic-review per module** (guide Step 2) — apply Premises → Trace → Divergence on public-facing functions; skip internal helpers unless a trace leads into them. Apply the per-module function budget from guide Step 2 (small/medium/large line-count tiers) — do not trace all functions in large modules.
**Step 3. Record findings per module** (guide Step 3) — tag module, L-code, severity.
**Step 4. Aggregate findings** (guide Step 4) — counts by severity and by L-code; cross-reference modules.
**Step 5. Compute scores** (guide Step 5) — per-module Logic Score via the standard formula; overall score is the line-weighted average (per `common.md` §6).
**Step 6. Identify systemic patterns** (guide Step 6) — L-codes appearing in **≥ 3 modules or ≥ 30% of scanned modules (whichever threshold is lower)** indicate codebase-wide habits; architectural enablers (heavy global state → L7; deep callee chains → L6) get explicit mention.
**Step 7. Output the Health Report** (guide Step 7) — standard header; Findings; Summary; then Module Breakdown, Systemic Patterns, and Recommended Priority Order (top 3–5) appended after Summary. Localize all headers if the user wrote in Chinese.
**Mode line in report:** `Logic Health` (Chinese: `逻辑体检`).
**Health-specific additions** (append after the standard Summary):
## Module Breakdown
| Module | Score | Critical | Warning | Suggestion | Top Risk |
|--------|-------|----------|---------|------------|----------|
## Systemic Patterns
[Risk codes appearing in ≥ 3 modules or ≥ 30% of scanned modules — codebase-wide habit rather than isolated bugs]
## Recommended Priority Order
1. [Most critical single finding]
2. [Systemic pattern with widest impact]
3. [Quick wins: suggestions that prevent future Criticals]
Localize column and section headers when the user wrote in Chinese (e.g., `模块分布`, `系统性模式`, `优先级建议`).
Read more
name: logic-health description: > Sweep a directory, module, or full codebase for logic correctness and produce a scored health dashboard with systemic patterns. Trigger when the user requests a health view — "audit the whole codebase", "health check", "health overview", "logic health overview", "audit src/", "audit auth and payments modules", "where should I focus testing", "onboarding review", "logic overview before we ship", "give me a health overview of this module". SCOPE RULE: prefer multi-file; also trigger for a single module when the user explicitly uses "health check", "health overview", or "logic health" — a concrete failure uses logic-locate; two versions uses logic-diff; explaining a path uses logic-explain; "fix everything" uses logic-fix-all. Do NOT trigger for: style/architecture-only audits, security-only scans, performance-only audits.
Logic-Lens — Logic Health
Setup
Use lazy loading per `../_shared/common.md` §13: 1. Read `../_shared/common.md` only for language, Iron Law, Logic Score, scope routing, Remedy discipline, config fields, and loading budget. 2. Read only the relevant step in `logic-health-guide.md` as you reach it. 3. Load `../_shared/logic-risks.md`, `../_shared/semiformal-guide.md`, `../_shared/semiformal-checklist.md`, `../_shared/report-template.md`, and `../logic-review/logic-review-guide.md` on demand when the current module trace needs them.
Process
**Step 0. Language + scope routing.** Detect language per `common.md` §1. Proceed for multi-file scopes and for single-module scopes when the user explicitly uses "health check", "health overview", or "logic health". If scope is one file and none of those health phrases appear, switch to logic-review.
**Step 1. Enumerate modules and plan the sweep** (guide Step 1) — prioritize public API surfaces, recently changed files, and user-flagged modules. Read `.logic-lens.yaml` only for `ignore:`, `focus:`, `disable:`, `severity:`, `custom_risks`, and `trace.*` fields. For broad scopes, build a ranked worklist before opening files.
**Step 2. Run focused logic-review per module** (guide Step 2) — apply Premises → Trace → Divergence on public-facing functions; skip internal helpers unless a trace leads into them. Apply the per-module function budget from guide Step 2 (small/medium/large line-count tiers) — do not trace all functions in large modules.
**Step 3. Record findings per module** (guide Step 3) — tag module, L-code, severity.
**Step 4. Aggregate findings** (guide Step 4) — counts by severity and by L-code; cross-reference modules.
**Step 5. Compute scores** (guide Step 5) — per-module Logic Score via the standard formula; overall score is the line-weighted average (per `common.md` §6).
**Step 6. Identify systemic patterns** (guide Step 6) — L-codes appearing in **≥ 3 modules or ≥ 30% of scanned modules (whichever threshold is lower)** indicate codebase-wide habits; architectural enablers (heavy global state → L7; deep callee chains → L6) get explicit mention.
**Step 7. Output the Health Report** (guide Step 7) — standard header; Findings; Summary; then Module Breakdown, Systemic Patterns, and Recommended Priority Order (top 3–5) appended after Summary. Localize all headers if the user wrote in Chinese.
**Mode line in report:** `Logic Health` (Chinese: `逻辑体检`).
**Health-specific additions** (append after the standard Summary):
## Module Breakdown | Module | Score | Critical | Warning | Suggestion | Top Risk | |--------|-------|----------|---------|------------|----------| ## Systemic Patterns [Risk codes appearing in ≥ 3 modules or ≥ 30% of scanned modules — codebase-wide habit rather than isolated bugs] ## Recommended Priority Order 1. [Most critical single finding] 2. [Systemic pattern with widest impact] 3. [Quick wins: suggestions that prevent future Criticals]
Localize column and section headers when the user wrote in Chinese (e.g., `模块分布`, `系统性模式`, `优先级建议`).
Logic-first AI code review via semi-formal execution tracing (Premises → Trace → Divergence → Trigger → Remedy). Catches behavioral bugs, type-contract breaches & async hazards that linters miss. Six skills · Claude Code · Codex CLI · Gemini CLI.
Repo: hyhmrright/logic-lens
Other skills on logic-lens.
- /bump-version
Bump the Logic-Lens version across all six metadata locations at once (package.json, the four plugin manifests, and the README badge), then validate. Use when cutting a release or when `npm run validate` reports a version mismatch.
Open skill - /iterate-skill
Run the Logic-Lens skill-improvement loop end to end — baseline → diagnose failures → edit → sync cache → re-eval → verify net gain → iterate until clean. Use whenever the goal is to RAISE a skill's eval score or fix a failing eval mode: "improve logic-review", "the format
Open skill - /new-skill
Scaffold a new logic-* skill in the Logic-Lens repo and wire it into every place a skill must be registered, so no step is missed. Use when adding a seventh (or later) skill to Logic-Lens.
Open skill - /run-iteration-eval
Run the Logic-Lens content-eval pipeline for one iteration and produce a scored summary.json — use to measure a skill change. Wraps scripts/run-content-evals.sh (runner, costs tokens) and scripts/grade-iteration.py (grader, free, re-runnable). ALWAYS sync the plugin cache first.
Open skill - /sync-skill-cache
Sync the Logic-Lens working-copy skills/ into the installed plugin cache so content-evals test the EDITED skill, not the last published one. ALWAYS run this after editing any skills/**/SKILL.md or guide/_shared file and BEFORE running content-evals — otherwise the eval silently
Open skill - /logic-diff
Compare two code versions for semantic equivalence via semi-formal tracing of both versions side-by-side. Trigger when the user shares a refactor, rewrite, migration, or A/B implementation and wants to confirm behavior is unchanged — "did I break anything", "is this equivalent",
Open skill

