Python
ericrisco/rsc-harness
A skill your agent uses when the task is Python itself, in any framework or none: PEP 695 generics, mypy --strict typing, dataclass/Protocol/TypedDict/Enum choices, asyncio.TaskGroup, stdlib idioms…
Python coding rules: style, patterns, security, testing. An agent skill from softspark/ai-toolkit.
$ npx skills add softspark/ai-toolkit --skill python-rules -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install softspark/ai-toolkit python-rules --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/softspark/ai-toolkit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/app/skills/python-rules .claude/skills/python-rules && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "python-rules" agent skill from https://github.com/softspark/ai-toolkit/tree/main/app/skills/python-rules into .claude/skills/python-rules/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "python-rules", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/softspark/ai-toolkit/tree/main/app/skills/python-rulesType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add softspark/ai-toolkit --skill python-rules -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install softspark/ai-toolkit python-rules --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/softspark/ai-toolkit.git skills-src && mkdir -p .agents/skills && cp -r skills-src/app/skills/python-rules .agents/skills/python-rules && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "python-rules" agent skill from https://github.com/softspark/ai-toolkit/tree/main/app/skills/python-rules into .agents/skills/python-rules/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "python-rules", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add softspark/ai-toolkit --skill python-rules -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install softspark/ai-toolkit python-rules --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/softspark/ai-toolkit.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/app/skills/python-rules .cursor/skills/python-rules && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "python-rules" agent skill from https://github.com/softspark/ai-toolkit/tree/main/app/skills/python-rules into .cursor/skills/python-rules/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "python-rules", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/softspark/ai-toolkit.git --path app/skills/python-rules--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add softspark/ai-toolkit --skill python-rules -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install softspark/ai-toolkit python-rules --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/softspark/ai-toolkit.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/app/skills/python-rules .gemini/skills/python-rules && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "python-rules" agent skill from https://github.com/softspark/ai-toolkit/tree/main/app/skills/python-rules into .gemini/skills/python-rules/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "python-rules", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install softspark/ai-toolkit python-rulesInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add softspark/ai-toolkit --skill python-rules -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/softspark/ai-toolkit.git skills-src && mkdir -p .github/skills && cp -r skills-src/app/skills/python-rules .github/skills/python-rules && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "python-rules" agent skill from https://github.com/softspark/ai-toolkit/tree/main/app/skills/python-rules into .github/skills/python-rules/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "python-rules", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add softspark/ai-toolkit --skill python-rules -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install softspark/ai-toolkit python-rules --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/softspark/ai-toolkit.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/app/skills/python-rules .opencode/skills/python-rules && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "python-rules" agent skill from https://github.com/softspark/ai-toolkit/tree/main/app/skills/python-rules into .opencode/skills/python-rules/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "python-rules", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
python-rulesPython coding rules: style, patterns, security, testing. An agent skill from softspark/ai-toolkit.
Python Rules is an agent skill from softspark/ai-toolkit. Python coding rules: style, patterns, security, testing. Triggers: .py, .pyi, pyproject.toml, requirements.txt, Pipfile, FastAPI, Django, Flask, pytest, SQLAlchemy, ruff, mypy.
Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Backend & APIs, covering Backend development, Type safety and ORMs and data access. It works with Python, Django, FastAPI and SQLAlchemy. The repository describes itself as: Professional-grade AI coding toolkit: 94 skills, 44 agents, multi-platform (Claude, Cursor, Windsurf, Copilot, Gemini, Cline, Roo Code, Aider, Augment, Antigravity, Codex CLI… The licence is Apache-2.0.
Read from SKILL.md and the folder at commit d64db2b. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadFrom allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
ruffmypyFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
SECRET_KEYFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Python Rules loads about 2.9k tokens when it runs. Until then it costs about 47 tokens; SKILL.md has 1,314 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from softspark/ai-toolkit at commit d64db2b, republished under its Apache-2.0 licence (© softspark). 1,314 words, ~2,886 tokens.
.claude/skills/python-rules/SKILL.md (or your agent's skills folder).These rules come from app/rules/python/ in ai-toolkit. They cover
the project's standards for coding style, frameworks, patterns,
security, and testing in Python. Apply them when writing or
reviewing Python code.
str | None (PEP 604) over Optional[str] on Python 3.10+.from __future__ import annotations for forward references.TypeAlias or type (3.12+) for complex type aliases.Protocol for structural subtyping instead of ABCs where possible._internal_helper. No double underscore unless name mangling needed._ for intentionally unused variables.* to force keyword-only: def fetch(*, limit: int, offset: int).@staticmethod only for pure utility. Prefer module-level functions.from module import *. Be explicit.if TYPE_CHECKING: for import-only-for-types to avoid circular imports.dataclasses for plain data containers.BaseModel for validated data / API schemas.NamedTuple for lightweight immutable records.Enum for fixed sets of values. Prefer StrEnum on 3.11+.dict / list literals over dict() / list() constructors..format() or % for new code.pathlib.Path over os.path for file operations.contextlib.suppress(KeyError) over bare try/except for simple cases.:= when it genuinely improves readability.match/case (3.10+) for complex conditionals on structured data.ruff format or black. No manual formatting.ruff check. Fix all errors before committing.mypy --strict or pyright in CI.Depends()) for shared logic (auth, DB sessions).APIRouter to organize routes by domain.BackgroundTasks for non-critical async work (emails, logging).lifespan context manager for startup/shutdown (not on_event).select_related and prefetch_related to prevent N+1 queries.transaction.atomic() for multi-model operations.select() statements, not legacy query().Mapped[type] annotations for typed column definitions.sessionmaker with expire_on_commit=False for API responses.async_sessionmaker with asyncpg for async applications.session.begin() context manager for transaction scope.model_validator(mode="before") for cross-field validation.field_validator for single-field validation.model_config = ConfigDict(strict=True) for strict type coercion.Annotated[str, Field(min_length=1)] for reusable constrained types.model_dump(exclude_unset=True) for PATCH operations.click.group() for multi-command CLIs.rich for formatted terminal output (tables, progress bars).arq for lightweight async job queues.uv for fast dependency resolution and virtual environments.pyproject.toml for all project configuration (no setup.py/setup.cfg).uv.lock, poetry.lock).except: or except Exception.class AppError(Exception) as base.raise AppError("context") from original.contextlib.suppress() for expected, ignorable exceptions.logger.exception("msg") to include traceback.with for any resource that needs cleanup (files, connections, locks).@contextmanager decorator.contextlib.AsyncExitStack for dynamic async resource management.atexit.register() for process-level cleanup only.asyncio for I/O-bound concurrency. Use multiprocessing for CPU-bound.asyncio.gather() for concurrent independent operations.asyncio.TaskGroup (3.11+) for structured concurrency.asyncio.run() inside already-running event loops.async for and async with for streaming and resource patterns.frozen=True for immutable value objects.field(default_factory=list) for mutable defaults, never field(default=[]).__post_init__ for validation, not complex logic.slots=True (3.10+) for memory efficiency in high-volume objects.functools.lru_cache for pure function memoization.itertools for efficient iteration (chain, islice, groupby).yield) for lazy sequences and large data processing.map/filter with lambdas.functools.partial to create specialized versions of functions.__init__ params.Protocol classes to define dependency interfaces.None and create inside function.Exception broadly: masks bugs and interrupts.type() for type checking: use isinstance().global keyword: pass state through parameters or classes.constr, conint, conlist for constrained types.eval(), exec(), or compile() with user input.pickle.loads() on untrusted data (arbitrary code execution).cursor.execute("SELECT * FROM users WHERE id = %s", (user_id,))..format() to build SQL queries.text() with :param syntax in SQLAlchemy raw queries.Environment(autoescape=True).markupsafe.Markup only for trusted HTML content.os.system() or subprocess.run(shell=True) with user input.subprocess.run() with list arguments: subprocess.run(["ls", "-la", path]).shlex.quote() if shell=True is absolutely necessary.pathlib.Path.resolve() and verify the result is within allowed directory.os.path.commonpath() to verify path containment.secrets module for tokens: secrets.token_urlsafe(32).hashlib.scrypt or bcrypt for password hashing.hmac.compare_digest() for constant-time secret comparison.os.environ["SECRET_KEY"], never hardcode.pip-audit or safety check in CI.uv or pip-compile for reproducible dependency resolution.pickle, yaml.load(), or marshal.yaml.safe_load() instead of yaml.load().json.loads() for untrusted data (safe by default).DEBUG = False in production. Never expose debug pages.django.utils.html.escape() for manual HTML escaping.CSRF_COOKIE_HTTPONLY = True and SESSION_COOKIE_SECURE = True.SECRET_KEY unique per environment and out of version control.test_*.py in tests/ directory.conftest.py at each test directory level for shared fixtures.src/auth/service.py -> tests/auth/test_service.py.@pytest.fixture for setup. Prefer fixtures over setup/teardown methods.function (default), module, session.yield fixtures for setup + teardown: yield resource; cleanup().tmp_path fixture for temporary files, not manual tempfile.monkeypatch for patching env vars, attributes, and dict items.@pytest.mark.parametrize for testing multiple inputs/outputs.pytest.param(..., id="descriptive_name") for readable test IDs.unittest.mock.patch or monkeypatch for dependency replacement.patch("myapp.service.http_client").MagicMock(spec=ClassName) to get attribute checking.AsyncMock for async functions.@pytest.mark.slow for tests >1s. Exclude from default runs.@pytest.mark.integration for tests requiring external services.pyproject.toml to avoid warnings.@pytest.mark.anyio or @pytest.mark.asyncio for async tests.httpx.AsyncClient for testing FastAPI/Starlette apps.aiosqlite or test containers for async database tests.pyproject.toml under [tool.pytest.ini_options].addopts = "--strict-markers -ra" for strict mode.testpaths = ["tests"] to avoid scanning the entire repo.© softspark, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in app/skills/python-rules of softspark/ai-toolkit.
Open the folder on GitHubat commit d64db2b
Python Rules next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Python Rules this skillsoftspark/ai-toolkit | 179 | — | ~2.9k | Automated safety check: Pass | Apache-2.0 | |
| Pythonericrisco/rsc-harness | 156 | — | ~3.8k | Automated safety check: Pass | MIT | |
| Mastering Python SkillSpillwaveSolutions/agent-brain | 120 | — | ~1.4k | Automated safety check: Notes | MIT | |
| Run And Verifyaropan/clist | 439 | — | ~461 | Automated safety check: Pass | Apache-2.0 | |
| PythonMadAppGang/claude-code | 283 | — | ~2.8k | Automated safety check: Notes | MIT | |
| Django Idiomsirahardianto/awesome-agv | 157 | — | ~786 | Automated safety check: Pass | MIT |
ericrisco/rsc-harness
A skill your agent uses when the task is Python itself, in any framework or none: PEP 695 generics, mypy --strict typing, dataclass/Protocol/TypedDict/Enum choices, asyncio.TaskGroup, stdlib idioms…
SpillwaveSolutions/agent-brain
Modern Python coaching covering language foundations through advanced production patterns.
aropan/clist
Choose and run focused checks after changing CLIST Python code: Django tests, standalone pytest tests, offline parser fixtures, Ruff, or a relevant management-command check.
MadAppGang/claude-code
A skill your agent uses when building FastAPI applications, implementing async endpoints, setting up Pydantic schemas, working with SQLAlchemy, or writing pytest tests for Python backend services.
irahardianto/awesome-agv
Django and Django REST Framework (DRF) patterns: ORM queries, model managers, class-based views, serializers, migrations, and pytest-django testing.
Jeffallan/claude-skills
Builds async Python APIs with FastAPI and Pydantic V2, covering endpoints, JWT authentication, async SQLAlchemy, WebSockets and pytest checks against the OpenAPI docs.
softspark/ai-toolkit
Prepare or verify a project QA environment with source identity, readiness, browser access, evidence paths and owned cleanup.
softspark/ai-toolkit
Accessibility validator: WCAG 2.1 AA, EN 301 549, EAA. An agent skill from softspark/ai-toolkit.
softspark/ai-toolkit
Analyzes code quality, complexity, patterns across codebase.
softspark/ai-toolkit
Drives a brief, specification, issue or existing PR through implementation, review, tests and QA to a ready PR.
softspark/ai-toolkit
Direct technical voice for docs, README, user-facing text. An agent skill from softspark/ai-toolkit.
softspark/ai-toolkit
Detect/generate/debug CI pipeline config (GitHub Actions, GitLab CI).
Categories
Python coding rules: style, patterns, security, testing. An agent skill from softspark/ai-toolkit. Python Rules is an agent skill from softspark/ai-toolkit. Python coding rules: style, patterns, security, testing.
Python Rules fits situations like: tasks that involve Backend development; tasks that involve Type safety; tasks that involve ORMs and data access.
Run `npx skills add softspark/ai-toolkit --skill python-rules -a claude-code`. Or copy the skill folder (app/skills/python-rules in softspark/ai-toolkit) into .claude/skills/python-rules in your project. Claude Code loads it when a task matches its description.
Run `npx skills add softspark/ai-toolkit --skill python-rules -a codex`. Or copy the skill folder (app/skills/python-rules in softspark/ai-toolkit) into .agents/skills/python-rules in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add softspark/ai-toolkit --skill python-rules -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/python-rules, .gemini/skills/python-rules, .github/skills/python-rules and .opencode/skills/python-rules in your project.
Going by SKILL.md and its folder, Python Rules needs the command-line tools its instructions call (ruff and mypy) and credentials named SECRET_KEY. Our summary lists: Python 3; A credential in SECRET_KEY. Its frontmatter pre-approves these tools: Read.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Python Rules is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.9k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Python Rules: Python (ericrisco/rsc-harness, 156 stars), Mastering Python Skill (SpillwaveSolutions/agent-brain, 120 stars), Run And Verify (aropan/clist, 439 stars) and Python (MadAppGang/claude-code, 283 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
softspark (a GitHub user) maintains it in softspark/ai-toolkit, which has 179 GitHub stars. The repository holds 112 skills in this directory. The repository was last updated on October 7, 2026.
Source: softspark/ai-toolkit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.