anonymize-logs

anonymize-logs is a skill for Claude Code from elastic/integration-skills. It costs 74 tokens per session (4,939 once invoked), scanned A, original, Apache-2.0.

A log-sanitizing skill that reviews customer logs line by line and replaces sensitive values while preserving the original format exactly. It supports files and individual syslog, key-value, or newline-delimited JSON lines.

In plain words
What is it for?
Use it to sanitize customer logs, sample events, or test fixtures. It can write a sanitized copy or overwrite the original when explicitly requested.
Why use it?
It makes logs safer to share or commit without breaking parsers, tests, or tools that depend on their exact spacing and structure.

Skill for Claude Code ✓ vendor

Written for Claude Code: shipped in a Claude Code plugin.

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /home/example-user/....

Part of the integration-skills plugin — 15 skills shipped together

Good fit Use it to sanitize customer logs, sample events, or test fixtures. It can write a sanitized copy or overwrite the original when explicitly requested.

Compare 6 skills from other repositories ↓
About the project

Integration Skills is a collection of agent workflows for researching, creating, reviewing, and maintaining Elastic integration packages. Engineers use it with coding environments such as Cursor, Claude Code, and Codex to scaffold integrations, configure data streams, map fields, and run tests.

elastic/integration-skills · 15 stars · on GitHub

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add elastic/integration-skills
Claude Code
/plugin install integration-skills

Made for: Claude Code.

Or install integration-skills, the plugin that ships this one along with the rest of its 15 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 anonymize-logs

README.md
[![agentmods](https://agentmods.dev/badge/skills/elastic/integration-skills/anonymize-logs.svg)](https://agentmods.dev/skills/elastic/integration-skills/anonymize-logs)
Your own site
<a href="https://agentmods.dev/skills/elastic/integration-skills/anonymize-logs"><img src="https://agentmods.dev/badge/skills/elastic/integration-skills/anonymize-logs.svg" alt="Measured on agentmods" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,939 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
  • Socket pass 20 May 2026
  • Snyk pass 20 May 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.00074 $0.04939
Opus 5 $0.00037 $0.02469
Sonnet 5 $0.00015 $0.00988
Haiku 4.5 $0.00007 $0.00494

Measured 7d ago against content hash 45bd40eb564b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

anonymize-logs 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 7d 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.

skills/anonymize-logs/SKILL.md · 202 lines

How it starts

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

Anonymize Logs

Sanitize customer-provided logs so they are safe to share or commit. Replace identity only; keep the original structure, delimiters, quoting, field order, and line breaks.

Input may be a file or a single syslog / KV / NDJSON line. Output must match that shape — do not pretty-print, wrap, truncate, or “fix” values as part of sanitization.

What you provide

Input How to provide
Log file(s) to sanitize @-mention files or paste inline
Output location (optional) free text path, defaults to same directory with .sanitized suffix
In-place override (optional) say "in place" to overwrite the original

Golden rule — never reformat the content

Only replace sensitive values. Do not touch anything else.

Parsers and anyone reviewing the log depend on exact whitespace, delimiters, quoting, and line structure.

  • NDJSON (one JSON object per line): do not pretty-print, re-indent, or restructure. Each line must remain a single compact JSON object on one line.
  • Syslog / CEF / key-value logs: do not add or remove spaces, change quoting, or normalize field order.
  • Multiline logs: preserve line grouping exactly.
  • Replace only the values that identify real people, systems, or organizations — preserve field names, delimiters, structural tokens, and everything else character-for-character.
  • Do not add, remove, or rewrite a syslog PRI / RFC5424 header. Do not prefix a bare line with <134> (or any PRI) “to look more like syslog.”
  • Truncation is never an anonymization strategy. Do not delete repeating fields, drop trailing KV pairs, or cut off the remainder of a line to “finish” sanitization. Use the two-pass map instead.

Workflow

Step 1 — Two-pass replacement

Do not replace as you read. Distinct originals that collapse to one placeholder, or a first-occurrence-only replace that leaves later copies, are both failures.

  1. Scan the whole file/line and build a map: original value → placeholder for every sensitive token (including nested ones: URL query params, hex dwords inside compound IDs, path segments).
  2. If two originals differ, they must get different placeholders. If they are identical, they must get the same placeholder.
  3. Apply the map globally (all occurrences).
  4. Scan again for leftovers (IPs inside URLs, hex IPs inside vendor IDs, hostnames that look like product names).

Read the full file on GitHub · 202 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. 7d ago First seen · 202 lines · 74 tokens per session scan A 45bd40eb564b

Subscribe to this mod's changes

anonymize-logs is a skill published in the GitHub repository elastic/integration-skills (15 stars, last pushed today), licensed Apache-2.0. It adds 74 tokens to every session and 4,939 once invoked, about $0.0004 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-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens