CtrlK
BlogDocsLog inGet started
Tessl Logo

pytest-asyncio-httpx-mocking

When masking httpx.AsyncClient with unittest.mock in Pytest, AsyncMock must be used instead of MagicMock for async methods like post/get to prevent TypeError when awaited.

64

Quality

76%

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 ./.agent/skills/pytest-asyncio-httpx-mocking/SKILL.md
SKILL.md
Quality
Evals
Security

Quality

Content

85%

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

The body is a tight, actionable debugging recipe with executable correct/incorrect examples and clean organization. Its main weakness is mild verbosity in explaining async/coroutine concepts Claude already knows.

Suggestions

Trim or remove the '为什么发生' rationale explaining that async functions return coroutines — Claude already knows this.

Add a one-line verification step ('run the test and confirm no TypeError') to close the fix loop.

Keep the useful 异步方法 vs 同步响应对象 distinction but move it closer to the solution to avoid restating fundamentals.

DimensionReasoningScore

Conciseness

Mostly efficient with tight code examples and clear sections, but the '为什么发生' explanation of coroutine semantics restates concepts Claude already knows and could be trimmed.

2 / 3

Actionability

Provides fully executable, copy-paste-ready code for both the incorrect and correct approaches, plus a concrete side_effect example for sequential requests.

3 / 3

Workflow Clarity

A simple single-fix skill with an unambiguous symptom → root cause → solution → key-takeaway structure; the single action is clear enough to score 3 without a multi-step workflow.

3 / 3

Progressive Disclosure

Under 50 lines with no need for external references and well-organized sections (症状, 根本原因, 代码解决方案, 关键经验), satisfying the simple-skill criterion for a top score.

3 / 3

Total

11

/

12

Passed

Description

67%

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

The description is highly specific and occupies a clear, non-conflicting niche, but it omits an explicit 'Use when...' trigger clause and leans on technical jargon rather than natural user phrasing. Adding when-to-use guidance and the verbatim error string would round it out.

Suggestions

Add an explicit trigger clause, e.g. 'Use when a pytest test hits `TypeError: object MagicMock can't be used in await expression` while mocking httpx.AsyncClient.'

Include the full natural-language error message as a trigger term so it matches what users paste.

Rephrase toward third-person capability framing ('Fixes async-mocking TypeErrors by switching MagicMock to AsyncMock') to surface natural keywords.

DimensionReasoningScore

Specificity

Names concrete components and actions: 'masking httpx.AsyncClient with unittest.mock', 'AsyncMock must be used instead of MagicMock for async methods like post/get to prevent TypeError' — specific library, fix, methods, and resulting error.

3 / 3

Completeness

Clearly states what to do (use AsyncMock instead of MagicMock) but provides no 'Use when...' clause or equivalent explicit trigger guidance, capping completeness at 2 per the rubric.

2 / 3

Trigger Term Quality

Includes relevant technical terms a developer would mention (pytest, httpx.AsyncClient, AsyncMock, MagicMock, TypeError) but reads as an instruction rather than natural trigger phrasing, and lacks common variations like the full error string a user would paste.

2 / 3

Distinctiveness Conflict Risk

A narrow, specific niche (mocking httpx.AsyncClient async methods in pytest) with a distinct error signature, making it unlikely to trigger for unrelated skills.

3 / 3

Total

10

/

12

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.

Validation16 / 16 Passed

Validation for skill structure

No warnings or errors.

Repository
Project-N-E-K-O/N.E.K.O
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.