Agent skill
auto-docstring-rules
Enforces dlt docstring conventions. Use when writing or modifying docstrings, classes, or function signatures in Python files.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/auto-docstring-rules-thanhhuong0209-dlt-normalization
SKILL.md
Docstring rules
Google style docstrings throughout. Three levels of detail:
Short form (internal methods, properties)
Description only — no Args/Returns. One-liner for simple accessors.
Full form (public API)
Full Google style with Args, Returns, Raises. Describe WHAT the function does and its output, never HOW it works internally.
def paginate(
self,
path: str = "",
method: HTTPMethodBasic = "GET",
params: Optional[Dict[str, Any]] = None,
) -> Iterator[PageData[Any]]:
"""Iterates over paginated API responses, yielding pages of data.
Args:
path (str): Endpoint path for the request, relative to `base_url`.
method (HTTPMethodBasic): HTTP method for the request, defaults to 'get'.
params (Optional[Dict[str, Any]]): Query parameters for the request.
Yields:
PageData[Any]: A page of data with request and response context.
Raises:
HTTPError: If the response status code is not a success code.
"""
- Public API args use
name (Type):format; internal methods may omit types - Args descriptions are short — one line unless truly complex
- Use
Yields:for generators,Returns:for regular functions Raises:only for exceptions the caller should handleExample:section is optional, add only when usage is non-obvious
Field docstrings
Inline triple-quoted string on the NEXT line after the field definition.
@configspec
class ItemsNormalizerConfiguration(BaseConfiguration):
add_dlt_id: bool = True
"""When true, items will have `_dlt_id` column added with a unique ID."""
add_dlt_load_id: bool = False
"""When true, items will have `_dlt_load_id` column added with current load ID."""
- Only document fields where the name + type aren't self-explanatory
- Keep to one line when possible
Anti-patterns — NEVER do these
- Do not explain HOW the code works, only WHAT it does and its output
- Do not state the obvious (
"""Returns the name"""onget_name) - Do not add docstrings to code you did not change
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?