xiaohongshu
xiaohongshu
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.
Full skill instructions
A proactive health checker that monitors code quality and enforces strict standards.
| Metric | Target | Critical Threshold |
|---|---|---|
| Test Coverage | >= 80% | >= 70% |
| Type Coverage | 100% public APIs | >= 90% |
| Cyclomatic Complexity | <= 10 | <= 15 |
| Function Length | <= 50 lines | <= 100 lines |
| File Length | <= 500 lines | <= 800 lines |
| Metric | Target | Critical Threshold |
|---|---|---|
| Type Safety | No any | < 5 any uses |
| Test Coverage | >= 75% | >= 60% |
| Component Size | <= 200 lines | <= 300 lines |
| Hook Complexity | <= 5 dependencies | <= 8 dependencies |
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"
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
cd /home/user/Autonomous-Assignment-Program-Manager/frontend
npm run type-check && \
npm run lint && \
npm test -- --coverage --watchAll=false
echo "Frontend health: PASS"
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"
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"
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.
When quality issues are detected, the automated-code-fixer skill can be triggered to automatically resolve:
lint-monorepo/run-tests - Full test suite/lint-fix - Auto-fix linting/health-check - System health/check-compliance - ACGME validationCode 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
## 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
Escalate to human when:
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience