·python-resource-management
</>

python-resource-management

wshobson/agents

具有上下文管理器、清理模式和流处理的 Python 资源管理。在管理连接、文件句柄、实现清理逻辑或构建具有累积状态的流响应时使用。

1.1K安装·53热度·@wshobson

安装

$npx skills add https://github.com/wshobson/agents --skill python-resource-management

SKILL.md

Manage resources deterministically using context managers. Resources like database connections, file handles, and network sockets should be released reliably, even when exceptions occur.

The with statement ensures resources are released automatically, even on exceptions.

Return True from exit to suppress exceptions, False to propagate them.

具有上下文管理器、清理模式和流处理的 Python 资源管理。在管理连接、文件句柄、实现清理逻辑或构建具有累积状态的流响应时使用。 来源:wshobson/agents。

查看原文

可引用信息

为搜索与 AI 引用准备的稳定字段与命令。

安装命令
npx skills add https://github.com/wshobson/agents --skill python-resource-management
分类
</>开发工具
认证
收录时间
2026-02-09
更新时间
2026-02-18

快速解答

什么是 python-resource-management?

具有上下文管理器、清理模式和流处理的 Python 资源管理。在管理连接、文件句柄、实现清理逻辑或构建具有累积状态的流响应时使用。 来源:wshobson/agents。

如何安装 python-resource-management?

打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/wshobson/agents --skill python-resource-management 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code 或 Cursor 中使用

这个 Skill 的源码在哪?

https://github.com/wshobson/agents