← 返回 Skills 市场
anderskev

Pydantic Ai Testing

作者 Kevin Anderson · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ 安全检测通过
188
总下载
0
收藏
2
当前安装
2
版本数
在 OpenClaw 中安装
/install pydantic-ai-testing
功能描述
Test PydanticAI agents using TestModel, FunctionModel, VCR cassettes, and inline snapshots. Use when writing unit tests, mocking LLM responses, or recording...
安全使用建议
This guide is coherent for its stated purpose, but before using it: 1) understand that running the recorded tests will call real LLM APIs and requires provider credentials in your environment — ensure keys are stored securely; 2) recorded cassettes and snapshots are files written to your repo and can contain prompts, responses, or other sensitive data — inspect git diff carefully before committing and scope recordings tightly; 3) prefer mocking (TestModel/FunctionModel) in CI or on sensitive projects rather than recording live API responses; 4) if a recording accidentally contains secrets, rotate the exposed credentials and remove the artifact from history. If you want me to, I can list the likely environment variables you’ll need for common providers (OpenAI, Anthropic, etc.) or suggest a safer local test workflow.
功能分析
Type: OpenClaw Skill Name: pydantic-ai-testing Version: 1.0.1 The skill bundle is a documentation and tutorial resource for testing PydanticAI agents. It contains standard code snippets for mocking LLM responses, using VCR cassettes, and performing snapshot testing with legitimate libraries like pytest and inline-snapshot. The instructions in SKILL.md are aligned with the stated purpose of managing test artifacts and do not contain any malicious commands, data exfiltration attempts, or harmful prompt injections.
能力评估
Purpose & Capability
The SKILL.md describes testing utilities (TestModel, FunctionModel, VCR cassettes, snapshots) and all instructions are about writing and running tests for PydanticAI agents — nothing requested or described appears unrelated to that stated purpose.
Instruction Scope
Instructions are generally scoped to testing workflows, but they explicitly instruct recording/replaying LLM API interactions (VCR cassettes) and automatically updating inline snapshots. Those steps write files under tests/cassettes/ and snapshot files and can capture prompts/responses (possibly sensitive). The document properly calls out a gated workflow, but users must follow the gates and inspect diffs carefully to avoid accidental commits of sensitive data.
Install Mechanism
This is an instruction-only skill with no install spec and no code files — nothing will be downloaded or written by the skill itself during install.
Credentials
The skill declares no required env vars, but examples instantiate Agent('openai:gpt-4o'), which implies use of external LLM providers and therefore API credentials (e.g., OPENAI_API_KEY) in the runtime environment. The omission of explicit credential requirements is not malicious but users must provide appropriate provider credentials and be aware recordings will include any data sent/received.
Persistence & Privilege
No elevated persistence flags (always:false). The skill does not request to modify other skills or system-wide settings; it only instructs local test-run workflows that write test artifacts in the repository under tests/.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install pydantic-ai-testing
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /pydantic-ai-testing 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- Added "Gates: VCR cassettes and inline snapshots" section clarifying the safe workflow for recording and fixing test artifacts, with ordered steps. - No changes to functionality, only documentation updated for better test hygiene and file update practices.
v1.0.0
Initial release of pydantic-ai-testing. - Enables deterministic testing of PydanticAI agents using TestModel. - Supports custom model logic with FunctionModel for advanced scenarios. - Integrates VCR cassettes to record and replay real API interactions in tests. - Provides inline snapshot assertions for verifying outputs. - Allows forced tool invocation and easy mocking of dependencies during testing. - Includes utilities for capturing agent messages and structuring pytest test suites.
元数据
Slug pydantic-ai-testing
版本 1.0.1
许可证 MIT-0
累计安装 2
当前安装数 2
历史版本数 2
常见问题

Pydantic Ai Testing 是什么?

Test PydanticAI agents using TestModel, FunctionModel, VCR cassettes, and inline snapshots. Use when writing unit tests, mocking LLM responses, or recording... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 188 次。

如何安装 Pydantic Ai Testing?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install pydantic-ai-testing」即可一键安装,无需额外配置。

Pydantic Ai Testing 是免费的吗?

是的,Pydantic Ai Testing 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Pydantic Ai Testing 支持哪些平台?

Pydantic Ai Testing 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Pydantic Ai Testing?

由 Kevin Anderson(@anderskev)开发并维护,当前版本 v1.0.1。

💬 留言讨论