본문으로 건너뛰기
cccskills
무료GitHub에 공개

docstring

Add or improve Google-style docstrings, the explanations embedded in Python code, for modules and classes. Document constructor arguments, public methods, configuration fields, and enum values while preserving existing documentation that already meets the project’s conventions.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

Document a Python module and its classes using Google style

설치 방법 보기

이럴 때 유용합니다

  • Document a Python module
  • Explain constructor arguments and public methods
  • Describe configuration fields and enum values
  • Fill gaps in existing code documentation

포함된 파일(1)

  • SKILL.md7.6 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Document a Python module or class using Google-style docstrings following project conventions. The argument can be a class name or a module path.

Instructions

  1. Determine what to document based on the argument:

    If a module path is provided (e.g. src/pipecat/audio/vad/vad_analyzer.py):

    • Use that file directly

    If a class name is provided (e.g. VADAnalyzer):

    • Search for class ClassName in src/pipecat/
    • If multiple files contain that class name, list all matches with their file paths, ask the user which one they want to document, and wait for confirmation
  2. Once the file is identified, read the module to understand its structure:

    • Identify all classes, functions, and important type aliases
    • Understand the purpose of each component
  3. Apply documentation in this order:

    • Module docstring (at top, after imports)
    • Class docstrings
    • __init__ methods (always document constructor parameters)
    • Public methods (not starting with _)
    • Dataclass/config classes with field descriptions
  4. Skip documentation for:

    • Private methods (starting with _)
    • Simple dunder methods (__str__, __repr__, __post_init__)
    • Very simple pass-through properties
    • Already documented code - If a class, method, or function already has a complete docstring that follows the project style, do not modify it. A docstring is complete if it has:
      • A one-line summary
      • Args section (if it has parameters)
      • Returns section (if it returns something meaningful)
    • Only add or improve documentation where it is missing or incomplete

Module Docstring Format

"""[One-line description of module purpose].

[Optional: Longer explanation of functionality, key classes, or use cases.]
"""

Example:

"""Neuphonic text-to-speech service implementations.

This module provides WebSocket and HTTP-based integrations with Neuphonic's
text-to-speech API for real-time audio synthesis.
"""

Class Docstring Format

class ClassName:
    """One-line summary describing what the class does.

    [Longer description explaining purpose, behavior, and key features.
    Use action-oriented language.]

    [Optional: Event handlers, usage notes, or important caveats.]
    """

Example:

class FrameProcessor(BaseObject):
    """Base class for all frame processors in the pipeline.

    Frame processors are the building blocks of Pipecat pipelines, they can be
    linked to form complex processing pipelines. They receive frames, process
    them, and pass them to the next or previous processor in the chain.

    Event handlers available:

    - on_before_process_frame: Called before a frame is processed
    - on_after_process_frame: Called after a frame is processed

    Example::

        @processor.event_handler("on_before_process_frame")
        async def on_before_process_frame(processor, frame):
            ...

        @processor.event_handler("on_after_process_frame")
        async def on_after_process_frame(processor, frame):
            ...
    """

Note: When listing event handlers, do NOT use backticks. Include an Example:: section (with double colon for Sphinx) showing the decorator pattern and function signature for each event.

Constructor (__init__) Format

def __init__(self, *, param1: Type, param2: Type = default, **kwargs):
    """Initialize the [ClassName].

    Args:
        param1: Description of param1 and its purpose.
        param2: Description of param2. Defaults to [default].
        **kwargs: Additional arguments passed to parent class.
    """

Example:

def __init__(
    self,
    *,
    api_key: str,
    voice_id: Optional[str] = None,
    sample_rate: Optional[int] = 22050,
    **kwargs,
):
    """Initialize the Neuphonic TTS service.

    Args:
        api_key: Neuphonic API key for authentication.
        voice_id: ID of the voice to use for synthesis.
        sample_rate: Audio sample rate in Hz. Defaults to 22050.
        **kwargs: Additional arguments passed to parent InterruptibleTTSService.
    """

Method Docstring Format

async def method_name(self, param1: Type) -> ReturnType:
    """One-line summary of what method does.

    [Longer description if behavior isn't obvious.]

    Args:
        param1: Description of param1.

    Returns:
        Description of return value.

    Raises:
        ExceptionType: When this exception is raised.
    """

Example:

async def put(self, item: Tuple[Frame, FrameDirection, FrameCallback]):
    """Put an item into the priority queue.

    System frames (`SystemFrame`) have higher priority than any other
    frames. If a non-frame item is provided it will have the highest priority.

    Args:
        item: The item to enqueue.
    """

Dataclass/Config Format

