一键导入
write-docstrings
Write or review docstrings for code in this repo. Use when writing new docstrings, reviewing existing docstrings, or editing docstrings.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Write or review docstrings for code in this repo. Use when writing new docstrings, reviewing existing docstrings, or editing docstrings.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Polishes recently written or modified Python code for style, dead code, docstrings, type annotations, and checks. Use when coding task is completed.
Write or review code in this repo. Use when writing new code, reviewing existing code, or editing code.
Write or review unit tests for code in this repo. Use when writing new tests, reviewing existing tests, or adding test coverage.
Write or review code in this repo. Use when writing new code, reviewing existing code, or editing code.
Write or revise scientific method documentation with equations, algorithm sketches, and implementation-status notes.
| name | write-docstrings |
| description | Write or review docstrings for code in this repo. Use when writing new docstrings, reviewing existing docstrings, or editing docstrings. |
| argument-hint | [source code] |
Required for: all public modules, classes, functions, and methods
Args, Returns, Raises, ExamplesSpam, not Spam)def process_spam(input_data: list[tuple[str, int]], threshold: int = 2) -> dict[str, int]:
"""Process spam counts, dropping those below threshold.
Args:
input_data: spam counts to process
threshold: minimum count threshold for inclusion
Returns:
Mapping of categories to counts
Raises:
ValueError: threshold is negative
Examples:
>>> process_spam([("jalapeno", 5), ("regular", 3), ("jalapeno", 9), ("low sodium", 1)], 2)
{"jalapeno": 14, "regular": 3}
"""
def process_spam(input_data: list[tuple[str, int]], threshold: int = 2) -> dict[str, int]:
"""spam counts, dropping those below threshold # ❌ Missing trailing period, needs sentence case, should be in imperative or indicative mood
Args:
input_data (list[str]): A list of spam counts to process. # ❌ Has type, article, and unnecessary trailing period
threshold (int): Minimum count threshold for inclusion. # ❌ Has type, article, and sentence-case description
Returns:
dict[str, int]: A dictionary mapping categories. # ❌ Has type, article, and unnecessary trailing period
"""
class line.pyproject.toml formatting, linting, or type checking without explicitly asking