tools: Skill for Claude Code

.claude/skills/doc-contract/SKILL.md

doc-contract is a skill for Claude Code from adamw7/tools. It costs 81 tokens per session (1,131 once invoked), scanned A, original, MIT.

A documentation-maintenance skill for CLAUDE.md, AGENTS.md, and README.md. It keeps these files aligned with the repository's required headings, size limit, module map, and shared facts.

In plain words
What is it for?
Use it when adding modules, changing the listed documentation, updating Java, or investigating a failed documentation check.
Why use it?
It helps prevent documentation checks and builds from failing when project files or documentation change.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions AGENTS.md.

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

View source ↗ adamw7/tools
Reuse

Borrowing it

Nothing to install: this file belongs to adamw7/tools. 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/adamw7/tools/main/.claude/skills/doc-contract/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/adamw7/tools

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 doc-contract

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/adamw7/tools/doc-contract"><img src="https://agentmods.dev/badge/skills/adamw7/tools/doc-contract.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,131 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00081 $0.01131
Opus 5.5 $0.00032 $0.00452
Sonnet 5.5 $0.00016 $0.00226
Haiku 4.5 $0.00008 $0.00113

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

Security

Grade A, and why

doc-contract 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/skills/doc-contract/SKILL.md · 82 lines

How it starts

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

Doc Contract Skill

In this repository the documentation is a build artifact: CLAUDE.md, AGENTS.md and README.md are validated by the claude-code-enforcer rules, and a -DenforceClaudeMd build fails when they drift. Edit them with the rules in mind rather than discovering them in CI.

Who is the source of truth

AGENTS.md is the single source of truth. CLAUDE.md is a quick-reference summary that defers to it — it is loaded into every session, so contextBudget caps it at 32 KB. New detail belongs in AGENTS.md or in a skill, not in CLAUDE.md.

Required structure

Document Title Required ## sections
CLAUDE.md # CLAUDE.md Project · Java version · Maven · Principles for Java Development · Testing · Dependencies
AGENTS.md # AGENTS.md Project overview · Module layout · Environment & toolchain · Build, test, and run · Code style & conventions · Releasing · Pull requests & commits

Also checked: the title must be the first non-blank line; a required section must have a non-empty body (a heading with nothing under it fails); CLAUDE.md must reference AGENTS.md; and memoryImports validates the @-import graph.

The consistency rules — what must change together

  • moduleMapConsistency — every <module> in the root pom.xml must be mentioned in both CLAUDE.md and AGENTS.md. Adding a module means editing three files in one commit: the pom, the module map in CLAUDE.md, and Module layout in AGENTS.md.
  • crossDocConsistency — the Java (\d+) pattern must read the same in CLAUDE.md and AGENTS.md. A JDK bump touches both.
  • readmeConsistency — the proto(\d) pattern must agree between README.md and AGENTS.md.
  • contextBudget — CLAUDE.md ≤ 32 KB.
  • noSecrets — no credentials in .claude/settings.json, .mcp.json, or .claude/hooks.

Skills, settings and hooks are checked too

  • skillFilesExist — each directory under .claude/skills needs a non-empty SKILL.md opening with YAML front matter carrying name and description. The name must be lower-case kebab-case, ≤ 64 chars, and equal to the directory name; an unknown front-matter key is reported (it catches descripton).
  • uniqueNames / uniqueDescriptions — two definitions may not share a name or a description (compared case- and whitespace-insensitively). Claude routes by description, so duplicates make one skill shadow another. Write a description that says what it covers and when to use it, with the trigger phrases.
  • settingsJsonValid, permissionsFormat, hookCommandsValid, hooksFormat, localSettingsIgnored — .claude/settings.json, the hook scripts, and the .claude/settings.local.json entry in .gitignore (removing that entry fails the build).

Read the full file on GitHub · 82 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 82 lines · 81 tokens per session scan A db83fbcbd861

Subscribe to this mod's changes

doc-contract is a skill published in the GitHub repository adamw7/tools (11 stars, last pushed today), licensed MIT. It adds 81 tokens to every session and 1,131 once invoked, about $0.0003 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-08-30.

Related

Other skills, from other repositories

tigeropen-java

Tiger Brokers OpenAPI Java SDK — complete skills for AI coding tools. Covers SDK setup, market data queries, stock/futures/options trading, real-time push subscriptions, account management, and strategy examples. Use when building Java trading applications, querying market data, placing orders, or integrating Tiger…

tigerfintech/tigeropen-skill · 262 tokens

java-affected-tests

Use before opening or updating an OpenMetadata PR that changes Java, a JSON schema, an index mapping, a SQL migration, seed data or a pom — PR CI no longer runs the Java integration tests (they run only in the merge queue) and the JavaUIIT/search-it suites run only nightly, so this selects the unit tests and…

open-metadata/OpenMetadata · 120 tokens

azure-security-keyvault-secrets-java

Azure Key Vault Secrets Java SDK for secret management. Use when storing, retrieving, or managing passwords, API keys, connection strings, or other sensitive configuration data.

microsoft/skills · 40 tokens

azure-ai-anomalydetector-java

Build anomaly detection applications with Azure AI Anomaly Detector SDK for Java. Use when implementing univariate/multivariate anomaly detection, time-series analysis, or AI-powered monitoring.

microsoft/skills · 43 tokens

azure-communication-chat-java

Build real-time chat applications with Azure Communication Services Chat Java SDK. Use when implementing chat threads, messaging, participants, read receipts, typing notifications, or real-time chat features.

microsoft/skills · 41 tokens

azure-communication-common-java

Azure Communication Services common utilities for Java. Use when working with CommunicationTokenCredential, user identifiers, token refresh, or shared authentication across ACS services.

microsoft/skills · 35 tokens