ai-prompt-characterization

ai-prompt-characterization is a skill for Claude Code, Codex from luanpdd/kit-mcp. It costs 47 tokens per session (3,519 once invoked), scanned B, original, MIT.

A testing guide for prompts and tool definitions used by language models. Characterization tests capture expected outputs and related details so changes can be compared with earlier behavior.

In plain words
What is it for?
Use it before changing a production prompt or function-calling schema to test common intents, tool calls, completion details, token usage, and model-version changes.
Why use it?
Prompt changes can alter responses or break software that parses model output without producing an obvious error. Fixed settings and snapshots make those changes easier to detect.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it before changing a production prompt or function-calling schema to test common intents, tool calls, completion details, token usage, and model-version changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/luanpdd/kit-mcp/ai-prompt-characterization
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 luanpdd/kit-mcp --skill ai-prompt-characterization
Clone the repo
git clone --depth 1 https://github.com/luanpdd/kit-mcp

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 ai-prompt-characterization

README.md
[![agentmods](https://agentmods.dev/badge/skills/luanpdd/kit-mcp/ai-prompt-characterization/github.svg)](https://agentmods.dev/skills/luanpdd/kit-mcp/ai-prompt-characterization)
Your own site
<a href="https://agentmods.dev/skills/luanpdd/kit-mcp/ai-prompt-characterization"><img src="https://agentmods.dev/badge/skills/luanpdd/kit-mcp/ai-prompt-characterization/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 ai-prompt-characterization

Your own site · 80×15
<a href="https://agentmods.dev/skills/luanpdd/kit-mcp/ai-prompt-characterization"><img src="https://agentmods.dev/badge/skills/luanpdd/kit-mcp/ai-prompt-characterization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,519 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 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.00047 $0.03519
Opus 5 $0.00023 $0.01759
Sonnet 5 $0.00009 $0.00704
Haiku 4.5 $0.00005 $0.00352

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

Security

Grade B, and why

ai-prompt-characterization scanned grade B 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 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.

Instruction-override phrasingmediumPrompt injection

Text telling the model to disregard its earlier instructions or safety rules is the shape of a prompt injection, whoever wrote it.

| **Adversarial** | Tentativa de jailbreak / prompt injection | "Ignore previous instructions and..." |

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

kit/skills/ai-prompt-characterization/SKILL.md · 337 lines

How it starts

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

AI Prompt Characterization (Modernização)

Quando usar

LLM carrega esta skill quando user vai modificar prompt ou tool definition de LLM em produção. Trigger phrases:

  • "vou mudar esse prompt", "modificar prompt em prod"
  • "atualizar tool definition", "function calling schema"
  • "como testar mudança de prompt?"
  • "characterization de prompt", "snapshot de generation"
  • "esse prompt tem 300 linhas e ninguém testou ainda"
  • prompt em arquivo como prompts/<name>.md ou string template em código

Insight central: prompts e tools são código legacy também quando:

  • 100 linhas

  • Em uso em produção
  • Mudanças quebram silenciosamente (output diferente, downstream parser falha)
  • Sem characterization tests

Regras absolutas

  • Prompts são código. Tratam-se com mesmo rigor: versionado, testado, code-reviewed. NÃO são "config text que muda livremente".
  • Determinismo via temperature=0 + seed. Anthropic Claude e OpenAI ambos suportam seed. Sem isso, characterization é flaky.
  • Capture mais que text. Outputs incluem: text, finish_reason, tool_calls (se function calling), input_tokens, output_tokens, model_version. Snapshot de TODOS estes campos.
  • Sanitize aggressively. Outputs LLM frequentemente incluem timestamps mencionados, UUIDs gerados, datas relativas. Normalize ANTES de snapshot.
  • 5+ inputs cobrindo intents distintas. Não é "happy path × 5"; é "5 intents qualitativamente diferentes" — concision request, troubleshooting, explanation, creative, edge case.
  • Behavioral coverage = % intents cobertas. Métrica não é coverage de "linhas do prompt" (não existe); é coverage de variações comportamentais.
  • Re-rodar em CI quando model_version muda. Anthropic publica nova versão de Claude → re-rode characterization → revisar diffs → aceitar/rejeitar.

Patterns canônicos

Pattern 1: Setup canônico de characterization de prompt

// tests/characterization/prompts/generate-summary.test.ts
import { Anthropic } from '@anthropic-ai/sdk'
import { describe, test, expect } from 'vitest'
import { readFileSync } from 'fs'

const client = new Anthropic({ apiKey: process.env.ANTHROPIC_API_KEY })
const PROMPT = readFileSync('prompts/generate-summary.md', 'utf-8')

interface PromptInput {
  systemPrompt: string
  userMessage: string
  maxTokens?: number
}

async function runPrompt(input: PromptInput) {
  const response = await client.messages.create({
    model: 'claude-opus-4-7',
    max_tokens: input.maxTokens ?? 500,
    temperature: 0,  // determinismo
    system: input.systemPrompt,
    messages: [{ role: 'user', content: input.userMessage }],
  })
  return {
    text: response.content[0].type === 'text' ? response.content[0].text : '',
    stopReason: response.stop_reason,
    inputTokens: response.usage.input_tokens,
    outputTokens: response.usage.output_tokens,
    modelVersion: response.model,
  }
}

function sanitizeForSnapshot(o: any): any {
  return JSON.parse(
    JSON.stringify(o, (key, value) => {
      // normalizar timestamps mencionados ("Today is 2026-05-08") → "<DATE>"
      if (typeof value === 'string') {
        value = value.replace(/\d{4}-\d{2}-\d{2}/g, '<DATE>')
        value = value.replace(/\d{2}:\d{2}(:\d{2})?/g, '<TIME>')
        value = value.replace(/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}/g, '<UUID>')
      }
      // permitir model version mas separar para audit (não no snapshot)
      if (key === 'modelVersion') return '<MODEL>'
      return value
    })
  )
}

describe('generate-summary prompt — characterization', () => {
  test('intent: concise summary of long article', async () => {
    const captured = await runPrompt({
      systemPrompt: PROMPT,
      userMessage: 'Resuma em 2 sentenças: [longo artigo de 500 palavras]...',
    })
    expect(sanitizeForSnapshot(captured)).toMatchSnapshot()
  })

  test('intent: bullet-list summary', async () => { /* ... */ })
  test('intent: technical/code summary', async () => { /* ... */ })
  test('intent: ambiguous request (edge)', async () => { /* ... */ })
  test('intent: hostile / prompt injection attempt', async () => { /* ... */ })
})

Read the full file on GitHub · 337 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 · 337 lines · 47 tokens per session scan B 79cebabf35a2

Subscribe to this mod's changes

ai-prompt-characterization is a skill published in the GitHub repository luanpdd/kit-mcp (1 stars, last pushed 3d ago), licensed MIT. It adds 47 tokens to every session and 3,519 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (instruction-override phrasing). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

data-quality-frameworks

Implement data quality validation with Great Expectations, dbt tests, and data contracts. Use when building data quality pipelines, implementing validation rules, or establishing data contracts.

wshobson/agents · 37 tokens

dbt-transformation-patterns

Master dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies. Use when building data transformations, creating data models, or implementing analytics engineering best practices.

wshobson/agents · 47 tokens

nemo-automodel-model-onboarding

Guide for onboarding new model architectures into NeMo AutoModel, including architecture discovery, implementation patterns, registration, and validation.

NVIDIA/skills · 33 tokens

nemo-automodel-recipe-development

Create and modify NeMo AutoModel training and evaluation recipes, including YAML structure, builders, and execution flow.

NVIDIA/skills · 31 tokens

neuron-test-engineer

Write tests for Neuron AI agents, RAG systems, workflows, and tools using the built-in testing utilities. Use this skill when the user mentions testing agents, writing unit tests, mocking AI providers, testing tool execution, verifying RAG retrieval, testing workflow behavior, or creating test cases for Neuron AI…

neuron-core/neuron-ai · 94 tokens

testing-llm

LLM and AI testing patterns — mock responses, evaluation with DeepEval/RAGAS, structured output validation, and agentic test patterns (generator, healer, planner). Use when testing AI features, validating LLM outputs, or building evaluation pipelines.

yonatangross/orchestkit · 55 tokens