Agent skill
ce-docstring-author
Write or repair NumPy-style docstrings for public CE APIs following STD-002 and contributor documentation rules.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/ce-docstring-author
SKILL.md
CE Docstring Author
You are writing or fixing Numpy-style docstrings for CE source code.
Numpy style is mandatory for all public symbols in src/calibrated_explanations/.
Load references/docstring_patterns.md for full templates and CE-specific patterns.
Section presence rules
| Section | When required |
|---|---|
| One-line summary | Always |
Parameters |
When there are >= 1 parameters |
Returns |
When the function returns a non-None value |
Raises |
When the function raises documented exceptions |
Notes |
Optional — use for non-obvious behaviour |
References |
Optional — when citing papers or ADRs |
Examples |
Strongly encouraged for public API; required for CE-First entry points |
Canonical order: Parameters -> Returns -> Raises -> Notes -> References -> Examples.
Type annotation format (in docstrings)
param : np.ndarray of shape (n_samples, n_features)
param : int or None, optional
param : {'regular', 'triangular', 'ensured'}, optional
param : list of str
param : Mapping[str, Any]
param : CalibratedExplanations
param : float, optional. Default 0.5.
Deprecation in docstrings
When a parameter is deprecated, add a .. deprecated:: directive in its entry:
param : int, optional
.. deprecated:: 0.11.0
Use ``new_param`` instead. Will be removed in v0.13.0.
Running docstring coverage
python scripts/quality/check_docstring_coverage.py src/
The coverage gate is tracked in docstring_coverage.txt. Public members with
missing docstrings appear as failures in CI.
Evaluation Checklist
- Summary is one line, imperative mood, no trailing period.
-
Parameterssection present for all non-trivial inputs. - Types match the function signature (or are more specific when
Anyis used). -
Returnssection describes the return value and its shape/keys. -
Raisesdocuments all exceptions the caller must handle. -
Examplessection present for CE-First entry points. - Deprecated parameters annotated with
.. deprecated:: <version>. - Section order matches the canonical order above.
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?