rudder-code-first-instrumentation

rudder-code-first-instrumentation is a skill for Claude Code from rudderlabs/rudder-agent-skills. It costs 38 tokens per session (2,851 once invoked), scanned A, original, MIT.

A method for planning product tracking from the types and structures already present in an existing codebase. Product tracking records actions and details such as plans, roles, or feature use.

In plain words
What is it for?
Use it when adding tracking to an existing product, especially when its enums, interfaces, and domain models describe the events and values to record.
Why use it?
It avoids manually translating the code's data into a separate tracking plan and helps keep recorded data consistent with the product.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the rudder-core plugin — 9 skills shipped together

Good fit Use it when adding tracking to an existing product, especially when its enums, interfaces, and domain models describe the events and values to record.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rudderlabs/rudder-agent-skills/rudder-code-first-instrumentation
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 rudderlabs/rudder-agent-skills --skill rudder-code-first-instrumentation
Clone the repo
git clone --depth 1 https://github.com/rudderlabs/rudder-agent-skills

Made for: Claude Code.

Or install rudder-core, the plugin that ships this one along with the rest of its 9 skills.

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 rudder-code-first-instrumentation

README.md
[![agentmods](https://agentmods.dev/badge/skills/rudderlabs/rudder-agent-skills/rudder-code-first-instrumentation/github.svg)](https://agentmods.dev/skills/rudderlabs/rudder-agent-skills/rudder-code-first-instrumentation)
Your own site
<a href="https://agentmods.dev/skills/rudderlabs/rudder-agent-skills/rudder-code-first-instrumentation"><img src="https://agentmods.dev/badge/skills/rudderlabs/rudder-agent-skills/rudder-code-first-instrumentation/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 rudder-code-first-instrumentation

Your own site · 80×15
<a href="https://agentmods.dev/skills/rudderlabs/rudder-agent-skills/rudder-code-first-instrumentation"><img src="https://agentmods.dev/badge/skills/rudderlabs/rudder-agent-skills/rudder-code-first-instrumentation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,851 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00038 $0.02851
Opus 5 $0.00019 $0.01425
Sonnet 5 $0.00008 $0.00570
Haiku 4.5 $0.00004 $0.00285

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

Security

Grade A, and why

rudder-code-first-instrumentation scanned grade A with 0 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 12d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/rudder-core/skills/rudder-code-first-instrumentation/SKILL.md · 461 lines

How it starts

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

Code-First Instrumentation

This skill guides instrumentation planning for existing products where you derive tracking plans from the codebase's existing types and structures.

When to Use This Skill

Scenario Use This Skill?
Existing product needs instrumentation Yes
Codebase has domain types (enums, interfaces) you want to track Yes
Restructuring messy existing tracking Yes
Building new feature, events not yet defined No — use rudder-design-first-instrumentation

Why Code-First?

When a product already exists, the code contains valuable type information:

  • Enums define valid values (billing plans, user roles, feature types)
  • Interfaces define object shapes (product, user, workspace)
  • Domain models define relationships and constraints

Deriving tracking plans from code types:

  • Eliminates translation/mapping layers
  • Ensures warehouse data matches code semantics
  • Enables compile-time validation of instrumentation
  • Keeps tracking plan in sync with product evolution

"If I say plan, that cannot mean many things. It's the plan. I have to be specific."

The Code-First Workflow

┌─────────────────────────────────────────────────────────────────────┐
│                    CODE-FIRST INSTRUMENTATION                        │
└─────────────────────────────────────────────────────────────────────┘
         │
         ▼
┌─────────────────┐
│ 1. DISCOVER     │ ← Identify domain types in codebase
│    CODE TYPES   │
└────────┬────────┘
         ▼
┌─────────────────┐
│ 2. MAP TYPES    │ ← Translate code types to tracking plan types
│    TO YAML      │
└────────┬────────┘
         ▼
┌─────────────────┐
│ 3. IDENTIFY     │ ← What user actions should be tracked?
│    EVENTS       │
└────────┬────────┘
         ▼
┌─────────────────┐
│ 4. BUILD        │ ← Create YAML referencing the types
│    TRACKING     │
│    PLAN         │
└────────┬────────┘
         ▼
┌─────────────────┐
│ 5. VERIFY       │ ← TypeScript compilation validates alignment
└────────┬────────┘
         ▼
┌─────────────────┐
│ 6. TEST & APPLY │ ← Verify in dev workspace, apply to prod
└─────────────────┘

Read the full file on GitHub · 461 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 12d ago First seen · 461 lines · 38 tokens per session scan A 407b2c6293a2

Subscribe to this mod's changes

rudder-code-first-instrumentation is a skill published in the GitHub repository rudderlabs/rudder-agent-skills (18 stars, last pushed 7d ago), licensed MIT. It adds 38 tokens to every session and 2,851 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

scientific-figure-prompt-compiler

Transform concise scientific or technical descriptions into structured visual specifications and high-quality image-generation prompts. Use for scientific figures, technical diagrams, system architectures, mechanisms, workflows, spatial models, timelines, layered systems, and information-dense visuals. Model-agnostic…

basejb/skills · 72 tokens

seo-optimizer

Search Engine Optimization specialist for content strategy, technical SEO, keyword research, and ranking improvements. Use when optimizing website content, improving search rankings, conducting keyword analysis, or implementing SEO best practices. Expert in on-page SEO, meta tags, schema markup, and Core Web Vitals.

basejb/skills · 60 tokens

ai-collab-evaluator

A review of Claude Code session logs against four hiring criteria for working with AI: how you handle, use, and question AI, and how you weigh trade-offs.

basejb/skills · 169 tokens

learning-companion

A guided learning tool that turns official documents or other sources into lasting study notes through five stages, including explanation, recall, reflection, and next steps.

basejb/skills · 134 tokens

oss-tour

A guided method for learning an unfamiliar open-source repository in layers, from the whole project to folders and core modules. An open-source repository is a publicly available code project whose source can be inspected.

basejb/skills · 106 tokens

image-optimizer

An image-processing tool that converts images to WebP, an image format that can reduce file size while preserving visual quality. It handles individual images, groups of images, and whole directories.

basejb/skills · 43 tokens