infermatrixlab/infermatrixcopilot/docstring-conventions

Claude Code and agent skill by infermatrixlab/infermatrixcopilot

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

House docstring standard (PEP 257 + Google style, terse rationale-first voice) — every module/class/function documents its logic and inputs/outputs; one-liners for trivial accessors; docstrings are additive; never introduce repo-specific literals in a docstring

Install

npx vskill@latest install infermatrixlab/infermatrixcopilot/docstring-conventions

SKILL.md

Diagnose

A module/class/function/method has no docstring, or one that restates the signature instead of explaining behavior + I/O. Or a PR adds a public function with no docstring. The normative reference is doc/contributing/DOCSTRING_STYLE.md.

Fix

Write to the house voice (grounded in PEP 257 form + Google's "what to document"), NOT heavy Args:/Returns: blocks:

  • Module: the one thing the file owns + what it exports. For a re-export

__init__.py, say what the package groups and that the surface is re-exported. The module docstring is the file's first statement, above from __future__.

  • Class: role in one line; note the key attribute or invariant it upholds.

Dataclass field meaning goes in the class docstring or an inline # comment.

  • Function/method: summary line, then inputs → output and the non-obvious

why, in prose. Name the parameters that carry meaning; say what the return represents. Keep the contract framing the specs use — call out when a function is a fail-closed gate, publishes state for a later step (B2), degrades to a typed BLOCKED result, or records a capability_gap.

  • Trivial accessor / property / tiny closure: a one-line docstring is

correct and PEP-257-preferred — do not scaffold it.

Scale a large pass with parallel agents over disjoint file sets, each given the style doc and the AST list of what's missing, told to add docstrings ONLY.

Verification

  • AST scan for coverage: parse every file, assert ast.get_docstring is

non-empty for the module and every ClassDef/FunctionDef/AsyncFunctionDef.

  • python -m py_compile each edited file; full test suite green.
  • The diff must be additive — the only acceptable deletions are pass

placeholders in empty classes that a docstring now replaces. Any other removed line means code was changed.

  • Re-run the repo-neutrality guard: a docstring must not add a repo-specific

literal (naming a sibling repo, a /rebase/ path). Reword to a generic phrase ("the parent rebase-agent") instead of loosening the ceiling.

Anti-patterns

  • Docstrings that narrate the code line-by-line instead of the intent/contract.
  • Inventing specifics (thresholds, line numbers, behavior) the code doesn't

support — describe only what the body actually does.

  • Changing signatures/logic or rewriting a correct existing docstring during a

docstring pass — it is purely additive.

  • Duplicating the per-file SPEC — the docstring is the local in-code view; the

spec is the normative contract.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
19
Repository forks
11
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/infermatrixlab/infermatrixcopilot/docstring-conventions/badge)](https://verified-skill.com/skills/infermatrixlab/infermatrixcopilot/docstring-conventions)

Something wrong with this skill or its page? Tell us.