custom-metrics

custom-metrics is a skill for Claude Code, Codex from Bilal140202/the-lord-of-the-skills. It costs 39 tokens per session (3,660 once invoked), scanned B, original, MIT.

A workflow for defining and managing business measurements for AI configurations. It can record events through an SDK and retrieve the resulting metric data.

In plain words
What is it for?
Use it to define custom metric types, send measurement events from an application, read results, and update or delete metrics.
Why use it?
It removes the need to build separate measurement handling for each business outcome and keeps metric definitions and recorded results together.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths.

Good fit Use it to define custom metric types, send measurement events from an application, read results, and update or delete metrics.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bilal140202/the-lord-of-the-skills/agentcontrol-custom-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 Bilal140202/the-lord-of-the-skills --skill agentcontrol-custom-metrics
Clone the repo
git clone --depth 1 https://github.com/Bilal140202/the-lord-of-the-skills

Made for: Claude Code, Codex.

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 custom-metrics

README.md
[![agentmods](https://agentmods.dev/badge/skills/bilal140202/the-lord-of-the-skills/agentcontrol-custom-metrics/github.svg)](https://agentmods.dev/skills/bilal140202/the-lord-of-the-skills/agentcontrol-custom-metrics)
Your own site
<a href="https://agentmods.dev/skills/bilal140202/the-lord-of-the-skills/agentcontrol-custom-metrics"><img src="https://agentmods.dev/badge/skills/bilal140202/the-lord-of-the-skills/agentcontrol-custom-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 custom-metrics

Your own site · 80×15
<a href="https://agentmods.dev/skills/bilal140202/the-lord-of-the-skills/agentcontrol-custom-metrics"><img src="https://agentmods.dev/badge/skills/bilal140202/the-lord-of-the-skills/agentcontrol-custom-metrics.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,660 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. 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.00039 $0.03660
Opus 5 $0.00019 $0.01830
Sonnet 5 $0.00008 $0.00732
Haiku 4.5 $0.00004 $0.00366

Measured 6d ago against content hash 92a1a93565e6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade B, and why

custom-metrics scanned grade B with 2 findings 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 6d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

1. **Check Claude MCP config** - Read `~/.claude/config.json` and look for `mcpServers.launchdarkly.env.LAUNCHDARKLY_API_KEY`

Makes network callslowCapability

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

response = requests.post(url, json=payload, headers=headers)
skills/gondor/claude-code/LaunchDarkly__agent-skills/agentcontrol-custom-metrics-SKILL.md · 504 lines

How it starts

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

Custom Metrics for Configs

Full lifecycle management of custom business metrics: create metric definitions via API, track events via SDK, retrieve metric data, and manage metrics programmatically.

Prerequisites

  • LaunchDarkly SDK initialized (see sdk)
  • LaunchDarkly API token with writer role for metric management
  • Understanding of built-in agent metrics (see built-in-metrics)

API Key Detection

Before prompting the user for an API key, try to detect it automatically:

  1. Check Claude MCP config - Read ~/.claude/config.json and look for mcpServers.launchdarkly.env.LAUNCHDARKLY_API_KEY
  2. Check environment variables - Look for LAUNCHDARKLY_API_KEY, LAUNCHDARKLY_API_TOKEN, or LD_API_KEY
  3. Prompt user - Only if detection fails, ask the user for their API key
import os
import json
from pathlib import Path

def get_launchdarkly_api_key():
    """Auto-detect LaunchDarkly API key from Claude config or environment."""
    # 1. Check Claude MCP config
    claude_config = Path.home() / ".claude" / "config.json"
    if claude_config.exists():
        try:
            config = json.load(open(claude_config))
            api_key = config.get("mcpServers", {}).get("launchdarkly", {}).get("env", {}).get("LAUNCHDARKLY_API_KEY")
            if api_key:
                return api_key
        except (json.JSONDecodeError, IOError):
            pass

    # 2. Check environment variables
    for var in ["LAUNCHDARKLY_API_KEY", "LAUNCHDARKLY_API_TOKEN", "LD_API_KEY"]:
        if os.environ.get(var):
            return os.environ[var]

    return None

Metrics Lifecycle Overview

Step Method Purpose
1. Create API Define metric in LaunchDarkly
2. Track SDK Send events to the metric
3. Get API Retrieve metric definition/data
4. Update API Modify metric properties
5. Delete API Remove metric

1. Create Metric (API)

Required fields for numeric custom metrics:

  • successCriteria - Must be one of: "HigherThanBaseline", "LowerThanBaseline"
  • unit - e.g., "count", "percent", "milliseconds"

Read the full file on GitHub · 504 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. 6d ago First seen · 504 lines · 39 tokens per session scan B 92a1a93565e6

Subscribe to this mod's changes

custom-metrics is a skill published in the GitHub repository Bilal140202/the-lord-of-the-skills (4 stars, last pushed 6d ago), licensed MIT. It adds 39 tokens to every session and 3,660 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 2 findings (reads agent configuration directories, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-06.

Related

Other skills, from other repositories

serpsmith

Publish SEO articles reliably across AI-agent runtimes.

emiliojohann/SERPsmith · 14 tokens

tool-calling-tutor

Use when a tool-calling agent does not call a tool, sends wrong arguments, loops without stopping, or needs a function schema. Guides a four-branch diagnosis and five-step schema repair. Do not use for framework-specific, MCP-server, or production-observability questions.

WenyuChiou/awesome-agentic-ai-zh · 62 tokens

performing-threat-hunting-with-yara-rules

Use YARA pattern-matching rules to hunt for malware, suspicious files, and indicators of compromise across filesystems and memory dumps. Covers rule authoring, yara-python scanning, and integration with threat intel feeds.

adriannoes/awesome-agentic-ai · 53 tokens

hunt-idor

Hunting skill for idor vulnerabilities. Built from 26 public bug bounty reports. Use when hunting idor on any target.

adriannoes/awesome-agentic-ai · 30 tokens

performing-soc2-type2-audit-preparation

Automates SOC 2 Type II audit preparation including gap assessment against AICPA Trust Services Criteria (CC1-CC9), evidence collection from cloud providers and identity systems, control testing validation, remediation tracking, and continuous compliance monitoring. Covers all five TSC categories (Security…

adriannoes/awesome-agentic-ai · 112 tokens

testrail

Sync tests with TestRail. Use when user mentions "testrail", "test management", "test cases", "test run", "sync test cases", "push results to testrail", or "import from testrail".

adriannoes/awesome-agentic-ai · 50 tokens