lfe-complexity-check

lfe-complexity-check is a skill for Claude Code, Codex from StChiotis/Library-First-Engineering. It costs 66 tokens per session (986 once invoked), scanned A, original, MIT.

An LFE inspection skill that reviews changed code for hard-to-maintain complexity, such as deeply nested logic, oversized functions, and difficult control flow. It is a sub-step called by the main Inspector skill.

In plain words
What is it for?
Use it during an LFE inspection to review a completed code change and record complexity findings for the project's inspection report.
Why use it?
It surfaces code that may be difficult for future developers or agents to understand and extend.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/stchiotis/library-first-engineering/lfe-complexity-check
Any agent
npx skills add StChiotis/Library-First-Engineering --skill lfe-complexity-check
Clone the repo
git clone --depth 1 https://github.com/StChiotis/Library-First-Engineering

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for lfe-complexity-check

README.md
[![agentmods](https://agentmods.dev/badge/skills/stchiotis/library-first-engineering/lfe-complexity-check.svg)](https://agentmods.dev/skills/stchiotis/library-first-engineering/lfe-complexity-check)
Your own site
<a href="https://agentmods.dev/skills/stchiotis/library-first-engineering/lfe-complexity-check"><img src="https://agentmods.dev/badge/skills/stchiotis/library-first-engineering/lfe-complexity-check.svg" alt="Measured on agentmods" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 986 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00066 $0.00986
Opus 5 $0.00033 $0.00493
Sonnet 5 $0.00013 $0.00197
Haiku 4.5 $0.00007 $0.00099

Measured 5d ago against content hash 68a2c930f89a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

lfe-complexity-check scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/lfe-complexity-check/SKILL.md · 90 lines

How it starts

The opening of the file, as written. The whole thing — 90 lines — stays where its author put it; the contents beside it link to each section on GitHub.

LFE Complexity Check — Prompt-Based Complexity Analysis

Position in Pipeline

  • Phase: 3 (Inspector sub-skill)
  • Persona: Inspector (read-only; no src/ writes)
  • Trigger: Invoked by /lfe-inspector Sub-Skill Dispatch when lfe-complexity-check: true in .docs/quality/inspector-config.md
  • Output: .plans/checks/complexity_findings.md — aggregated by Inspector into critique.md

Mission

Reason over changed code to identify complexity indicators that reduce maintainability. The goal is not to enforce arbitrary metrics but to surface patterns that will make future AI sessions harder to navigate and extend correctly.

Hard Rules

  1. Dispatch Context Required (refuse direct invocation): This skill is dispatched by /lfe-inspector Step 6 — it is not a Brain-typeable skill (per LLM_AGENT_GUIDE.md §8.8 Skill Invocation Authority). If invoked without .plans/builder_done.md for the current slice, halt immediately and reply: "/lfe-complexity-check is an Inspector sub-skill dispatched by /lfe-inspector. It cannot be run standalone. Run /lfe-inspector — the dispatcher will invoke this sub-skill if it is enabled in .docs/quality/inspector-config.md (or via an ## Inspector Overrides section in active_plan.md)." Direct invocation produces orphaned findings files and breaks the Inspector's aggregation logic.
  2. Prompt-Only: Reason over the diff only — no linters or complexity calculators.
  3. Diff-Scoped: Analyse only files listed in builder_done.md.
  4. Severity: High (will actively confuse the next AI session) / Medium (increases risk) / Low (style concern).
  5. Context Matters: A 25-line function that is purely a switch statement is less concerning than a 15-line function with 4 levels of nesting and side effects.

Inputs

  1. .plans/builder_done.md — list of changed files
  2. .plans/active_plan.md — scope boundary

Workflow

Step 1: Extract Diff Scope

From builder_done.md, identify and read modified files.

Read the full file on GitHub · 90 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 90 lines · 66 tokens per session scan A 68a2c930f89a

Subscribe to this mod's changes

lfe-complexity-check is a skill published in the GitHub repository StChiotis/Library-First-Engineering (43 stars, last pushed 1mo ago), licensed MIT. It adds 66 tokens to every session and 986 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

playwright

Use when the task requires capturing or automating a real browser from the terminal.

openai/openai-agents-python · 19 tokens

implementation-final-review

Perform the repository's risk-tiered independent final review before implementation completion. Use only when explicitly invoked or when repository instructions require it after behavior-impacting implementation work; audit the complete task diff, supported contracts, lifecycle and security boundaries, complexity, and…

openai/openai-agents-python · 58 tokens

redteam-plugin-development

Standards for creating redteam plugins and graders. Use when creating new plugins, writing graders, or modifying attack templates.

promptfoo/promptfoo · 29 tokens

promptfoo-evals

Write, refine, run, and QA promptfoo evaluation suites: promptfooconfig.yaml, prompts, providers, vars, tests, assertions, model-graded rubrics, transforms, datasets, exports, and CI gates. Use for non-redteam eval coverage, regression tests, or new eval matrices. Do not use for adversarial redteam plugin or strategy…

promptfoo/promptfoo · 79 tokens

promptfoo-provider-setup

Configure promptfoo providers or redteam targets for hosted models, live HTTP APIs, Python/JavaScript local scripts, agent SDKs, or multi-input systems. Use when connecting promptfoo to the system under test, mapping vars, auth env vars, request bodies, response transforms, or static-code-derived provider wrappers. Do…

promptfoo/promptfoo · 91 tokens

code-change-verification

Run the mandatory verification stack when changes affect runtime code, tests, or build/test behavior in the OpenAI Agents Python repository.

openai/openai-agents-python · 30 tokens