ql-housekeep

ql-housekeep is a skill for Claude Code from andyzengmath/quantum-loop. It costs 57 tokens per session (2,224 once invoked), scanned A, original, MIT.

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 Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions .claude-plugin; positional $N argument; mentions Claude Code.

Part of the quantum-loop plugin — 10 skills, 9 agents shipped together

Good fit Use it to audit a repository before or during parallel development and review findings before making cleanup decisions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/andyzengmath/quantum-loop/ql-housekeep
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.

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.

Or install quantum-loop, the plugin that ships this one along with the rest of its 10 skills, 9 agents.

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 ql-housekeep

README.md
[![agentmods](https://agentmods.dev/badge/skills/andyzengmath/quantum-loop/ql-housekeep/github.svg)](https://agentmods.dev/skills/andyzengmath/quantum-loop/ql-housekeep)
Your own site
<a href="https://agentmods.dev/skills/andyzengmath/quantum-loop/ql-housekeep"><img src="https://agentmods.dev/badge/skills/andyzengmath/quantum-loop/ql-housekeep/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ql-housekeep

Your own site · 80×15
<a href="https://agentmods.dev/skills/andyzengmath/quantum-loop/ql-housekeep"><img src="https://agentmods.dev/badge/skills/andyzengmath/quantum-loop/ql-housekeep.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. A grade says what 26 rules found in the file — not that it is safe.
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.00057 $0.02224
Opus 5.5 $0.00023 $0.00890
Sonnet 5.5 $0.00011 $0.00445
Haiku 4.5 $0.00006 $0.00222

Measured 1mo ago against content hash 8f398df67de3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 4mo ago), licensed MIT. It adds 57 tokens to every session and 2,224 once invoked, about $0.0002 per session on Opus 5.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

pr-conflict-from-mid-flight-merges

A pull request that was clean when you opened it now says on GitHub "This branch has conflicts that must be resolved", because others landed on main over the days it sat open. Use when gh pr view N --json mergeable,mergeStateStatus returns CONFLICTING and DIRTY, when your branch carries commits you do not recognise…

wan-huiyan/agent-traffic-control · 146 tokens

gh-pr-merge-worktree-checkout-trap

Diagnose and bypass gh pr merge --squash --delete-branch failing with "failed to run git: fatal: 'main' is already used by worktree at ..." when another git worktree has main checked out. Use when: (1) you run gh pr merge and see this exact error, (2) you have multiple worktrees in the repo (e.g. .claude/worktrees/)…

wan-huiyan/agent-traffic-control · 497 tokens

parallel-pr-template-fork-duplicates-moved-section

Diagnose silent semantic duplication after two parallel PRs ship. Use when: (1) one PR (the mover) relocates a section/component/block from template X to template Y (X loses it, Y gains it), (2) a sibling PR (the forker), authored against pre-mover main, creates / promotes / copies template Z from the OLD version of X…

wan-huiyan/agent-traffic-control · 308 tokens

pr-hijack-via-stale-worktree-branch-ref

Diagnose and recover from accidentally overwriting another session's open PR when git push -u origin in a long-lived worktree silently replaces the remote branch ref. Use when ANY of the following appears: (1) you ran git checkout -b origin/main and git push -u and git reported [new branch] even though the branch…

wan-huiyan/agent-traffic-control · 305 tokens

wip-branch-linter-revert-system-reminder-trap

Avoid silently accepting linter / automation reverts of deliberate wip-branch framings. Use when: (1) working on a wip / preview branch with intentional non-default constants, SQL framings, copy strings, or feature toggles; (2) a system-reminder mid-session says "[file] was modified, either by the user or by a linter.…

wan-huiyan/agent-traffic-control · 315 tokens

worktree-stale-local-main-ref-inflates-pr-diff

Stop a false "my PR is reverting/touching dozens of upstream files" alarm when git diff main... reports far more files than your commit changed, in a multi-worktree repo. Use when: (1) you're in a worktree at /.claude/worktrees/ / (or any git worktree), (2) git diff main...HEAD (3-dot) or --stat shows tens/hundreds of…

wan-huiyan/agent-traffic-control · 398 tokens