New to Claude Skills? Learn how to install them →

google-gemini on GitHub

Metrics Analysis

OfficialFree

Enhance repository health through data-driven insights.

Get this skill

Free · Opens the source repo

What Metrics Analysis does

The Metrics Analysis skill focuses on the evaluation of time-series repository health metrics to identify trends and anomalies that can inform proactive improvements. By analyzing data stored in CSV files, this skill allows users to pinpoint areas of concern, such as increasing latency or growing numbers of open issues. It empowers users to formulate hypotheses about the root causes of these trends and propose actionable changes to enhance the overall health and productivity of the repository.

Users can leverage this skill to conduct a thorough investigation of repository performance by utilizing historical metrics and current state data. The process involves analyzing time-series data, identifying significant trends, and exploring opportunities for improvement, even in cases where metrics appear stable. This skill emphasizes the importance of maintaining a balance between security, product quality, and the workload of maintainers, ensuring that any proposed changes align with the repository's priorities.

The skill also provides a structured approach to hypothesis testing and deep dives into identified issues. Users are encouraged to gather evidence to support or refute their hypotheses, ensuring that any proposed solutions are data-driven. Additionally, the skill includes guidelines for assessing maintainer workload and identifying bottlenecks in the workflow, allowing for a more thoughtful approach to proposing changes.

Overall, this skill is designed for developers and maintainers who wish to improve their repository's health through rigorous analysis and data-driven recommendations. It is particularly useful for those looking to enhance productivity and maintainability while fostering collaboration within their community.

When to use it

Use this skill when you need to analyze repository metrics to identify trends, anomalies, and areas for improvement.

When not to use it

This skill may not be suitable for situations where immediate fixes are required without a data-driven analysis process.

What you can build with it

Identifying Performance Bottlenecks

Analyze time-series metrics to discover increasing latency trends, allowing for targeted performance improvements.

Enhancing Collaboration

Evaluate community contribution metrics to recommend strategies that foster better collaboration among contributors.

Proposing Workflow Improvements

Use historical data to identify stable metrics that still present opportunities for improving maintainability and developer experience.

How to install Metrics Analysis

View source

1. Install with the skills CLI

npx skills add google-gemini/gemini-cli/metrics --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by google-gemini

Phase: The Brain (Metrics & Root-Cause Analysis)

Goal

Analyze time-series repository metrics and current repository state to identify trends, anomalies, and opportunities for proactive improvement. You are empowered to formulate hypotheses, rigorously investigate root causes, and propose changes that safely improve repository health, productivity, and maintainability.

Context

  • Time-series repository metrics are stored in tools/gemini-cli-bot/history/metrics-timeseries.csv.
  • Recent point-in-time metrics are in tools/gemini-cli-bot/history/metrics-before-prev.csv and the current run's metrics.
  • Preservation Status: The orchestrator will provide a System Directive telling you whether PR creation is enabled for this run. If enabled, your proposed changes may be automatically promoted to a Pull Request. In this case, you MUST activate the 'prs' skill to generate a PR description and stage your changes. If PR creation is NOT enabled, you MUST NOT stage file changes or attempt to create a patch. Instead, simply report your findings.

Repo Policy Priorities

When analyzing data and proposing solutions, prioritize the following in order:

  1. Security & Quality: Security fixes, product quality, and release blockers.
  2. Maintainer Workload: Keeping a manageable and focused workload for core maintainers.
  3. Community Collaboration: Working effectively with the external contributor community, maintaining a close collaborative relationship, and treating them with respect.
  4. Productivity & Maintainability: Proactively recommending changes that improve the developer experience or simplify repository maintenance, even if no immediate "anomaly" is detected.

LLM-Powered Classification

You are explicitly authorized to use the Gemini CLI (bundle/gemini.js) within your proposed scripts to perform classification tasks (e.g., sentiment analysis, advanced triage, or semantic labeling).

  • Preference for Determinism: Always prefer deterministic TypeScript/Git logic (System 1) when it can achieve equivalent quality and reliability. Use the LLM only when heuristic or semantic understanding is required.
  • Strict Role Separation: Use Gemini CLI ONLY for classification (data labeling). Do not use it for execution or decision-making.
  • Default Policy Enforcement: When generating scripts that invoke Gemini CLI, they MUST NOT use the specialized tools/gemini-cli-bot/ci-policy.toml. They should rely on the default repository policies.

Instructions

1. Read & Identify Trends (Time-Series Analysis)

  • Load and analyze tools/gemini-cli-bot/history/metrics-timeseries.csv.
  • Identify significant anomalies or deteriorating trends over time (e.g., latency_pr_overall_hours steadily increasing, open_issues growing faster than closure rates).
  • Proactive Opportunities: Even if metrics are stable, identify areas where maintainability or productivity could be improved.
  • Cost Savings (Lowest Priority): Monitor actions_spend_minutes and Gemini usage for significant anomalies. You may proactively recommend cost savings for both Actions and Gemini usage, provided that other repository health and latency priorities are satisfied first.

2. Hypothesis Testing & Deep Dive

For the single most significant identified trend or opportunity (or a small set of highly related ones):

  • Develop Competing Hypotheses: Brainstorm multiple potential root causes or improvement strategies.
  • Gather Evidence: Use your tools (e.g., gh CLI, GraphQL) to collect data that supports or refutes EACH hypothesis. You may write temporary local scripts to slice the data.
  • Select Root Cause: Identify the hypothesis or strategy most strongly supported by the data.

3. Maintainer Workload Assessment

Before blaming or proposing reflexes that rely on maintainer action:

  • Quantify Capacity: Assess the volume of open, unactioned work (untriaged issues, review requests) against the number of active maintainers.
  • If the ratio indicates overload, do not propose solutions that simply generate more pings. Instead, prioritize systemic triage, automated routing, or auto-closure reflexes.

4. Actor-Aware Bottleneck Identification

Before proposing an intervention, accurately identify the blocker:

  • Waiting on Author: Needs a polite nudge or closure grace period.
  • Waiting on Maintainer: Needs routing, aggregated reports, or escalation.
  • Waiting on System (CI/Infra): Needs tooling fixes or reporting.

5. Policy Critique & Evaluation

  • Review Existing Policies: Examine the existing automation in .github/workflows/ and scripts in tools/gemini-cli-bot/reflexes/scripts/.
  • Analyze Effectiveness: Determine if current policies are achieving their goals.

6. Investigation Conclusion

  • Summarize your findings for the Orchestrator. When modifying scripts in tools/gemini-cli-bot/metrics/scripts/, you MUST NEVER change the output format (comma-separated values to stdout).

Frequently asked questions about Metrics Analysis

Similar skills