rlpatrao/claude_harness_forge/lint-drift
Claude Code and agent skill by rlpatrao/claude_harness_forge
- community
Checking that the SKILL.md file is still in the repository.
Scan codebase for pattern drift and generate targeted cleanup PRs. Entropy control for agent-generated code.
Install
npx vskill@latest install rlpatrao/claude_harness_forge/lint-driftSKILL.md
The same SKILL.md was published earlier as rlpatrao/claude_harness_forge/lint-drift.
/lint-drift — Entropy Scanner
Inspired by OpenAI's "garbage collection" pattern: as agents replicate code, patterns drift. This skill scans for deviations from golden principles and generates targeted refactoring PRs.
Usage
What It Scans For
1. Duplicate Logic
- Grep for similar function bodies across files
- Flag when 3+ files have near-identical patterns
- Recommend extracting to shared utility
2. Inconsistent Naming
- Check function/class naming follows conventions from code-gen/SKILL.md
- Flag mixed camelCase/snake_case within same language
- Flag inconsistent error class naming
3. Layer Violations (beyond imports)
- Service functions that directly access env vars (should go through config)
- API handlers with business logic (should be in service layer)
- Repository functions with HTTP calls (should be in service)
4. Dead Code
- Functions never called (grep for references)
- Imports never used
- Files not imported by anything
- Config values not referenced
5. Test Quality Drift
- Tests that only assert truthiness (assert result) without checking values
- Tests with no assertions
- Test files with no test functions
- Mocked business logic (should only mock boundaries)
6. Golden Principle Violations
- Files > 200 lines (warn) or > 300 lines (flag)
- Functions > 50 lines
- Missing type annotations
- Bare except/catch blocks
- Hardcoded values that should be config
Steps
- Read
.claude/skills/code-gen/SKILL.mdfor golden principles - Read
.claude/state/learned-rules.mdfor project-specific rules - Scan source directories for each category above
- Generate report to
specs/reviews/drift-report.md:
- Category, file:line, description, suggested fix
- Severity: CLEANUP (auto-fixable), REFACTOR (needs thought), DEBT (track)
- If
--auto-fix: generate targeted commits for CLEANUP items - For REFACTOR items: create GitHub issues or add to backlog
When to Run
- After every 5 iterations of /auto (automatic)
- Before creating a PR
- When learned-rules.md grows past 10 rules (pattern accumulation signal)
- Weekly maintenance
Gotchas
- Don't refactor code you're not working on (scope creep)
- Don't flag pre-existing issues — only scan files changed since last scan
- CLEANUP fixes must pass the full ratchet gate before merging
- Never delete "unused" code without grepping for dynamic references
Duplication check (jscpd)
Entropy control includes a copy-paste ratchet. Run:
node .claude/scripts/jscpd-gate.js
It runs jscpd over the project's source dirs, compares the duplicated-line percentage against state/duplication-baseline.txt (never regress; absolute cap 10%), and ratchets the baseline down on improvement. If jscpd/npx is unavailable it exits 0 with NOT_RUN (never a false pass). On regression (exit 2), extract the duplicated block into a shared helper — do not suppress the finding.
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
- SKILL.md in the repositoryCheckingskills/lint-drift/SKILL.md
Popularity
- Repository stars
- 4
- Repository forks
- 1
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. 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
[](https://verified-skill.com/skills/rlpatrao/claude_harness_forge/lint-drift)