prompt-optimization

prompt-optimization is a skill for Claude Code, Codex from wecode-ai/Wegent. It costs 62 tokens per session (938 once invoked), scanned A, original, Apache-2.0.

A workflow for changing the instructions that control an AI agent or its team members.

In plain words
What is it for?
Use it when you want the agent to behave differently, focus on a subject, or give a particular team member a new role.
Why use it?
It gives you a defined way to inspect the current instructions, decide what should change, and submit revised wording for review.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when you want the agent to behave differently, focus on a subject, or give a particular team member a new role.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wecode-ai/wegent/prompt-optimization
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 wecode-ai/Wegent --skill prompt-optimization
Clone the repo
git clone --depth 1 https://github.com/wecode-ai/Wegent

Made for: Claude Code, Codex.

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 prompt-optimization

README.md
[![agentmods](https://agentmods.dev/badge/skills/wecode-ai/wegent/prompt-optimization/github.svg)](https://agentmods.dev/skills/wecode-ai/wegent/prompt-optimization)
Your own site
<a href="https://agentmods.dev/skills/wecode-ai/wegent/prompt-optimization"><img src="https://agentmods.dev/badge/skills/wecode-ai/wegent/prompt-optimization/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 prompt-optimization

Your own site · 80×15
<a href="https://agentmods.dev/skills/wecode-ai/wegent/prompt-optimization"><img src="https://agentmods.dev/badge/skills/wecode-ai/wegent/prompt-optimization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 938 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 pass 7 Sept 2026
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.00062 $0.00938
Opus 5.5 $0.00025 $0.00375
Sonnet 5.5 $0.00012 $0.00188
Haiku 4.5 $0.00006 $0.00094

Measured 1mo ago against content hash 75522fcda67f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

prompt-optimization 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 1mo 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.

backend/init_data/skills/prompt-optimization/SKILL.md · 100 lines

How it starts

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

Prompt Optimization Skill

This skill allows you to view and modify the system prompts of the current AI agent (Team).

Available Tools

  • get_team_prompt() — Get the current prompt and source mapping for the team
  • submit_prompt_changes(changes) — Send optimized prompts to the user for review

Workflow

Step 1: Get Current Prompts

Call get_team_prompt(). It returns:

  • team_id: The team's database ID
  • assembled_prompt: The full assembled prompt
  • sources: Array of prompt sources, each with:
    • type: "ghost" (base prompt) or "member" (team member prompt)
    • id: Resource ID (Ghost ID or Team ID)
    • name: Display name (Ghost name or Bot name)
    • field: Field name (e.g., "systemPrompt" or "prompt")
    • content: The actual prompt text
    • index: Member index (only for "member" type)

Step 2: Analyze and Rewrite

Based on the user's request, determine which source(s) need modification:

  • If the user wants to change the agent's core behavior → modify the ghost source
  • If the user wants to change a specific team member's role → modify the member source
  • You may modify multiple sources if needed

Rules:

  • Only modify the sources that are relevant to the user's request
  • Preserve the overall structure and intent of unrelated parts
  • Write complete, production-quality prompts (not just appending text)
  • If the original prompt is in Chinese, write the modification in Chinese
  • If the original prompt is in English, write the modification in English

Step 3: Submit Changes

Call submit_prompt_changes(changes=[...]) with your changes. Each change must include:

{
  "type": "ghost",          // or "member"
  "id": 561,                // from source.id
  "name": "Ghost名称",      // from source.name, used for display
  "field": "systemPrompt",  // from source.field
  "original": "原始内容",    // from source.content
  "suggested": "修改后内容",  // your optimized version
  "index": 0                // only for "member" type, from source.index
}

Read the full file on GitHub · 100 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. 1mo ago First seen · 100 lines · 62 tokens per session scan A 75522fcda67f

Subscribe to this mod's changes

prompt-optimization is a skill published in the GitHub repository wecode-ai/Wegent (872 stars, last pushed yesterday), licensed Apache-2.0. It adds 62 tokens to every session and 938 once invoked, about $0.0002 per session on Opus 5.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

ai-skills

Use when building LLM applications, RAG knowledge bases, AI agents, terminal coding agents, multi-model orchestration, plugin-based agent harnesses, or file translation. Index of 14 skills: Dify, LangChain, LlamaIndex, Ollama, Transformers, Hermes Agent, OpenClaw, OpenCode, Pi, DocuTranslate, DeepSeek Harness and more.

znlgis/opengis-skills · 81 tokens

prompt-engineering

Use when advanced prompt engineering — chain-of-thought, few-shot, tree-of-thought, self-consistency, meta-prompting, system design, debugging, and optimization for production AI systems. Use when working with prompt engineering.

oyi77/1ai-skills · 51 tokens

tsq-prompt

A guide for writing and improving prompts, skill files, and agent instructions.

sonature-lab/timsquad · 99 tokens

prompt-optimizer

Analyze and improve LLM prompts for clarity, precision, and output quality. Use when a prompt produces inconsistent results, the model ignores instructions, outputs are too long/short, or quality is below expectations.

chandrudp29/skillhub · 45 tokens

claude-api

Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER — read BEFORE opening the target file; don't skip because it "looks like a one-liner" — whenever: the prompt names Claude/Anthropic in any form (Claude…

asgeirtj/system_prompts_leaks · 294 tokens

claude-api-in-prototypes

Call Claude from your HTML artifacts via window.claude.complete.

asgeirtj/system_prompts_leaks · 19 tokens