
fresh-eyes-sweep
Audit an entire repository with fresh eyes for correctness errors, bugs, omissions, duplication, inconsistencies, stale, duplicate, or tautological tests, stale comments, and other mistakes supported by evidence. Fix every safe issue and verify the result.
- Installs
- 66
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/paulrberg/agent-skills --skill fresh-eyes-sweep- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads fresh-eyes-sweep automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Fresh Eyes Sweep
If a slash or dollar invocation already added these instructions to the conversation, follow them directly. In that case, do not invoke this skill again through a skill tool.
Inspect the requested Git scope for mistakes supported by evidence. Fix every safe issue. Account for every mapped file. A verified no-op requires that coverage and a full pass that finds nothing new. Leave sound work unchanged. Edits are not required to demonstrate a successful sweep.
--max-runtime DURATION is optional: it is a positive integer followed by m or h, such as 45m or 3h. Reject an
invalid duration, unknown option, or ambiguous positional input. When a deadline is supplied, calculate it before
auditing. In that case, reserve the final 15% for aggregate validation and reporting, clamped to 5–30 minutes and never
exceeding the total runtime. At that window, settle in-flight slices and do not start new fixes. Report an incomplete
sweep with its ledger rather than overrunning the deadline.
Overnight Autonomy
At invocation, read the environment's local time. If it is strictly after 22:00 or strictly before 08:00, treat the entire run as autonomous even if it later crosses a boundary. Exactly 22:00 and 08:00 are outside this window.
During an autonomous overnight run:
- Do not ask the user any questions or pause for clarification, selection, or approval. This does not broaden the skill's authority: leave destructive, disclosure, purchase, public-contract, and other approval-dependent actions undone.
- Use the smallest safe reversible interpretation and continue all independent work. Put every ambiguity, blocked issue, and approval-dependent choice on an overnight backlog instead of interrupting the run.
- Present the backlog at the end with each item's evidence, safe disposition, impact, and decision needed. Phrase the entries as findings, not questions. Omit the section when the backlog is empty.
Ledger Interface
Resolve scripts/sweep-ledger.py from this SKILL.md. Create the scratch ledger outside the repository:
uv run "<skill-dir>/scripts/sweep-ledger.py" init \
--root <repo> --ledger <scratch.json> [<path>...]
With no paths, init maps the whole repository. With paths, it maps exactly those Git scopes. A path that matches no
tracked or non-ignored untracked file fails init. It records every tracked and non-ignored untracked file plus each
path's pre-existing worktree status. The helper does not classify generated, vendored, binary, safe, important, or
defective files.
Record an agent decision atomically only after inspecting or otherwise accounting for the path:
uv run "<skill-dir>/scripts/sweep-ledger.py" mark \
--ledger <scratch.json> --status <pending|inspected|fixed|reported|excluded> \
--path <path> [--path <path>...] [--reason <text>]
excluded requires an agent-written reason. Unknown paths or invalid batches fail without a partial update. Concurrent
mark calls serialize on a sidecar <scratch.json>.lock, so parallel subagents may mark their own paths.
uv run "<skill-dir>/scripts/sweep-ledger.py" pending --ledger <scratch.json> [--limit <n>]
uv run "<skill-dir>/scripts/sweep-ledger.py" summary --ledger <scratch.json>
pending returns the next unaccounted paths in stable order. summary returns exact status counts, pre-existing edit
count, completeness, percentage inputs, and a ten-cell bar. Use those facts directly. Never estimate progress or
reimplement ledger arithmetic.
Setup
-
Require Git and read applicable repository instructions. Record the worktree root, starting commit, starting status, resolved scope, and any deadline and validation window.
-
Initialize the ledger for the requested scope. The agent may additionally inspect shared configuration and instructions needed to understand that scope. Do not silently widen the ledger. If
initmaps more than roughly 2,000 files and the user gave no[paths], partition the mapped ledger into bounded, system-aware directory or subsystem slices and continue without asking solely because of file count. Keep the complete requested scope in the ledger and preserve cross-slice invariants through the system map and aggregate validation.When a supplied deadline cannot cover every slice, stop at its validation window and report the resumable frontier. Ask only when no safe partition can preserve a material invariant and the user must choose a narrower outcome. During an autonomous overnight run, record that choice in the overnight backlog and complete everything that remains independently safe.
-
Classify generated, vendored, minified, binary, and bulk-data artifacts. Validate them through their generator, schema, or invariants when line-by-line review is inappropriate, then mark them with the agent's reason.
-
Build a compact system map: executable entry points, workspace or package dependency directions, public interfaces, generators and derived artifacts, external and persisted-data seams, and the owner of each material invariant. Trace the highest-risk workflows end to end before choosing slices.
-
Inspect recent history and diffs, especially the newest changes, to find affected callers, dependencies, tests, configuration, and docs. Rank slices and fixes by impact supported by evidence. Prioritize correctness, data loss, security, and externally exposed personal-data or disclosure risk. Rank reliability, maintainability, measured performance, and developer experience after those issues. Treat recency as one prioritization signal, never as a substitute for coverage.
-
Discover build, test, lint, typecheck, format, and codegen checks.
-
Establish a baseline for every safe, relevant check before the first fix. If it fails, prioritize reproducible failures before discretionary work. Defer failures that need an unclear or prohibited action while continuing with independently verifiable work.
-
Preserve every pre-existing edit recorded by the ledger. Do not revert, absorb, commit, or report it as a finding.
After mapping, report ### 🔎 Sweep mapped — <files> files · <slices> slices · ledger <scratch.json>. The agent chooses
the slice count for organization. File count comes from the ledger.
The ledger outlives the session. A later session resumes the same sweep by pointing at the same ledger path instead of
re-running init: pending defines the frontier, and already-accounted paths are not reinspected. Carry the ledger
path into every progress update, and name it again when reporting an incomplete sweep, so the user can hand it to the
next session.
Subagents
- Delegate independent slices when it materially improves coverage or completion time. Use the smallest effective team within host limits and the user's delegation preferences.
- When the host supports model selection, choose reviewer and fixer models deliberately for the task. Otherwise, use the host default.
- Announce the planned fan-out in one line before launching: agent count and the model of each group.
- Cap concurrent reviewers at 4 unless the user raises it, always within the host's available concurrency.
- Record each spawned task ID in the coordinator's slice plan so a later stop request resolves against real IDs. The
ledger's
reasonrecords exclusions only. - Give writing agents stable IDs, dependency waves, exact non-overlapping write scopes, repository constraints, and required completion evidence. In every slice brief, completion evidence must include every discovered strict static gate — typecheck, lint, and format/import order — applicable to the languages in the slice's write scope, scoped as narrowly as the tool permits. Assign each repository-wide gate to one validation owner after its affected slices settle. Other agents report that dependency instead of duplicating the run. Assign shared manifests, lockfiles, exports, and integration files to one sequential owner.
- Reconcile every wave before starting dependents. Use a fresh-context verifier when independent scrutiny addresses a concrete risk, such as concurrency, security, or a cross-slice invariant. A routine edit alone does not require one.
- Subagents and workers never commit. The coordinating session commits settled slices serially as checkpoint commits, so only one process touches the Git index.
- A session holds one coordination claim, and each new claim replaces the last. When the repository uses a claim-based
coordinator such as
ai-coord, claim the union of every in-flight writing slice (running agents plus the coordinator's own edits) before launching a writer. Widen to a new union, never to a scope that drops a slice still being written, and release only after every in-flight slice is reconciled and committed. - On lint-staged or other hook failures during a checkpoint commit, follow
$commit's failure-recovery guidance rather than diagnosing index contention here.
Inspect and Fix
Work through coherent slices so implementation, callers, tests, configuration, and documentation stay visible together. For each slice, reason from first principles: identify the intended outcome and required behavior from the user's request and repository evidence. Treat the current implementation as something to justify, not as a requirement. Interrogate it in this order:
- What is unnecessary, overly complicated, or based on weak assumptions? Challenge those assumptions against evidence.
- What can be deleted entirely while preserving required behavior and contracts? Check consumers and invariants before concluding that a piece is unnecessary.
- After removing unnecessary pieces, what remaining logic, interfaces, or workflow can be simplified?
Prefer deleting over simplifying, simplifying over optimizing, and optimizing over automating. Apply confirmed, safe improvements within the requested scope. This ordering does not justify dropping requirements or automating needless work.
Trace important control, data, concurrency, and error paths end to end. Look for concrete bugs, omissions, invalid assumptions, unhandled edges, security/reliability failures, inconsistencies, duplication, dead code, stale docs, and needless complexity. Also inspect evidenced problems in performance, dependencies, data formats and extensions, configuration, observability, accessibility, agent context, naming, and directory structure. Style preferences and unverified hunches are not findings.
At applicable external and persisted-data seams, inspect these concerns:
- validation, domain precision, and units.
- deterministic ordering and deduplication.
- idempotency and repeat-run behavior.
- atomicity and interruption safety.
- retry and pagination completeness.
- bounded concurrency, cancellation, and resource cleanup.
- secret, log, path, temporary-file, and command safety.
Confirm each issue before editing. Fix the smallest root cause when intent is clear and verification is available. Add a regression test when it protects a meaningful failure mode absent from existing coverage. Do not add tautological tests or tests that merely mirror reversible prose or configuration edits. Fix each verifiable in-scope risk before the report. Do not report it as a residual risk.
Mark reported only for real decisions: intent is ambiguous, a safe fix would change a public contract for consumers
outside the repository, or no verification is available. Give every reported finding a recommended fix and its blast
radius. Do not add speculative features, broad refactors, or cosmetic churn.
Treat source files over 1000 lines and test files over 2000 lines as discovery candidates only. Split a file only when
cohesion, coupling, change risk, or testability establishes a better seam. Line count alone is not evidence. When a
confirmed structural issue requires interface or seam redesign, use $codebase-design when available. Centralize the
invariant in its owning module, apply the deletion test to pass-through modules, introduce a seam only where behavior
actually varies, and keep callers and tests on the resulting interface.
Before changing an interface, persisted format, exported name, or path, enumerate and migrate every producer, consumer, schema, fixture, generator, export or manifest, script or recipe, check, configuration reference, and document. Search for the old identifier afterward and account for every intentional remainder. Apply dependency or framework updates, data-format or extension changes, renames, and reorganizations only when the migration is atomic, compatibility is demonstrable, and repository checks can prove it. Do not retain a performance change without a recorded baseline metric and repeatable benchmark.
If an experiment fails its evidence threshold, revert only that experiment's attributable edits. Never use
repository-wide clean, checkout, or reset commands. After each nontrivial change wave, run $code-polish over that
wave's exact changed file union when available. Otherwise apply the same fixed-scope contract inline: simplify only
where comprehension or defect risk measurably improves, review by severity, fix evidenced defects, and rerun the
narrowest proving checks.
On long runs, post updates only after coherent slices settle, using the ledger summary's exact bar and counts. The bar means path accounting, not depth of inspection.
Tests
Review tests as code under the same first-principles questions, aiming for a smaller suite that catches the same or more defects. For each test, identify the required behavior it protects, then:
-
Delete tautological tests: tests that pass by construction, so no plausible defect in the code under test can fail them. Typical shapes include:
- asserting a mock's or fixture's own configured value.
- deriving the expected value with the code under test or a copy of its logic.
- asserting a constant, type, or literal equals itself.
- restating language, framework, or dependency behavior.
For a quick check, mentally break the implementation. If the test still passes, it is tautological.
-
Delete tests that are stale or unhelpful: they target removed or renamed behavior kept alive only by mocks or fixtures, have no meaningful assertion, pin incidental implementation details or call sequences no requirement depends on, or are skipped or commented out with no live reason.
-
Merge tests that effectively prove the same thing: identical paths differing only in inputs become one table-driven or parameterized test. Remove a narrower test when another test's assertions fully cover it. Combine duplicates across files into the owning suite.
Before deleting or merging, confirm the protected behavior is obsolete or still covered by a named retained test. When the overlap is not obvious, use coverage output or temporarily break the targeted code.
A merge keeps every distinct assertion, input, and diagnosable failure message. Keep regression tests for fixed bugs
unless another test demonstrably covers the same case. Never delete or skip a failing or flaky test to make checks pass.
Fix the cause or mark it reported. Run the affected suites before and after, and record the test-count delta.
Comments
Compare every comment with the code, callers, and history it describes. Fix only clear STALE (describes behavior the
code no longer has), ORPHANED (names a missing symbol, path, flag, or concept), MISLEADING (materially suggests
different behavior), or REDUNDANT (narrates self-explanatory code without intent, constraint, or context) comments.
When evidence proves the correct claim, rewrite the comment. Otherwise, remove it. Never change executable code merely
to make a comment true, and leave useful rationale and imperfect-but-accurate wording alone.
Treat behavior-bearing comments as code: compiler and tool directives (//go:*, build constraints, cgo preambles,
go:embed, @ts-expect-error, lint suppressions, coverage pragmas), license headers, public API docs, and concurrency,
ownership, or safety contracts. Edit them only when the tooling semantics are proven and validated by the relevant
tooling. Otherwise, mark them reported.
Verify and Report
Run the narrowest check proving each fix, including every discovered typecheck, lint, and format/import-order gate applicable to its changed files, then aggregate checks scoped to changed files. Reinspect affected paths and repeat until a pass finds no new evidenced issue. Before declaring completion, revisit the first-principles questions against the result, including the sweep's own additions. Passing checks alone does not justify unnecessary complexity.
During a supplied deadline's validation window, reconcile owned edits and run the aggregate format, lint, type, test, build, and invariant checks justified by the final changed-file union. Compare final results with the recorded baseline. Audit coverage, fixes, and checks against tool output before claiming completion.
When the sweep pushed commits and the repository defines CI workflows, such as .github/workflows, watch the pushed
head's runs before reporting (gh run list --commit <sha>, then gh run watch <run-id>, in the background when the
host supports it). In that case, fix failures attributable to the sweep and report the CI outcome. When changed code
behaves differently by platform and local checks covered only one, name the unverified platforms as a risk.
Lead with
### ✅ Sweep ledger complete — <accounted>/<mapped> files accounted (<inspected> inspected, <excluded> excluded) only
when helper complete is true. Otherwise, use ### ⛔ Sweep incomplete. Summarize fixed, reported, excluded, and check
counts, plus deleted and merged tests with the test-count delta and fixed comments when non-zero. Include a compact
Check | Baseline | Final table, changed artifacts and verified fixes, and subagent results.
Treat each reported finding as an Open item. An Open item may cite only user-owned input, an action outside the
repository, or a confirmation boundary (destructive action, purchase, deployment, or external write). When the task
permits writes and an in-repository change resolves an item, make that change before the report under the standing
maintenance authorization. Do not write needs owner decision, report-only, or residual risk for a routine
engineering choice. Decide, make the change, and state the decision in the report.
When non-empty, also include reverted experiments with the failed evidence, each reported finding with its evidence,
recommended fix, and blast radius, and the overnight backlog when applicable. On ### ⛔ Sweep incomplete, name the
ledger path so the next session can resume from pending. Do not dump the scratch ledger's contents, unrelated
pre-existing changes, or bulk data. Include task-relevant evidence when it materially supports the report.
In an interactive (non-overnight) run with any reported findings, end with one decision question listing them: fix all
as recommended, pick specific items, or leave them reported. Treat invocation wording that already authorizes fixing
(for example "fix any/all problems" or "I will follow your judgement") as prior approval and skip the question, except
for destructive actions, external writes, and purchases, which still need explicit confirmation regardless of invocation
wording. On approval, run a fix wave over the approved items under the same sweep rules — confirm, fix, verify, update
the ledger, and rerun $code-polish — then report the updated ledger and check results. During an autonomous overnight
run, skip the question and leave reported findings in the overnight backlog instead.
Completion requires every mapped path accounted for, every finding fixed and verified, fixed by an approved fix wave, or reported with evidence and a pending decision, and every relevant check passing or its failure attributed.
FAQ
What does the fresh-eyes-sweep skill do?
Audit an entire repository with fresh eyes for correctness errors, bugs, omissions, duplication, inconsistencies, stale, duplicate, or tautological tests, stale comments, and other mistakes supported by evidence. Fix every safe issue and verify the result.
How do I install fresh-eyes-sweep?
Run npx skills add https://github.com/paulrberg/agent-skills --skill fresh-eyes-sweep in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/fresh-eyes-sweep/ (personal) or .claude/skills/fresh-eyes-sweep/ (project).
Which AI agents can use fresh-eyes-sweep?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is fresh-eyes-sweep safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains fresh-eyes-sweep?
It is published by paulrberg in paulrberg/agent-skills. It has 66 recorded installs.
More from paulrberg/agent-skills
effect-ts
paulrberg/agent-skills
Use for nontrivial Effect 4 work including services/layers, typed errors, Schema/JsonSchema, Config, runtime/concurrency, @effect/vitest, effect/ai and @effect/ai-, effect/sql and @effect/sql-, Effect Atom (@effect/atom-), or @prb/effect-next.
tailwind-css
paulrberg/agent-skills
Use for Tailwind v4 styling: add/fix classes, configure or migrate Tailwind, use tailwind-variants, or tw-animate-css.
cli-gh
paulrberg/agent-skills
Use for GitHub CLI automation: repository reads, workflow runs, search, codespaces, releases, configuration, or gh command syntax. Use yeet for contribution writes to PRs, issues, comments, or discussions.
code-polish
paulrberg/agent-skills
Polish changed code when the user explicitly asks, or when an active workflow requests post-implementation simplification and risk-profiled review over a fixed file scope.
yeet
paulrberg/agent-skills
Use for GitHub PR/issue/discussion workflows: create/update PRs, issues, or discussions and post issue or discussion comments; triggers include yeet.
bump-release
paulrberg/agent-skills
Cut a release: bump versions, write changelogs, commit, tag.
Popular ai & agents skills
google-agents-cli-publish
google/agents-cli
This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini", "publish to Gemini" (formerly Gemini Enterprise), or needs guidance on the agents-cli publish gemini command. Also use when the user wants to "manage agents in Agent Registry", "list/update/delete registered agents", or "register an MCP server". Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, Agent Registry fleet management, and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment (use google-agents-cli-deploy).
google-agents-cli-eval
google/agents-cli
This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).
skill-creator
anthropics/skills
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
codex-pet
prime-skills/runcomfy-agent-skills
Codex Pet generator on RunComfy. Build a Codex-compatible Codex Pet spritesheet.webp + pet.json from a single reference image, drop it into ${CODEXHOME:-$HOME/.codex}/pets/ / and Codex picks it up as a custom Codex Pet next to the 8 built-ins. This skill produces the exact Codex Pet atlas Codex expects (1536x1872 PNG/WebP, 8 cols x 9 rows, 192x208 cells, 9 animation states — idle, running-right, running-left, waving, jumping, failed, waiting, running, review). Calls OpenAI GPT Image 2 edit ONCE via the local RunComfy CLI as runcomfy run openai/gpt-image-2/edit to produce a canonical Codex Pet pose, then assembles all 9 animation rows programmatically with ImageMagick micro-transforms — no Codex Pro, no $imagegen, no OPENAIAPIKEY required, only RUNCOMFYTOKEN. Triggers on "codex pet", "create codex pet", "make codex pet", "hatch codex pet", "/hatch image", "desktop pet codex", "codex pets", "spritesheet.webp", or any explicit ask to build a custom pet for OpenAI Codex.
full-output-enforcement
leonxlnx/taste-skill
Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.
executing-plans
obra/superpowers
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available