CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

python-performance-optimization

Profile and optimize Python code using cProfile, memory profilers, and performance best practices. Use when debugging slow Python code, optimizing bottlenecks, or improving application performance.

Quality

71%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

Fix and improve this skill with Tessl

tessl review fix ./tests/ext_conformance/artifacts/agents-wshobson/python-development/skills/python-performance-optimization/SKILL.md
SKILL.md
Quality
Evals
Security

Quality

Content

46%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

The body is highly actionable and code-rich but massively overlong: roughly two-thirds of the patterns cover Python optimization idioms Claude already knows, and nothing is split into reference files. It needs aggressive trimming to non-obvious material (py-spy, tracemalloc, py-spy flamegraphs, lru_cache pitfalls) plus a file split for the advanced/database/memory sections, and an explicit profile-first workflow with benchmark checkpoints.

Suggestions

Cut the patterns that restate basic Python knowledge (list comprehensions vs loops, string join, local vs global access, function call overhead, dict vs list lookup, the Core Concepts section) and keep only what Claude would not already know, such as py-spy usage, tracemalloc snapshot comparison, line_profiler invocation, and __slots__ memory measurements.

Split the remaining material into one-level-deep reference files (e.g., references/profiling-tools.md, references/memory-optimization.md, references/database-optimization.md) and keep SKILL.md as a short overview with clear links, instead of the current 870-line monolith.

Add an explicit ordered workflow with validation checkpoints, e.g.: 1. Profile with cProfile/py-spy; 2. Identify the top cumulative-time functions; 3. Apply the matching optimization pattern; 4. Re-benchmark and only keep changes that measurably improve results.

DimensionReasoningScore

Conciseness

The ~870-line body spans 20 patterns, many of which teach textbook knowledge Claude already has ("List Comprehensions vs Loops", "String Concatenation" with join, "Local Variable Access", "Function Call Overhead", "Dictionary Lookups vs List Searches"), plus a padding "Core Concepts" section ("Execution Time: How long operations take"). It is noticeably below the midpoint rather than severely prose-padded, since the content is code-dense and executable, keeping it above anchor 1.

2 / 5

Actionability

Most patterns are copy-paste-ready executable code with real commands ("py-spy record -o profile.svg --pid 12345", "kernprof -l -v script.py", "python -m cProfile -o output.prof script.py"). Minor gaps prevent anchor 5: Pattern 17 embeds SQL in a docstring instead of executable statements, Pattern 15 executes network calls at module import time, and the "@profile" decorator example depends on an unstated kernprof runtime.

4 / 5

Workflow Clarity

"Profile before optimizing" and the closing "Performance Checklist" imply the profile -> identify -> optimize -> re-benchmark sequence, but no explicit ordered workflow with validation checkpoints is ever laid out; "Benchmarked before and after optimization" is the only checkpoint and it is left implicit. This sits between a rough implied sequence and a clear checkpointed one.

3 / 5

Progressive Disclosure

No bundle files exist and all 870 lines are inlined in one monolithic SKILL.md, including clearly separable material ("Advanced Optimization", "Database Optimization", "Memory Optimization") that belongs in separate reference files. Section headers provide some structure, but the defining defect is inlining content that clearly belongs in separate files, which keeps it below the some-structure anchor 3.

2 / 5

Total

11

/

20

Passed

Description

83%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A strong description that clearly states what the skill does and when to use it, with concrete tool names and natural trigger phrases. The only weaknesses are the generic "performance best practices" filler and the overly broad final trigger clause.

DimensionReasoningScore

Specificity

"Profile and optimize Python code using cProfile, memory profilers" names the domain plus several concrete actions and tools. "performance best practices" is generic filler with no concrete action behind it, leaving a minor coverage gap that keeps this below the comprehensive anchor 5.

4 / 5

Completeness

The description explicitly answers both what ("Profile and optimize Python code using cProfile, memory profilers") and when ("Use when debugging slow Python code, optimizing bottlenecks, or improving application performance") with concrete trigger phrases, matching the anchor-5 structure. It is not below 5 because neither element is vague or implied.

5 / 5

Trigger Term Quality

"debugging slow Python code", "optimizing bottlenecks", and "improving application performance" are natural phrases a user would say. A few common synonyms such as "speed up", "latency", or "profiling" are missing, so coverage falls just short of the comprehensive anchor 5.

4 / 5

Distinctiveness Conflict Risk

Python performance profiling is a clear niche with distinct triggers, but the broad tail phrase "improving application performance" creates minor overlap risk with general debugging or application-performance skills. It is mostly distinct rather than having minimal conflict risk.

4 / 5

Total

17

/

20

Passed

Validation

93%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 15 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

skill_md_line_count

SKILL.md is long (875 lines); consider splitting into references/ and linking

Warning

Total

15

/

16

Passed

Repository

Dicklesworthstone/pi_agent_rust

Path

tests/ext_conformance/artifacts/agents-wshobson/python-development/skills/python-performance-optimization/SKILL.md

Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.