Skip to content
code-quality-monitor logo

Code Quality Monitor

code-quality-monitor

Proactive code health monitoring and quality gate enforcement. Use when validating code changes, reviewing PRs, or ensuring code meets quality standards before merging.

mattnigh/skills_collection0installs24stars

SKILL.md

Full skill instructions

Code Quality Monitor

A proactive health checker that monitors code quality and enforces strict standards.

When This Skill Activates

  • Before committing changes
  • During PR reviews
  • When validating code health
  • After making multiple edits
  • When user asks about code quality

Quality Standards

Python Backend Standards

MetricTargetCritical Threshold
Test Coverage>= 80%>= 70%
Type Coverage100% public APIs>= 90%
Cyclomatic Complexity<= 10<= 15
Function Length<= 50 lines<= 100 lines
File Length<= 500 lines<= 800 lines

TypeScript Frontend Standards

MetricTargetCritical Threshold
Type SafetyNo any< 5 any uses
Test Coverage>= 75%>= 60%
Component Size<= 200 lines<= 300 lines
Hook Complexity<= 5 dependencies<= 8 dependencies

Health Check Commands

Quick Health Check

cd /​home/​user/​Autonomous-Assignment-Program-Manager/​backend

# Run all quality checks
pytest --tb=no -q && \
ruff check app/ tests/ && \
black --check app/ tests/ && \
mypy app/ --python-version 3.11 --no-error-summary

echo "Backend health: PASS"

Comprehensive Health Check

cd /​home/​user/​Autonomous-Assignment-Program-Manager/​backend

# Coverage report
pytest --cov=app --cov-report=term-missing --cov-fail-under=70

# Complexity analysis
radon cc app/ -a -s

# Security scan
bandit -r app/ -ll

# Dependency check
pip-audit

Frontend Health Check

cd /​home/​user/​Autonomous-Assignment-Program-Manager/​frontend

npm run type-check && \
npm run lint && \
npm test -- --coverage --watchAll=false

echo "Frontend health: PASS"

Quality Gate Rules

Gate 1: Must Pass (Blocking)

  • All tests pass
  • No linting errors
  • No type errors
  • No critical security issues

Gate 2: Should Pass (Warning)

  • Coverage >= 70%
  • No new complexity issues
  • Documentation updated
  • No TODOs without tickets

Gate 3: Nice to Have (Info)

  • Coverage >= 80%
  • All functions documented
  • No magic numbers
  • Consistent naming

Monitoring Workflow

Pre-Commit Check

Before committing, validate:

#!/​bin/​bash
set -e

echo "Running pre-commit checks..."

# Format
black app/ tests/

# Lint
ruff check app/ tests/ --fix

# Type check
mypy app/ --python-version 3.11

# Quick tests
pytest --tb=no -q --lf

echo "Pre-commit checks: PASS"

PR Validation Check

For pull request reviews:

#!/​bin/​bash
set -e

echo "Running PR validation..."

# Full test suite with coverage
pytest --cov=app --cov-report=term-missing

# Security scan
bandit -r app/ -ll

# Check for common issues
ruff check app/ tests/

# Type coverage
mypy app/ --python-version 3.11

echo "PR validation: PASS"

Red Flags to Watch For

Immediate Action Required

  1. Test coverage dropped below 70%
  2. New security vulnerability detected
  3. Type errors in public APIs
  4. Breaking changes without migration

Needs Attention

  1. Coverage trending down
  2. Increasing complexity metrics
  3. Growing file sizes
  4. Missing docstrings on new functions

Nice to Address

  1. Minor style inconsistencies
  2. Optimization opportunities
  3. Documentation gaps
  4. Technical debt

Integration Points

With lint-monorepo (Primary Linting)

For all linting operations, delegate to the lint-monorepo skill:

Quality gate check needed
    → Invoke lint-monorepo skill
    → lint-monorepo runs auto-fix workflow
    → Returns pass/​fail with details

Linting workflow:

# lint-monorepo handles both Python and TypeScript
# See .claude/​skills/​lint-monorepo/ for details

# Quick lint check
cd /​home/​user/​Autonomous-Assignment-Program-Manager/​backend
ruff check app/ tests/

cd /​home/​user/​Autonomous-Assignment-Program-Manager/​frontend
npm run lint

For persistent lint errors: Use lint-monorepo root-cause analysis workflow.

With automated-code-fixer

When quality issues are detected, the automated-code-fixer skill can be triggered to automatically resolve:

  • Linting issues (auto-fixable) - coordinates with lint-monorepo
  • Formatting issues
  • Simple type annotation additions
  • Import organization

With Existing Commands

  • /​run-tests - Full test suite
  • /​lint-fix - Auto-fix linting
  • /​health-check - System health
  • /​check-compliance - ACGME validation

