Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use when writing Google-style docstrings for Python functions: apply this house variant's exact formatting, not standard Google style.
.claude/skills/python-docstring-conventions/SKILL.md| Model | Eval pass | Runs |
|---|---|---|
| gemini-3.6-flash | 100% | 6 |
| gemini-3.1-pro-preview | 100% | 1 |
| Model | Lift | Δ tokens | Δ turns | Cases | Verified |
|---|---|---|---|---|---|
| gemini-3.5-flashbest | +100% | — | 0% | 24 | 86d ago |
| gemini-3.6-flash | +59% | +134% | 0% | 22 | 54d ago |
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-22 | ✗→✓ | ▲ Improved | — | — |
| case-13 | ✗→✓ | ▲ Improved | — | — |
| case-10 | ✗→✓ | ▲ Improved | — | — |
| case-01 | ✗→✓ | ▲ Improved | — | — |
| case-16 | ✗→✓ | ▲ Improved | — | — |
Write every Python function, method, and class docstring in this house variant of Google style. The rules below differ from standard Google style on several arbitrary, specific points — apply them exactly whenever you author or edit a docstring.
Calculate, Fetch, Return, Parse, Build, Merge. Never third-person (Calculates, Fetches, Returns). One line, ending in a period.
(bool): Whether the row was inserted. Never a bare bool:. The parentheses wrap the type only; the description follows the colon.
For a function returning two things, write two entries (first (str): ... and last (str): ...), not (tuple[str, str]): or (tuple):.
Defaults to 5., no default: 5, no (default 5). Describe behavior only. Erase any default value you find in an existing Args description.
, optional inside the type parentheses. Writetimeout (int, optional): Seconds to wait. The marker goes in the parens, not in the prose, and it never carries a default value.
list, dict, tuple,int, str, bool, bytes — never the capitalized typing forms List, Dict, Tuple. Use | for unions (int | None), never Optional[int] or Union[int, None]. Capitalize Any, Path, None.
Returns: when the function returns nothing(annotated -> None). Omit Args: when there are no parameters. Omit Raises: UNLESS the raise is a critical, contractual part of the function's behavior.
self and cls are never documented in a method's Args: section.Args:, Returns:, Raises:, Examples:)sit at 0 indent relative to the docstring body; their entries indent 4 spaces.
Attributes: section only — omit Methods: and Args:.__init__ gets Args: only — no Examples:, Notes:, or Methods:. Test functions get single-line docstrings only.
Rule 1 — imperative summary.
# BEFORE (base default: third-person)
"""Calculates the sum of two integers."""
# AFTER (house)
"""Calculate the sum of two integers."""Rule 2 — parenthesized return type.
# BEFORE (standard Google: bare type)
Returns:
bool: Whether the row was inserted.
# AFTER (house)
Returns:
(bool): Whether the row was inserted.Rule 3 — named values, not a tuple type.
# BEFORE
Returns:
(tuple[str, str]): The first and last name.
# AFTER
Returns:
first (str): The given name.
last (str): The family name.Rule 4 — no defaults in Args.
# BEFORE
Args:
limit (int): Max rows to return. Defaults to 100.
# AFTER
Args:
limit (int, optional): Max rows to return.Rule 5 — , optional inside the parens.
# BEFORE
Args:
timeout (int): Optional. Seconds to wait, defaults to 30.
# AFTER
Args:
timeout (int, optional): Seconds to wait.Rule 6 — lowercase builtins, | unions.
# BEFORE
Args:
columns (Optional[List[str]]): Columns to select.
Returns:
Optional[int]: The index, or None.
# AFTER
Args:
columns (list | None, optional): Columns to select.
Returns:
(int | None): The index, or None.Rule 7 — omit empty/uncritical sections.
# BEFORE (base reflexively adds Returns + Raises)
"""Record an event.
Args:
name (str): The event name.
Returns:
None: Nothing.
Raises:
RuntimeError: If logging is unconfigured.
"""
# AFTER (None return + non-critical raise both dropped)
"""Record an event.
Args:
name (str): The event name.
"""Rule 8 — never document self.
# BEFORE
Args:
self: The instance.
key (str): The lookup key.
# AFTER
Args:
key (str): The lookup key.Rule 6/Path — capitalize Path even when the param is untyped.
# BEFORE
Args:
path (str): The file to read.
# AFTER
Args:
path (Path): The file to read.Raises: that IS the contract stays. If a function's documented job is toraise on bad input (e.g. divide raising ValueError when the divisor is zero), keep Raises:. The rule omits reflexive raises (impossible-scenario guards), not contractual ones.
parse_config(path) with no annotation but the function opens a file, document it as path (Path). The docstring carries the intended type even when the signature omits it.
-> Any returns are documented, with Any capitalized: (Any): .... Only a-> None return drops the Returns: section.
tuple as a literal return shape vs. multiple values. If the function genuinelyreturns one tuple object that callers treat as a unit, a single entry is fine — but the common case (returning "the min and the max") is two named entries.
"""Return the cached value.""") are valid andpreferred for trivial functions and all test functions; don't expand them into multi-section blocks.
never mentions the default regardless of mutability.
Returns:\n dict:. Always write Returns:\n (dict):.Calculates/Returns/Fetches. Always start with the bare verb.Optional[X] or Union[X, Y]. Always use X | None / X | Y.List/Dict/Tuple. Always lowercase list/dict/tuple.(tuple):. Always name each value.Raises: for a guard the caller can't trigger. Always omit it unlessthe raise is part of the contract.
self/cls. Always start Args at the first real parameter.bool: return) because that's the base'sdefault — the house variant parenthesizes it.
Returns:\n None for a -> None function instead of omitting thesection entirely.
Args: header to a zero-parameter function.Defaults to N into the Args text — the single most common slip.Optional[int] for a int | None return, or List[str] for list., optional on a parameter that has a default in the signature.( ); multiple values are named separately., optional inside the type parens.|; Any/Path/None capitalized.Returns:/Args:/Raises: omitted when empty or non-contractual.self/cls not documented.| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-22 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.5-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +59 percentage points is the difference between those two pass rates over the 22 comparable cases.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
| Model | Method | Date | Lift |
|---|---|---|---|
| gemini-3.5-flash | verified | 6/27/2026 | +100% |
Other measured skills in the registry, with their headline benchmark lift.