Execute this skill optimizes prompts for large language models (llms) to reduce token usage, lower costs, and improve performance.

MITAuto-check passedAI & LLM Engineering

Install Optimizing Prompts

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill optimizing-prompts -a claude-code

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

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace optimizing-prompts --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/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/optimizing-prompts .claude/skills/optimizing-prompts && 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
optimizing-prompts
GitHub stars
2.8k
Token cost
~1k tokens
SKILL.md length
481 words
Files
7 (incl. scripts, references, assets)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Execute this skill optimizes prompts for large language models (llms) to reduce token usage, lower costs, and improve performance.

  • Works in 3 steps: Analyzing Prompt: The skill analyzes the… → Rewriting Prompt: It rewrites the prompt… → Suggesting Alternatives: The skill…
  • Optimizing performance
  • SKILL.md covers Overview, How It Works, When to Use This Skill and Examples, plus 7 more sections
  • With phrases like optimize

What it does

Optimizing Prompts is an agent skill from jeremylongshore/tons-of-skills-marketplace. Execute this skill optimizes prompts for large language models (llms) to reduce token usage, lower costs, and improve performance. it analyzes the prompt, identifies areas for simplification and redundancy removal, and rewrites the prompt to be more conci... Use when optimizing performance. Trigger with phrases like 'optimize', 'performance', or 'speed up'.

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files, including scripts, reference files and assets (for example `assets/README.md`, `assets/example_prompts.md` and `assets/optimization_report_template.md`). Compatibility notes: Designed for Claude Code

It sits in AI & LLM Engineering, covering LLM cost and token optimization and Performance optimization. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Optimizing performance
  • With phrases like optimize

Example prompts

  • “optimize”
  • “performance”
  • “speed up”
  • “/optimizing-prompts”

Requirements

  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Grep, Glob, Bash(cmd:*)

Workflow steps

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

  1. Analyzing Prompt: The skill analyzes the input prompt to identify areas of redundancy, verbosity, and potential for simplification.
  2. Rewriting Prompt: It rewrites the prompt using techniques like concise language, targeted instructions, and efficient phrasing.
  3. Suggesting Alternatives: The skill provides the optimized prompt along with an explanation of the changes made and their expected impact.

What it can do on your machine

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

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Grep
    • Glob
    • Bash(cmd:*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/, which the agent can run.

    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

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Optimizing Prompts loads about 1k tokens when it runs, and up to ~1.1k if it reads all its reference files. Until then it costs about 95 tokens; SKILL.md has 481 words of instructions outside code blocks.

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

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); the scripts in this folder are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 481 words, ~1,037 tokens.

Download SKILL.mdSave it as .claude/skills/optimizing-prompts/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
optimizing-prompts
description
Execute this skill optimizes prompts for large language models (llms) to reduce token usage, lower costs, and improve performance. it analyzes the prompt, identifies areas for simplification and redundancy removal, and rewrites the prompt to be more conci... Use when optimizing performance. Trigger with phrases like 'optimize', 'performance', or 'speed up'.
allowed-tools
Read, Write, Edit, Grep, Glob, Bash(cmd:*)
compatibility
Designed for Claude Code
version
1.30.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
license
MIT
tags
packages, llm, performance, cost-optimization

Ai Ml Engineering Pack

Optimize LLM prompts for reduced token usage, lower costs, and improved output quality by identifying redundancies, simplifying instructions, and restructuring for clarity.

Overview

Refine prompts for optimal LLM performance. It streamlines prompts to minimize token count, thereby reducing costs and enhancing response speed, all while maintaining or improving output quality.

How It Works

  1. Analyzing Prompt: The skill analyzes the input prompt to identify areas of redundancy, verbosity, and potential for simplification.
  2. Rewriting Prompt: It rewrites the prompt using techniques like concise language, targeted instructions, and efficient phrasing.
  3. Suggesting Alternatives: The skill provides the optimized prompt along with an explanation of the changes made and their expected impact.

When to Use This Skill

This skill activates when you need to:

  • Reduce the cost of using an LLM.
  • Improve the speed of LLM responses.
  • Enhance the quality or clarity of LLM outputs by refining the prompt.

Examples

Example 1: Reducing LLM Costs

User request: "Optimize this prompt for cost and quality: 'I would like you to create a detailed product description for a new ergonomic office chair, highlighting its features, benefits, and target audience, and also include information about its warranty and return policy.'"

The skill will:

  1. Analyze the prompt for redundancies and areas for simplification.
  2. Rewrite the prompt to be more concise: "Create a product description for an ergonomic office chair. Include features, benefits, target audience, warranty, and return policy."
  3. Provide the optimized prompt and explain the token reduction achieved.
Show full SKILL.md (232 more words)Show less
Example 2: Improving Prompt Performance

User request: "Optimize this prompt for better summarization: 'Please read the following document and provide a comprehensive summary of all the key points, main arguments, supporting evidence, and overall conclusion, ensuring that the summary is accurate, concise, and easy to understand.'"

The skill will:

  1. Identify areas for improvement in the prompt's clarity and focus.
  2. Rewrite the prompt to be more direct: "Summarize this document, including key points, arguments, evidence, and the conclusion."
  3. Present the optimized prompt and explain how it enhances summarization performance.

