/docker-model
Use this skill when running local AI models with Docker Model Runner — the `docker model` CLI — e.g. "run an LLM locally with Docker", "pull a model from the ai/ namespace", "connect my app to a local model", "use a local model as backend for the Drupal AI module", or when
$ npx -y skills add siva01c/claude-plugins --skill docker-model --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/docker-model
Context preview
The summary Claude sees to decide when to auto-load this skill.
Use this skill when running local AI models with Docker Model Runner — the `docker model` CLI — e.g. "run an LLM locally with Docker", "pull a model from the ai/ namespace", "connect my app to a local model", "use a local model as backend for the Drupal AI module", or when
SKILL.md
docker-model.SKILL.mdname: docker-model
description: >
Use this skill when running local AI models with Docker Model Runner — the
`docker model` CLI — e.g. "run an LLM locally with Docker", "pull a model
from the ai/ namespace", "connect my app to a local model", "use a local
model as backend for the Drupal AI module", or when wiring the `models:`
top-level element into a compose.yaml. Covers pulling/running models,
OpenAI-compatible endpoints, and Compose integration.
Docker Model Runner Skill
Docker Model Runner (DMR) manages and serves AI models through Docker Desktop or Docker Engine, exposing **OpenAI-compatible APIs**. Models are pulled as OCI artifacts from Docker Hub (`ai/` namespace), any OCI registry, or Hugging Face, and stored locally. For Drupal work it provides a free, local, keyless backend for the AI module ecosystem during development.
---
Enabling
- **Docker Desktop:** Settings → enable *Docker Model Runner* (Beta features).
- **Docker Engine (Linux):** supported without Desktop; models are served on
the host. GPU support: NVIDIA (CUDA), AMD (ROCm), Vulkan; Apple Silicon on macOS; CPU everywhere.
---
Core CLI
docker model status # is the runner active?
docker model pull ai/smollm2 # fetch a model (Docker Hub ai/ namespace)
docker model pull hf.co/bartowski/Llama-3.2-1B-Instruct-GGUF # from Hugging Face
docker model list # local models
docker model run ai/smollm2 "Hello" # one-shot prompt
docker model run ai/smollm2 # interactive chat (exit with /bye)
docker model configure --context-size 8192 ai/smollm2 # adjust context window
docker model inspect ai/smollm2 # model metadata
docker model logs # runner logs
docker model rm ai/smollm2 # delete local model
Run `docker model --help` for the full, current command list — the CLI is still evolving.
---
OpenAI-compatible API
| Endpoint | Method | |---|---| | `/engines/v1/models` | GET | | `/engines/v1/chat/completions` | POST | | `/engines/v1/completions` | POST | | `/engines/v1/embeddings` | POST |
Base URLs:
- **From the host:** `http://localhost:12434` (default TCP port)
- **From containers (Docker Desktop):** `http://model-runner.docker.internal`
- **From containers (Docker Engine):** `http://172.17.0.1:12434`
curl http://localhost:12434/engines/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model": "ai/smollm2", "messages": [{"role": "user", "content": "Hi"}]}'Any OpenAI SDK works by pointing `base_url` at `http://localhost:12434/engines/v1` — no API key required.
---
Compose integration — `models:` top-level element
Declare models next to services; Compose pulls and provisions them:
services:
app:
image: my-app
models:
- llm # short syntax
models:
llm:
model: ai/smollm2
context_size: 4096
runtime_flags:
- "--no-prefill-assistant"Short syntax injects environment variables into the service container, named after the model key: `LLM_URL` and `LLM_MODEL`. Long syntax picks your own variable names:
services:
app:
image: my-app
models:
llm:
endpoint_var: AI_MODEL_URL
model_var: AI_MODEL_NAME---
Using DMR as a Drupal AI backend
The Drupal **AI module** (`drupal/ai`) talks to providers over the OpenAI API. Point an OpenAI-compatible provider (e.g. `drupal/ai_provider_openai`) at the Model Runner endpoint to develop AI features without cloud keys:
- **Base URL** (Drupal in a container, Docker Desktop):
`http://model-runner.docker.internal/engines/v1`
- **Base URL** (Drupal on the host): `http://localhost:12434/engines/v1`
- **API key:** any non-empty placeholder — DMR does not check it.
- **Model name:** exactly as listed by `docker model list` (e.g. `ai/smollm2`).
This gives local, reproducible AI development for content generation, embeddings/search experiments, and automated tests without external costs.
---
Troubleshooting
| Symptom | Fix | |---|---| | `docker model: command not found` | Enable Model Runner in Docker Desktop settings, or install the plugin on Docker Engine | | Connection refused on 12434 | Enable *host-side TCP support* in the Model Runner settings; check `docker model status` | | Container cannot reach `model-runner.docker.internal` | On Docker Engine use `http://172.17.0.1:12434` instead | | Responses truncated | Raise the context window: `docker model configure --context-size <n> <model>` | | Model too slow / out of memory | Pull a smaller quantized variant from the `ai/` namespace; check GPU is actually used (`docker model logs`) |
Read more
name: docker-model description: > Use this skill when running local AI models with Docker Model Runner — the `docker model` CLI — e.g. "run an LLM locally with Docker", "pull a model from the ai/ namespace", "connect my app to a local model", "use a local model as backend for the Drupal AI module", or when wiring the `models:` top-level element into a compose.yaml. Covers pulling/running models, OpenAI-compatible endpoints, and Compose integration.
Docker Model Runner Skill
Docker Model Runner (DMR) manages and serves AI models through Docker Desktop or Docker Engine, exposing **OpenAI-compatible APIs**. Models are pulled as OCI artifacts from Docker Hub (`ai/` namespace), any OCI registry, or Hugging Face, and stored locally. For Drupal work it provides a free, local, keyless backend for the AI module ecosystem during development.
---
Enabling
- **Docker Desktop:** Settings → enable *Docker Model Runner* (Beta features).
- **Docker Engine (Linux):** supported without Desktop; models are served on
the host. GPU support: NVIDIA (CUDA), AMD (ROCm), Vulkan; Apple Silicon on macOS; CPU everywhere.
---
Core CLI
docker model status # is the runner active? docker model pull ai/smollm2 # fetch a model (Docker Hub ai/ namespace) docker model pull hf.co/bartowski/Llama-3.2-1B-Instruct-GGUF # from Hugging Face docker model list # local models docker model run ai/smollm2 "Hello" # one-shot prompt docker model run ai/smollm2 # interactive chat (exit with /bye) docker model configure --context-size 8192 ai/smollm2 # adjust context window docker model inspect ai/smollm2 # model metadata docker model logs # runner logs docker model rm ai/smollm2 # delete local model
Run `docker model --help` for the full, current command list — the CLI is still evolving.
---
OpenAI-compatible API
| Endpoint | Method | |---|---| | `/engines/v1/models` | GET | | `/engines/v1/chat/completions` | POST | | `/engines/v1/completions` | POST | | `/engines/v1/embeddings` | POST |
Base URLs:
- **From the host:** `http://localhost:12434` (default TCP port)
- **From containers (Docker Desktop):** `http://model-runner.docker.internal`
- **From containers (Docker Engine):** `http://172.17.0.1:12434`
curl http://localhost:12434/engines/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model": "ai/smollm2", "messages": [{"role": "user", "content": "Hi"}]}'Any OpenAI SDK works by pointing `base_url` at `http://localhost:12434/engines/v1` — no API key required.
---
Compose integration — `models:` top-level element
Declare models next to services; Compose pulls and provisions them:
services:
app:
image: my-app
models:
- llm # short syntax
models:
llm:
model: ai/smollm2
context_size: 4096
runtime_flags:
- "--no-prefill-assistant"Short syntax injects environment variables into the service container, named after the model key: `LLM_URL` and `LLM_MODEL`. Long syntax picks your own variable names:
services:
app:
image: my-app
models:
llm:
endpoint_var: AI_MODEL_URL
model_var: AI_MODEL_NAME---
Using DMR as a Drupal AI backend
The Drupal **AI module** (`drupal/ai`) talks to providers over the OpenAI API. Point an OpenAI-compatible provider (e.g. `drupal/ai_provider_openai`) at the Model Runner endpoint to develop AI features without cloud keys:
- **Base URL** (Drupal in a container, Docker Desktop):
`http://model-runner.docker.internal/engines/v1`
- **Base URL** (Drupal on the host): `http://localhost:12434/engines/v1`
- **API key:** any non-empty placeholder — DMR does not check it.
- **Model name:** exactly as listed by `docker model list` (e.g. `ai/smollm2`).
This gives local, reproducible AI development for content generation, embeddings/search experiments, and automated tests without external costs.
---
Troubleshooting
| Symptom | Fix | |---|---| | `docker model: command not found` | Enable Model Runner in Docker Desktop settings, or install the plugin on Docker Engine | | Connection refused on 12434 | Enable *host-side TCP support* in the Model Runner settings; check `docker model status` | | Container cannot reach `model-runner.docker.internal` | On Docker Engine use `http://172.17.0.1:12434` instead | | Responses truncated | Raise the context window: `docker model configure --context-size <n> <model>` | | Model too slow / out of memory | Pull a smaller quantized variant from the `ai/` namespace; check GPU is actually used (`docker model logs`) |
A curated collection of Claude Code plugins for Drupal development, security, and deployment. Each plugin covers one topic — Drupal itself, DDEV, Docker, CI/CD, git workflows, and security verification — so you install only what you need.
Other skills on claude-plugins.
- /github-actions
Use this skill when authoring or debugging GitHub Actions workflows (.github/workflows/*.yml) — e.g. "add CI for this Drupal project on GitHub", "run phpcs/phpstan/phpunit on pull requests", "cache composer dependencies", "deploy over SSH when main is pushed", "why didn't my
Open skill - /gitlab-ci
Use this skill when authoring or debugging GitLab CI/CD pipelines (.gitlab-ci.yml) — e.g. "add a CI pipeline for this Drupal project", "run phpcs/phpstan/phpunit in GitLab CI", "deploy with drush from a pipeline", "why is my job not running", "cache composer dependencies", or
Open skill - /drupal-ddev-operations
Use for operational Drupal 11 workflows in DDEV environments, including safe updates, backup-first procedures, and troubleshooting commands.
Open skill - /docker-compose
Use this skill when authoring or editing Docker Compose files (compose.yaml / docker-compose.yml), running multi-container stacks, or containerizing a Drupal/PHP application — e.g. "set up a local Drupal stack with nginx and MariaDB", "add Redis to my compose file", "why won't
Open skill - /drupal-module-development
Use when creating or extending Drupal 11 custom modules, including scaffolding, service architecture, and dependency injection best practices.
Open skill - /drupal-security-review
Use when auditing Drupal 11 custom modules/themes for security issues such as unsafe input handling, XSS risks, SQL injection, and access control gaps.
Open skill

