cleanup

Remove dead code from Odoo addons and run pre-commit checks before QA.

1|Updated Feb 28, 2026
One-click install
npx skills add https://github.com/glwr/ai-coding-base --skill cleanup-glwr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cleanup
Source: https://github.com/glwr/ai-coding-base/tree/main/odoo/.claude/skills/cleanup
Command: npx skills add https://github.com/glwr/ai-coding-base --skill cleanup-glwr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Remove dead code and ensure pre-commit hooks pass before QA.

Core Features & Use Cases

  • Scope identification by diffing the feature branch to locate added or unused code
  • Automatic dead-code cleanup and pre-commit fixes
  • Structured QA handoff with clean, reportable results

Quick Start

Run the cleanup skill on the target module to remove dead code and ensure pre-commit checks pass.

Frequently Asked Questions about cleanup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I remove dead code from an Odoo addon before QA?

Dead code removal in Odoo addons is handled by diffing the feature branch to locate unused Python and XML code, applying automated ruff fixes, and running dynamic reference checks before QA handoff.

What is the best way to ensure pre-commit checks pass for Python and XML changes?

Ensuring pre-commit checks pass involves running automated fixes for cleanup, executing dynamic reference checks, and twice-running pre-commit hooks with guardrails to guarantee clean, reportable results.

Does this automated cleanup approach work with ruff for dead-code elimination?

Yes, automated cleanup integrates ruff to apply dead-code elimination and pre-commit fixes, utilizing scope diffs and dynamic reference checks to safely target unused code in Odoo addons.

How do I scope dead code identification to a specific feature branch?

Scoping dead code identification to a feature branch uses scope diffs to locate added or unused Python and XML code, applying guardrails and automated fixes only to the modified module.

Why does pre-commit fail after automated dead-code cleanup in Odoo modules?

Pre-commit failures after dead-code cleanup can occur if dynamic reference checks miss residual dependencies, which is why the process twice-runs pre-commit and applies guardrails before QA handoff.

Do I need a specific environment setup to run Odoo pre-commit and ruff cleanup?

Running Odoo pre-commit and ruff cleanup requires a /odoo-dev to /qa workflow environment, where the addon source is available for scope diffing and dynamic reference checking.