contract-review: Command for Claude Code

.claude/commands/library.md

library is a command for Claude Code from lowtidebuild/contract-review. It costs 0 tokens per session (351 once invoked), scanned A, original, Apache-2.0.

A command-line library manager for contract-review documents and their related clauses, playbooks, and comment banks. It keeps approved, archived, and deprecated materials organized for later lookup.

In plain words
What is it for?
Use it to list or inspect documents, search clauses by structured criteria or meaning, deprecate assets, and archive superseded documents.
Why use it?
It avoids manually searching folders and helps prevent outdated or archived documents from being treated as active resources.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

This is lowtidebuild/contract-review's own configuration. It tells Claude Code how to work on contract-review 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 contract-review configures →

Reuse

Borrowing it

Nothing to install: this file belongs to lowtidebuild/contract-review. 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/lowtidebuild/contract-review/main/.claude/commands/library.md
Clone the repo
git clone --depth 1 https://github.com/lowtidebuild/contract-review

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 library

README.md
[![agentmods](https://agentmods.dev/badge/commands/lowtidebuild/contract-review/library/github.svg)](https://agentmods.dev/commands/lowtidebuild/contract-review/library)
Your own site
<a href="https://agentmods.dev/commands/lowtidebuild/contract-review/library"><img src="https://agentmods.dev/badge/commands/lowtidebuild/contract-review/library/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 library

Your own site · 80×15
<a href="https://agentmods.dev/commands/lowtidebuild/contract-review/library"><img src="https://agentmods.dev/badge/commands/lowtidebuild/contract-review/library.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 351 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.00000 $0.00351
Opus 5.5 $0.00000 $0.00140
Sonnet 5.5 $0.00000 $0.00070
Haiku 4.5 $0.00000 $0.00035

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

Security

Grade A, and why

library 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 1mo 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/commands/library.md · 52 lines

What it actually says

Library Management

You are managing the contract review library. Execute the requested library operation.

$ARGUMENTS


Available Commands

If no specific command is given, ask the user what they'd like to do.

list

List assets in the library. Read contract-review/library/indexes/documents.json and display a summary table:

  • doc_id, title, doc_class, contract_family, status, approval_state
  • Support filtering by: doc_class, contract_family, status

show [doc_id]

Display full details of a specific asset:

  • Manifest metadata
  • Clause count and clause types
  • Validation report summary
  • Related playbooks/comment banks

search [query]

Search the library by structured criteria and/or natural language:

  1. Filter contract-review/library/indexes/clauses.json by clause_type, contract_family, jurisdiction
  2. For semantic queries, use LLM judgment to match against clause text

deprecate [doc_id]

Set the asset's status to deprecated. Refresh indexes. Confirm with the user before executing.

archive [doc_id]

Move the asset from approved/ to archive status. Exclude from active indexes. Confirm with the user before executing.

supersede [old_doc_id] [new_doc_id]

Register a new asset as the successor of an old one. Update the supersession chain. Requires user confirmation.

refresh [doc_id]

Update the last_legal_refresh_date field. Clear stale status. Requires user confirmation.

rebuild-index

Perform a full scan of contract-review/library/approved/ and regenerate all index files in contract-review/library/indexes/. Use this to recover from index corruption.

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. 1mo ago First seen · 52 lines · 0 tokens per session scan A 7c0f8dbaebf4

Subscribe to this mod's changes

library is a command published in the GitHub repository lowtidebuild/contract-review (41 stars, last pushed 3mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 351 tokens. 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-08-30.