flisk-agent-ops
Ground rules and the CLI-to-MCP command map for a coding agent (Claude Code, Cursor, Codex) working in a Flisk project - create services with `flisk resource` instead of hand-writing Dockerfiles, Comp
SKILL.md.claude/skills/flisk-agent-ops/SKILL.md
GitHubFlisk Agent Operations Guide
When building, adding, or modifying services in this workspace, do not hand-write Dockerfiles, Docker Compose files, or container manifests. Flisk automatically manages containerization, networking (Traefik), dependencies, and hot reload.
Core Rules for AI Coding Agents
Always use Flisk to scaffold new services:
- Scaffold an AI agent:
flisk resource <name> --type agent [--durability files|postgres] - Scaffold an MCP tool server:
flisk resource <name> --type mcp - Scaffold a backend API:
flisk resource <name> --type backend [--framework hono|express|fastify] - Scaffold a worker:
flisk resource <name> --type worker - Scaffold a frontend:
flisk resource <name> --type frontend [--framework react|vue|next] - Wrap an existing Dockerfile or image:
flisk resource <name> --type bring-your-own --dockerfile ./Dockerfile(or--image <name>)
- Scaffold an AI agent:
The
agentProcess Contract:/health: Liveness only. Responds 200 when the process is alive./ready: Readiness check. Responds 200 when the checkpoint store (named volume or Postgres) is reachable./turn(POST): Accepts a JSON body{"input": "..."}with headerx-session-id: <session-id>./session(GET): Returns checkpointed messages and turns for the session specified inx-session-id./sessions(GET): Lists the stored sessions, newest first.- Checkpoints persist across container restarts and
flisk down/flisk up.
Operate via MCP or CLI:
- Preflight & diagnostics:
flisk doctor --json(or tooldoctor) - Start the stack:
flisk up --json(or toolup) - Inspect status:
flisk status --json(or toolstatus) - Check logs:
flisk logs --tail 200 --json(or toollogs) - Restart a service:
flisk restart <resource> --json(or toolresource_restart) - List agents:
flisk resources --type agent --json(or toolagent_list) - List agent sessions:
flisk agent sessions <resource> --json(or toolagent_sessionswithresource); add--session-id <id>(tool:sessionId) to read one session's checkpoint - Stop services:
flisk down --json(or tooldown)
- Preflight & diagnostics: