返回 Skill 列表
extension
分类: 开发与工程无需 API Key

prompt-shaping

提出对不明确请求的结构化解释。当用户的请求模糊或不完整,但可以做出合理假设时使用。通过重述、结构化以及承诺下一步行动来快速原型化意图。

person作者: jakexiaohubgithub

Prompt Shaping

Rapid prototyping of user intent through structured proposals.

When to Apply

User request is underspecified but agent can infer plausible intent.

Process

  1. Restate in natural language - Articulate what you understand the user wants, making assumptions explicit
  2. Bullet the structure - Break the restatement into scannable components
  3. Propose a grounding loop - Define how you will verify the work is complete
  4. State the next action - Commit to a concrete step if the interpretation is correct

Grounding Loop

Before committing to action, propose how you will verify completion:

  • Define success criteria - What observable outcome proves the request is fulfilled?
  • Propose a verification method - A concrete check the agent can execute (test, command, assertion)
  • Commit to iteration - Run the verification repeatedly until it passes

The grounding loop ensures the agent doesn't just claim success—it demonstrates success through executable feedback.

Example proposals:

"I'll add the API endpoint, then write a test that calls it and asserts the expected response. I'll iterate until the test passes."

"I'll fix the bug by first writing a failing test that reproduces it, then modifying the code until the test passes."

"I'll refactor the module, running the existing test suite after each change to ensure no regressions."

The loop terminates when the verification passes, not when the agent believes the work is done.

Example

User: "I want to add some kind of caching"

Agent: "It sounds like you want to reduce redundant computation or network calls by storing results temporarily. I'm assuming:

  • In-memory cache (not distributed)
  • Cache invalidation on write
  • For the API layer, not the database layer

If this is correct, I'll start by adding a simple LRU cache wrapper around the API client."

Context Grounding

Before proposing, orient to the environment:

  • Scan for existing patterns that inform reasonable defaults
  • Note what's present that the proposal should integrate with
  • Identify constraints the user may not have stated but likely expects