code-metrics

Compute PR-time delta metrics for coverage, complexity, module size, and dependency cycles.

4|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/leocosta/octopus --skill code-metrics-leocosta
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-metrics
Source: https://github.com/leocosta/octopus/tree/main/skills/code-metrics
Command: npx skills add https://github.com/leocosta/octopus --skill code-metrics-leocosta

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PRs often drift in code health without visible signals; this skill provides a deterministic readout of key metrics to surface degradation before merge.

Core Features & Use Cases

  • Deterministic per-PR delta for coverage, complexity, module size, and dependency cycles.
  • Baseline vs PR and vs main comparisons using an orphan ref to track trends over time.
  • Automated curation signals that trigger only when thresholds are breached, keeping noise low.

Quick Start

Run the PR delta workflow to generate a deterministic code-metrics report for the current branch.

Frequently Asked Questions about code-metrics

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I measure code quality and complexity changes in a pull request?

PR analysis tracks code health by computing dual-delta metrics for coverage, complexity, module size, and dependency cycles. It compares the current branch against a baseline and local main to surface degradation before merge without gating the pull request.

What is a dual-delta code metrics report and how does it work?

A dual-delta code metrics report calculates deterministic measurements by comparing your current pull request change against both a stored baseline and the local main branch. It uses an orphan ref to track trends and triggers automated curation signals only when thresholds are breached.

Can I track code coverage and dependency cycles over time without blocking merges?

Yes, you can track coverage and dependency cycles without blocking merges by returning a non-blocking delta report. The analysis runs against an orphan ref to track trend changes and suggests minimal fixes only when thresholds are breached.

How do I generate a PR impact analysis report for code complexity and module size?

Run the PR delta workflow on your current branch to generate a deterministic code metrics report. The workflow calculates coverage, complexity, module size, and dependency cycle impacts, returning a summarized readout of findings and suggested minimal fixes.

Does this code metrics tool require external dependencies to analyze pull requests?

No external dependencies are required to analyze pull requests. The tool uses per-stack adapters to compute deterministic measurements independently, comparing the current change against the baseline and local main without needing external integrations.