Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Python Numpy Style+Python Google Style?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/danielrispler-python-numpy-style-python-google-style)
---
name: python-numpy-style+python-google-style
description: Merged skill that replaces `python-numpy-style` and `python-google-style`. Use for any Python function.
---
# Merged skill: python-numpy-style + python-google-style
This skill replaces `python-numpy-style` and `python-google-style`. It keeps every rule of both skills that can hold at the same time. Follow every rule below.
## Rules kept unchanged from `python-numpy-style`
- Start the module with `from __future__ import annotations`.
- Show a doctest-style example that uses `>>>`.
- Export the function by defining `__all__`.
- Mark each non-obvious step with a comment that starts with `# NOTE:`.
- Write the docstring in NumPy style, with a `Parameters` header underlined by dashes. Never use `Args:`.
## Rules kept unchanged from `python-google-style`
- Name the function with a verb prefix: `get_`, `compute_`, `build_`, `parse_`, `validate_`, `find_`, `count_`, `format_` or `to_`.
- Annotate every parameter and the return value with type hints.
- Reject invalid input by raising `ValueError`.
## Reconciled rules (each one satisfies a rule of both skills at once)
- State the time complexity as `Complexity: O(...)` on its own line inside the docstring of the function, for example `Complexity: O(n log n)`. Reply with one Python code block and nothing outside it, so never write the complexity or any other text before or after the code block.
## Example
Request: Write a Python function that returns the median of a list of numbers.
Output:
```python
from __future__ import annotations
__all__ = ["compute_median"]
def compute_median(values: list[float]) -> float:
"""Return the median of a list of numbers.
Complexity: O(n log n)
Parameters
----------
values : list of float
The numbers to summarize.
Returns
-------
float
The median value.
Raises
------
ValueError
If values is empty.
Examples
--------
>>> compute_median([1, 3, 2])
2
"""
if not values:
raise ValueError("values must not be empty")
ordered = sorted(values)
mid = len(ordered) // 2
# NOTE: an even count averages the two middle values
if len(ordered) % 2:
return ordered[mid]
return (ordered[mid - 1] + ordered[mid]) / 2
```