Official agent skill

Markdown Token Optimizer

by Azure in Azure/azure-sdk-tools

Analyze markdown files for token efficiency and reduce context-window bloat.

OfficialMITAuto-check passedAgent Workflows

Install Markdown Token Optimizer

skills CLI
$ npx skills add Azure/azure-sdk-tools --skill markdown-token-optimizer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Azure/azure-sdk-tools markdown-token-optimizer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Azure/azure-sdk-tools.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/markdown-token-optimizer .claude/skills/markdown-token-optimizer && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
markdown-token-optimizer
GitHub stars
134
Token cost
~602 tokens
SKILL.md length
203 words
Files
5 (incl. references)
Skills in repo
35
Repo updated
First seen
Licence
MIT

At a glance

Analyze markdown files for token efficiency and reduce context-window bloat.

  • Works in 4 steps: Count - Calculate tokens (~4 chars = 1… → Scan - Find patterns: emojis, verbosity,… → Suggest - Table with location, issue,… → …
  • : code optimization
  • SKILL.md covers Triggers, Steps, Rules and Examples, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Markdown Token Optimizer is an agent skill from Azure/azure-sdk-tools, published by the product's own GitHub organization. Analyze markdown files for token efficiency and reduce context-window bloat. UTILITY SKILL. DO NOT USE FOR: code optimization, general file editing, non-markdown files. TRIGGERS: optimize markdown, reduce tokens, token count, token bloat, too many tokens, make concise, shrink file, file too large, optimize for AI, token efficiency, verbose markdown, reduce file size.

Its SKILL.md is about 600 tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `evals/eval.yaml`, `evals/trigger.eval.yaml` and `references/ANTI-PATTERNS.md`). Compatibility notes: copilot-chat

It sits in Agent Workflows, covering Markdown, Context engineering and LLM cost and token optimization. The repository describes itself as: Tools repository leveraged by the Azure SDK team. The licence is MIT.

When your agent uses it

  • : code optimization
  • General file editing
  • Non-markdown files

Example prompts

  • “/markdown-token-optimizer”

Requirements

  • Compatibility (from SKILL.md): copilot-chat

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Count - Calculate tokens (~4 chars = 1 token), report totals
  2. Scan - Find patterns: emojis, verbosity, duplication, large blocks
  3. Suggest - Table with location, issue, fix, savings estimate
  4. Summary - Current/potential/savings with top recommendations

What it can do on your machine

Read from SKILL.md and the folder at commit 69f4006. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    copilot-chat

    From compatibility in the SKILL.md frontmatter.

Context cost

Markdown Token Optimizer loads about 602 tokens when it runs, and up to ~2.3k if it reads all its reference files. Until then it costs about 100 tokens; SKILL.md has 203 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~100
When it runs · the whole SKILL.md, loaded when a task matches
~602
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Azure/azure-sdk-tools at commit 69f4006, republished under its MIT licence (© Azure). 203 words, ~602 tokens.

Download SKILL.mdSave it as .claude/skills/markdown-token-optimizer/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
markdown-token-optimizer
description
Analyze markdown files for token efficiency and reduce context-window bloat. **UTILITY SKILL**. DO NOT USE FOR: code optimization, general file editing, non-markdown files. TRIGGERS: optimize markdown, reduce tokens, token count, token bloat, too many tokens, make concise, shrink file, file too large, optimize for AI, token efficiency, verbose markdown, reduce file size.
compatibility
copilot-chat
license
MIT
metadata.author
Microsoft
metadata.version
1.0.0

Markdown Token Optimizer

This skill analyzes markdown files for token efficiency and reduces context-window bloat by identifying verbose patterns, duplicated content, and oversized sections, then suggesting concise revisions that preserve meaning while making documentation easier for AI systems to consume.

Triggers

USE FOR: analyze markdown files for token efficiency and reduce context-window bloat WHEN: "optimize markdown", "reduce tokens", "token count", "token bloat", "too many tokens", "make concise", "shrink file", "file too large", "optimize for AI", "token efficiency", "verbose markdown", "reduce file size" DO NOT USE FOR: code optimization, general file editing, non-markdown files

Steps

  1. Count - Calculate tokens (~4 chars = 1 token), report totals
  2. Scan - Find patterns: emojis, verbosity, duplication, large blocks
  3. Suggest - Table with location, issue, fix, savings estimate
  4. Summary - Current/potential/savings with top recommendations

See ANTI-PATTERNS.md for detection patterns and OPTIMIZATION-PATTERNS.md for techniques.

Rules

  • Suggest only (no auto-modification)
  • Preserve clarity in all optimizations
  • SKILL.md target: <500 tokens, references: <1000 tokens

Examples

  • "Optimize this SKILL.md for tokens"
  • "Count tokens in references/SCORING.md"

Troubleshooting

High token count? Check for emojis, repeated headings, or verbose tables.

MCP Tools

ToolPurpose
NoneCLI-only; uses local file tools

CLI fallback: Primary mode is CLI-based. No MCP servers required.

References

© Azure, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (references) in .github/skills/markdown-token-optimizer of Azure/azure-sdk-tools.

  • SKILL.md
  • evals/eval.yaml
  • evals/trigger.eval.yaml
  • references/ANTI-PATTERNS.md
  • references/OPTIMIZATION-PATTERNS.md

Open the folder on GitHubat commit 69f4006

Compare with similar skills

