prompt-token-efficiency

$npx mdskill add github/gh-aw/prompt-token-efficiency

Compress prompts for minimal tokens and maximal clarity

  • Reduces token costs while preserving LLM output quality
  • Depends on prompt engineering principles and cost metrics
  • Analyzes text length, ambiguity levels, and instruction density
  • Returns optimized prompts ready for immediate API execution

SKILL.md

.github/skills/prompt-token-efficiencyView on GitHub ↗
---
name: prompt-token-efficiency
description: Rewrite prompts for minimal tokens, maximal clarity, and low ambiguity for LLM consumption.
---

# Prompt Token Efficiency

Use this skill to compress prompts while preserving intent and output quality.

## Goals

1. Minimize token count
2. Maximize clarity
3. Minimize ambiguity
4. Optimize for LLM execution, not human prose style

## Core Rules

- Keep only task-critical information.
- Remove pleasantries, repetition, and narrative framing.
- Prefer short, concrete instructions over descriptive paragraphs.
- Use explicit constraints and output format requirements.
- Use stable terminology (one term per concept).
- Replace vague words (`appropriate`, `some`, `better`) with measurable criteria.
- Put required context before optional context.
- Avoid conflicting instructions.

## Prose Compression Pattern

Rewrite prose to be direct and compact:

1. Start with the objective in one short sentence.
2. Keep only facts needed to complete the task.
3. Replace long qualifiers with concrete limits.
4. Remove filler words that do not change behavior.
5. End with explicit success criteria.

## LLM-Optimized Writing Style

- Use imperative statements.
- Prefer bullets over long prose.
- Keep each instruction atomic.
- Avoid examples unless needed to prevent failure.
- If examples are required, include one minimal example.

## Ambiguity Checks

Before finalizing a prompt, verify:

- Any undefined noun is resolved.
- Any pronoun has a clear antecedent.
- Scope limits are explicit (time range, file range, quantity limits).
- Success criteria are testable.
- Output format is unambiguous.

## Prose Rewrite Checks

When rewriting, ensure the final prompt:

- Uses fewer words than the original.
- Preserves all required constraints.
- Uses concrete nouns instead of pronouns where possible.
- Avoids optional wording unless options are actually allowed.
- States required output and any length bound in plain language.

More from github/gh-aw

SkillDescription
agentic-workflow-designerConversational skill that interviews users to design new agentic workflows
aw-valueDesign and verify a deterministic operational-value grader for a GitHub Agentic Workflow. Use for per-run operational value, evidence attribution, maturation, baselines, and operational-value evaluators. Usage: /aw-value OWNER/REPO WORKFLOW-NAME.
awf-release-integratorUpgrade gh-aw to latest gh-aw-firewall release and identify follow-up spec tasks.
checkout-credential-reviewReview code that performs git or gh operations against repository checkouts in gh-aw, checking that the right credentials are available at the right time and that sparseness, shallowness and credential-free factors are properly considered.
console-renderingUse Go struct tags to render styled terminal output in gh-aw.
copilot-reviewTeach Copilot how to plan, address, and respond to pull request review feedback.
create-canvasAuthor, validate, and debug canvas extensions that the agent can open in the GitHub Copilot app's side panel. Use when creating, reviewing, or troubleshooting a canvas extension — including its actions, inputs, rendered content, and the surrounding extension wiring (tools, hooks, lifecycle).
custom-agentsDefine and validate GitHub custom agent files, prompts, and examples.
custom-engine-implementationAdd and test declarative behavior-defined agentic engines in gh-aw, extending Go infrastructure only when necessary.
debugging-workflowsDiagnose gh-aw failures using logs and audits; follow the shared strategy for patches and permitted active debug loops.