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.
npx agentmods add skills/stchiotis/library-first-engineering/lfe-diagnosenpx skills add StChiotis/Library-First-Engineering --skill lfe-diagnosegit clone --depth 1 https://github.com/StChiotis/Library-First-EngineeringWrote 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.
[](https://agentmods.dev/skills/stchiotis/library-first-engineering/lfe-diagnose)<a href="https://agentmods.dev/skills/stchiotis/library-first-engineering/lfe-diagnose"><img src="https://agentmods.dev/badge/skills/stchiotis/library-first-engineering/lfe-diagnose.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00042 | $0.00774 |
| Opus 5 | $0.00021 | $0.00387 |
| Sonnet 5 | $0.00008 | $0.00155 |
| Haiku 4.5 | $0.00004 | $0.00077 |
Grade A, and why
lfe-diagnose 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 6d 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.
How it starts
The opening of the file, as written. The whole thing — 67 lines — stays where its author put it; the contents beside it link to each section on GitHub.
LFE Diagnose
Position in Pipeline
- Phase: 3 (Inspector sub-pipeline, Step 3 — conditional)
- Persona: Inspector (triggers), Builder (fixes)
- Trigger: Called by Inspector when
/lfe-inspectorverification fails - Input: Failing behavior identified during inspection
- Output: Fix applied → returns to Builder sub-pipeline for re-verification
Hard Rules
- First-failure only: Diagnose may only run on the first failed inspection of a slice. The Inspector's Cycle Guard (
lfe-inspector/SKILL.mdCycle Guard step) is responsible for blocking re-entry on the second failure. If you discover that.plans/inspection_report.mdalready records astatus: failedfor the sameslice:, halt immediately, leave the existing report as-is, and bounce back to Inspector for Brain triage (seeLOOP_ARCHITECTURE.mdScenario 2.2). This is a defensive belt-and-braces check; the Cycle Guard should have prevented this entry. - Minimal fix only: Solve the diagnosed problem, nothing more. No opportunistic refactors.
Process
- Feedback Loop: Build a deterministic repro (test/script) that reliably demonstrates the failure.
- Reproduce: Run the loop and witness the failure. Confirm it matches the Inspector's reported issue.
- Hypothesise: Generate 3-5 ranked, falsifiable hypotheses for the root cause.
- Instrument: Add targeted probes to test hypotheses one at a time. Eliminate hypotheses until the root cause is confirmed.
- Fix: Write a regression test that captures the bug → Apply the minimal fix → Watch the test pass.
- Persist Diagnosis: Write
.plans/diagnosis_report.mdso the why of the fix survives a session crash. Schema below. - Handoff: Return to Builder sub-pipeline. The Builder runs the full test suite, then the Inspector re-verifies.
Coordination File Output
Per the contract in COORDINATION_FILES.md:
---
phase: inspector
step: diagnose
status: complete
timestamp: <ISO-8601>
source: .plans/tdd_report.md
slice: <copied from active_plan.md — used by /lfe-builder to detect a stale report>
---
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.
- 6d ago First seen · 67 lines · 42 tokens per session scan A f1b01bb2a1b6
lfe-diagnose is a skill published in the GitHub repository StChiotis/Library-First-Engineering (43 stars, last pushed 1mo ago), licensed MIT. It adds 42 tokens to every session and 774 once invoked, about $0.0002 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.
Other skills, from other repositories
sensitive-logging-audit
Audit and fix sensitive-data exposure through Python runtime logging in openai-agents-python. Use when reviewing logging, print, warnings, stderr, traceback, MCP names, model or tool exceptions, redaction flags, or any diagnostic path that may retain user data.
credit-note-fixer
Fix the tiny credit-note formatting bug and rerun the exact targeted test command.
code-review
Reviews code for bugs, security issues, and best practices.
bug-reproducer
Find likely software bugs in a codebase, rank concrete bug candidates, and prove or reject them with focused regression tests before proposing a fix. Also turn bug reports, stack traces, screenshots, failing behavior, support tickets, and regressions into minimal reproducible cases with red-to-green evidence. Use when…
code-complexity
Keep each unit comprehensible while the code grows: deep modules over shallow ones, information hiding, honest names, small functions with one job, error handling that does not lose the error, DRY and orthogonality, design by contract, and not leaving broken windows. Merges module-complexity management with…
refactoring-safely
Change the structure of code that already exists without changing what it does: smells as triggers, the named transformations (extract/inline, move feature, organise data, simplify conditionals), and above all the workflow that makes it safe — characterization tests first, one transformation at a time, green between…