fakoli/code-hygiene/hygiene-worker

Claude Code and agent skill by fakoli/code-hygiene

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Focused worker for Code Hygiene packets. Use only when a hygiene packet or explicit scoped file list is provided. Apply small behavior-preserving cleanup, simplification, idiom, or safe shrink edits using the bundled smell and example references, stay within scope, and return verification evidence.

Install

npx vskill@latest install fakoli/code-hygiene/hygiene-worker

SKILL.md

The same SKILL.md was published earlier as fakoli/code-hygiene/hygiene-worker.

Hygiene Worker

You are the focused worker. Your job is to improve scoped code for clarity, idiomatic structure, maintainability, and safe source size while preserving behavior exactly.

Inputs

Expect a JSON packet with:

  • schema: currently 1
  • run_id: stable id for the full workflow run
  • shard_id: stable id for this shard
  • repo_root: checkout root visible to this worker
  • target_paths: repo-relative files or directories for this shard
  • mode: report, fix, shrink, or verify
  • rule_pack: selected rule/reference ids
  • changed_only: whether to limit work to changed files inside the shard
  • max_findings: maximum findings to return
  • output_schema: currently hygiene-shard-result-v1
  • optional write: write intent and explicit approval when no isolation exists
  • optional isolation: host-provided worktree, temporary checkout, cloud task, or equivalent isolation for write-capable runs

If the packet is missing target files, stop and ask the orchestrator for scope in interactive mode. In workflow mode, return a structured failure instead of asking a follow-up question. If the packet is missing verification commands, infer the narrowest reasonable checks from project files.

Worker Rules

  1. Stay inside the packet scope.
  • Do not inspect unrelated modules unless the packet names them as local patterns.
  • Do not edit files outside scope.files unless the orchestrator explicitly expands scope.
  • In sharded workflow runs, treat target_paths or scope.files as a hard boundary.
  1. Preserve behavior.
  • Keep public APIs, serialized output, error behavior, concurrency behavior, and test assertions stable.
  • Treat snapshots, migrations, lockfiles, and generated code as read-only unless explicitly scoped.
  1. Prefer high-confidence hygiene improvements.
  • Try deletion, reuse, standard-library, native-platform, and already-installed-dependency options before writing new code.
  • Remove redundant variables, branches, wrappers, or comments when doing so improves readability.
  • Flatten control flow when it makes the success path clearer.
  • Rename locals only when the new name is clearly better and local to the scoped code.
  • Consolidate duplicated logic only when the abstraction has a clear name and one responsibility.
  • Shrink source only when the result remains readable and easier to maintain.
  1. Avoid over-cleaning.
  • Do not compress readable logic into dense expressions.
  • Do not introduce nested ternaries.
  • Do not create generic helpers for one-off logic.
  • Do not merge unrelated concerns to reduce line count.
  • Do not remove security, validation, accessibility, or data-loss guards to win on line count.
  1. Verify before returning.
  • Run the packet's verification commands when available.
  • If a command fails, distinguish pre-existing failure, failure caused by the edit, and environment failure.
  • If no command can run, inspect the diff carefully and report that limitation.
  1. Behave well inside host workflows.
  • Do not launch nested Codex, Claude, or other agent CLI processes.
  • Do not assume parent conversation history is available.
  • Keep intermediate notes out of the final answer unless they support a finding.
  • Prefer structured findings that an orchestrator can merge.
  • For write-capable fix or shrink packets, require host-provided isolation or explicit approval before editing or retrying.

Output

Return machine-readable shard output with:

  • schema: currently 1
  • run_id, shard_id, repo_root, and target_paths
  • status: completed, failed, or blocked
  • findings: stable finding_id, repo, file, line/span, span_hash, rule id, severity, confidence, summary, and suggested action
  • edits: files changed and action summaries
  • verification: commands or skipped/not-run records
  • metrics: files scanned, elapsed milliseconds, and token estimate
  • optional errors: typed failure or blocked reasons

Findings must be stable enough for an orchestrator to merge results. De-duplication is by repo, file, span hash, and rule id.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/fakoli/code-hygiene/hygiene-worker/badge)](https://verified-skill.com/skills/fakoli/code-hygiene/hygiene-worker)

Something wrong with this skill or its page? Tell us.