Install any skill in seconds. Free to start, no credit card required.
Get Started Free →majiayu000/pydantic-ai-common-pitfalls
Avoid common mistakes and debug issues in PydanticAI agents.
Passed 21 of 22 test cases with the skill, and 20 of 22 without it.
1 fixed20 passed either way1 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
A test case the skill fixed. Same model, same prompt, with and without the skill.
My streaming request async with agent.run_stream('Summarize') as stream_res: completes without throwing exceptions, but no token processing occurs and output data remains missing. What missing method call or loop iteration must be executed on stream_res?
| Checked | Without skill | With skill |
|---|---|---|
| Explains that stream_output() must be iterated over to consume chunks from the active stream | Missed | Passed |
The instructions your model reads when the skill loads.
# ERROR: RunContext not allowed in tool_plain
@agent.tool_plain
async def bad_tool(ctx: RunContext[MyDeps]) -> str:
return "oops"
# UserError: RunContext annotations can only be used with tools that take context
Fix: Use @agent.tool if you need context:
@agent.tool
async def good_tool(ctx: RunContext[MyDeps]) -> str:
return "works"
# ERROR: First param must be RunContext
@agent.tool
def bad_tool(user_id: int) -> str:
return "oops"
# UserError: First parameter of tools that take context must be annotated with RunContext[...]
Fix: Add RunContext as first parameter:
@agent.tool
def good_tool(ctx: RunContext[MyDeps], user_id: int) -> str:
return "works"
test cases passed, vs 20 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.