.cursor/skills/devcontainer-provisioner/SKILL.md
Install missing software and start services on the fly inside the devcontainer without rebuilding. Use when a command fails with "not found", a Python import fails with "ModuleNotFoundError", a PHP class is missing, npm package is absent, or a service (PostgreSQL, Redis, OpenSearch, RabbitMQ) is not running. Triggers on: "not found", "ModuleNotFoundError", "No module named", "command not found", "could not find", "package not found", "install", "provision", "service not running", "connection refused".
npx skillsauth add nmdimas/ai-community-platform devcontainer-provisionerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Install missing packages, libraries, and runtimes on the fly in the running devcontainer. Restart stopped Docker Compose services. Make everything available immediately without requiring a container rebuild.
command not found or No such file or directoryModuleNotFoundError or No module namedClass 'X' not found or Undefined functionCannot find moduleconnection refused on PostgreSQL (5432), Redis (6379),
OpenSearch (9200), or RabbitMQ (5672)Before doing anything else, run these checks in order. Stop at the first failure.
# Returns 0 (true) inside devcontainer, 1 (false) on host
test -f /.dockerenv || test -n "$REMOTE_CONTAINERS" || test -n "$CODESPACES" || [[ "$PWD" == /workspaces/* ]]
If the check fails (we are on the host / local machine), stop immediately:
This skill only works inside the devcontainer. Infrastructure services (PostgreSQL, Redis, OpenSearch, RabbitMQ) are managed by Docker Compose as sidecar containers of the devcontainer. To start the devcontainer: open the project in VS Code and use "Dev Containers: Reopen in Container", or run
devcontainer up.
Do NOT attempt to install packages or start services on the host machine.
docker info &>/dev/null
If Docker is not available, infrastructure services cannot be managed. Report the issue clearly:
Docker is not available inside this devcontainer. Without Docker, infrastructure services (PostgreSQL, Redis, OpenSearch, RabbitMQ) cannot be started — they run as Docker Compose sidecar containers.
Possible causes:
- Docker socket not mounted (check
.devcontainer/docker-compose.ymlhas/var/run/docker.sock:/var/run/docker.sock)- Docker-in-Docker feature not started (check
devcontainer.jsonhasghcr.io/devcontainers/features/docker-in-docker:2)- Container provider (Codespaces, etc.) doesn't support DinD
Fix: rebuild the devcontainer with "Dev Containers: Rebuild Container" or ensure Docker socket is accessible.
You can still install packages (apt, pip, npm, composer) without Docker. Only service management requires Docker.
Run this to get a full picture before taking action:
echo "=== Infrastructure Services ==="
for svc in \
"PostgreSQL:pg_isready -h postgres -U app -q" \
"Redis:redis-cli -h redis ping" \
"OpenSearch:curl -sf http://opensearch:9200" \
"RabbitMQ:curl -sf http://rabbitmq:15672"; do
name="${svc%%:*}"; cmd="${svc#*:}"
if eval "$cmd" &>/dev/null; then echo " [OK] $name"
else echo " [FAIL] $name"; fi
done
If any service is down, restart it:
docker compose up -d <service>
If ALL services are down, restart everything:
docker compose up -d
OpenCode should have at least two configured providers visible from the
devcontainer. This confirms that .env.local is being forwarded correctly and
the coding agents have fallback capacity.
opencode auth list
Expected minimum:
2 provider entries (lines starting with ● )Environment providers such as
OpenRouter, MiniMax, or OpenCodeIf fewer than 2 providers are visible:
OpenCode does not have enough configured providers inside the devcontainer. Check
.env.local, verify.devcontainer/docker-compose.ymlforwards it viaenv_file, and rerunbash .devcontainer/post-start.shafter recreating the container.
This devcontainer runs Ubuntu (noble) with these runtimes pre-installed:
| Runtime | Version | Manager |
|---------|---------|---------|
| PHP | 8.5 | apt (ondrej/php PPA) |
| Node.js | 22 LTS | apt (NodeSource) + npm |
| Python | 3.12 | system (apt for system pkgs, pip for libraries) |
| Go | 1.24 | /usr/local/go/bin/go |
| Composer | 2.x | composer |
| Bun | 1.x | bun |
Infrastructure services are defined in the root compose.yaml and shared with the
devcontainer via merged Docker Compose project (not duplicated):
| Service | Host | Port | Image |
|---------|------|------|-------|
| PostgreSQL 16 | postgres | 5432 | postgres:16-alpine |
| Redis 7 | redis | 6379 | redis:7-alpine |
| OpenSearch 2.11 | opensearch | 9200 | opensearchproject/opensearch:2.11.1 |
| RabbitMQ 3.13 | rabbitmq | 5672/15672 | rabbitmq:3.13-management-alpine |
Apps use Docker service hostnames (postgres, redis, opensearch, rabbitmq)
as defined in their .env files — no .env.local overrides needed.
See references/runtime-map.md for the full command reference.
See references/service-map.md for service management commands.
See references/architecture.md for compose merge model and path resolution.
Parse the error message or user request to determine:
Before installing, verify the package isn't already present:
# System binary
which <binary> || command -v <binary>
# Python module
python3 -c "import <module>" 2>&1
# PHP extension
php -m | grep -i <extension>
# Node module (global)
npm list -g <package> 2>/dev/null
# apt package
dpkg -l | grep <package>
# Docker Compose service status
docker compose ps <service>
# Service connectivity
pg_isready -h postgres # PostgreSQL
redis-cli -h redis ping # Redis
curl -sf http://opensearch:9200 >/dev/null # OpenSearch
If already installed, tell the user and stop. Do NOT reinstall.
Use the correct package manager. Always use non-interactive flags.
System packages (apt):
sudo apt-get update -qq && sudo apt-get install -y -qq <package>
Python packages (pip):
pip3 install --break-system-packages -q <package>
--break-system-packagesis required in this devcontainer because Python is the system Python (no virtualenv). This is intentional for dev use.
PHP extensions:
sudo apt-get update -qq && sudo apt-get install -y -qq php8.5-<extension>
Node packages (global):
npm install -g <package>
Node packages (project-local):
npm install <package>
# or for a specific app:
cd apps/<app> && npm install
Composer packages:
composer require <package>
# or install from existing lock:
composer install
Go tools:
go install <package>@latest
Bun packages:
bun add <package>
# or global:
bun add -g <package>
Docker Compose services (restart a stopped service):
docker compose up -d <service>
After installing, verify the package is available:
# Binaries
which <binary> && <binary> --version
# Python
python3 -c "import <module>; print(<module>.__version__)" 2>/dev/null \
|| python3 -c "import <module>; print('OK')"
# PHP
php -m | grep -i <extension>
# Node
node -e "require('<package>')" 2>/dev/null || npm list -g <package>
# Docker Compose services
docker compose ps <service>
pg_isready -h postgres # PostgreSQL
redis-cli -h redis ping # Redis
If verification fails, check error output and report to the user.
If the missing piece is a Docker Compose service that is down:
# Restart a specific service
docker compose up -d <service>
# Restart all infrastructure services
docker compose up -d postgres redis opensearch rabbitmq
# View service logs for debugging
docker compose logs <service> --tail 50
See references/service-map.md for full details including database operations.
Tell the user:
.devcontainer/Dockerfile
or .devcontainer/post-create.shWhen multiple packages are needed (e.g., a Python project's requirements.txt):
# Python project dependencies
pip3 install --break-system-packages -q -r apps/<app>/requirements.txt
# Node project dependencies
cd apps/<app> && npm install
# PHP project dependencies
composer install
Packages installed at runtime do NOT survive a devcontainer rebuild. If the user wants persistence, guide them to add the install command to the appropriate file:
| Package Type | Persist In |
|-------------|-----------|
| apt packages | .devcontainer/Dockerfile (in an apt-get install block) |
| pip packages | .devcontainer/Dockerfile or app-specific requirements.txt |
| npm global tools | .devcontainer/Dockerfile (in npm install -g line) |
| npm project deps | App's package.json (already persisted) |
| PHP extensions | .devcontainer/Dockerfile (in apt-get install php8.5-* block) |
| composer deps | composer.json (already persisted) |
| Infrastructure services | compose.yaml (already persisted) |
| Database init scripts | docker/postgres/init/ SQL files (already persisted) |
# Check which services are running
docker compose ps
# Restart the specific service
docker compose up -d <service>
# If a service fails to start, check logs
docker compose logs <service> --tail 50
pip3 install --break-system-packages -q psycopg2-binary
pip3 install --break-system-packages -q -r apps/news-maker-agent/requirements.txt
Databases are auto-created by init scripts in docker/postgres/init/.
If you need to manually create one:
psql -h postgres -U postgres -c "CREATE DATABASE <dbname>;"
psql -h postgres -U postgres -c "CREATE USER <user> WITH PASSWORD '<pass>';" 2>/dev/null || true
psql -h postgres -U postgres -c "GRANT ALL ON DATABASE <dbname> TO <user>;"
psql -h postgres -U postgres -c "ALTER DATABASE <dbname> OWNER TO <user>;"
pgvector must be installed inside the postgres container:
docker compose exec postgres \
sh -c "apk add --no-cache postgresql16-pgvector"
psql -h postgres -U postgres -d <dbname> -c "CREATE EXTENSION IF NOT EXISTS vector;"
# PHP (Doctrine — Core)
php apps/core/bin/console doctrine:migrations:migrate --no-interaction
# PHP (Doctrine — Knowledge Agent)
php apps/knowledge-agent/bin/console doctrine:migrations:migrate --no-interaction
# Python (Alembic — news-maker-agent)
cd apps/news-maker-agent && alembic upgrade head
cd tests/e2e && npm install && npx playwright install --with-deps
| Error Pattern | Action |
|--------------|--------|
| bash: <cmd>: command not found | sudo apt-get install -y <package> or check references/runtime-map.md |
| ModuleNotFoundError: No module named '<pkg>' | pip3 install --break-system-packages <pkg> |
| Connection refused on port 5432 | docker compose up -d postgres |
| Connection refused on port 6379 | docker compose up -d redis |
| Connection refused on port 9200 | docker compose up -d opensearch |
| Connection refused on port 5672 | docker compose up -d rabbitmq |
| could not translate host name "postgres" | Service DNS not ready — docker compose up -d postgres |
| FATAL: database "<db>" does not exist | psql -h postgres -U postgres -c "CREATE DATABASE <db>;" |
| FATAL: role "<user>" does not exist | psql -h postgres -U postgres -c "CREATE USER <user> WITH PASSWORD '<pass>';" |
| Class 'X' not found (PHP) | sudo apt-get install -y php8.5-<extension> |
| Cannot find module '<pkg>' (Node) | npm install <pkg> |
-y, -q, --no-interaction) for all installssudo for apt-get (current user is vscode)--break-system-packages for pip3 (no virtualenv in devcontainer)docker compose commands, NOT sudo pg_ctlcluster or sudo redis-serverpostgres, redis, opensearch, rabbitmqpsql -h postgres -U postgresdevelopment
Convert a website or page with related links into a local collection of Markdown files with an index. Follows project docs conventions (ua/en bilingual structure). Uses WebFetch — no external dependencies. Triggers on: "web to docs", "website to markdown", "save docs locally", "convert site", "download docs", "fetch docs", "scrape to markdown".
documentation
Translation agent for ua/en bilingual content. Handles UI labels, help text, error messages, docs, and agent/system prompts. Finds translatable elements, detects supported languages, translates by context, maintains term consistency. Triggers on: "translate", "translation", "i18n", "missing translations", "mirror docs", "sync languages".
development
Security review agent for PHP/Symfony codebase. Performs manual-style security review with OWASP ASVS 5.0 category mapping, severity ratings, and PHP/Symfony-specific checklist. Triggers on: "security review", "security audit", "vulnerability check", "OWASP review", "pentest review", "security scan".
development
Auto-bump pipeline monitor version when builder/monitor/pipeline-monitor.sh is modified. Triggers automatically as a post-edit convention — not user-invocable directly. When any change is made to pipeline-monitor.sh, increment the patch version in the "# Version:" header comment. Triggers on: "pipeline-monitor", "monitor version", "bump monitor".