Install
openclaw skills install sharpinputUse when a user asks to optimize, sharpen, clarify, rewrite, pressure-test, or improve an input, prompt, question, requirement, plan, idea, or message before sending it to an AI or person. Trigger on "帮我优化/润色/理清/改一下/这样问行不行", "怎么问 AI 更好", "optimize this prompt", "make this clearer", or any discussion about prompt/question quality. Do not use for directly answering the underlying task, coding, data analysis, or file operations.
openclaw skills install sharpinputSharpInput is an AI input compiler. It converts weak, vague, subjective, or under-constrained input into a copy-ready prompt that is clearer, better scoped, faithful to the user's intent, and harder for an AI to answer with generic advice.
It does not solve the user's underlying task by default. It improves the user's input so another AI response can be better.
Always preserve these invariants:
SharpInput is organized as an agent orchestration layer plus focused capability skills.
| Layer | File | Role |
|---|---|---|
| Main orchestration | AGENT.md | full routing flow and handoff contract |
| Trigger skill | SKILL.md | compact runtime checklist loaded on trigger |
| Capability skills | skills/*/SKILL.md | focused modules for intent, scenario, context, compiling, pressure, judge, rendering |
| References | references/*.md | taxonomies, templates, rubrics, and shared data |
| Regression assets | examples/, tests/ | examples and acceptance cases |
Read AGENT.md when the task is non-trivial, ambiguous, scenario-heavy, or Level 2/3.
Trigger check
-> Input normalization
-> Gate Level 0-3
-> Intent detection
-> Scenario detection
-> Scenario slot elicitation or general context completion
-> Route selection
-> Prompt compilation
-> Intent fidelity check
-> Prompt quality scoring
-> Optional Judge review
-> Output rendering
-> Feedback/self-learning
Trigger SharpInput only when the user asks to improve the input itself.
Use SharpInput:
Do not trigger SharpInput:
If user intent is mixed, split:
你是想让我直接回答这个问题,还是把它改成一个更好的 AI 提问?
| Level | When | Default Route |
|---|---|---|
| Level 0 | very short input or user asks for quick/simple | Quick Rewrite |
| Level 1 | clear direction, mainly wording/structure improvement | Quick Rewrite or Clarify First |
| Level 2 | needs stance, constraints, comparison, optimization, or trade-off | Pressure Prompt |
| Level 3 | high-risk decision, multi-path strategy, long-term impact, or requested review | Judge Mode |
Short input is not automatically Level 0. Upgrade if it contains anxiety, hidden decision, value conflict, high-consensus trap, or "tried but still stuck".
Use capability files as focused reference modules:
| Need | Read |
|---|---|
| identify primary/secondary intent | skills/intent-detection/SKILL.md |
| detect concrete scenario | skills/scenario-detection/SKILL.md |
| ask scenario-specific slots | skills/scenario-slot-elicitation/SKILL.md |
| fill generic missing context | skills/context-completion/SKILL.md |
| clarify vague subjective description | skills/description-clarifier/SKILL.md |
| compile final prompt | skills/prompt-compiler/SKILL.md |
| add pressure without over-contrarian behavior | skills/pressure-strategy/SKILL.md |
| review high-risk prompts | skills/judge-review/SKILL.md |
| format user-facing output | skills/output-renderer/SKILL.md |
Do not load every capability file by default. Read only what the route needs.
Pass information between modules using this shape:
{
"raw_input": "",
"target_input": "",
"user_instruction": "",
"task_mode": "prompt_optimization",
"level": 1,
"primary_intent": "",
"secondary_intent": "",
"intent_confidence": 0.0,
"scenario": "",
"slot_template": "",
"known_context": {},
"missing_fields": [],
"slot_questions": [],
"clarified_dimensions": [],
"pressure_requirements": [],
"compiled_prompt_draft": "",
"fidelity_check": {},
"quality_score": {},
"judge_result": {},
"final_prompt": "",
"risk_notes": []
}
The handoff contract is defined in references/handoff-contract.md.
| Route | Use When | Modules |
|---|---|---|
| Quick Rewrite | short/simple prompt improvement | intent -> prompt compiler -> renderer |
| Clarify First | vague or subjective input | intent -> scenario -> slot/context -> description clarifier -> compiler -> renderer |
| Pressure Prompt | decision/comparison/optimization/analysis | intent -> context -> compiler -> pressure -> fidelity -> scoring -> renderer |
| Judge Mode | Level 3/high-risk/multi-path/review requested | intent -> scenario -> context -> compiler -> pressure -> judge -> rewrite if needed -> renderer |
Before final output:
tests/quality-rubric.md.If quality is 6.5-7.4, rewrite once. If below 6.5, return to context completion or scenario slot elicitation.
Every final response must include:
Never output only critique, rating, or suggestions.
| File | Purpose |
|---|---|
references/intent-taxonomy.md | canonical 14 intent definitions |
references/scenario-slot-templates.md | scenario-specific slot templates |
references/prompt-patterns.md | thinking frameworks and prompt patterns |
references/pressure-strategies.md | default-answer stress test and pressure rules |
references/output-templates.md | final output templates |
references/judge-rubric.md | Judge review rubric |
references/handoff-contract.md | shared data object |
references/interaction-patterns.md | user-choice prompts and fallbacks |
references/self-learning.md | preference learning |
Use tests/regression-cases.md after structural changes. The essential checks: