Skip to content
Back to skills

Python Google Style

ASecurity

Write Python functions in the team's Google style. Use whenever Python code is requested.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added December 1, 2026
ai-agentspythongodocumentation

Security analysis

A100/100

Scanned December 1, 2026

npx -y skills add danielrispler/skill-truce --skill python-google-style --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Python Google Style?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Python Google Style
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/danielrispler-python-google-style/badge)](https://www.skillsdirectory.com/skills/danielrispler-python-google-style)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: python-google-style
description: Write Python functions in the team's Google style. Use whenever Python code is requested.
---

# python-google-style

Library code here follows the Google Python style so that documentation tools can parse it.

## Rules

- Name the function with a verb prefix: `get_`, `compute_`, `build_`, `parse_`, `validate_`, `find_`, `count_`, `format_` or `to_`.
- Write the docstring in Google style with `Args:` and `Returns:` sections. Never use underlined section headers.
- Annotate every parameter and the return value with type hints.
- Reject invalid input by raising `ValueError`.
- Include at least one usage example with a `>>>` prompt in the docstring.
- Reply with one Python code block and nothing outside it.

## Example

Request: Write a Python function that returns the median of a list of numbers.

Output:

```python
def compute_median(values: list[float]) -> float:
    """Return the median of a list of numbers.

    Args:
        values: The numbers to summarize.

    Returns:
        The median value.

    Example:
        >>> compute_median([1, 3, 2])
        2
    """
    if not values:
        raise ValueError("values must not be empty")
    ordered = sorted(values)
    mid = len(ordered) // 2
    if len(ordered) % 2:
        return ordered[mid]
    return (ordered[mid - 1] + ordered[mid]) / 2
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.