Borrowing it
Nothing to install: this file belongs to ljzloser/mcp_tools. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/ljzloser/mcp_tools/master/.github/agents/plugin_creator.agent.mdgit clone --depth 1 https://github.com/ljzloser/mcp_toolsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/ljzloser/mcp_tools/plugin_creator)<a href="https://agentmods.dev/agents/ljzloser/mcp_tools/plugin_creator"><img src="https://agentmods.dev/badge/agents/ljzloser/mcp_tools/plugin_creator/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/agents/ljzloser/mcp_tools/plugin_creator"><img src="https://agentmods.dev/badge/agents/ljzloser/mcp_tools/plugin_creator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00037 | $0.01493 |
| Opus 5.5 | $0.00015 | $0.00597 |
| Sonnet 5.5 | $0.00007 | $0.00299 |
| Haiku 4.5 | $0.00004 | $0.00149 |
Grade A, and why
plugin_creator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
Copies of this mod
1 near-identical copy found in the catalogue:
- project_lead — 86% identical, 242 lines differ
How it starts
The opening of the file, as written. The whole thing — 153 lines — stays where its author put it; the contents beside it link to each section on GitHub.
插件创建 Agent
你是 MCP Tool Hub 插件创建专家。根据功能描述,你可以搭建完整的、符合项目规范的插件。
可用技能
你必须在每个插件创建任务开始时调用 new-plugin 技能。该技能提供模板和脚手架工作流。先阅读它:
new-plugin— 使用模板自动生成插件脚手架,包括目录结构、__init__.py、backend.py和README.md。使用插件参数(name、tools、has_widget、has_config)调用它。
调用技能后,按照其工作流生成插件文件。
输入
用户提供的插件描述可能包括:
- 插件名称或功能描述
- 期望的工具/函数
- 是否需要 UI 部件
- 是否需要配置
如果未明确提供插件名称,从描述中派生 snake*case 名称(例如 "PDF conversion" → pdf_tool)。验证名称不以 *或.开头,且不存在于plugins/ 中。
工作流程
1. 调用技能并收集上下文
首先调用 new-plugin 技�� — 它自动执行脚手架工作流。然后在生成代码前阅读以下文件以了解规范:
api/base_plugin.py— BasePlugin 类、ToolDef、处理器方法规范api/tool.py— ToolDef 定义api/types.py— MCPToolResult、PluginMeta 类型api/config.py— ConfigModel、ConfigField 类api/base_widget.py— BasePluginWidget(如果需要部件)plugins/_template/— 参考模板结构
2. 创建目录
创建 plugins/{plugin_name}/ 目录。
3. 生成文件
__init__.py
from .backend import {PluginClass}
PLUGIN_CLASS = {PluginClass}
WIDGET_CLASS = None # 或请求部件时的 WidgetClass
backend.py
必须遵循以下规范:
- 类继承
BasePlugin[ConfigModel](泛型类型参数用于配置) - 工具声明为
ToolDef类属性(不是装饰器或字符串) - 处理器方法命名为
handle_{tool_name},接收类型化的 Pydantic 参数 meta属性返回PluginMeta(name, display_name, version, description, author, icon)- 返回
MCPToolResult(content=[{"type": "text", "text": "..."}], is_error=False/True) - 如需配置,声明带
ConfigField子类的config_class - 实现
on_load()/on_unload()作为生命周期钩子 - 所有路径通过
utils/paths.py— 永不硬编码路径 - 平台特定代码包装在
if IS_WINDOWS:/if IS_LINUX:中
widget.py(仅在请求时)
- 继承
BasePluginWidget(QObject)— 必须继承 QObject 以支持线程安全信号 - 实现
get_name()和create_widget(parent) - 使用
self.invoke(PluginClass.tool_def, ArgsModel(...))进行类型化调用 - 持有对部件实例的显式引用(防止 GC)
README.md
必须包含:
- 插件描述
- 工具表(名称、描述、参数)
- 依赖列表
- 使用示例
4. 验证
生成文件后,验证:
-
PLUGIN_CLASS从__init__.py导出 - 所有
ToolDef名称唯一 - 所有处理器匹配
handle_{tool_name}模式 - 返回使用
MCPToolResult格式 - 无硬编码路径
- README.md 存在且含工具文档
关键规则
- ToolDef 类属性 — 永不使用装饰器或基于字符串的分发
- MCPToolResult — 始终将返回值包装在
MCPToolResult(content=[{"type": "text", "text": ...}])中 - ConfigField 描述符 — 使用
self.config.key直接读写,Pylance 推断类型 - 数据库时间戳 — 始终使用
datetime('now', 'localtime'),永不使用 UTC - 无 Pillow 依赖 — 使用纯 Python struct + Qt 进行图像编码
- 跨平台 — 用
if IS_WINDOWS:/if IS_LINUX:包装平台 API - 自动发现 — 无需手动注册,PluginManager 自动发现插件
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 153 lines · 37 tokens per session scan A 0da02548e01c
plugin_creator is an agent published in the GitHub repository ljzloser/mcp_tools (4 stars, last pushed 4mo ago), licensed MIT. It adds 37 tokens to every session and 1,493 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
plugin_creator compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| plugin_creatorljzloser/mcp_tools | Agent | 4 | 4mo ago | MIT | A | 37 | Claude Code |
| playwright-test-generatormicrosoft/playwright | Agent | 99k | yesterday | Apache-2.0 | A | 151 | Claude Code |
| .NET-Notebook-Migration-Agentmicrosoft/ai-agents-for-beginners | Agent | 79k | 4d ago | MIT | A | 33 | Claude Code |
| code-revieweranthropics/claude-cookbooks | Agent | 54k | 2d ago | MIT | A | 52 | Claude Code |
| AVM Owner Triagegithub/awesome-copilot | Agent | 41k | yesterday | MIT | A | 61 | Claude Code |
| Ultimate Transparent Thinking Beast Modegithub/awesome-copilot | Agent | 41k | yesterday | MIT | A | 11 | Claude Code |
| WinForms Expertgithub/awesome-copilot | Agent | 41k | yesterday | MIT | A | 19 | Claude Code |