claude-code-python-template CLAUDE.md

Project instructions for a Python software template with a defined development process, security checks, and container setup. A devcontainer is a ready-made development environment that runs in a container.

In plain words
What is it for?
It guides design and synchronization steps, development commands, pull-request completion, secret handling, firewall rules, security scanning, and blocking unsafe publishing or shell actions.
Why use it?
It standardizes how work starts and finishes and helps prevent secrets, unsafe code, and data-exfiltration commands from entering the project.

Instructions file

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.

agentmods
npx agentmods add instructions/stranma/claude-code-python-template/claude-md
Clone the repo
git clone --depth 1 https://github.com/stranma/claude-code-python-template
Per session 616 This file is loaded in full into every session.
When invoked 616 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.00616 $0.00616
Opus 5 $0.00308 $0.00308
Sonnet 5 $0.00123 $0.00123
Haiku 4.5 $0.00062 $0.00062

Measured yesterday against content hash 97d23df16070, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

claude-code-python-template CLAUDE.md 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 yesterday.

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.

CLAUDE.md · 53 lines

How it starts

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

CLAUDE.md

Development Process

Use /sync before starting work, /design to formalize a plan, /done when finished, and /landed after the PR merges. /design estimates scope (Q/S/P) during planning; /done auto-detects actual scope at completion based on workspace signals. Before creating any plan, read docs/DEVELOPMENT_PROCESS.md first.

Security

Two-layer defense against data exfiltration:

  1. Firewall (primary): iptables whitelist in devcontainer blocks all non-approved network domains
  2. Exfiltration guard (hook): dangerous-actions-blocker.sh (PreToolUse/Bash) blocks exfiltration via trusted channels -- gh gist create, gh issue create --body, package publishing (twine/npm/uv publish), and secrets as literal command arguments

Additional:

  • Real-time scanning: The security-guidance plugin runs automatically during code editing, warning about command injection, eval/exec, deserialization, XSS, and unsafe system calls
  • Secrets handling: Never commit API keys, tokens, passwords, or private keys -- use environment variables or .env files (which are gitignored)
  • Unsafe operations: Avoid eval, exec, unsafe deserialization, subprocess(shell=True), and yaml.load without SafeLoader in production code. If required, document the justification in a code comment
  • Code review: The code-reviewer agent checks for logic-level security issues (authorization bypass, TOCTOU, data exposure) that static pattern matching cannot catch

Development Commands

  • Create virtual environment: uv venv
  • Install all dependencies: uv sync --all-packages --group dev

Use uv run from the repo root for all commands:

uv run pytest                           # All tests
uv run pytest libs/core/ -v             # Core tests only
uv run pytest apps/server/ -v           # Server tests only
uv run ruff check .                     # Lint
uv run ruff format .                    # Format
uv run pyright                          # Type check

Read the full file on GitHub · 53 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. yesterday First seen · 53 lines · 616 tokens per session scan A 97d23df16070

Subscribe to this mod's changes

claude-code-python-template CLAUDE.md is an instructions file published in the GitHub repository stranma/claude-code-python-template (2 stars, last pushed 4mo ago), licensed MIT. It adds 616 tokens to every session, about $0.0031 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-08-31.

Related

Other instructions, from other repositories