dimctl-skill
v0.1.1
Published
Agent Skill for the dim container-image build daemon. Installs SKILL.md (Anthropic Agent Skills format) and depends on the dimctl CLI as a runtime tool.
Maintainers
Readme
dimctl-skill
An Anthropic Agent Skill that teaches an AI agent how to drive the dim container-image build daemon through the dimctl CLI. For operators who run AI agents (Claude Code, Codex CLI, Continue.dev, Cursor, custom Anthropic-SDK agents) and want them to build container images on demand.
What you get
SKILL.md— frontmatter (name,description,allowed-tools) + the agent's playbook. Anthropic Agent Skills format; any compatible runtime auto-discovers it.dimctlCLI — installed as a transitive dependency, used by the agent at runtime.dimctl-skill init— installer that detects which AI runtimes you have, copiesSKILL.mdinto each one's skill directory, and persistsDIM_ADDR/DIM_TOKEN.
Install on a new machine
# 1. Node ≥ 18 must be present.
node --version
# 2. Install the skill (pulls dimctl as a dep).
npm install -g dimctl-skill
# 3. Run init — detects Claude Code / Codex / Continue.dev / Cursor and
# wires SKILL.md into each one's skill folder. Prompts for daemon
# URL + token.
dimctl-skill init
# 4. Reload your shell (so DIM_ADDR / DIM_TOKEN are exported) and restart
# your agent. Done.dimctl-skill init is idempotent — re-run it any time the daemon URL or token changes; it diffs SKILL.md and only rewrites when content differs.
Detected runtimes
| Runtime | Detection marker | Action |
|---|---|---|
| Claude Code | ~/.claude/ exists | Auto-installs SKILL.md to ~/.claude/skills/dimctl/SKILL.md |
| Codex CLI (OpenAI) | ~/.codex/ exists | Prints manual integration hint (Codex uses one AGENTS.md per scope, no per-skill folder) |
| Continue.dev | ~/.continue/ exists | Auto-installs to ~/.continue/rules/dimctl/SKILL.md |
| Cursor | ~/.cursor/ exists | Prints manual integration hint (project-scoped .cursorrules) |
If no runtime is detected, init falls back to installing into ~/.claude/skills/dimctl/SKILL.md as a default and tells you to point your agent there.
init options
dimctl-skill init [options]
--addr=URL daemon base URL (default: prompt or http://127.0.0.1:8080)
--token=TOKEN bearer token (default: prompt)
--no-env skip env-var setup; only copy SKILL.md
--force overwrite SKILL.md even if content is unchanged
-h, --help show helpNon-interactive (CI / dotfiles) install:
npm install -g dimctl-skill
dimctl-skill init --addr=http://daemon.internal:8080 --token=$DIM_TOKENEnv file persistence
init writes the daemon URL and token to:
- Linux / macOS —
~/.config/dimctl/env(mode 0600,export DIM_ADDR=...syntax). Source it from your shell rc:echo 'source ~/.config/dimctl/env' >> ~/.bashrc - Windows —
%APPDATA%\dimctl\env.ps1(PowerShell$env:DIM_ADDR='...'syntax). Dot-source it from your$PROFILE:. "$env:APPDATA\dimctl\env.ps1"
The env file holds the secret — it's mode 0600 on Unix; lock down the directory ACL accordingly on Windows.
How an agent uses this
After init, the agent runtime (Claude Code etc.) sees dimctl in its available-skills list. When the user's message matches the skill's description trigger ("build this repo and push to X", "is build N done", "show me the logs of build N", "what's the digest"), the agent loads SKILL.md and follows the playbook:
- Pre-flight: check
dimctl creds listto verify both git & registry hosts are configured. dimctl submit ...to launch the build, capture the ULID.dimctl logs <id> --followto stream logs to completion.dimctl get <id> -o json | jq .status .digestto confirm success and report the digest.
The agent treats 4xx errors as deterministic (no retry), only retries on transient network failures, and never echoes the token.
What this skill is NOT
- Not the dim daemon itself — that's
dim(formerlyimgbuild), run by your operator. - Not the admin CLI — credential / user / token management is intentionally outside the agent's reach. The skill knows to say "ask your operator" when it hits an operator-only gate.
- Not provider-locked — the Anthropic Agent Skills format is plain markdown + YAML frontmatter; any runtime that reads
SKILL.mdand injects the body into a system prompt can use this skill.
License
MIT
