ag-destilar

ag-destilar is a skill for Claude Code from andregusman-raiz/a-gusman-claude. It costs 49 tokens per session (1,051 once invoked), scanned A, original, MIT.

A document-compression tool for Markdown files that reduces repeated wording and reorganizes content into compact forms while retaining important information. It saves the compressed version next to the original with a .distilled.md suffix.

In plain words
What is it for?
Use it on individual files or directories of Markdown documents, such as specifications, architecture notes, TOTVS knowledge-base documents, design libraries, and reference material.
Why use it?
It helps fit large specifications, reference documents, and knowledge bases into fewer language-model tokens without removing key names, paths, settings, decisions, or reasoning.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter.

Good fit Use it on individual files or directories of Markdown documents, such as specifications, architecture notes, TOTVS knowledge-base documents, design libraries, and reference material.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/andregusman-raiz/a-gusman-claude/ag-destilar
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 andregusman-raiz/a-gusman-claude --skill ag-destilar
Clone the repo
git clone --depth 1 https://github.com/andregusman-raiz/a-gusman-claude

Made for: Claude Code.

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 ag-destilar

README.md
[![agentmods](https://agentmods.dev/badge/skills/andregusman-raiz/a-gusman-claude/ag-destilar/github.svg)](https://agentmods.dev/skills/andregusman-raiz/a-gusman-claude/ag-destilar)
Your own site
<a href="https://agentmods.dev/skills/andregusman-raiz/a-gusman-claude/ag-destilar"><img src="https://agentmods.dev/badge/skills/andregusman-raiz/a-gusman-claude/ag-destilar/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 ag-destilar

Your own site · 80×15
<a href="https://agentmods.dev/skills/andregusman-raiz/a-gusman-claude/ag-destilar"><img src="https://agentmods.dev/badge/skills/andregusman-raiz/a-gusman-claude/ag-destilar.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,051 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 warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 4
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
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.00049 $0.01051
Opus 5 $0.00024 $0.00526
Sonnet 5 $0.00010 $0.00210
Haiku 4.5 $0.00005 $0.00105

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

Security

Grade A, and why

ag-destilar 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.

skills/ag-destilar/SKILL.md · 102 lines

How it starts

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

ag-destilar — Destilacao de Documentos

O que faz

Comprime documentos grandes para formato otimizado para LLMs, mantendo 100% da informacao em menos tokens. O documento destilado e salvo ao lado do original com sufixo .distilled.md.

Invocacao

/ag-destilar docs/specs/big-spec.md                    # Ratio default 0.4 (60% reducao)
/ag-destilar ~/Claude/assets/knowledge-base/totvs/docs/DOC-1.md --ratio 0.3
/ag-destilar docs/architecture.md --ratio 0.5          # Menos agressivo
/ag-destilar --batch docs/specs/                       # Todos os .md do diretorio

Tecnicas de Destilacao

1. Remover Redundancia

  • Frases que repetem informacao ja dita ("como mencionado acima", "conforme descrito anteriormente")
  • Introducoes e conclusoes genericas
  • Exemplos redundantes (manter 1 de cada pattern, remover os demais)

2. Compactar Estrutura

  • Paragrafos → bullet points
  • Listas verbosas → tabelas
  • Explicacoes longas → [conceito]: [definicao em 1 linha]
  • Code blocks longos → apenas assinatura + comentario do comportamento

3. Preservar Informacao Critica

  • NUNCA remover: nomes de funcoes, tipos, paths, configuracoes
  • NUNCA remover: decisoes e rationale (por que X e nao Y)
  • NUNCA remover: edge cases e restricoes
  • NUNCA remover: numeros, datas, thresholds, limites
  • NUNCA simplificar: schemas, interfaces, tipos TypeScript

4. Otimizar para LLM

  • Headers claros e hierarquicos (scannable)
  • Termos tecnicos sem explicacao (LLM ja conhece)
  • Referencias absolutas (path completo, nao relativo)
  • Metadata no topo: original path, data, ratio aplicado

Formato do Output

<!-- distilled from: [path original] | date: [data] | ratio: [0.X] | original: [N] tokens | distilled: [M] tokens -->

# [Titulo]

[Conteudo destilado]

Ratio Guidelines

Tipo de documento Ratio recomendado Porque
SPEC tecnica 0.5 Muita info critica
PRD 0.3 Muito texto narrativo
Knowledge Base 0.4 Equilibrio info/narrativa
API reference 0.6 Ja e compacto
Meeting notes 0.2 Muito filler
README 0.5 Estruturado mas verboso

Read the full file on GitHub · 102 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. 12d ago First seen · 102 lines · 49 tokens per session scan A 97a00eb20f0b

Subscribe to this mod's changes

ag-destilar is a skill published in the GitHub repository andregusman-raiz/a-gusman-claude (19 stars, last pushed 3d ago), licensed MIT. It adds 49 tokens to every session and 1,051 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

docs-sync-internal

Use when code changes on the current branch need matching internal or developer documentation — "update our internal docs", "the architecture docs are stale after this change", "document what I just changed", "do the dev docs still match the code?" — or as a pre-push check that developer docs track the code. Narrower…

The01Geek/prflow · 105 tokens

lab-report-writer

A writing workflow for producing structured, journal-style laboratory, research, engineering, or competition reports from experiment details and results.

endearqb/endearqb-skills · 256 tokens

community-profiler

A skill for analyzing technical community chat records from text, screenshots, JSON, or CSV. It creates member profiles, activity assessments, influence rankings, and community-health findings.

endearqb/endearqb-skills · 226 tokens

svg-flowchart

A tool for turning written steps into a consistent SVG flowchart. SVG is a scalable image format that can be embedded in web pages and documents.

endearqb/endearqb-skills · 256 tokens

frontend-dataviz

A skill for choosing and creating clear charts from user-provided data, following the Storytelling with Data approach. It matches chart types to tasks such as comparing categories, showing trends, or displaying distributions.

endearqb/endearqb-skills · 124 tokens

storybook-story-generation

Use after React components are built (Phase 4.5 of the Figma/Canva/screenshot pipeline) or whenever a project needs Storybook coverage — auto-generates .stories.tsx and .mdx docs from components via ts-morph AST parsing, with prop controls, variant stories, action args, and default args. Keywords: Storybook, generate…

PMDevSolutions/Aurelius · 0 tokens