All skills
microsoft avatar

/markdown-token-optimizer

@5829570 official

Analyzes markdown files for token efficiency. 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

Use this Skill: https://skilld.dev/gh/microsoft/github-copilot-for-azure/markdown-token-optimizer

This session only. Nothing lands on disk.

referencesANTI-PATTERNS.md

≈769 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Anti-Patterns: Common Token Wasters

Patterns that inflate token counts without adding value.

Decorative Elements

Excessive Emojis

Bad:

# 🚀 Getting Started 🎉

Welcome! 👋 Let's get you set up! 💪

## 📋 Prerequisites ✨

You'll need: 🔧
- Node.js 🟢
- Azure CLI ☁️

Good:

# Getting Started

## Prerequisites

- Node.js 18+
- Azure CLI

Token cost: ~2 tokens per emoji. 10 decorative emojis = 20 wasted tokens.

When emojis ARE appropriate:

  • Status indicators in tables
  • Actual meaning (not decoration)

Horizontal Rules Overuse

Bad:

## Section One
Content here.
---
## Section Two
More content.
---

Good:

## Section One
Content here.

## Section Two
More content.

Token cost: ~3 tokens per ---

Redundant Content

Repeated Introductions

Bad:

## Prerequisites
Before you begin, ensure these are installed:
- Node.js (with redundant explanations)
- Azure CLI (with redundant explanations)

Good:

## Prerequisites

- Node.js 18+
- Azure CLI 2.50+

Echo Headers

Bad:

## Troubleshooting

This section covers troubleshooting steps.

### Common Issues

Here are some common issues you might encounter.

Good:

## Troubleshooting

| Issue | Solution |
|-------|----------|
| Auth fails | Run `az login` |

Verbose Constructions

Filler Words

Bad:

To successfully deploy your application to Azure, 
you will first need to make sure that you have properly 
configured all of the necessary prerequisites.

Good:

Before deploying to Azure, configure these prerequisites:

Savings: ~20 tokens

Unnecessary Qualifiers

Bad:

- It's very important to always remember to...
- You should definitely make sure to...
- It's absolutely essential that you...

Good:

- Remember to...
- Ensure...
- Required:...

Structural Issues

Inline Documentation That Should Be Referenced

Bad (in SKILL.md):

## Complete API Reference
### GET /users
Returns all users. Accepts params...
[continues for 200 more lines]

Good:

## API Reference
See [references/API.md](references/API.md) for endpoints.
Key endpoints: `GET /users`, `POST /users`, `GET /users/:id`

Duplicate Examples

Bad: Three separate examples with 95% identical base command

Good:

## Examples
Basic: `az storage account create -n NAME -g RG -l LOCATION`
Options: `--tags env=dev`, `--sku Standard_GRS`

More: [references/EXAMPLES.md](references/EXAMPLES.md)

Detection Checklist

When reviewing a file, check for:

  • More than 3 decorative emojis
  • Sections that start with "This section..."
  • Verbose constructions (see Filler Words section)
  • Same command/text appearing 3+ times
  • Code blocks longer than 10 lines
  • Tables with 10+ rows in main SKILL.md
  • Headers followed immediately by similar subheaders

Source: SKILL.md on GitHub

No alerts15d5 checks · Risk SAFE
  • Gen Agent Trust Hub15d

    This skill is a markdown optimization utility focused on providing guidance for reducing token consumption in documentation. It consists entirely of informational markdown files and does not contain any executable code or security risks.

  • Socket15d

    No alerts

  • Snyk15d

    Risk: LOW · No issues

  • Runlayer7mo

    3 files scanned · No issues

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 5829570. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 17 hours ago.

Activeupdated 7 months ago
metadata
{
  "author": "Microsoft",
  "version": "1.0.0"
}
  • Documentation
  • markdown
  • tokens
  • optimization
  • file-size
  • ai-efficiency
  • conciseness
  • skill-md

README badge

README badge for microsoft/github-copilot-for-azure/markdown-token-optimizer

Analyzes markdown files for token efficiency and suggests optimizations to reduce consumption without sacrificing clarity. Counts tokens, identifies patterns like verbosity and duplication, and recommends fixes with estimated savings. Targets documentation and SKILL.md files that need to be more concise for AI consumption.

Generated from the current SKILL.md.

Does this skill modify files automatically?
No. It analyzes markdown and suggests optimizations in a table format but does not auto-modify files.
What token counting method does this use?
The skill uses an approximate rule of 4 characters equals 1 token.
What types of markdown problems does it detect?
It scans for emojis, verbosity, duplication, and large code blocks as token-wasting patterns.
What are the target file sizes this skill aims for?
SKILL.md files should be under 500 tokens, and reference files under 1000 tokens.

Generated from the current SKILL.md. These answers refresh after source changes.