optimize-glm-prompts

optimize-glm-prompts is a skill for Claude Code, Codex from IchenDEV/prompt-optimizer-plugins. It costs 53 tokens per session (1,182 once invoked), scanned A, original, MIT.

A guide for improving prompts written for GLM, a family of language models from Zhipu AI. It helps turn rough instructions into clearer prompts while preserving their intended output and constraints.

In plain words
What is it for?
Auditing, rewriting, migrating, or designing GLM prompts, including prompts with specific audience, language, formatting, validation, or model-behavior requirements.
Why use it?
Vague or poorly structured prompts can produce inconsistent results or omit important requirements. This helps define the task, inputs, output format, evidence needs, and fallback behavior clearly.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present.

Part of the prompt-optimizer plugin — 11 skills shipped together

Good fit Auditing, rewriting, migrating, or designing GLM prompts, including prompts with specific audience, language, formatting, validation, or model-behavior requirements.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ichendev/prompt-optimizer-plugins/optimize-glm-prompts
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 IchenDEV/prompt-optimizer-plugins --skill optimize-glm-prompts
Clone the repo
git clone --depth 1 https://github.com/IchenDEV/prompt-optimizer-plugins

Made for: Claude Code, Codex.

Or install prompt-optimizer, the plugin that ships this one along with the rest of its 11 skills.

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 optimize-glm-prompts

README.md
[![agentmods](https://agentmods.dev/badge/skills/ichendev/prompt-optimizer-plugins/optimize-glm-prompts/github.svg)](https://agentmods.dev/skills/ichendev/prompt-optimizer-plugins/optimize-glm-prompts)
Your own site
<a href="https://agentmods.dev/skills/ichendev/prompt-optimizer-plugins/optimize-glm-prompts"><img src="https://agentmods.dev/badge/skills/ichendev/prompt-optimizer-plugins/optimize-glm-prompts/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 optimize-glm-prompts

Your own site · 80×15
<a href="https://agentmods.dev/skills/ichendev/prompt-optimizer-plugins/optimize-glm-prompts"><img src="https://agentmods.dev/badge/skills/ichendev/prompt-optimizer-plugins/optimize-glm-prompts.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,182 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.
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.00053 $0.01182
Opus 5.5 $0.00021 $0.00473
Sonnet 5.5 $0.00011 $0.00236
Haiku 4.5 $0.00005 $0.00118

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

Security

Grade A, and why

optimize-glm-prompts 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 2mo 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.

plugins/prompt-optimizer/skills/optimize-glm-prompts/SKILL.md · 91 lines

How it starts

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

Optimize GLM Prompts

Turn rough ideas and existing prompt stacks into copy-ready GLM prompts. Preserve the user's intent and hard constraints, ask for genuinely blocking information, and add structure only when it changes model behavior.

Use the official basis

Read references/official-guidance.md when model-specific rationale or the longer checklist is needed. Treat its prose as a dated summary and its URL as the canonical source. Fetch the live Zhipu AI page before making claims about current model IDs, API features, parameters, context limits, availability, or pricing.

Follow the workflow

1. Capture the prompt contract

Identify:

  • the intended user-visible outcome, audience, and language;
  • the inputs, background, references, or retrieval results GLM will receive;
  • standing behavior that belongs in a system prompt, if the integration supports one;
  • facts and hard constraints to preserve;
  • the output content, format, schema, and length;
  • evidence, reasoning visibility, validation, and fallback behavior needed for success.

Treat these as diagnostic dimensions, not mandatory headings. Preserve system, developer, user, and tool-description boundaries when the user supplies a layered prompt stack.

2. Apply the clarity gate

Ask a question only when two reasonable answers would materially change the outcome, source boundary, prompt layer, schema, permissions, or success criteria.

Treat these gaps as blocking by default:

  • a vague topic and generic verb with no identifiable deliverable or audience;
  • a required backend schema with undefined fields or semantics;
  • an unspecified source set whose choice changes the answer;
  • an external action without clear authorization;
  • conflicting role, scope, evidence, or output requirements.

When clarification is blocking, ask one to three high-information questions and do not produce a provisional prompt. Otherwise proceed with conservative local assumptions and list only assumptions actually made. Never invent facts, sources, policies, access, or permissions.

Read the full file on GitHub · 91 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2mo ago Changed · -81 tokens per session 36b6ca60268e
  2. 3mo ago First seen · 91 lines · 134 tokens per session scan A cb1323c7f826

Subscribe to this mod's changes

optimize-glm-prompts is a skill published in the GitHub repository IchenDEV/prompt-optimizer-plugins (7 stars, last pushed 2mo ago), licensed MIT. It adds 53 tokens to every session and 1,182 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-31.

Related

optimize-glm-prompts compared with skills from other repositories

optimize-glm-prompts next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
optimize-glm-promptsIchenDEV/prompt-optimizer-pluginsSkill72mo agoMITA53Claude Code, Codex
instructorOrchestra-Research/AI-Research-SKILLsSkill15k1mo agoMITA41Claude Code
build-dotnet-agent-servicegaelic-ghost/socketSkill123mo agoApache-2.0A36Claude Code
prompt-mininidhinjs/prompt-miniSkill318mo agoMITA37Claude Code
writing-instruction-builderproduct-on-purpose/writing-style-catalogSkill43d agononeA35Claude Code
analyze-promptrayapatiranjithai/prompt-analyzerSkill14mo agoMITA64Claude Code
gpt-5-6-prompt-enginewp-a/gpt-5.6-prompt-engineSkill44mo agoMITA58Codex