By hangox
Portainer CE container management plugin for Claude Code. Manage Docker containers, stacks, images, networks, and volumes through Portainer REST API.
Claude Code 插件,通过 Portainer REST API 管理 Docker 容器和服务。
在 Claude Code 中运行:
/plugin install portainer@hangox
或通过 CLI:
claude plugin install portainer@hangox
适用于 Cursor、Windsurf 等多种 AI 编程工具:
# 安装到当前项目(推荐)
npx skills-installer install @hangox/claude-portainer-plugin/portainer -p --client claude-code
# 全局安装(所有项目可用)
npx skills-installer install @hangox/claude-portainer-plugin/portainer --client claude-code
git clone https://github.com/hangox/claude-portainer-plugin.git ~/.claude/plugins/claude-portainer-plugin
重启 Claude Code 后插件自动生效。
插件按以下优先级自动获取 Portainer 连接信息:
export PORTAINER_URL="https://portainer.example.com"
export PORTAINER_API_KEY="ptr_your_api_key_here"
export PORTAINER_ENDPOINT_ID="1" # 可选,默认 1
在项目的 CLAUDE.md 中添加 Portainer 配置段落:
## Portainer 信息
- 管理地址: https://portainer.example.com
- Portainer ID: 2
首次使用时,插件会自动询问 Portainer URL 和认证信息。
"列出所有 stack"
"部署这个 docker-compose.yml 到 Portainer"
"重启 nginx 容器"
"查看 redis 的日志"
"触发 webhook 重新部署 my-stack"
"清理未使用的镜像"
"查看 Docker 磁盘使用情况"
ptr_ 开头的 API Key项目包含自动化测试,使用 Docker 启动独立的 Portainer 测试环境:
cd tests
npm install
npx tsx run-tests.ts # 一键运行(自动 setup + test + teardown)
测试覆盖:28 个用例(14 P0 + 10 P1 + 3 错误处理 + 1 清理),0 失败。
| Portainer 版本 | 状态 |
|---|---|
| CE 2.33.7 | 已验证 |
| CE 2.24.1 | 已验证(自动化测试) |
| CE 2.19+ | 最低支持 |
MIT
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub hangox/claude-portainer-plugin --plugin portainerDocker and containerization expert for Dockerfile optimization, multi-stage builds, docker-compose orchestration, container debugging, image size reduction, security scanning, networking, and volume management. Use when working with Docker containers, writing Dockerfiles, or troubleshooting containerization issues.
Manage container registries (ECR, GCR, Harbor)
Container development and deployment - Docker, registry, Skaffold
Build optimized Docker images and improve Dockerfile best practices
Ultra-compressed communication mode. Cuts ~75% of tokens while keeping full technical accuracy by speaking like a caveman.
Frontend design skill for UI/UX implementation