deephaven-mcp: Skill for Claude Code

.agents/skills/pydocs-improve/SKILL.md

pydocs-improve is a skill for Claude Code, Codex from deephaven/deephaven-mcp. It costs 69 tokens per session (1,614 once invoked), scanned A, original, Apache-2.0.

A guide for improving Python documentation strings, the explanatory text attached to code elements.

In plain words
What is it for?
It is for documenting functions, classes, modules, arguments, return values, errors, and Pydantic model fields without changing the program code.
Why use it?
It finds missing, outdated, or inaccurate documentation and makes its structure more complete and consistent.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

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

Reuse

Borrowing it

Nothing to install: this file belongs to deephaven/deephaven-mcp. 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/deephaven/deephaven-mcp/main/.agents/skills/pydocs-improve/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/deephaven/deephaven-mcp

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 pydocs-improve

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/deephaven/deephaven-mcp/pydocs-improve"><img src="https://agentmods.dev/badge/skills/deephaven/deephaven-mcp/pydocs-improve.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,614 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.00069 $0.01614
Opus 5 $0.00034 $0.00807
Sonnet 5 $0.00014 $0.00323
Haiku 4.5 $0.00007 $0.00161

Measured 8d ago against content hash 4962f7ddeaad, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

pydocs-improve 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 8d 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.

.agents/skills/pydocs-improve/SKILL.md · 96 lines

How it starts

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

Single source of truth. The canonical, exact-match wording for the "Terminology Note" and "Format Accuracy for AI Agents" sections lives in mcp-tool-sections.md. Other skills reference that file rather than duplicating the wording — duplicates drift. Load it when a tool docstring needs those sections.

Review the docstrings in the specified file for correctness, completeness, and clarity. Also review the module-level docstring at the top of the file. Only change docstrings — do not change source code.

Only make a change if there is a significant improvement. Unnecessary changes make code review harder.

Correctness: Apply the pydocs-accuracy criteria — description, Args, Returns, Raises must all match the actual code; no stale documented behavior.

Type information: Function signatures must have type annotations, and docstrings must also document types in Google style:

  • Args: param (type): description
  • Returns: type: description
  • Raises: ExceptionType: description

Completeness: Every non-trivial function and class should have a docstring. Args, Returns, and Raises sections should be present when applicable.

Pydantic fields: Every field on a StrictSchema / RedactableSchema subclass needs runtime-introspectable documentation. Apply the ref-configuration-conventions skill for the canonical rule and examples; in summary:

  • Each field carries a PEP 257 trailing docstring (triple-quoted string immediately below the assignment line). The project enables use_attribute_docstrings=True on the base so Pydantic harvests it into model_fields[name].description.
  • Sphinx Attributes: blocks on the class docstring are invisible to model_json_schema() and the MCP tool surface — remove any redundant Attributes: listing when adding trailing docstrings.
  • Explicit Field(description="...") works at runtime but violates project style — convert to the trailing-docstring form opportunistically.
  • Verify with uv run python -c "from <module> import <Model>; print(<Model>.model_fields['<field>'].description)"; None or an empty string means the field is undocumented at runtime regardless of what the class docstring says.
  • Enforced by tests/test_field_docs_contract.py.

Contract, not context: A docstring documents what the function accepts, returns, and raises — not its surrounding context. Specifically, do not include:

  • A list of callers (it's grep-recoverable and creates maintenance friction when callers change)
  • Per-caller behavioral exposition (each caller's reason for using the function belongs in that caller's docstring or in a design comment, not here)
  • Future-evolution hedging like "current rules", "at present, only...", or "additional rules can be added" (the docstring describes what the function does today; future changes are documented when they happen)
  • Implementation rationale beyond what a caller needs to use the function correctly (rationale belongs in commit messages, design docs, or inline comments at the implementation site)
  • Another type's internal structure — its sub-fields, its members, or its validation mechanics. Name the type and stop; that type's own docstrings own those details. Applies to module, class, and field docstrings alike.

If a docstring describes the world outside the function — its callers, its design history, its future plans, or the internals of a type it merely references — it's wrong. This holds for module and class docstrings with the same force.

# WRONG — re-narrates AuthConfig's internals; duplicates the Schema::
# block and AuthConfig's own field docstrings, and drifts when either changes
"""... the `auth` block validates to `AuthConfig`, whose `credentials`
is a `CredentialsUnion` at `auth.credentials` ..."""

# RIGHT — name the type and stop
"""... the `auth` block (an `AuthConfig`) carries the connection credentials ..."""

Module and package docstrings: A package __init__.py docstring is a one-line statement of what the package is, plus a list of its surface submodules — nothing more. The "Contract, not context" rule applies with the same force here; module/package docstrings are the most common place it is violated. Specifically:

Read the full file on GitHub · 96 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. 8d ago First seen · 96 lines · 69 tokens per session scan A 4962f7ddeaad

Subscribe to this mod's changes

pydocs-improve is a skill published in the GitHub repository deephaven/deephaven-mcp (5 stars, last pushed 4d ago), licensed Apache-2.0. It adds 69 tokens to every session and 1,614 once invoked, about $0.0003 per session on Opus 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-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens