lfe-hygiene

lfe-hygiene is a skill for Claude Code, Codex from StChiotis/Library-First-Engineering. It costs 42 tokens per session (1,871 once invoked), scanned A, original, MIT.

A repository audit that compares the project’s documented file map with the files actually on disk. It also checks whether temporary planning and execution files match the project’s lifecycle rules.

In plain words
What is it for?
Use it during maintenance reviews to detect documentation drift and unwanted repository clutter.
Why use it?
It finds files that are missing from the documentation, documentation for files that no longer exist, and leftover coordination files that can cause confusion.

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-hygiene
Any agent
npx skills add StChiotis/Library-First-Engineering --skill lfe-hygiene
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-hygiene

README.md
[![agentmods](https://agentmods.dev/badge/skills/stchiotis/library-first-engineering/lfe-hygiene.svg)](https://agentmods.dev/skills/stchiotis/library-first-engineering/lfe-hygiene)
Your own site
<a href="https://agentmods.dev/skills/stchiotis/library-first-engineering/lfe-hygiene"><img src="https://agentmods.dev/badge/skills/stchiotis/library-first-engineering/lfe-hygiene.svg" alt="Measured on agentmods" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,871 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.1 $0.00042 $0.01871
Opus 5 $0.00021 $0.00936
Sonnet 5 $0.00008 $0.00374
Haiku 4.5 $0.00004 $0.00187

Measured 5d ago against content hash dd7cf93cdf6b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

lfe-hygiene 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-hygiene/SKILL.md · 100 lines

How it starts

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

LFE Hygiene Audit

Position in Pipeline

  • Phase: 5 (Hygiene sub-pipeline, Step 1)
  • Persona: Archivist
  • Trigger: Scheduled every 5 sessions (tracked in pipeline_status.md) or manually by human
  • Next Step: /lfe-improve-architecture (Step 2)

Mission

Ensure the repository remains LFE-compliant. Detect drift between the Library and the physical filesystem, and verify the coordination layer is clean.

Workflow

1. Floor Map Audit

  • Read .docs/README.md.
  • Scan the filesystem.
  • Identify "Illegal" Files: Files that exist but are not registered in the Floor Map.
  • Identify "Ghost" Files: Files listed in the Floor Map that no longer exist.

2. Coordination Layer Audit

The cleanup tiers in lfe-archivist/SKILL.md Step 5a/5b are the source of truth for which files should be present at each lifecycle moment. This audit checks for drift from those rules.

  • Mission complete (Mission State == [MISSION COMPLETE] or [BLANK CANVAS]): no execution OR planning files should remain. If any of 01_grill_summary.md, 02_prd.md, 03_slices.md, plan_critique.md, active_plan.md, builder_done.md, tdd_report.md, critique.md, inspection_report.md, diagnosis_report.md, rework_directive.md still exist, or if .plans/checks/ contains any files → flag as "Stale Coordination Files".
  • Between slices (Mission State == [IN-FLIGHT: <phase>] and Active Persona is Architect): planning files (01_grill_summary.md, 02_prd.md, 03_slices.md) MAY exist; execution files (plan_critique.md, active_plan.md, builder_done.md, tdd_report.md, critique.md, inspection_report.md, diagnosis_report.md, rework_directive.md, .plans/checks/) MUST be absent — flag any present as "Partial Cleanup Skipped".
  • Mid-mission: active_plan.md exists but Active Persona is NOT Architect, plan-critique, or Builder → flag as "Orphaned Plan".
  • Plan critique checkpoint: plan_critique.md should exist only between Plan Approval and Builder start. If plan_critique.md exists AND builder_done.md exists → the critique file should have been cleaned up by Partial Cleanup; flag as "Stale Plan Critique".
  • Hygiene cycle: hygiene_report.md is owned by the Hygiene sub-pipeline; flag only if it persists outside an active hygiene cycle.
  • Verify the Coordination Files row in pipeline_status.md matches the mainline files in .plans/ (the nine checkboxes are 01 02 03 plan plan_critique build tdd critique inspect). Conditional artifacts (diagnosis_report.md, rework_directive.md, hygiene_report.md, .plans/checks/*.md) intentionally have no checkbox — their presence on disk is not row-drift.

Read the full file on GitHub · 100 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 · 100 lines · 42 tokens per session scan A dd7cf93cdf6b

Subscribe to this mod's changes

lfe-hygiene 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 1,871 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.

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

ai-engineering-toolkit

6 production-ready AI engineering workflows: prompt evaluation (8-dimension scoring), context budget planning, RAG pipeline design, agent security audit (65-point checklist), eval harness building, and product sense coaching.

sickn33/agentic-awesome-skills · 47 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-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

search-params

URL search param and hash state management. Use when adding or modifying URL search params, working with useSearchParams, setSearchParams, useSearchParamState, or navigate() with query strings or hash fragments, or fixing browser back/forward button issues.

promptfoo/promptfoo · 55 tokens