ag-referencia-python

ag-referencia-python is a skill for Claude Code from andregusman-raiz/a-gusman-claude. It costs 20 tokens per session (979 once invoked), scanned A, original, MIT.

A reference guide for Python projects using virtual environments, type hints, pytest, and a consistent folder layout.

In plain words
What is it for?
Use it when creating a Python project, setting up an isolated environment, adding type hints, or writing pytest tests.
Why use it?
It gives developers a shared way to set up Python projects and organize code and tests, reducing guesswork when starting or extending a project.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Good fit Use it when creating a Python project, setting up an isolated environment, adding type hints, or writing pytest tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/andregusman-raiz/a-gusman-claude/ag-referencia-python
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add andregusman-raiz/a-gusman-claude --skill ag-referencia-python
Clone the repo
git clone --depth 1 https://github.com/andregusman-raiz/a-gusman-claude

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ag-referencia-python

README.md
[![agentmods](https://agentmods.dev/badge/skills/andregusman-raiz/a-gusman-claude/ag-referencia-python/github.svg)](https://agentmods.dev/skills/andregusman-raiz/a-gusman-claude/ag-referencia-python)
Your own site
<a href="https://agentmods.dev/skills/andregusman-raiz/a-gusman-claude/ag-referencia-python"><img src="https://agentmods.dev/badge/skills/andregusman-raiz/a-gusman-claude/ag-referencia-python/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ag-referencia-python

Your own site · 80×15
<a href="https://agentmods.dev/skills/andregusman-raiz/a-gusman-claude/ag-referencia-python"><img src="https://agentmods.dev/badge/skills/andregusman-raiz/a-gusman-claude/ag-referencia-python.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 979 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00020 $0.00979
Opus 5 $0.00010 $0.00490
Sonnet 5 $0.00004 $0.00196
Haiku 4.5 $0.00002 $0.00098

Measured 7d ago against content hash 111ded41c616, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

ag-referencia-python scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/ag-referencia-python/SKILL.md · 180 lines

How it starts

The opening of the file, as written. The whole thing — 180 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Skill: Python Patterns

Referencia de patterns para projetos Python.

Quando Ativar

  • Trabalhando em projeto Python
  • Configurando ambiente virtual
  • Escrevendo testes com pytest

Estrutura Recomendada

projeto/
├── README.md
├── requirements.txt
├── requirements-dev.txt
├── pyproject.toml
├── .env.example
├── src/
│   └── nome_projeto/
│       ├── __init__.py
│       ├── main.py
│       ├── config.py
│       ├── models/
│       ├── services/
│       ├── repositories/
│       └── utils/
├── tests/
│   ├── conftest.py
│   ├── test_models/
│   └── test_services/
└── scripts/

Ambiente Virtual

python -m venv .venv
source .venv/bin/activate      # Linux/Mac
.venv\Scripts\activate         # Windows
pip install -r requirements.txt
pip freeze > requirements.txt

Type Hints

from typing import Optional
from dataclasses import dataclass

def greet(name: str) -> str:
    return f"Ola, {name}!"

def find_user(user_id: str) -> Optional["User"]:
    ...

def process_items(items: list[str]) -> dict[str, int]:
    return {item: len(item) for item in items}

@dataclass
class User:
    id: str
    email: str
    name: str
    age: int | None = None

Pydantic (Validacao)

from pydantic import BaseModel, EmailStr, Field
from uuid import UUID, uuid4

class UserCreate(BaseModel):
    email: EmailStr
    name: str = Field(min_length=1, max_length=255)

class User(UserCreate):
    id: UUID = Field(default_factory=uuid4)

    class Config:
        from_attributes = True

Pytest

# tests/conftest.py
import pytest

@pytest.fixture
def sample_user():
    return User(id="123", email="[email protected]", name="Test")

# tests/test_services/test_user_service.py
class TestUserService:
    def test_create_user_success(self, mock_db):
        service = UserService(db=mock_db)
        user = service.create(email="[email protected]", name="Test")
        assert user.email == "[email protected]"

    @pytest.mark.parametrize("email,valid", [
        ("[email protected]", True),
        ("invalid", False),
    ])
    def test_validate_email(self, email: str, valid: bool):
        assert UserService.validate_email(email) == valid

Read the full file on GitHub · 180 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 180 lines · 20 tokens per session scan A 111ded41c616

Subscribe to this mod's changes

ag-referencia-python is a skill published in the GitHub repository andregusman-raiz/a-gusman-claude (19 stars, last pushed yesterday), licensed MIT. It adds 20 tokens to every session and 979 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

modelcontextprotocol-python-sdk-context

Answers questions about the official Model Context Protocol (MCP) Python SDK (mcp package on PyPI, modelcontextprotocol/python-sdk on GitHub). Tracks the main branch (v2 pre-alpha — MCPServer/snakecase/constructor-on handlers). Use when working with MCP servers or clients in Python, debugging v1→v2 migrations, or…

nick-railsback/skill-engine · 116 tokens

python-syntax-tutor

A Python syntax tutor that explains unfamiliar language features in the code where they appear. Python is a programming language; examples include decorators, async code, generators, and type hints.

SWHee/diffscope · 238 tokens

programming

MUST USE for ANY work on .py .pyi .rs .ts .tsx .mts .cts .go files. One philosophy: strict types, modern stacks (Pydantic v2 / serde+thiserror / Zod / gin+sqlc+pgx+slog), modern toolchains (uv+basedpyright+ruff / cargo+clippy+miri / Bun+Biome+tsc / gofumpt+golangci-lint v2+nilaway+go-race), parse-don't-validate…

daeryundf2-prog/LAZYANTIGRAVITY · 261 tokens

local-python-tools

Use when working with local-python-tools provider actions such as pythonruntimecheck.

dinglebear-ai/soma · 21 tokens

python-testing

Python testing best practices using pytest including fixtures, parametrization, mocking, coverage analysis, async testing, and test organization. Use when writing or improving Python tests.

Yaomeng1749/claude-code-digital-nomad-config-pack · 35 tokens

python-patterns

Python-specific design patterns and best practices including protocols, dataclasses, context managers, decorators, async/await, type hints, and package organization. Use when working with Python code to apply Pythonic patterns.

Yaomeng1749/claude-code-digital-nomad-config-pack · 45 tokens