
upkeep-quality
by llbbl
A collection of Claude Code skills backed by a Bun CLI tool for maintaining JavaScript and TypeScript repositories.
SKILL.md
name: upkeep-quality version: 0.1.3 description: Generate and improve code quality scores for JS/TS projects allowed-tools: Bash, Read, Grep, Glob, Edit
/upkeep-quality
Generate comprehensive quality reports and actionable improvement recommendations.
Overview
This skill helps you:
- Assess overall project health with a quality score
- Understand which areas need improvement
- Get specific, actionable recommendations
- Track quality improvements over time
Git Workflow Defaults
IMPORTANT: Always follow these defaults unless the user explicitly requests otherwise:
-
Work in a branch - Never commit directly to main. Create a feature branch:
git checkout -b chore/improve-quality -
Create a PR - After committing improvements, create a pull request:
gh pr create --title "chore: improve code quality" --body "## Summary - Improved quality score from X to Y (grade: Z) ## Changes [list improvements made] ## Quality Report [include before/after metrics]" -
No attribution - Do NOT include any of these in commits or PRs:
Co-Authored-By: Claudeor any Claude attribution🤖 Generated with Claude Codeor similar footers- Any AI/assistant attribution or emoji markers
Prerequisites
./bin/upkeepbinary must be available in this skill's directory
Quality Metrics
The quality score is calculated from 6 weighted metrics:
| Metric | Weight | What It Measures |
|---|---|---|
| Dependency Freshness | 20% | % of dependencies up-to-date |
| Security | 25% | Absence of vulnerabilities |
| Test Coverage | 20% | Code coverage percentage |
| TypeScript Strictness | 10% | Strict compiler options enabled |
| Linting Setup | 10% | Linter configuration quality |
| Dead Code | 15% | Unused code detection setup |
Grade Scale
| Grade | Score Range | Meaning |
|---|---|---|
| A | 90-100 | Excellent - well maintained |
| B | 80-89 | Good - minor improvements needed |
| C | 70-79 | Fair - some attention required |
| D | 60-69 | Poor - significant improvements needed |
| F | 0-59 | Failing - major issues present |
Workflow
Step 1: Generate Quality Report
./bin/upkeep quality --json
This returns:
- Overall score (0-100)
- Letter grade (A-F)
- Breakdown of each metric
- Prioritized recommendations
Step 2: Present the Report
Show the user:
- Overall grade and score
- Each metric's contribution
- Which areas are dragging down the score
Step 3: Explain Each Metric
For metrics scoring below 70, explain:
- Why it scored low
- What the impact is
- How to improve it
Step 4: Offer to Fix Issues
Many issues can be fixed automatically:
Dependency Freshness:
- Use
/upkeep-depsskill to update packages
Security:
- Use
/upkeep-auditskill to fix vulnerabilities
TypeScript Strictness:
- Edit tsconfig.json to enable strict flags
- Run type checker to find new errors
- Fix type errors
Linting Setup:
- Add Biome or ESLint configuration
- Run linter with --fix
Test Coverage:
- Identify uncovered files
- Help write tests for critical paths
Example Session
User: "How healthy is my project?"
- Run
./bin/upkeep quality --json - Present the grade and score prominently
- Show the breakdown chart
- Highlight areas needing attention
- Present recommendations in priority order
- Offer to help fix specific issues
Improving Specific Metrics
Dependency Freshness (Target: 90+)
# Check outdated packages
./bin/upkeep deps --json
# Update all patch versions (usually safe)
<pm> update
Security (Target: 100)
# Find vulnerabilities
./bin/upkeep audit --json
# Fix what's available
<pm> audit fix # npm
Test Coverage (Target: 80+)
- Check current coverage: Look for
coverage/directory - Run tests with coverage:
<pm> test --coverage - Identify uncovered files
- Prioritize testing critical paths (API, auth, data handling)
TypeScript Strictness (Target: 100)
Add to tsconfig.json:
{
"compilerOptions": {
"strict": true,
"noUncheckedIndexedAccess": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"exactOptionalPropertyTypes": true,
"noImplicitOverride": true
}
}
Then fix resulting type errors.
Linting Setup (Target: 100)
For a new project, recommend Biome:
bunx @biomejs/biome init
For existing ESLint projects, ensure Prettier is configured too.
Dead Code (Target: 75+)
Enable TypeScript dead code detection:
{
"compilerOptions": {
"noUnusedLocals": true,
"noUnusedParameters": true
}
}
Consider adding knip or ts-prune for advanced detection.
Commands Reference
| Command | Purpose |
|---|---|
./bin/upkeep quality | Generate quality report |
./bin/upkeep detect | Check project configuration |
./bin/upkeep deps | Dependency freshness details |
./bin/upkeep audit | Security details |
Tracking Progress
After making improvements:
- Re-run
./bin/upkeep quality --json - Compare new score to previous
- Celebrate improvements!
- Plan next improvements if needed
Common Improvement Paths
F → D (Quick wins):
- Fix critical/high vulnerabilities
- Update patch-level dependencies
D → C (Foundation):
- Add linting configuration
- Enable basic TypeScript strict mode
C → B (Solid):
- Achieve 60%+ test coverage
- Fix all high/moderate vulnerabilities
- Enable all TypeScript strict flags
B → A (Excellence):
- 80%+ test coverage
- All dependencies up-to-date
- No vulnerabilities
- Full TypeScript strictness
スコア
総合スコア
リポジトリの品質指標に基づく評価
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
3ヶ月以内に更新がある
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
レビュー
レビュー機能は近日公開予定です