Best Practices

  • Clarity: Ensure the original prompt is clear and well-defined before optimization.
  • Context: Provide sufficient context to the skill so it can understand the prompt's purpose.
  • Iteration: Iterate on the optimized prompt based on the LLM's output to fine-tune performance.

Integration

This skill integrates with the prompt-architect agent to leverage advanced prompt engineering techniques. It can also be used in conjunction with the llm-integration-expert to optimize prompts for specific LLM APIs.

Prerequisites

  • Appropriate file access permissions
  • Required dependencies installed

Instructions

  1. Invoke this skill when the trigger conditions are met
  2. Provide necessary context and parameters
  3. Review the generated output
  4. Apply modifications as needed

Output

The skill produces structured output relevant to the task.

Error Handling

  • Invalid input: Prompts for correction
  • Missing dependencies: Lists required components
  • Permission errors: Suggests remediation steps

Resources

  • Project documentation
  • Related skills and commands

© jeremylongshore, 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 6 other files (scripts, references, assets) in skills/.curated/optimizing-prompts of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • assets/README.md
  • assets/example_prompts.md
  • assets/optimization_report_template.md
  • assets/prompt_template.json
  • references/README.md
  • scripts/README.md

Open the folder on GitHubat commit cfae287

Compare with similar skills

Optimizing Prompts 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.

Optimizing Prompts compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Optimizing Prompts this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1kAutomated safety check: PassMIT
Cognee Performance Tuningtopoteretes/cognee32k—~2.5kAutomated safety check: PassApache-2.0
Profileverl-project/verl-omni1.2k—~1.1kAutomated safety check: PassApache-2.0
HoneyGreen-PT/honey-for-devs313—~3.5kAutomated safety check: PassMIT
Performance Optimizationalbumentations-team/AlbumentationsX567—~1.7kAutomated safety check: PassAGPL-3.0
Hivemindalirezarezvani/claude-skills28k—~2.4kAutomated safety check: PassApache-2.0

Similar skills

  • Cognee Performance Tuning

    topoteretes/cognee

    Speeds up or throttles cognee ingestion: estimate cost with a dry run, tune batching and chunk size, set LLM rate limits and run work in the background.

    32k GitHub stars~2.5k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Profile

    verl-project/verl-omni

    Route a verl-omni performance investigation to the right tool and capture a usable trace.

    1.2k GitHub stars~1.1k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Honey

    Green-PT/honey-for-devs

    Write less code and say less about it. An agent skill from Green-PT/honey-for-devs.

    313 GitHub stars~3.5k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed
  • Performance Optimization

    albumentations-team/AlbumentationsX

    Systematic performance audit for AlbumentationsX runtime code.

    567 GitHub stars~1.7k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Hivemind

    alirezarezvani/claude-skills

    Orchestrate free opencode workers from Claude Code to cut token costs.

    28k GitHub stars~2.4k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed
  • Ulw Perf

    rlaope/oh-my-hermes

    [omh] Software slowness, memory leaks, or cost spikes: find where a system is actually slow, leaking, or expensive across runtime, memory, token cost, storage, rendering, inference, CI, and query…

    3.2k GitHub stars~2.4k tokensUpdated today
    DevelopmentAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated yesterday
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated yesterday
    Auto-check passed

Questions about Optimizing Prompts

What does Optimizing Prompts do?

Execute this skill optimizes prompts for large language models (llms) to reduce token usage, lower costs, and improve performance. Optimizing Prompts is an agent skill from jeremylongshore/tons-of-skills-marketplace. Execute this skill optimizes prompts for large language models (llms) to reduce token usage, lower costs, and improve performance.

When should I use Optimizing Prompts?

Optimizing Prompts fits situations like: optimizing performance; with phrases like optimize.

How do I install Optimizing Prompts in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill optimizing-prompts -a claude-code`. Or copy the skill folder (skills/.curated/optimizing-prompts in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/optimizing-prompts in your project. Claude Code loads it when a task matches its description.

How do I install Optimizing Prompts in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill optimizing-prompts -a codex`. Or copy the skill folder (skills/.curated/optimizing-prompts in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/optimizing-prompts in your project. Codex loads it when a task matches its description.

Can I use Optimizing Prompts 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 jeremylongshore/tons-of-skills-marketplace --skill optimizing-prompts -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/optimizing-prompts, .gemini/skills/optimizing-prompts, .github/skills/optimizing-prompts and .opencode/skills/optimizing-prompts in your project.

What does Optimizing Prompts need to run?

SKILL.md names no scripts, command-line tools or credentials: Optimizing Prompts is instructions for the agent only. Its frontmatter pre-approves these tools: Read, Write, Edit, Grep, Glob, Bash(cmd:*). Compatibility (from SKILL.md): Designed for Claude Code.

Does Optimizing Prompts 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 Optimizing Prompts 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Optimizing Prompts use?

Optimizing Prompts 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 Optimizing Prompts use?

About 1k tokens (SKILL.md is roughly 4.1k 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 17 tokens, read only when the agent opens those files.

What are the alternatives to Optimizing Prompts?

Skills that share tags, products or a category with Optimizing Prompts: Cognee Performance Tuning (topoteretes/cognee, 32k stars), Profile (verl-project/verl-omni, 1.2k stars), Honey (Green-PT/honey-for-devs, 313 stars) and Performance Optimization (albumentations-team/AlbumentationsX, 567 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Optimizing Prompts?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.