Reporting Format

Quick Status

Code Health: GREEN/​YELLOW/​RED

Tests: 156 passed, 0 failed
Coverage: 78.2% (target: 80%)
Linting: 0 errors, 3 warnings
Types: 100% coverage
Security: No issues

Detailed Report

## Code Quality Report

### Test Results
- Total: 156 tests
- Passed: 156
- Failed: 0
- Skipped: 2

### Coverage Analysis
- Current: 78.2%
- Target: 80.0%
- Delta: -1.8%
- Uncovered: app/​services/​new_feature.py (lines 45-67)

### Linting
- Errors: 0
- Warnings: 3
  - W291: trailing whitespace (3 occurrences)

### Type Safety
- Checked files: 147
- Errors: 0
- Coverage: 100%

### Security
- Critical: 0
- High: 0
- Medium: 0
- Low: 0

### Recommendations
1. Add tests for app/​services/​new_feature.py
2. Remove trailing whitespace
3. Consider splitting large function in resilience.py

Escalation Rules

Escalate to human when:

  1. Coverage drops below 60%
  2. Critical security issue found
  3. Multiple interdependent failures
  4. Unclear how to improve metrics
  5. Architectural concerns detected

More skills from mattnigh

spring-framework-patterns logo
mattnigh/skills_collection

spring-framework-patterns

Comprehensive Spring Framework and Spring Boot best practices including dependency injection patterns, bean lifecycle and scopes, REST API development, Spring Data JPA, service layer design, Spring Security, testing strategies, caching, AOP, async processing, error handling, and common anti-patte...

24 0
View

TypeScript厳格モードによる型安全性設計を専門とするスキル。 📖 参照書籍: - 『Effective TypeScript』(Dan Vanderkam): 型設計 📚 リソース参照: - `resources/Level1_basics.md`: レベル1の基礎ガイド - `resources/Level2_intermediate.md`: レベル2の実務ガイド - `resources/Level3_advanced.md`: レベル3の応用ガイド - `resources/Level4_expert.md`: レベル4の専門ガイド - `resources/di...

24 0
View
deploying-cloud-k8s logo
mattnigh/skills_collection

deploying-cloud-k8s

Deploys applications to cloud Kubernetes (AKS/GKE/DOKS) with CI/CD pipelines. Use when deploying to production, setting up GitHub Actions, troubleshooting deployments. Covers build-time vs runtime vars, architecture matching, and battle-tested debugging.

24 0
View
moai-alfred-agent-guide logo
mattnigh/skills_collection

moai-alfred-agent-guide

19-agent team structure, decision trees for agent selection, Haiku vs Sonnet model selection, and agent collaboration principles. Use when deciding which sub-agent to invoke, understanding team responsibilities, or learning multi-agent orchestration.

24 0
View
mermaid-diagram-generator logo
mattnigh/skills_collection

mermaid-diagram-generator

Converts architecture descriptions, module specs, or workflow docs into Mermaid diagrams. Use when visualizing brick module relationships, workflows (DDD, investigation), or system architecture. Supports: flowcharts, sequence diagrams, class diagrams, state machines, entity relationship diagrams,...

24 0
View
pre-flight-check logo
mattnigh/skills_collection

pre-flight-check

INVOKE FIRST before any code work. Validates git workflow (branch, issue, worklog) and checks approach. Use at START of every task and END before completing. Prevents skipped steps.

24 0
View
browser-dev-tools logo
mattnigh/skills_collection

browser-dev-tools

This skill should be used when working with browser-rendered artifacts (i.e. Bun, React/React Native) to proactively validate that development work on localhost is being built appropriately and to support debugging browser-rendered content. Use this skill after making frontend changes to verify t...

24 0
View
lead-dev logo
mattnigh/skills_collection

lead-dev

Lead Développeur - Coordination technique opérationnelle, code review, mentoring et livraison. Pair de web-dev-process au niveau OPÉRATIONS.

24 0
View
worker-monitor logo
mattnigh/skills_collection

worker-monitor

Monitor Docker workers, RQ queue health, and auto-scale workers (max 4). Use when: checking job progress, monitoring queue depth, scaling workers up/down, diagnosing slow processing, or waiting for jobs to complete. Referenced by data-quality skill during reprocessing.

24 0
View
quality-advisor logo
mattnigh/skills_collection

quality-advisor

Proactive quality guidance system that monitors artifact creation and provides real-time feedback on documentation quality

24 0
View
bump-version logo
mattnigh/skills_collection

bump-version

This skill should be used when the user wants to bump the version number in the workspace. It updates versions across all pyproject.toml files (root, tde, and tda packages) and the CHANGELOG.md to keep them synchronized.

24 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View