improve-legal-prompt

improve-legal-prompt is a skill for Claude Code, Codex from microsoft/cat-agent-skills. It costs 168 tokens per session (2,552 once invoked), scanned A, original, MIT.

A rewritten prompt for Cowork, making a rough legal request clearer about its goal, documents, constraints, missing information and expected output. It returns the prompt and two or three improvement notes without carrying out the legal task.

In plain words
What is it for?
Use it to improve a request such as asking Cowork to review an agreement or revise a clause, while keeping the original legal objective.
Why use it?
It helps users give a coding or document agent a precise legal instruction before asking it to analyse, review, draft or edit. This reduces ambiguity without claiming to solve the underlying legal problem.

Skill for Claude CodeCodex ✓ vendor

Written for no agent in particular: nothing here depends on one.

Good fit Use it to improve a request such as asking Cowork to review an agreement or revise a clause, while keeping the original legal objective.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/microsoft/cat-agent-skills/improve-legal-prompt
About the project

microsoft/cat-agent-skills is a static website that catalogs reusable instruction sets and related packages for AI agents. People use it to search, filter, rate, and download skills for Cowork, Copilot Studio, and Scout, along with Copilot plugins and Scout automations. The catalogue entries are the skills, instructions, plugins, and settings displayed by the site.

microsoft/cat-agent-skills · 101 stars · on GitHub

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 microsoft/cat-agent-skills --skill improve-legal-prompt
Clone the repo
git clone --depth 1 https://github.com/microsoft/cat-agent-skills

Made for: Claude Code, Codex.

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 improve-legal-prompt

README.md
[![agentmods](https://agentmods.dev/badge/skills/microsoft/cat-agent-skills/improve-legal-prompt/github.svg)](https://agentmods.dev/skills/microsoft/cat-agent-skills/improve-legal-prompt)
Your own site
<a href="https://agentmods.dev/skills/microsoft/cat-agent-skills/improve-legal-prompt"><img src="https://agentmods.dev/badge/skills/microsoft/cat-agent-skills/improve-legal-prompt/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 improve-legal-prompt

Your own site · 80×15
<a href="https://agentmods.dev/skills/microsoft/cat-agent-skills/improve-legal-prompt"><img src="https://agentmods.dev/badge/skills/microsoft/cat-agent-skills/improve-legal-prompt.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 168 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,552 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.00168 $0.02552
Opus 5.5 $0.00067 $0.01021
Sonnet 5.5 $0.00034 $0.00510
Haiku 4.5 $0.00017 $0.00255

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

Security

Grade A, and why

improve-legal-prompt 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 2d 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.

submissions/legal-for-cowork/skills/improve-legal-prompt/SKILL.md · 225 lines

How it starts

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

Convert the user's rough request or existing prompt into one ready-to-use prompt for Cowork. Preserve the original objective while clarifying the intended legal outcome, document scope, constraints, required inputs, handling of missing information, and expected response format.

This skill optimizes the prompt. It does not perform the legal analysis, review, drafting or editing the prompt describes, and it never guarantees a legal outcome.

When NOT to Use

Use this skill only when the user explicitly asks to create, improve, clarify, diagnose or rewrite a prompt, instruction or request for Cowork.

  • Rewrite my prompt for reviewing this agreement — prompt optimization. In scope.
  • How should I ask Cowork to revise the termination clause? — prompt optimization. In scope.
  • Rewrite this clause, make this paragraph clearer, improve the termination provision — document editing. Use edit-contract.
  • Is this clause enforceable?, what does this mean for us? — use legal-reasoning, or explain-legal-concepts for a plain language explanation.
  • Review this agreement — use review-contract.
  • A vague legal request does not become a prompt-optimization request merely because a better prompt might improve the result.

Hand-off rule. If a request, or part of one, matches an item above that names another skill, do not do that part here — even when the documents are already open and the work looks quick. Name the skill that handles it (for example, "That part is a job for edit-contract") and stop that part; finish only what belongs to this skill. If the named skill is not installed, say so plainly and do not attempt it here.

Step 1: Identify the source request

  • Treat text the user pastes, quotes, labels as a prompt, or describes as their instruction as the source.
  • Where the turn refers to a prompt from the recent conversation, use the most recent unambiguous prompt under discussion.
  • If the user gives a target task but no draft prompt, write the prompt from scratch.
  • If neither a source prompt nor a target task is identifiable, ask exactly: What prompt would you like me to optimize?
  • Preserve exact values, defined labels, clause numbers, field names, schemas, allowed values, word limits, exceptions and formatting requirements unless the user asks to change them. Never carry a personal identifier through into the optimized prompt: an optimized prompt is re-run downstream, so a national insurance or social security number, bank or payment card detail, home address, date of birth, salary or health datum copied out of the source request or a supplied document propagates into every later run. Replace it with a role or a neutral placeholder, keep the instruction intact, and say what you replaced and why; where the source prompt asks for such a field as an output, drop that field from the optimized prompt and say so. See Personal data minimisation in Guardrails.

Read the full file on GitHub · 225 lines

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. 2d ago First seen · 225 lines · 168 tokens per session scan A 7cc26c88139c

Subscribe to this mod's changes

improve-legal-prompt is a skill published in the GitHub repository microsoft/cat-agent-skills (101 stars, last pushed yesterday), licensed MIT. It adds 168 tokens to every session and 2,552 once invoked, about $0.0007 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-11-06.

Related

improve-legal-prompt compared with skills from other repositories

improve-legal-prompt next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
improve-legal-promptmicrosoft/cat-agent-skillsSkill101yesterdayMITA168Claude Code, Codex
fto-triageanthropics/claude-for-legalSkill9.9kyesterdayApache-2.0A81Claude Code
legal-holdanthropics/claude-for-legalSkill9.9kyesterdayApache-2.0A68Claude Code
specification-writingwanshuiyin/Auto-claude-code-research-in-sleepSkill19ktodayMITA49Claude Code
regulatory-research-fallbackHKUDS/OpenSpaceSkill7.9k2d agoMITA20Claude Code, Codex
terms-of-servicegenspark-ai/genofficeSkill12ktodayApache-2.0A32Claude Code, Codex
x-scorecardx-cmd/x-cmdSkill4.7k8d agoApache-2.0A57Claude Code, Codex