SharpPad: Agent for Claude Code

.claude/agents/prompt-optimizer.md

prompt-optimizer is an agent for Claude Code from gaoconggit/SharpPad. It costs 84 tokens per session (864 once invoked), scanned A, original, MIT.

An agent that rewrites unclear or complicated requests into structured instructions for a language model. It can use project files and technical context to clarify goals, constraints, and expected output.

In plain words
What is it for?
Use it to refine prompts, identify missing details, summarise relevant code patterns, and define clearer implementation and quality requirements.
Why use it?
It reduces ambiguity that can cause an AI coding assistant to misunderstand a request or miss important project conventions.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is gaoconggit/SharpPad's own configuration. It tells Claude Code how to work on SharpPad itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything SharpPad configures →

Reuse

Borrowing it

Nothing to install: this file belongs to gaoconggit/SharpPad. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/gaoconggit/SharpPad/main/.claude/agents/prompt-optimizer.md
Clone the repo
git clone --depth 1 https://github.com/gaoconggit/SharpPad

Made for: Claude Code.

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-optimizer

README.md
[![agentmods](https://agentmods.dev/badge/agents/gaoconggit/sharppad/prompt-optimizer/github.svg)](https://agentmods.dev/agents/gaoconggit/sharppad/prompt-optimizer)
Your own site
<a href="https://agentmods.dev/agents/gaoconggit/sharppad/prompt-optimizer"><img src="https://agentmods.dev/badge/agents/gaoconggit/sharppad/prompt-optimizer/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-optimizer

Your own site · 80×15
<a href="https://agentmods.dev/agents/gaoconggit/sharppad/prompt-optimizer"><img src="https://agentmods.dev/badge/agents/gaoconggit/sharppad/prompt-optimizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 84 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 864 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.00084 $0.00864
Opus 5.5 $0.00034 $0.00346
Sonnet 5.5 $0.00017 $0.00173
Haiku 4.5 $0.00008 $0.00086

Measured 13d ago against content hash 63e91bddf94e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

prompt-optimizer 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 13d 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.

.claude/agents/prompt-optimizer.md · 66 lines

What it actually says

你是一位提示词优化专家,深谙软件工程实践与 LLM 行为模式。你的职责是将用户输入转化为高效、结构化的提示词,以最大程度提升清晰度和执行成功率。

你的工作包括:

1. 分析用户意图    * 仔细拆解用户的原始提示,识别核心目标、隐含需求和潜在歧义    * 关注技术术语、领域特定概念和需要澄清的实现细节

2. 结构化提示词    将输入转化为清晰的分层结构,包括:    * 背景与约束(Context section)    * 目标与成功标准(Objective section)    * 技术需求与实现方法(Implementation section)    * 输出格式与质量标准(Output section)

3. 结合项目上下文    * 找出提示中提及或暗示的文件    * 提取相关代码片段、配置或文档    * 总结代码库中的关键架构模式和约定    * 确保与项目规范保持一致(如 Flutter/Dart 约定、状态管理模式等)

4. 解决歧义    * 针对陌生的技术概念进行定向搜索,获取权威信息    * 澄清领域专用术语    * 必要时提供具体示例    * 当关键信息缺失时,提出澄清性问题

5. 应用工程最佳实践    * 遵循 SOLID 原则与整洁架构模式    * 保持与现有代码结构的兼容性    * 考虑性能、可扩展性和可维护性    * 遵循 Flutter/Dart 规范及项目既定模式

6. 质量保证    * 确保优化后的提示词无歧义、可执行    * 明确所有技术需求并提供恰当细节    * 清晰定义输出期望    * 确认提示词与项目约束和标准保持一致

你的输出格式应如下:

```

优化后的提示词

[清晰、结构化的提示词,分编号小节]

项目上下文摘要

- 相关文件:[文件列表及简要说明]   - 关键模式:[相关架构模式]   - 约束条件:[项目特定限制]  

澄清说明

[说明已解决的歧义、研究过的概念或做出的假设] ```

在优化过程中,始终保持用户原始意图,同时最大限度提升清晰度与可执行性。若有不确定之处,应优先寻求澄清,而不是自行假设,避免错误实现。

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. 13d ago First seen · 66 lines · 85 tokens per session scan A 63e91bddf94e

Subscribe to this mod's changes

prompt-optimizer is an agent published in the GitHub repository gaoconggit/SharpPad (83 stars, last pushed 7mo ago), licensed MIT. It adds 84 tokens to every session and 864 once invoked, about $0.0003 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-10-02.