@dataclass
class ConfigName:
    """One-line description of configuration.

    [Explanation of when/how to use this config.]

    Parameters:
        field1: Description of field1.
        field2: Description of field2. Defaults to [default].
    """

    field1: Type
    field2: Type = default_value

Example:

@dataclass
class FrameProcessorSetup:
    """Configuration parameters for frame processor initialization.

    Parameters:
        clock: The clock instance for timing operations.
        task_manager: The task manager for handling async operations.
        observer: Optional observer for monitoring frame processing events.
    """

    clock: BaseClock
    task_manager: BaseTaskManager
    observer: Optional[BaseObserver] = None

Enum Documentation Format

class EnumName(Enum):
    """One-line description of the enum purpose.

    [Longer description of how the enum is used.]

    Parameters:
        VALUE1: Description of VALUE1.
        VALUE2: Description of VALUE2.
    """

    VALUE1 = 1
    VALUE2 = 2

Writing Style Guidelines

  • Concise and professional - No casual language or filler words
  • Action-oriented - Start with verbs: "Processes...", "Manages...", "Converts..."
  • Purpose before implementation - Explain WHY before HOW
  • Clear parameter descriptions - Include type hints, defaults, and purpose
  • No redundant type info - Type hints are in the signature, don't repeat in description
  • Use backticks for code references - Wrap class names, method names, event names, parameter names, and code snippets in backticks

Good: "Neuphonic API key for authentication." Bad: "str: The API key (string) that is used for authenticating with Neuphonic."

Good: "Triggers on_speech_started when the VADAnalyzer detects speech." Bad: "Triggers on_speech_started when the VADAnalyzer detects speech."

Deprecation Notice Format

When documenting deprecated code:

"""[Description].

.. deprecated:: X.X.X
    `ClassName` is deprecated and will be removed in a future version.
    Use `NewClassName` instead.
"""

Checklist

Before finishing, run /prose-review <path> over the documented file and fix anything it flags, then verify:

  • Module has a docstring at the top (after copyright header and imports)
  • All public classes have docstrings
  • All __init__ methods document their parameters
  • All public methods have docstrings with Args/Returns/Raises as needed
  • Dataclasses use "Parameters:" section for field descriptions
  • Enums document each value in "Parameters:" section
  • Writing is concise and action-oriented
  • No documentation added to private methods (starting with _)
  • Existing complete docstrings were left unchanged

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

changelog

무료

Create changelog files for significant changes in a pull request, a proposed code change. Describe effects users will notice and organize entries by PR number and change type, such as features or fixes.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Writing changelog entries for a pull request
  • Separating new features from bug fixes
  • Explaining changes in user-facing language
pipecat-ai/pipecat1.7만2026년 10월 18일 업데이트

cleanup

무료

Review and improve code changes on the current branch using Pipecat conventions. Refine names and structure, add type hints and documentation, check example patterns, and make conservative performance improvements while preserving compatibility.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Cleaning up branch changes before review
  • Adding missing type hints and documentation
  • Checking Pipecat service and example patterns
pipecat-ai/pipecat1.7만2026년 10월 18일 업데이트

Review GitHub pull requests with specialized agents that check for clear bugs and violations of project instructions in CLAUDE.md. Validate bug findings before posting focused comments on the affected lines, with fix suggestions where appropriate.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Reviewing a pull request for clear bugs
  • Checking changes against CLAUDE.md rules
  • Posting validated findings on affected lines
pipecat-ai/pipecat1.7만2026년 10월 18일 업데이트

Draft or update GitHub pull request descriptions using the actual changes and related context. Explain the problem, changed behavior, and review concerns in plain language, including breaking changes and explicit issue-closing references when applicable.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Draft a description for a new pull request
  • Rewrite a description to reflect the final implementation
  • Explain behavior changes and review concerns
pipecat-ai/pipecat1.7만2026년 10월 18일 업데이트

pr-submit

무료

Submit current work as a GitHub pull request, handling relevant uncommitted changes and reviewing prose before pushing. After creating the PR, run companion skills to generate changelog files, update the description, and return its URL.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Submitting current work as a GitHub pull request
  • Creating a branch and commits for uncommitted changes
  • Reviewing prose and adding a changelog before handoff
pipecat-ai/pipecat1.7만2026년 10월 18일 업데이트

Review newly added comments, docstrings, and changelog entries so future readers can understand the current code. Revise development history, redundant explanations, and unclear shorthand while preserving constraints that the code cannot explain on its own.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Review comments before committing
  • Check prose added across a branch
  • Clarify function documentation for future readers
pipecat-ai/pipecat1.7만2026년 10월 18일 업데이트

pipecat-ai의 스킬 모두 보기

이 스킬의 문제 신고