kastelldev/kastell/kastell-ops
Claude Code and agent skill by kastelldev/kastell
- community
Checking that the SKILL.md file is still in the repository.
Kastell CLI patterns, architecture, anti-patterns, and decision trees. Use automatically when working in Kastell codebase or when asked about Kastell server infrastructure, security audit, hardening, lock, provision, or provider management.
Install
npx vskill@latest install kastelldev/kastell/kastell-opsSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Kastell Architecture
Kastell is a CLI toolkit for provisioning, securing, and managing self-hosted servers. TypeScript, ESM, strict mode. CLI commands, first-party MCP tools, 4 cloud providers (hetzner, digitalocean, vultr, linode), 2 platform adapters (coolify, dokploy).
Live Context
Version: !node -e "import('fs').then(f=>console.log(JSON.parse(f.readFileSync('package.json','utf8')).version)).catch(()=>console.log('unknown'))" Registered servers: !kastell list 2>/dev/null || echo "No servers registered"
Architecture File Map
Layer Rules
| Layer | Path | Responsibility | Rule | |
|---|---|---|---|---|
| Commands | src/commands/ | Parse CLI args, call core, display output | ZERO business logic | |
| Core | src/core/ | All business logic, orchestration | No UI/chalk/ora imports | |
| Providers | src/providers/ | Cloud API calls per provider | Implements cloud CRUD | |
| Adapters | src/adapters/ | Platform-specific ops (Coolify/Dokploy) | Via PlatformAdapter interface | |
| MCP | src/mcp/ | MCP server + tool handlers | Delegates to core | |
| Utils | src/utils/ | SSH, config, modeGuard, errorMapper | Shared infrastructure |
Adapter Contract
Access adapters via getAdapter(platform) from src/adapters/factory.ts. Never import CoolifyAdapter or DokployAdapter directly in commands.
Factory exports: getAdapter(platform), detectPlatform(ip), resolvePlatform(server)
Provider Registry
| Provider | Env Key | Display Name | |
|---|---|---|---|
| hetzner | HETZNER_TOKEN | Hetzner Cloud | |
| digitalocean | DIGITALOCEAN_TOKEN | DigitalOcean | |
| vultr | VULTR_TOKEN | Vultr | |
| linode | LINODE_TOKEN | Linode (Akamai) |
PROVIDER_REGISTRY in src/constants.ts is the single source of truth for providers.
What Do I Want to Add?
New CLI command
src/commands/<name>.ts— thin wrapper (parse + delegate, no logic)src/core/<name>.ts— all business logic heresrc/index.ts— register withprogramsrc/__tests__/— test core, not command
New audit check
src/core/audit/<category>/— add to existing category- Update check catalog in
src/core/audit/catalog.ts - No new command file needed — runs through
kastell audit
New provider
src/providers/<name>.ts— implements base.ts contractsrc/constants.ts— add to PROVIDER_REGISTRY- No adapter changes — providers handle cloud API only
New MCP tool
src/mcp/tools/server<Name>.ts— Zod schema + handlersrc/mcp/server.ts— import +registerTool()- Annotations:
readOnlyHint/destructiveHint/idempotentHint
Key Conventions
- ESM project (
"type": "module") —import, notrequire KASTELL_SAFE_MODE+isSafeMode()= destructive operation guardassertValidIp()before every SSH operationsanitizedEnvfor subprocess callssanitizeResponseData()whitelist approach for API error responses- Config dir: user home
kastell/directory (auto-migrated from legacy name) PROVIDER_REGISTRY= single source of truth for providerswithProviderErrorHandlingHOF for consistent provider error handlingdescribe.eachwithjest.resetAllMocks()(notclearAllMocks())
Scripts (Deterministic)
Run without LLM — deterministic analysis scripts:
Reference Files
- 31 CLI commands — see references/commands.md
- first-party MCP tools — see references/mcp-tools.md
- Patterns and test templates — see references/patterns.md
- Known pitfalls — see references/pitfalls.md
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingkastell-plugin/skills/kastell-ops/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/kastelldev/kastell/kastell-ops)