enhance-prompt
Use when the user has typed a short or vague prompt and the system is configured to expand prompts before submission, or when the user explicitly invokes…
Skill by LegalQuants
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/legalquants-enhance-prompt
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: writing, productivity, legal, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/enhance-prompt
What's inside
- Skill name
enhance-prompt- Description
- Use when the user has typed a short or vague prompt and the system is configured to expand prompts before submission, or when the user explicitly invokes "Enhance Prompt" or asks the system to "improve this prompt before sending." Rewrites the user's input into a structured legal prompt with role, jurisdiction, task, constraints, and output format made explicit, and returns the expansion alongside a brief reasoning section so the user can review, edit, or skip before the expanded prompt is submitted to the model.
- License
- Apache-2.0
- Instructions
- 117 lines in SKILL.md · view on GitHub
Files (13)
- SKILL.md
- already-structured.md · acceptance/fixtures/
- multi-task-prompt.md · acceptance/fixtures/
- vague-review-prompt.md · acceptance/fixtures/
- already-structured.golden.json · acceptance/snapshots/
- multi-task-prompt.golden.json · acceptance/snapshots/
- vague-review-prompt.golden.json · acceptance/snapshots/
- example_short_prompt.md · examples/
- example_skipped.md · examples/
- example_with_skill.md · examples/
- expansion_patterns.md · reference/
- preserve_user_voice.md · reference/
- test-plan.md
SKILL.md (first lines)
# Enhance Prompt
Rewrite the user's prompt into a more effective version before it is submitted to the model. Show the user what changed and why. Make the expansion *visible and editable*, never silent.
The point of this skill is not to make every prompt longer. It is to surface the implicit assumptions in a short prompt and turn them into explicit instructions, so the model produces what the user actually wanted on the first try rather than after several rounds of clarification.
## When this skill applies
Apply when:
1. The user has invoked Enhance Prompt explicitly (button click, skill attachment, or trigger phrase).
2. The application has Enhance Prompt's auto-expand toggle enabled and the user has just submitted a prompt.
In auto-expand mode, also apply the skip conditions in the next section before producing an expansion. Auto-expand should not be aggressive — many prompts do not need expansion, and producing an expansion when one is not needed is friction rather than value.
## When NOT to apply (skip conditions)
Skip the expansion and let the original prompt through unchanged when:
- **The prompt is already well-structured.** If the user has already specified role, task, constraints, and output format, expansion adds noise. Heuristic: if the prompt is over ~80 words and contains explicit instructions about format, audience, or scope, skip.
- **The prompt is conversational or interpersonal.** "thanks," "what did you mean by that," "go ahead," "skip that point" — these are conversational moves, not new tasks. Do not expand.
- **The prompt is a follow-up question continuing a prior task.** When chat_history shows the user is iterating on a previous answer ("can you also add X," "shorter please," "what about California"), the prior turn supplies context; expansion would discard it. Do not expand.
- **The prompt is operational rather than substantive.** "summarize the document I just uploaded," "translate this," "format this as a table" — these are direct operational asks; expansion adds friction without adding clarity.
- **The user has explicitly opted out for this prompt.** If the user has typed `--no-enhance-prompt`, `[skip enhance prompt]`, or similar, honor it.
- **A skill is attached that already expands the prompt itself.** If `attached_skills` includes a skill whose description shows it handles prompt expansion or rewriting, skip — let the attached skill drive.
When skipping, return the skip decision explicitly (see Output section) so the application can pass the original prompt through.
## What a good expansion does
A good expansion makes implicit elements explicit. The implicit elements that most often need surfacing in legal prompts are:
1. **Role.** What kind of lawyer is the model adopting? "You are an in-house counsel reviewing X" anchors the response in the right voice and rigor. Default role is in-house counsel; adjust for context.
2. **Jurisdiction.** Legal answers depend on jurisdiction. If the prompt asks a question with jurisdiction-dependent answers and no jurisdiction is specified, fold in the user's configured `jurisdiction` if available, or note that the expansion assumed US-default and the answer should be re-asked if a different jurisdiction applies.
3. **Audience.** Is the output for the user, for forwarding to a business partner, for board consumption, for outside counsel? The audience changes the tone, length, and depth.
4. **Scope.** "Review this contract" can mean a 30-second triage or a two-hour substantive review. Surface the implicit scope. "Identify three to five most important issues" is a different ask than "comprehensive review."
5. **Output format.** Bulleted list? Memo with headings? Table? One-paragraph summary? Default to whatever the substance suggests, but make it explicit.
6. **Constraints and exclusions.** What should the response *not* do? "Without giving a final legal opinion," "without speculating about enforceability," "limited to issues observable in the document text" — these are the safety rails that keep the model in scope.
7. **Citation expectations.** When the prompt is about a document, specify whether responses should cite specific clauses or sections.
A good expansion adds these only where they are actually missing. Adding a role to a prompt that already specifies a role is noise. Adding a jurisdiction to a question that has no jurisdiction-dependent component is noise.
## What a good expansion does NOT do
- **Does not invent legal substance.** The skill expands the prompt; it does not pre-answer it. If the user's prompt is "what's the standard term length for an NDA," the expansion clarifies role, audience, and format — it does not insert "the standard is 3 years" into the prompt.
- **Does not narrow the user's intent.** If the user's prompt is open-ended, the expansion preserves that openness. Specifying "give me three issues" when the user said "review this" substitutes the skill's judgment for the user's.
- **Does not import skills the user did not attach.** If there is no NDA-Review skill attached but the prompt is about an NDA, the expansion may note that NDA-Review exists in the library, but does not insert NDA-Review's review framework into the prompt.
- **Does not contradict skill instructions.** If a skill is attached, the expansion respects the skill's scope. The skill's frontmatter description tells you what the skill does; the expansion should complement, not override.
- **Does not discard user wording.** Preserve the user's substantive verbs and nouns. "Help me figure out" stays as-is; do not "improve" it to "Analyze comprehensively." The user's voice carries information about urgency, formality, and confidence — preserving it is part of preserving intent.
- **Does not exceed reasonable length.** A good expansion is typically 2–5x the length of the input. A 10-word prompt becoming a 200-word prompt is a sign the expansion has overreached.
## Workflow
1. **Read the input.** Parse the raw_input. Identify what the user is asking for (the substantive task) and how the user is asking for it (voice, formality, urgency).
2. **Check skip conditions.** Run through the skip conditions in the section above. If any apply, return a skip decision (see Output section). Stop here.
3. **Read the context.** If `attached_skills`, `attached_files`, `chat_history`, or `jurisdiction` are provided, read them. Identify what is already established and should not be re-established.
4. **Identify the gaps.** Walk through the seven elements (role, jurisdiction, audience, scope, output format, constraints, citation expectations) and identify which are implicit in the prompt and worth surfacing. Skip elements that are already explicit, and skip elements that are not relevant to this prompt (e.g., citation expectations are irrelevant if no document is in scope).
5. **Draft the expansion.** Write the expanded prompt. Preserve the user's substantive verbs and nouns. Add the elements identified in step 4. Keep total length to 2–5x the input length.
6. **Write the reasoning section.** Three to six bullet points, one per element you added or modified. Each bullet names what was added and why in plain language. The user will read this; write for the user, not for a developer.
7. **Return the structured output.** See Output section.
## Output
The skill returns a structured object:
```yaml
expansion_applied: true | false
expanded_prompt: <the expanded prompt text, or the original if skipped>
reasoning:
- <bullet on what was added or modified, and why>
- <one bullet per substantive change>
skip_reason: <if expansion_applied is false, the reason from the skip conditions list, or null>
preview_to_user: |
<a single rendered string the application can show in the "review before sending" UI, combining the expanded prompt and the reasoning, formatted for human reading>
```
The skill is responsible for:
- Producing the expansion content and reasoning.
- Returning the structured output the application consumes.
The application is responsible for:
- Showing `preview_to_user` to the user with edit/submit/skip controls.
- Submitting `expanded_prompt` to the model when the user confirms.
- Submitting the original `raw_input` if the user chooses skip.
- Providing a "view this skill" affordance on the review screen so the user can inspect the skill itself if they want to (see Transparency below).
The skill itself does not invoke the model with the expanded prompt; it returns the expansion for the application to handle.
## Transparency
This skill is designed to be inspectable by the user. The application should make the skill's contents (this SKILL.md and its supporting files) viewable from the review-before-sending screen. Users who want to understand exactly how their prompts are being enhanced — including the patterns this skill applies, the constraints on what is added, and the principles for preserving voice — should be able to read the skill itself.
Transparency is a feature, not a leak. The skill's instructions are not a trade secret; they are open-source work product. Users who can read the skill can also disagree with it, fork it, or replace it. That is the right relationship between users and the tools that shape their work.
## Edge cases and refusals
- **Empty or near-empty input.** If the user submitted only whitespace, "?", "test," or similar, return `expansion_applied: false` with `skip_reason: "input too short to expand meaningfully"`.
- **Multilingual input.** Preserve the language of the input. A prompt in French expands to a French expanded prompt with French reasoning. If the input mixes languages or the language is unclear, expand in the dominant language and note the ambiguity in reasoning.
- **Prompts that contain confidential information in the prompt itself.** Do not extract or paraphrase the confidential content into the reasoning section. The reasoning section talks about *structure*, not content.
- **Prompts that are clearly outside legal practice.** If the user's prompt has nothing to do with legal work (e.g., "what's a good restaurant in Boston," "write a haiku about my dog"), expand using general role/audience/format heuristics rather than legal-specific ones. Do not refuse — Enhance Prompt is a general expansion skill that is calibrated for legal work but still useful elsewhere.
- **Prompts asking the skill to do something other than expand.** If the user's prompt is "what does Enhance Prompt do" or "skip Enhance Prompt," route to the skip path and return the original.
## Reference materials
- `reference/expansion_patterns.md` — common patterns for legal-prompt expansion across categories of legal work (contract review, drafting, research, advice).
- `reference/preserve_user_voice.md` — the principles for keeping the user's voice intact through expansion.
- `examples/example_short_prompt.md` — short prompt expanded to a full structured prompt.
- `examples/example_skipped.md` — example of a prompt that should be skipped, with reasoning.
- `examples/example_with_skill.md` — expansion when a skill is already attached, showing how the expansion respects the attached skill's scope.From LegalQuants/lq-ai, Apache-2.0.
More from LegalQuants/lq-ai
- 0.784score
nda-review
LegalQuants
Use when the user uploads or pastes a non-disclosure agreement and asks for review, redline, risk assessment, or a recommendation on whether to sign.
SkillAFreshness: A★ 156Claude Code +9 - 0.784score
action-items-from-client-alert
LegalQuants
Use when the user provides a client alert, regulatory bulletin, law firm memo, or similar legal update and wants the time-sensitive action items, deadlines…
SkillAFreshness: A★ 156Claude Code +9 - 0.784score
playbook-easy-extract
LegalQuants
Use when extracting the negotiated positions from a single prior contract as input to the Easy Playbook auto-generation pipeline.
SkillAFreshness: A★ 156Claude Code +9 - 0.784score
vendor-privacy-policy-first-pass
LegalQuants
Use when the user has a vendor's published privacy policy (URL, PDF, or pasted text) and wants a fast triage assessment to decide whether deeper diligence is…
SkillAFreshness: A★ 156Claude Code +9 - 0.784score
contract-qa
LegalQuants
Use when the user has a contract loaded and asks a specific question about it — what a clause means, where something is addressed, whether a term is unusual…
SkillAFreshness: A★ 156Claude Code +9 - 0.784score
msa-review-saas
LegalQuants
Use when the user uploads or pastes a Software-as-a-Service Master Services Agreement (MSA), Master Subscription Agreement, SaaS Agreement, or Cloud Services…
SkillAFreshness: A★ 156Claude Code +9 - 0.784score
comms-improver
LegalQuants
Use when the user has a piece of legal-jargon-heavy text and wants it rewritten in plain language for a specified non-legal audience.
SkillAFreshness: A★ 156Claude Code +9 - 0.784score
msa-review-commercial-purchase
LegalQuants
Use when the user uploads or pastes a Master Purchase Agreement, Master Supply Agreement, Master Goods Agreement, or commercial purchase MSA covering the…
SkillAFreshness: A★ 156Claude Code +9 - 0.784score
dpa-checklist-review
LegalQuants
Use when the user provides a Data Processing Agreement, Data Processing Addendum, or HIPAA Business Associate Agreement and asks whether it contains the terms…
SkillAFreshness: A★ 156Claude Code +9 - 0.777score
orchestrator-harness
LegalQuants
Demonstrates an approved plan, bounded parallel delegation, progress collection and synthesis using sample findings.
SkillAFreshness: A★ 156Claude Code +9 - 0.777score
saved-notes-demo
LegalQuants
Demonstrate optional saved notes and a bundled helper across skill invocations.
SkillAFreshness: A★ 156Claude Code +9 - 0.777score
orchestration-topic-demo
LegalQuants
Produces a bounded sample topic outcome for the orchestration demonstration.
SkillAFreshness: A★ 156Claude Code +9
Signals
- Stars
- 156
- Forks
- 67
- Open issues
- 94
- Last commit (this folder)
- Oct 12, 2026 (16 days ago)
- Last release
- Oct 8, 2026 (20 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/LegalQuants/lq-ai
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from LegalQuants
- 0.784score
contract-qa
LegalQuants
Use when the user has a contract loaded and asks a specific question about it — what a clause means, where something is addressed, whether a term is unusual…
SkillAFreshness: A★ 156Claude Code +9 - 0.784score
dpa-checklist-review
LegalQuants
Use when the user provides a Data Processing Agreement, Data Processing Addendum, or HIPAA Business Associate Agreement and asks whether it contains the terms…
SkillAFreshness: A★ 156Claude Code +9 - 0.784score
action-items-from-client-alert
LegalQuants
Use when the user provides a client alert, regulatory bulletin, law firm memo, or similar legal update and wants the time-sensitive action items, deadlines…
SkillAFreshness: A★ 156Claude Code +9 - 0.784score
comms-improver
LegalQuants
Use when the user has a piece of legal-jargon-heavy text and wants it rewritten in plain language for a specified non-legal audience.
SkillAFreshness: A★ 156Claude Code +9 - 0.784score
nda-review
LegalQuants
Use when the user uploads or pastes a non-disclosure agreement and asks for review, redline, risk assessment, or a recommendation on whether to sign.
SkillAFreshness: A★ 156Claude Code +9 - 0.784score
msa-review-commercial-purchase
LegalQuants
Use when the user uploads or pastes a Master Purchase Agreement, Master Supply Agreement, Master Goods Agreement, or commercial purchase MSA covering the…
SkillAFreshness: A★ 156Claude Code +9
Cite this page
enhance-prompt skill. Agent Mart. https://agentmart.dev/skills/legalquants-enhance-prompt (last updated 2026-10-24)