ql-housekeep

A detection-only tool for finding accumulated repository-hygiene problems in long-running development projects.

In plain words
What is it for?
Use it to audit a repository before or during parallel development and review findings before making cleanup decisions.
Why use it?
It reports issues such as unresolved merge markers, abandoned worktrees, duplicate files, stale branches, and version-manifest differences without changing anything.

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/andyzengmath/quantum-loop/ql-housekeep
Any agent
npx skills add andyzengmath/quantum-loop --skill ql-housekeep
Clone the repo
git clone --depth 1 https://github.com/andyzengmath/quantum-loop

Made for: Claude Code, Codex.

Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,224 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.00057 $0.02224
Opus 5 $0.00028 $0.01112
Sonnet 5 $0.00011 $0.00445
Haiku 4.5 $0.00006 $0.00222

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

Security

Grade A, and why

ql-housekeep 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 2d 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.

skills/ql-housekeep/SKILL.md · 205 lines

How it starts

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

ql-housekeep — repo hygiene detector

Purpose

ql-housekeep surfaces the hygiene failures that accumulate when an autonomous development pipeline runs for weeks without human sweep. It is a detector, not an actuator. Auto-fix is explicitly out of scope.

This skill exists because idea-stage/AUDIT_QL.md catalogued eight categories of hygiene failure on master. The first job of the next pipeline iteration is to not produce that state again.

When to use

  • Before starting a new /ql-brainstorm cycle on a repo that has been running parallel execution for weeks.
  • As a gate in ql-execute between waves if you suspect accumulated drift.
  • Manually, when you want a structured view of "what is wrong with the repo right now that the runtime cannot see".

What it detects

1. Merge-conflict markers in tracked files

Pattern: ^<<<<<<< or ^=======$ or ^>>>>>>>. These are the signature of an abandoned git merge that was committed without resolution.

Note: the ^=======$ pattern can theoretically false-positive on Markdown setext-heading underlines (e.g., a heading followed by exactly seven = chars at column 1). In practice this is rare, and the <<<<<<< + >>>>>>> siblings are required for a real conflict block, so false positives are self-limiting.

Command:

grep -rn --include='*.md' --include='*.sh' --include='*.ts' --include='*.js' \
  --include='*.py' --include='*.json' --include='*.yml' --include='*.yaml' \
  -E '^<<<<<<<|^=======$|^>>>>>>>' .

2. Orphan git worktrees

Directories under .claude/worktrees/agent-* or .ql-wt/<story-id>/ that git no longer tracks.

Command:

for d in .claude/worktrees/agent-* .ql-wt/*; do
  [ -d "$d" ] || continue
  git worktree list | grep -q "$d" || echo "$d"
done

3. CPC-variant duplicate files

Pattern: files matching *-CPC-andyz-ZH84K.*. These are OneDrive-renamed copies that indicate a parallel-hardening fork. If detected, the project likely has two pipelines coexisting — see idea-stage/AUDIT_QL.md for promotion protocol.

Read the full file on GitHub · 205 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. 2d ago First seen · 205 lines · 57 tokens per session scan A 8f398df67de3

Subscribe to this mod's changes

ql-housekeep is a skill published in the GitHub repository andyzengmath/quantum-loop (24 stars, last pushed 2mo ago), licensed MIT. It adds 57 tokens to every session and 2,224 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