Skip to content

feat(skills): add int-portainer integration (Portainer container/stack monitoring)#114

Open
mt-alarcon wants to merge 1 commit into
evolution-foundation:developfrom
mt-alarcon:feat/int-portainer-skill
Open

feat(skills): add int-portainer integration (Portainer container/stack monitoring)#114
mt-alarcon wants to merge 1 commit into
evolution-foundation:developfrom
mt-alarcon:feat/int-portainer-skill

Conversation

@mt-alarcon

Copy link
Copy Markdown

Summary

  • Adds int-portainer skill for managing and monitoring Portainer CE/EE container orchestration instances
  • Multi-instance support via env vars — no hardcoded names; any PORTAINER_<NAME>_URL + PORTAINER_<NAME>_TOKEN pair in .env is discovered at runtime
  • Follows the same skill structure and .env auto-load pattern as existing int-* skills

Configuration

# .env — one block per instance
PORTAINER_PROD_URL=https://portainer.prod.example.com
PORTAINER_PROD_TOKEN=ptr_xxxx
PORTAINER_STAGING_URL=https://portainer.staging.example.com
PORTAINER_STAGING_TOKEN=ptr_yyyy

No API keys or secrets are required at install time — credential pattern matches existing skills.

Commands

Command Description
ping Health-check all configured instances
health Detailed system info (version, resources)
containers List containers with status and image
stacks List Docker Compose stacks
logs Tail container logs (supports --lines)
events Recent Docker events
deploy Deploy/update a stack from a Compose file
stop / restart Lifecycle operations on a container
exec Run a command inside a container
smoke Standard health-check exit-0+JSON (CI/heartbeat pattern)

Tests

13 unit tests covering:

  • .env auto-load (populates env without overriding existing vars)
  • Dynamic instance discovery from PORTAINER_<NAME>_* env vars
  • cmd_logs guard rejects endpoint_id=None with clear error
  • resolve_instances('all') iterates all configured instances
  • smoke command always exits 0 and returns valid JSON

All tests pass with pytest .claude/skills/int-portainer/tests/ -v.

Checklist

  • No hardcoded secrets or private URLs
  • .env auto-load without requiring manual source
  • Dynamic instance discovery — works with any instance name
  • smoke command follows the standard exit-0+JSON pattern
  • 13 tests passing
  • MIT-compatible (uses only stdlib + urllib)

🤖 Generated with Claude Code

…k monitoring)

New skill for managing and monitoring Portainer CE/EE instances. Supports
multi-instance configuration via env vars (PORTAINER_<NAME>_URL + PORTAINER_<NAME>_TOKEN),
dynamic instance discovery at runtime, and standard skill command interface.

Commands: ping, health, containers, stacks, logs, events, deploy, stop, restart, exec, smoke.
Tests: 13 unit tests covering .env auto-load, dynamic discovery, logs guard, and smoke.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @mt-alarcon, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant