From repo-structure
This skill should be used when the user asks to "calculate quality score", "audit repository quality", "check repo health", "score documentation", "measure code quality", or needs quantitative assessment of repository quality across documentation, security, CI/CD, and community standards.
How this skill is triggered — by the user, by Claude, or both
Slash command
/repo-structure:quality-scoringThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Quantitative assessment engine for repository quality with weighted scoring across four categories: Documentation, Security, CI/CD, and Community.
Quantitative assessment engine for repository quality with weighted scoring across four categories: Documentation, Security, CI/CD, and Community.
Provides objective, repeatable quality measurement with:
README Completeness (12 pts):
API Documentation (5 pts):
Additional Docs (5 pts):
Inline Documentation (3 pts):
Security Policy (8 pts):
Dependency Management (8 pts):
Code Scanning (6 pts):
Best Practices (3 pts):
Automated Testing (10 pts):
Continuous Integration (8 pts):
Code Quality (4 pts):
Deployment (3 pts):
License (6 pts):
Contribution Process (8 pts):
Community Health (6 pts):
Documentation Quality (5 pts):
Main scoring engine: scripts/calculate-score.py
Usage:
cd /path/to/project
python3 $CLAUDE_PLUGIN_ROOT/skills/quality-scoring/scripts/calculate-score.py
Output format (JSON):
{
"score": 82,
"max_score": 100,
"grade": "Excellent",
"timestamp": "2024-02-09T10:30:00Z",
"git_commit_sha": "abc123def456",
"categories": {
"documentation": {
"score": 22,
"max": 25,
"percentage": 88,
"breakdown": {
"readme_completeness": 11,
"api_documentation": 4,
"additional_docs": 5,
"inline_documentation": 2
},
"issues": [
{
"severity": "warning",
"message": "Missing architecture documentation",
"impact": -1,
"recommendation": "Add docs/architecture.md with system design"
}
]
},
"security": {
"score": 18,
"max": 25,
"percentage": 72,
"breakdown": {
"security_policy": 8,
"dependency_management": 5,
"code_scanning": 3,
"best_practices": 2
},
"issues": [
{
"severity": "critical",
"message": "CodeQL not configured",
"impact": -3,
"recommendation": "Add .github/workflows/codeql.yml"
},
{
"severity": "warning",
"message": "Dependabot not enabled",
"impact": -3,
"recommendation": "Add .github/dependabot.yml"
}
]
},
"ci_cd": {
"score": 25,
"max": 25,
"percentage": 100,
"breakdown": {
"automated_testing": 10,
"continuous_integration": 8,
"code_quality": 4,
"deployment": 3
},
"issues": []
},
"community": {
"score": 17,
"max": 25,
"percentage": 68,
"breakdown": {
"license": 6,
"contribution_process": 5,
"community_health": 3,
"documentation_quality": 3
},
"issues": [
{
"severity": "warning",
"message": "CODE_OF_CONDUCT missing",
"impact": -3,
"recommendation": "Add CODE_OF_CONDUCT.md using Contributor Covenant 2.1"
},
{
"severity": "info",
"message": "Issue/PR templates not found",
"impact": -2,
"recommendation": "Add .github/ISSUE_TEMPLATE/ and PULL_REQUEST_TEMPLATE.md"
}
]
}
},
"recommendations": [
{
"priority": "high",
"category": "security",
"action": "Enable CodeQL code scanning",
"impact": "+3 pts",
"effort": "low"
},
{
"priority": "medium",
"category": "community",
"action": "Add CODE_OF_CONDUCT.md",
"impact": "+3 pts",
"effort": "low"
},
{
"priority": "low",
"category": "security",
"action": "Configure Dependabot",
"impact": "+3 pts",
"effort": "low"
}
]
}
| Score | Grade | Emoji | Meaning |
|---|---|---|---|
| 95-100 | Outstanding | ⭐ | Production-ready, exemplary quality |
| 85-94 | Excellent | ✅ | Minor polish opportunities |
| 70-84 | Good | ⚠️ | Some areas need attention |
| 50-69 | Poor | 🔶 | Significant improvements needed |
| 0-49 | Critical | 🚨 | Immediate action required |
Customize category weights in config:
scoring:
weights:
documentation: 20 # Reduced from 25
security: 35 # Increased from 25 (security-critical project)
ci_cd: 25 # Default
community: 20 # Reduced from 25
Validation: Weights must sum to 100.
Track quality evolution in .repo-quality-history.json:
{
"project": "my-project",
"history": [
{
"timestamp": "2024-02-01T10:00:00Z",
"score": 45,
"git_commit_sha": "abc123",
"triggered_by": "manual-audit",
"categories": {...}
},
{
"timestamp": "2024-02-09T11:00:00Z",
"score": 82,
"git_commit_sha": "def456",
"triggered_by": "post-setup",
"improvement": "+37 pts",
"categories": {...}
}
],
"trend": {
"direction": "improving",
"velocity": "+5.3 pts/week"
}
}
Analysis:
Award partial points for incomplete items:
Example: README completeness (12 pts total)
Title present: +2 pts
Description present: +2 pts
Installation missing: +0 pts (partial: 50% = +1 pt if incomplete)
Usage present: +3 pts
Contributing link: +2 pts
License badge: +1 pt
Prerequisites: +1 pt
Contact info missing: +0 pts
---
Actual score: 11/12 (partial credit: 1 pt from incomplete installation)
Incomplete criteria:
Component validation: scripts/validate-component.sh
# Validate specific components
bash validate-component.sh --check readme
bash validate-component.sh --check license
bash validate-component.sh --check ci
# All validations
bash validate-component.sh --check all
Enhance scoring with GitHub API data:
Community health score:
gh api repos/{owner}/{repo}/community/profile
Returns:
{
"health_percentage": 85,
"files": {
"readme": {"html_url": "..."},
"contributing": {"html_url": "..."},
"license": {"html_url": "..."},
"code_of_conduct": null
}
}
Issue response time:
gh api repos/{owner}/{repo}/issues --jq '
[.[] | select(.created_at > (now - 7*86400)) |
select(.comments > 0)] | length'
Map score to compliance requirements:
OpenSSF Best Practices:
CII Best Practices:
See: references/compliance-mapping.md
references/scoring-rubrics.md - Detailed scoring criteriareferences/compliance-mapping.md - Framework requirement mappingreferences/partial-credit-rules.md - Partial credit guidelinesscripts/calculate-score.py - Main scoring enginescripts/validate-component.sh - Component validationscripts/analyze-history.py - Historical trend analysisexamples/score-output.json - Sample scoring outputexamples/history-analysis.json - Trend analysis exampleThis skill integrates with:
Scoring is used by structure-architect agent for gap analysis and improvement prioritization.
npx claudepluginhub nsalvacao/nsalvacao-claude-code-plugins --plugin repo-structureRuns Agent-Ready Codebase Assessment scoring codebase across 8 dimensions with parallel agents, producing weighted 0-100 score, band rating, and improvement roadmap. Supports Ruby, Python, PHP, TypeScript, JavaScript, Go, Java, Scala, Rust.
Runs a repository engineering audit with SARIF-compatible evidence, 4-level confidence scoring, and OpenSSF-style health evaluation. Use when assessing code quality or repository health.
Generates one-time or comparative code quality scorecards with evidence-backed ratings across correctness, maintainability, and structure. Supports baseline, compare, review, and action queue modes.