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

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.

agentmods
npx agentmods add skills/wecode-ai/wegent/prompt-optimization
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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00062 $0.00938
Opus 5 $0.00031 $0.00469
Sonnet 5 $0.00012 $0.00188
Haiku 4.5 $0.00006 $0.00094

Measured 4d ago against content hash 75522fcda67f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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. 4d 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 (776 stars, last pushed today), licensed Apache-2.0. It adds 62 tokens to every session and 938 once invoked, about $0.0003 per session on Opus 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 9 skills: Dify, Hermes Agent, OpenClaw, OpenCode, Pi, DocuTranslate, Oh-My-OpenAgent, Superpowers-zh, DeepSeek Harness.

znlgis/opengis-skills · 79 tokens

system-prompt

Design and review system prompts for any joelclaw agent surface (gateway, codex workers, content review, loops, etc.). Codifies the canonical principles that every system prompt must follow. Use when writing new system prompts, reviewing existing ones, or when any agent needs to generate instructions for another…

joelhooks/joelclaw · 114 tokens

contribute-to-eliza

Finish and prove a scoped elizaOS GitHub issue, or independently review and repair an open elizaOS pull request. Use when contributing compute to elizaOS by selecting unclaimed work, implementing or reviewing changes, adding real tests and evidence, validating artifacts, or preparing a contribution for maintainer…

elizaOS/eliza · 68 tokens

build-monetized-app

Use when the task is building a new app on Eliza Cloud that earns money — chat apps, agent apps, MCP-backed tools, anything that calls the cloud's chat/messages/inference endpoints on behalf of users. Covers app registration, container deploy, markup configuration, affiliate header, app charge requests, x402 payment…

elizaOS/eliza · 126 tokens

discord

Use when you need to control Discord from Otto via the discord tool: send messages, react, post or upload stickers, upload emojis, run polls, manage threads/pins/search, create/edit/delete channels and categories, fetch permissions or member/role/channel info, set bot presence/activity, or handle moderation actions in…

elizaOS/eliza · 70 tokens

eliza-cloud-buy-domain

Use whenever a user wants to register or buy a custom domain for an Eliza Cloud app — including in the same request as building the app ("build me X and put it on Y.com"). Uses Cloudflare as registrar after explicit user confirmation, paid from the user's existing cloud credit balance. Pairs with build-monetized-app…

elizaOS/eliza · 125 tokens