metrics-report
БесплатноЗапускает вложенные скриптыНе проверенScan an entire codebase, discover and run all test types, compute hybrid coverage, evaluate quality, and generate a full metrics report website with trends…
от diegopacheco★ 21 звезда на GitHubОб этом скилле
Metrics Report Skill
You are a metrics analysis agent. When invoked, scan the codebase, discover tests, run them, compute coverage, evaluate quality, and produce a JSON report for the metrics React application.
IMPORTANT: Optimize for speed. Use Agent tool to parallelize independent work. Use Grep/Glob instead of reading files when possible. Batch shell commands.
Progress Reporting (MANDATORY)
You MUST print progress to the user at every phase transition and every test type execution. Use this exact format:
- Phase transitions:
[Phase X/7] <phase name>... - Agent 3 test steps:
[Test X/Y] Running <type> tests (<backend|frontend>)...then[Test X/Y] <type> tests: <N> passed, <M> failed - Phase completion:
[Phase X/7] Done. <one-line summary of result>
This is NON-NEGOTIABLE. The user must always know what is happening and where we are in the process. Never go silent for more than one tool call without printing status.
Phase 0: Install Metrics Report Site
Print: [Phase 0/7] Installing metrics report site...
Check if metrics-report/metrics-application/ exists. If NOT, copy it from the skill installation directory and run npm install:
SKILL_DIR="$HOME/.claude/skills/metrics-report"
if [ ! -d "metrics-report/metrics-application" ]; then
mkdir -p metrics-report
cp -r "$SKILL_DIR/metrics-report/"* metrics-report/
cd metrics-report/metrics-application && npm install && cd ../..
fi
If metrics-report/metrics-application/ already exists but node_modules is missing, just run npm install:
if [ -d "metrics-report/metrics-application" ] && [ ! -d "metrics-report/metrics-application/node_modules" ]; then
cd metrics-report/metrics-application && npm install && cd ../..
fi
Print: [Phase 0/7] Done. Metrics report site ready.
Phase 1: Setup and Detection (do all at once)
Print: [Phase 1/7] Setup and detection...
Run these in a SINGLE Bash call chained with &&:
git remote get-url origin 2>/dev/null || echo ""; git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "main"; git rev-parse --short HEAD 2>/dev/null || echo "unknown"
Check if metrics-report/metrics-config.json exists. If not, create it:
{
"port": 3737,
"testTypes": {
"unit": true,
"integration": true,
"contract": true,
"e2e": true,
"css": false,
"stress": false,
"chaos": false,
"mutation": false,
"observability": true,
"fuzzy": false,
"propertybased": false
},
"githubRemote": "origin"
}
Detect stacks using Glob (one call, check results):
pom.xmlorbuild.gradleorbuild.gradle.kts= Java/Spring Bootpackage.jsonwith react = React/Nodemanage.pyor django inpyproject.toml= Django/PythonCargo.tomlwith actix/axum/tokio = Rust
Print: [Phase 1/7] Done. Detected stacks: <list stacks found>
Phase 2: Scan and Run Tests
Print: [Phase 2/7] Scanning codebase and running tests...
Launch 2 background agents for read-only scanning, then run tests DIRECTLY with Bash (no agent).
Background Agent 1: File Count and Test Discovery
Use Glob to count all source files (skip node_modules, target, dist, build, .git, pycache, venv, .venv, metrics-report). Split by frontend/backend using file extension and path.
Then use Grep to find all test files in ONE pass per pattern:
Grep pattern="@Test|@ParameterizedTest" for Java
Grep pattern="def test_|class Test" for Python
Grep pattern="#\[test\]|#\[cfg\(test\)\]" for Rust
Grep pattern="describe\(|it\(|test\(" for JS/TS
Classify each test file by type using these Grep checks (batch them):
- Integration: Grep for
@SpringBootTest|@Testcontainers|@DataJpaTest|IntegrationTest|supertestacross test files - E2E: Grep for
@playwright/test|playwrightacross test files - Contract: Grep for
Pact|Contract|pactacross test files - Stress: Grep for
k6/http|k6/wsor files matching*.k6.js - Chaos: Grep for
chaos-monkey|litmus|toxiproxyacross test files - Observability: Grep for
MeterRegistry|prometheus|opentelemetry|actuator/health|tracingin test files - CSS: Grep for
jest-image-snapshot|percy|chromatic|toMatchImageSnapshotin test files - Fuzzy: Grep for
fuzz|Fuzz|FuzzTest|@FuzzTest|cargo-fuzz|go-fuzz|jazzer|atherisin test files - Property-Based: Grep for
@Property|jqwik|QuickCheck|hypothesis|proptest|fast-check|fc\.propertyin test files - Everything else in test dirs = unit
For each test file, extract test method names and line numbers using Grep (not Read):
- Java:
Grep pattern="@Test" -A 1to get method names - Python:
Grep pattern="def test_" - Rust:
Grep pattern="fn test_|#\[test\]" -A 1 - JS/TS:
Grep pattern="(it|test)\('"
Return: file counts, test file list with types and test names.
Background Agent 2: Git Attribution (batch)
Run a SINGLE bash command to get all test file authors at once:
for f in $(find . -path '*/test*' -name '*.java' -o -name '*.py' -o -name '*.rs' -o -name '*.ts' -o -na
Установить metrics-report в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
GlobGrepReadWriteEditBashAgentВложенные файлы
FAQ
Что делает скилл metrics-report?
Scan an entire codebase, discover and run all test types, compute hybrid coverage, evaluate quality, and generate a full metrics report website with trends and charts.
Как установить скилл metrics-report?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл metrics-report запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic