← 返回 Skills 市场
Pydantic Ai Dependency Injection
作者
Kevin Anderson
· GitHub ↗
· v1.0.1
· MIT-0
172
总下载
0
收藏
1
当前安装
2
版本数
在 OpenClaw 中安装
/install pydantic-ai-dependency-injection
功能描述
Implement dependency injection in PydanticAI agents using RunContext and deps_type. Use when agents need database connections, API clients, user context, or...
安全使用建议
This skill is a documentation-pattern guide (no code to install). It's coherent with its purpose, but when you implement it: (1) avoid putting long-lived plaintext secrets into shared deps — prefer passing initialized client objects with minimal scopes; (2) only supply DB connections or API clients to agents you trust, since those deps grant runtime access to external systems; (3) follow the gates the SKILL.md suggests (ensure deps cover every ctx.deps access and tests pin shapes); and (4) rotate credentials and use least privilege for API keys used by agent-run tools. If you need extra assurance, review any code that uses these patterns before giving it production credentials.
功能分析
Type: OpenClaw Skill
Name: pydantic-ai-dependency-injection
Version: 1.0.1
The skill bundle is a documentation and implementation guide for dependency injection in PydanticAI. The content in SKILL.md consists of standard code examples, type-safety patterns, and testing strategies aligned with the library's official documentation. No malicious code, data exfiltration attempts, or suspicious instructions were found.
能力标签
能力评估
Purpose & Capability
The name and description (dependency injection for PydanticAI agents) match the content: SKILL.md provides patterns, examples, and gating/testing guidance. There are no unrelated env vars, binaries, or installs requested.
Instruction Scope
Instructions focus on typing and passing deps via RunContext and show realistic examples (DB connections, HTTP clients, api_key). They do not instruct the agent to read system files or exfiltrate data. Note: examples include using api_key and initialized clients in deps — that is expected for DI but means runtime behavior depends entirely on the credentials/clients you supply.
Install Mechanism
No install spec and no code files — instruction-only. This is lowest-risk in terms of disk writes or arbitrary downloads.
Credentials
The skill declares no required environment variables or credentials. However, example code shows API keys and client objects placed into deps at runtime; this is appropriate for the pattern but users must be aware they will be supplying secrets/clients to agents when using the pattern.
Persistence & Privilege
always is false, no requested config paths, and the skill does not request persistent presence or modify agent/system config. Autonomous invocation is allowed by platform default but is not a specific concern given this skill's instruction-only nature.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install pydantic-ai-dependency-injection - 安装完成后,直接呼叫该 Skill 的名称或使用
/pydantic-ai-dependency-injection触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- Added a new "Gates" section specifying step-by-step pass conditions for correct agent configuration.
- No code or interface changes; SKILL.md documentation only.
- Improves clarity and confidence in dependency usage and testing patterns.
v1.0.0
Initial release of pydantic-ai-dependency-injection.
- Enables dependency injection in PydanticAI agents using RunContext and deps_type.
- Supports both dataclasses and Pydantic models for defining dependencies.
- Provides full type safety for dependencies and output models.
- Describes patterns for using, accessing, and testing dependencies in tools, instructions, and system prompts.
- Includes best practices for managing and scoping dependencies.
- Allows overriding of dependencies for testing purposes.
元数据
常见问题
Pydantic Ai Dependency Injection 是什么?
Implement dependency injection in PydanticAI agents using RunContext and deps_type. Use when agents need database connections, API clients, user context, or... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 172 次。
如何安装 Pydantic Ai Dependency Injection?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install pydantic-ai-dependency-injection」即可一键安装,无需额外配置。
Pydantic Ai Dependency Injection 是免费的吗?
是的,Pydantic Ai Dependency Injection 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Pydantic Ai Dependency Injection 支持哪些平台?
Pydantic Ai Dependency Injection 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Pydantic Ai Dependency Injection?
由 Kevin Anderson(@anderskev)开发并维护,当前版本 v1.0.1。
推荐 Skills