Markdown Token Optimizer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Markdown Token Optimizer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Markdown Token Optimizer this skillAzure/azure-sdk-tools134—~602Automated safety check: PassMIT
Context Mode Output Sandboxmksglu/context-mode26k—~4.1kAutomated safety check: PassCustom licence
Context Mode for Antigravity CLImksglu/context-mode26k—~850Automated safety check: PassCustom licence
Context Fundamentalsguanyang/open-agent-hub9732 repos~4.2kAutomated safety check: PassMIT
Context DoctorjzOcb/context-doctor119—~642Automated safety check: PassMIT
Code Context Slicingtrailofbits/skills7.4k—~2.1kAutomated safety check: PassCC-BY-SA-4.0

Similar skills

  • Context Mode Output Sandbox

    mksglu/context-mode

    Routes large command, file, API and browser output through context-mode tools so only the needed result enters the agent's context, instead of dumping it via Bash.

    26k GitHub stars~4.1k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Routing rules for using context-mode MCP tools in Antigravity CLI: sandboxed code runs, file analysis, indexed search and web fetches that keep large output out of the conversation.

    26k GitHub stars~850 tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Context Fundamentals

    guanyang/open-agent-hub

    This skill should be used to explain or reason about the foundational concepts of context engineering: what context is, the anatomy of a context window, how attention mechanics work, the U-shaped…

    973 GitHub starsUsed in 2 repos~4.2k tokens
    Agent WorkflowsAuto-check passed
  • Context Doctor

    jzOcb/context-doctor

    Visualize and diagnose OpenClaw context window usage. An agent skill from jzOcb/context-doctor.

    119 GitHub stars~642 tokensUpdated 6 mo ago
    Agent WorkflowsAuto-check passed
  • Code Context Slicing

    trailofbits/skills

    Official

    Picks a small, graph-based slice of source with Trailmark and hands a focused code task to a smaller or local model without exposing the whole repository.

    7.4k GitHub stars~2.1k tokensUpdated 5 days ago
    Agent WorkflowsAuto-check passed
  • Loads one section of a Markdown file by its path#h2-slug address with a bundled resolver script, for use outside OpenRig's context library.

    5.5k GitHub stars~341 tokensUpdated today
    Agent WorkflowsAuto-check passed

More from Azure/azure-sdk-tools

All 35 skills in this repo
  • Apiview Feedback Resolution

    Azure/azure-sdk-tools

    Official

    Analyze and resolve APIView review feedback on Azure SDK PRs.

    134 GitHub stars~547 tokensUpdated today
    Auto-check passed
  • Official

    Deploy test resources and run Azure SDK tests in live, record, or playback mode.

    134 GitHub stars~1.5k tokensUpdated today
    Auto-check: notes
  • Azsdk Common Pipeline Analysis

    Azure/azure-sdk-tools

    Official

    Analyze Azure SDK CI/CD pipeline failures into a structured diagnosis, and define the required output format.

    134 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Official

    Create, get, update, abandon, and link SDK PRs to release plan work items for Azure SDK releases.

    134 GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Azure Typespec Assessment

    Azure/azure-sdk-tools

    Official

    Assess Azure TypeSpec Git diffs for semantic intent, REST and downstream SDK breaking changes, Azure Guidelines compliance, and documentation completeness.

    134 GitHub stars~1.9k tokensUpdated today
    Auto-check passed

Questions about Markdown Token Optimizer

What does Markdown Token Optimizer do?

Analyze markdown files for token efficiency and reduce context-window bloat. Markdown Token Optimizer is an agent skill from Azure/azure-sdk-tools, published by the product's own GitHub organization. Analyze markdown files for token efficiency and reduce context-window bloat.

When should I use Markdown Token Optimizer?

Markdown Token Optimizer fits situations like: : code optimization; general file editing; non-markdown files.

How do I install Markdown Token Optimizer in Claude Code?

Run `npx skills add Azure/azure-sdk-tools --skill markdown-token-optimizer -a claude-code`. Or copy the skill folder (.github/skills/markdown-token-optimizer in Azure/azure-sdk-tools) into .claude/skills/markdown-token-optimizer in your project. Claude Code loads it when a task matches its description.

How do I install Markdown Token Optimizer in Codex?

Run `npx skills add Azure/azure-sdk-tools --skill markdown-token-optimizer -a codex`. Or copy the skill folder (.github/skills/markdown-token-optimizer in Azure/azure-sdk-tools) into .agents/skills/markdown-token-optimizer in your project. Codex loads it when a task matches its description.

Can I use Markdown Token Optimizer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Azure/azure-sdk-tools --skill markdown-token-optimizer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/markdown-token-optimizer, .gemini/skills/markdown-token-optimizer, .github/skills/markdown-token-optimizer and .opencode/skills/markdown-token-optimizer in your project.

What does Markdown Token Optimizer need to run?

SKILL.md names no scripts, command-line tools or credentials: Markdown Token Optimizer is instructions for the agent only. Compatibility (from SKILL.md): copilot-chat.

Does Markdown Token Optimizer access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Markdown Token Optimizer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Markdown Token Optimizer use?

Markdown Token Optimizer is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Markdown Token Optimizer use?

About 602 tokens (SKILL.md is roughly 2.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.7k tokens, read only when the agent opens those files.

What are the alternatives to Markdown Token Optimizer?

Skills that share tags, products or a category with Markdown Token Optimizer: Context Mode Output Sandbox (mksglu/context-mode, 26k stars), Context Mode for Antigravity CLI (mksglu/context-mode, 26k stars), Context Fundamentals (guanyang/open-agent-hub, 973 stars) and Context Doctor (jzOcb/context-doctor, 119 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Markdown Token Optimizer?

Azure (a GitHub organization, an official publisher) maintains it in Azure/azure-sdk-tools, which has 134 GitHub stars. The repository holds 35 skills in this directory. The repository was last updated on October 6, 2026.

Source: Azure/azure-sdk-tools on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.