weekly-quality-audit

Detects and repays one unit of code quality debt weekly beyond ESLint and tsc coverage.

Updated Jul 1, 2025
One-click install
npx skills add https://github.com/mosakuzii0216/mosaku-v1 --skill weekly-quality-audit-mosakuzii0216
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: weekly-quality-audit
Source: https://github.com/mosakuzii0216/mosaku-v1/tree/main/.claude/skills/weekly-quality-audit
Command: npx skills add https://github.com/mosakuzii0216/mosaku-v1 --skill weekly-quality-audit-mosakuzii0216

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Linters and type checkers already force unused imports, any, and unsafe calls to zero, so the remaining quality debt—missing tests, oversized files, duplicated logic, stale comments—requires human judgment and tends to accumulate unnoticed. This Skill audits exactly that blind spot once a week and repays one small, safe unit of debt. ## Core Features & Use Cases - Mechanical candidate detection: Shell scripts enumerate untested implementation files, files over 300 lines, duplicated logic lines, WHAT-style comments, magic numbers, and an avoid-list of recently touched files. - Strictly scoped repayment: Changes are limited to 1-3 files, behavior-preserving moves only, with mandatory test runs and a structured report including uncovered public methods. - Unattended mode: A scheduled agent can run the full audit autonomously, producing a branch, commit, and PR whose body is forwarded to Slack via GitHub Actions. - Use Case: Every Friday, the skill finds that theme.service.ts has no tests, adds tests for its public methods, runs the affected test suite, and opens a PR with a full audit report. ## Quick Start Run the weekly quality audit on this repository and report the top candidate for debt repayment.

Frequently Asked Questions about weekly-quality-audit

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

FAQPage Schema
How do I find code quality issues that ESLint cannot detect?

Run the find-candidates.sh script, which lists untested implementation files sorted by line count, files over 300 lines, duplicated logic lines across files, WHAT-style comments, and magic numbers. These are the debt categories that require human judgment rather than mechanical linting.

How to run only the tests affected by changed files?

Use run-affected-tests.sh with the changed file paths as arguments. It locates each file's nearest package.json workspace and passes test name patterns as positional arguments, which works with both jest and vitest.

Why does --testPathPattern fail with vitest?

Vitest 4 does not recognize the --testPathPattern flag and exits immediately with a CACError: Unknown option. Both jest and vitest accept test path filtering via positional arguments, so the script uses those instead.

Can this skill run unattended on a schedule?

Yes, an unattended mode supports scheduled cloud agents. It picks the top candidate without asking, creates a dated branch and PR with the full report in the body, and never pushes to main or creates follow-up schedules.

What are the limits on changes made during an audit?

Changes must stay within 1-3 files, pure refactoring is capped at plus or minus 50 lines, and file splits at 150 lines of moved code. Logic changes, bug fixes, and feature additions are forbidden; suspected bugs are only recorded in the report.