metrics

metrics is a skill for Claude Code from Venkateshwar-Reddy-Jambula/razorpay-integration-plugin. It costs 65 tokens per session (4,674 once invoked), scanned A, original, MIT.

A guide for calculating SaaS payment metrics from Razorpay data, including monthly recurring revenue, churn, average revenue per user, customer lifetime value, and revenue trends.

In plain words
What is it for?
Use it to build revenue dashboards, calculate business metrics, and reconcile results with Razorpay.
Why use it?
It gives developers ways to measure subscription business health from payment records or API data.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the razorpay plugin — 15 skills, 9 agents, 1 hook shipped together

Good fit Use it to build revenue dashboards, calculate business metrics, and reconcile results with Razorpay.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/venkateshwar-reddy-jambula/razorpay-integration-plugin/metrics
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Venkateshwar-Reddy-Jambula/razorpay-integration-plugin --skill metrics
Clone the repo
git clone --depth 1 https://github.com/Venkateshwar-Reddy-Jambula/razorpay-integration-plugin

Made for: Claude Code.

Or install razorpay, the plugin that ships this one along with the rest of its 15 skills, 9 agents, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for metrics

README.md
[![agentmods](https://agentmods.dev/badge/skills/venkateshwar-reddy-jambula/razorpay-integration-plugin/metrics/github.svg)](https://agentmods.dev/skills/venkateshwar-reddy-jambula/razorpay-integration-plugin/metrics)
Your own site
<a href="https://agentmods.dev/skills/venkateshwar-reddy-jambula/razorpay-integration-plugin/metrics"><img src="https://agentmods.dev/badge/skills/venkateshwar-reddy-jambula/razorpay-integration-plugin/metrics/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for metrics

Your own site · 80×15
<a href="https://agentmods.dev/skills/venkateshwar-reddy-jambula/razorpay-integration-plugin/metrics"><img src="https://agentmods.dev/badge/skills/venkateshwar-reddy-jambula/razorpay-integration-plugin/metrics.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,674 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00065 $0.04674
Opus 5 $0.00032 $0.02337
Sonnet 5 $0.00013 $0.00935
Haiku 4.5 $0.00006 $0.00467

Measured 11d ago against content hash 05d19d001e5d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

metrics scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

const plan = await razorpay.plans.fetch(sub.plan_id);
skills/metrics/SKILL.md · 573 lines

How it starts

The opening of the file, as written. The whole thing — 573 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Razorpay Business Metrics

Calculate key SaaS metrics from your Razorpay subscription and payment data. Includes both database queries (fast, for dashboards) and API-based approaches (accurate, for reconciliation).

MRR (Monthly Recurring Revenue)

Database Approach (Fast)

// lib/metrics/mrr.ts
import { db } from "@/lib/db";

interface MRRResult {
  mrr: number;          // in paise
  mrrDisplay: string;   // formatted in rupees
  activeCount: number;
  breakdown: { planKey: string; count: number; mrr: number }[];
}

export async function calculateMRR(): Promise<MRRResult> {
  // Query active subscriptions with plan details
  const subscriptions = await db.subscription.findMany({
    where: { status: "active" },
    select: {
      planKey: true,
      amount: true,       // amount in paise
      period: true,        // "monthly" | "yearly"
    },
  });

  let totalMRR = 0;
  const planMap = new Map<string, { count: number; mrr: number }>();

  for (const sub of subscriptions) {
    // Convert yearly to monthly contribution
    const monthlyAmount = sub.period === "yearly"
      ? Math.round(sub.amount / 12)
      : sub.amount;

    totalMRR += monthlyAmount;

    const existing = planMap.get(sub.planKey) || { count: 0, mrr: 0 };
    planMap.set(sub.planKey, {
      count: existing.count + 1,
      mrr: existing.mrr + monthlyAmount,
    });
  }

  const breakdown = Array.from(planMap.entries()).map(([planKey, data]) => ({
    planKey,
    ...data,
  }));

  return {
    mrr: totalMRR,
    mrrDisplay: `₹${(totalMRR / 100).toLocaleString("en-IN")}`,
    activeCount: subscriptions.length,
    breakdown,
  };
}

Razorpay API Approach (Accurate)

// lib/metrics/mrr-api.ts
import { razorpay } from "@/lib/razorpay";

export async function calculateMRRFromAPI(): Promise<number> {
  let totalMRR = 0;
  let skip = 0;
  const count = 100; // max per request

  // Fetch all plans first to know their periods
  const plansRes = await razorpay.plans.all({ count: 100 });
  const planPeriods = new Map<string, string>();
  for (const plan of plansRes.items) {
    planPeriods.set(plan.id, plan.period); // "monthly" | "yearly" | "weekly" | "daily"
  }

  // Paginate through all active subscriptions
  while (true) {
    const res = await razorpay.subscriptions.all({ count, skip });
    const active = res.items.filter((s: any) => s.status === "active");

    for (const sub of active) {
      const plan = await razorpay.plans.fetch(sub.plan_id);
      const amount = plan.item.amount * (sub.quantity || 1);

      // Normalize to monthly
      const period = planPeriods.get(sub.plan_id) || plan.period;
      if (period === "yearly") {
        totalMRR += Math.round(amount / 12);
      } else if (period === "weekly") {
        totalMRR += Math.round(amount * 4.33);
      } else if (period === "daily") {
        totalMRR += Math.round(amount * 30);
      } else {
        totalMRR += amount; // monthly
      }
    }

    if (res.items.length < count) break;
    skip += count;
  }

  return totalMRR; // in paise
}

Read the full file on GitHub · 573 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 573 lines · 65 tokens per session scan A 05d19d001e5d

Subscribe to this mod's changes

metrics is a skill published in the GitHub repository Venkateshwar-Reddy-Jambula/razorpay-integration-plugin (6 stars, last pushed 6mo ago), licensed MIT. It adds 65 tokens to every session and 4,674 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

sector-rotation

An analysis framework for comparing industries in the Chinese A-share stock market, using business conditions, price momentum, valuation, and money flows. It produces rankings and higher- or lower-allocation suggestions.

HKUDS/Vibe-Trading · 39 tokens

strategy-pivot-designer

Detect backtest iteration stagnation and generate structurally different strategy pivot proposals when parameter tuning reaches a local optimum.

tradermonty/claude-trading-skills · 28 tokens

twitter-reader

Read Twitter/X for financial research using opencli (read-only). Use this skill whenever the user wants to read their Twitter feed, search for financial tweets, view bookmarks, look up user profiles, or gather market sentiment from Twitter/X. Triggers include: "check my feed", "search Twitter for", "show my…

himself65/finance-skills · 161 tokens

chenhao-limit-up

A framework for judging Chinese A-share stocks that have reached the daily price-rise limit, using market mood, sector leadership, and trading momentum.

questflowai/investorskills · 44 tokens

trading-risk-gate

Unified pre-trade safety gate: Ruin check (Law #1), ergodicity audit, and win-rate dominance validation. Absorbs: ergodicity-check, law-of-ruin, win-rate-dominance.

winstonkoh87/Athena-Public · 53 tokens

furusato

A Japanese hometown-tax donation manager for furusato nozei, a system where donations to municipalities can qualify for an income-tax or local-tax deduction. It reads donation receipts, stores donation records, and calculates deduction limits.

kazukinagata/shinkoku · 102 tokens