tools-python

A set of tools for examining Python projects through dependency graphs, import rules, type checking, linting, complexity measures, and dead-code detection. These checks show how Python modules depend on one another and where maintenance risks may exist.

In plain words
What is it for?
It is for reviewing Python architecture, import-layer rules, module graphs, type errors, code quality, dependency hygiene, complexity hotspots, and unused code.
Why use it?
It helps verify module boundaries and dependency direction, find type or bug warnings, identify overly complex code, and detect unused code or unhealthy dependencies. The checks provide evidence for judging how well the project is divided into parts.

Skill for Claude CodeCodex

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 skills/alexei-led/architect/tools-python
Any agent
npx skills add alexei-led/architect --skill tools-python
Clone the repo
git clone --depth 1 https://github.com/alexei-led/architect

Made for: Claude Code, Codex.

Per session 118 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,016 The whole file, excluding the scripts and references it only reads on demand.
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.00118 $0.01016
Opus 5 $0.00059 $0.00508
Sonnet 5 $0.00024 $0.00203
Haiku 4.5 $0.00012 $0.00102

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

Security

Grade A, and why

tools-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 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.

src/skills/tools-python/SKILL.md · 107 lines

How it starts

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

Python tools

Dependency, complexity, and quality evidence for Python targets. These cover the import graph, layering contracts, type state, dead code, and dependency hygiene.

Evidence dimensions: dependency, structural, semantic (type checkers), and complexity hotspots.

When to use

Use when the system map shows pyproject.toml / setup.py / requirements. Pick to the question: layering contracts (import-linter), module graph (pydeps), types (pyright/basedpyright), lint (ruff), dependency hygiene (deptry, pipdeptree, uv tree), complexity/size (radon, lizard), dead code (vulture). Use the results to judge module boundaries, dependency direction, cohesion, and architecture fitness.

Commands

Redirect caches to $TMPDIR (RUFF_CACHE_DIR=$TMPDIR/ruff). Prefer uv run/uvx so the target env is untouched.

# Layering / boundary contracts (config in .importlinter or pyproject)
uvx --from import-linter lint-imports

# Import/module dependency graph (DOT for the system map)
uvx pydeps src/pkg --max-bacon 2 --noshow -T dot

# Type errors (semantic)
uvx pyright            # or: uvx basedpyright

# Lint (style + many bug classes)
RUFF_CACHE_DIR=$TMPDIR/ruff uvx ruff check .

# Declared-vs-used dependency mismatches
uvx deptry src

# Installed dependency tree
uvx pipdeptree            # or, for a uv project: uv tree

# Cyclomatic complexity / maintainability hotspots
uvx radon cc -s src      # or: uvx lizard src

# Dead code (unused functions/vars — confirm before trusting)
uvx vulture src

Evidence output

Record:

  • dimension: dependency, structural, semantic, or complexity hotspot.
  • source: Python command, package path, environment/tool runner, and cache location.
  • facts: import contracts, module edges, cycles, type/lint findings, dead-code hypotheses, or clean scope.
  • limits: missing deps, dynamic imports, optional deps, cache failures, or partial package coverage.

Confidence impact

  • import-linter contracts and pydeps cycles are direct dependency/boundary evidence: tools_used, raises dependency_graph_health and boundary_integrity confidence.
  • An existing import-linter contract run in CI is an enforced fitness check — count it toward architecture_fitness. A contract you'd recommend is not.
  • radon/lizard complexity flags cohesion/size hotspots (god modules); pair with the dependency graph before scoring cohesion_modularity.
  • vulture and deptry have false positives (dynamic imports, optional deps) — treat their output as hypotheses to confirm, not settled findings.

Read the full file on GitHub · 107 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 · 107 lines · 118 tokens per session scan A edd1d282d0c7

Subscribe to this mod's changes

tools-python is a skill published in the GitHub repository alexei-led/architect (2 stars, last pushed 1mo ago), licensed MIT. It adds 118 tokens to every session and 1,016 once invoked, about $0.0006 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 skills, from other repositories

brooks-sweep

Full-sweep mode: runs a unified analysis across all quality dimensions — code decay, architecture, tech debt, and test quality — then applies fixes directly to the codebase. Safe changes are auto-applied; risky changes are confirmed before execution. Drawing on twelve classic engineering books. Triggers when: user…

hyhmrright/brooks-lint · 178 tokens

codex-autoresearch

Run autonomous, measurable experiments in a Git repository: change one hypothesis, verify a numeric metric, keep improvements, and revert failures. Use when the user wants Codex to keep iterating toward a numeric target in the foreground or as a detached background run. Do not use for ordinary one-shot coding…

leo-lilinxiao/codex-autoresearch · 80 tokens

map-wayfind

Decision-frontier wayfinding: build and work a durable map of open design decisions BEFORE planning, for large or foggy efforts where /map-plan would force premature decomposition. Use when a task is too big or too vague to decompose — many unknowns, tangled decisions, or "I'm not even sure what to build yet" — and…

azalio/map-framework · 182 tokens

clipboard

Copy text to clipboard with optional rich formatting. Triggers on "copy to clipboard", "copy that", "pbcopy", "copy formatted", "copy rich text".

CodeAlive-AI/ai-driven-development · 36 tokens

neo4j-modeling-skill

Design, review, and refactor Neo4j graph data models. Use when choosing node labels vs relationship types vs properties, migrating relational/document schemas to graph, detecting anti-patterns (generic labels, supernodes, missing constraints), designing intermediate nodes for n-ary relationships, enforcing schema with…

neo4j-contrib/neo4j-skills · 152 tokens

alphafold-database

Access AlphaFold 200M+ AI-predicted protein structures. Retrieve structures by UniProt ID, download PDB/mmCIF files, analyze confidence metrics (pLDDT, PAE), for drug discovery and structural biology.

agent-skills-hub/agent-skills-hub · 54 tokens