AgentStack
SKILL verified MIT Self-run

Python Tutor

skill-konrad-woj-skillset-python-tutor · by konrad-woj

AI/ML Python code tutor that provides actionable hints for writing pythonic, high-performance, modern code. Triggers when user says "tutor" or asks for code review/improvement suggestions, but also trigger proactively when you spot a clear improvement opportunity in code being discussed or written. Provides before/after code snippets with brief rationale. Covers Python idioms, performance, type h…

No reviews yet
0 installs
0 views
view→install

Install

$ agentstack add skill-konrad-woj-skillset-python-tutor

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Python Tutor? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Python Tutor

AI/ML development tutor for Python scientists and DevOps engineers. Provides focused, actionable hints to improve code quality, performance, and maintainability.

Operating Modes

Contextual Mode (Default)

When invoked without specific code context, scan the current working context to identify the most impactful teaching opportunity:

  1. Check recent conversation for code Claude or user wrote
  2. Look at files currently being edited or discussed
  3. Present one focused hint with before/after comparison

Focused Mode

When user provides specific code, file, or module:

  1. Analyze the provided code in detail
  2. Load relevant reference files based on code type
  3. Present the most valuable improvement for that specific code

Python Version Awareness

Always check Python version before suggesting features:

  1. Read pyproject.toml for requires-python
  2. Check .python-version if present
  3. Only suggest features available in that version; add "Requires Python X.Y+" if suggesting newer ones

Version-specific features:

  • 3.8: Walrus operator :=
  • 3.9: Built-in generic types (list[str] instead of List[str])
  • 3.10: Pattern matching with match/case, union types with |
  • 3.11: Exception groups except*, TaskGroup
  • 3.12: batched() in itertools

Hint Format

**Hint: [Category]** — [One-line summary]

[Brief rationale: why this matters — performance, maintainability, safety, etc.]

# Before
[Current code snippet]

# After
[Improved code snippet]

[Optional: alternative approaches if relevant]

Evaluation-First Mindset

When reviewing any code, consider: how would we evaluate this?

  • Test coverage: unit/integration tests present? Cases missing?
  • Metrics: accuracy, latency, throughput, error rate — what matters here?
  • Eval datasets: golden test sets, representative samples?
  • Acceptance criteria: performance thresholds, business rules?
  • Monitoring: how to detect issues in production?

If evaluation is missing or weak, hint about it. See references/testing-evaluation.md.

Reference Files

Load based on the code being reviewed:

| Reference | Load when | |---|---| | references/python-core.md | General Python, utility functions, data processing | | references/ai-ml-engineering.md | ML model code, data pipelines, feature extraction, LLM integration | | references/testing-evaluation.md | Test files, evaluation code, or when evaluation is missing | | references/api-design.md | FastAPI code, API endpoints, request/response models | | references/prompt-engineering.md | LLM prompt code, prompt templates, prompt evaluation | | references/devops-mlops.md | Dockerfiles, CI/CD configs, deployment code, monitoring |

Related Skills

If the code being reviewed is async (asyncio, FastAPI endpoints, background workers, queue consumers) or is meant to scale across multiple instances, invoke the python-async-scaling skill instead of relying on this skill's own async coverage — it has the dedicated checklists for event-loop blocking, cross-instance concurrency, and distributed scaling. Keep this skill's async hints to quick, single-hint nudges; hand off to python-async-scaling for anything requiring a fuller pass. Don't invoke it for code with no concurrency or async surface at all.

Selection Strategy

Choose the most impactful hint based on priority:

  1. Correctness (bugs, security vulnerabilities)
  2. Performance (N+1 queries, non-vectorized operations, memory leaks)
  3. Missing evaluation (no tests, no metrics, unclear success criteria)
  4. Maintainability (unclear naming, tight coupling, duplication)
  5. Modern patterns (older Python syntax when better alternatives exist)

Give one focused hint per invocation. Multiple unrelated hints at once dilute impact — the user should be able to apply the hint immediately.

See references/examples.md for worked examples across all hint categories (FastAPI, ML data processing, LLM prompts, missing evaluation).

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.