CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

python-resource-management

Explains context-manager protocols and shows class-based, decorator-based, and asynchronous approaches to managing database connections, files, and other resources. Covers unconditional cleanup, selective exception suppression, efficient stream accumulation, metrics, and managing multiple resources with ExitStack.

1.02x
Quality

76%

Does it follow best practices?

Impact

100%

1.02x

Average score across 3 eval scenarios

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-resource-management/SKILL.md

The canonical home for this skill is python-resource-management in wshobson/agents

SKILL.md
Quality
Evals
Security

Quality

Content

57%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.

A well-organized, code-rich catalog of context-manager and streaming patterns with mostly executable examples, undermined by a redundant 'Core Concepts' section, placeholder dependencies in the code, no concrete validation guidance, and a monolithic single-file structure that inlines advanced streaming material. Tightening the known-concept explanations and splitting the streaming patterns into a reference file would raise most dimensions.

Suggestions

Delete or drastically cut the 'Core Concepts' section — Claude already knows `with` statement semantics and the `__enter__`/`__exit__` protocol; keep only the non-obvious guidance (e.g., returning True from `__exit__` suppresses exceptions).

Move Patterns 6-8 (streaming accumulation, efficient string joins, stream metrics) into a reference file such as references/streaming.md and keep SKILL.md as an overview with clearly signaled links, reducing the body to the core context-manager patterns.

Replace the vague 'Test cleanup paths' bullet with a concrete validation example, e.g., a short pytest snippet using assertRaises to verify that close() runs when an exception is thrown inside the with block.

DimensionReasoningScore

Conciseness

The body is mostly efficient and code-forward, but the 'Core Concepts' section explains basics Claude already knows ('The `with` statement ensures resources are released automatically, even on exceptions', '__enter__/__exit__ for sync') and Pattern 7 re-explains string immutability ('O(n²) due to string immutability'). This is more than minor over-explanation, so it sits at anchor 3 rather than 4, but the padding is confined to a few short sections, well short of anchor 2's 'noticeably verbose'.

3 / 5

Actionability

Every pattern ships a complete class or function with usage (e.g., the full DatabaseConnection protocol implementation and ExitStack examples), which is mostly executable guidance with minor gaps. It falls short of anchor 5 because several examples depend on undefined placeholders like acquire_resource(), StreamingResponse, and connect_to_host(), so the code is not fully copy-paste ready.

4 / 5

Workflow Clarity

This is a pattern catalog rather than a sequenced workflow, and patterns are individually unambiguous, but validation guidance is only the vague bullet 'Test cleanup paths - Verify resources are released on errors' with no concrete verify step or feedback loop, matching anchor 3 ('checkpoints missing or implicit'). It does not reach anchor 4 because no explicit validation checkpoint exists anywhere in the body.

3 / 5

Progressive Disclosure

Sections are clearly organized (Core Concepts, Quick Start, Fundamental/Advanced Patterns, Best Practices), but the entire ~420-line body is inlined with zero reference files, and the streaming patterns (6-8) form a distinct sub-topic that clearly belongs in a separate file, matching anchor 3 ('content that should be separate is inline'). The under-50-lines exception does not apply, and the absence of any reference structure keeps it below anchor 4.

3 / 5

Total

13

/

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 explicitly covers both what the skill does and when to use it, with natural trigger terms and a mostly distinct niche in third-person voice. The only gaps are minor: a few missing trigger synonyms ('with statement', 'resource leaks') and slightly abstract phrasing of the core capabilities.

DimensionReasoningScore

Specificity

It lists several specific capability areas — 'with context managers, cleanup patterns, and streaming' — matching anchor 4 ('several specific actions; minor gaps'). It is not anchor 5 because it names topic areas rather than fine-grained concrete actions (e.g., 'implement __enter__/__exit__, use ExitStack'), and it exceeds anchor 3's '1-2 concrete actions'.

4 / 5

Completeness

It explicitly answers both what ('Python resource management with context managers, cleanup patterns, and streaming') and when ('Use when managing connections, file handles, implementing cleanup logic, or building streaming responses with accumulated state') with concrete trigger phrases, matching anchor 5. The when-clause is specific and multi-trigger, so it is not the weaker anchor 4.

5 / 5

Trigger Term Quality

'managing connections, file handles, implementing cleanup logic, or building streaming responses' are natural phrases users would say, giving good keyword coverage per anchor 4. It stops short of anchor 5 because common variations like 'with statement', 'sockets', or 'resource leaks' are missing, and it is well above anchor 3's 'missing common variations'.

4 / 5

Distinctiveness Conflict Risk

The niche — deterministic Python resource cleanup and streaming accumulation — has distinct triggers and only minor overlap risk with closely related skills (general Python or async skills), matching anchor 4. It is not anchor 5 because 'Python resource management' is broader than a clear single-niche trigger set like the PDF example.

4 / 5

Total

17

/

20

Passed

Validation

100%

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

Validation — 16 / 16 Passed

Validation for skill structure

No warnings or errors.

Repository

Dicklesworthstone/pi_agent_rust

Path

tests/ext_conformance/artifacts/agents-wshobson/python-development/skills/python-resource-management/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.