From fabrik
Allocates unique ports for SERVER_ADDRESS and MinIO, updates .env files, starts docker-compose and make watch for git worktrees in service-based projects.
npx claudepluginhub maragudk/fabrik --plugin fabrikThis skill uses the workspace's default tool permissions.
Claude Code has built-in worktree support (`--worktree`, `EnterWorktree`, `isolation: "worktree"`) that handles creating worktrees, branch management, cleanup, and copying gitignored files (via `.worktreeinclude`).
Guides Next.js Cache Components and Partial Prerendering (PPR): 'use cache' directives, cacheLife(), cacheTag(), revalidateTag() for caching, invalidation, static/dynamic optimization. Auto-activates on cacheComponents: true.
Processes PDFs: extracts text/tables/images, merges/splits/rotates pages, adds watermarks, creates/fills forms, encrypts/decrypts, OCRs scans. Activates on PDF mentions or output requests.
Share bugs, ideas, or general feedback.
Claude Code has built-in worktree support (--worktree, EnterWorktree, isolation: "worktree") that handles creating worktrees, branch management, cleanup, and copying gitignored files (via .worktreeinclude).
This skill covers the project-specific parts: allocating ports, starting services, and stopping them -- so multiple worktrees can run the same app in parallel without port conflicts.
Use these instructions after entering a worktree only if:
.env* files (should be listed in .worktreeinclude so they get copied automatically)If the project is a library or CLI tool without services, skip this entirely.
To avoid conflicts when running multiple instances, each worktree needs its own set of ports.
Allocate 4 available ports for:
SERVER_ADDRESS - Main HTTP server port (also used for BASE_URL)MINIO_PORT - MinIO S3 API endpoint (also used for AWS_ENDPOINT_URL)MINIO_CONSOLE_PORT - MinIO web consoleMINIO_TEST_PORT - MinIO test instance# Find 4 available ports
ports=($(bash scripts/allocate-ports.sh))
SERVER_PORT=${ports[1]}
MINIO_PORT=${ports[2]}
MINIO_CONSOLE_PORT=${ports[3]}
MINIO_TEST_PORT=${ports[4]}
# Update .env with allocated ports
sed -i '' "s|^SERVER_ADDRESS=.*|SERVER_ADDRESS=:${SERVER_PORT}|" .env
sed -i '' "s|^BASE_URL=.*|BASE_URL=http://localhost:${SERVER_PORT}|" .env
sed -i '' "s|^AWS_ENDPOINT_URL=.*|AWS_ENDPOINT_URL=http://localhost:${MINIO_PORT}|" .env
sed -i '' "s|^MINIO_PORT=.*|MINIO_PORT=${MINIO_PORT}|" .env
sed -i '' "s|^MINIO_CONSOLE_PORT=.*|MINIO_CONSOLE_PORT=${MINIO_CONSOLE_PORT}|" .env
sed -i '' "s|^MINIO_TEST_PORT=.*|MINIO_TEST_PORT=${MINIO_TEST_PORT}|" .env
Note: The scripts/ directory is part of this skill, not the project repository. Array uses 1-based indexing (zsh).
After updating .env:
# 1. Start docker-compose (if docker-compose.yml exists)
docker compose up -d
# 2. Start the app with file watching (if Makefile has a watch target)
make watch &
Report back to the user with the worktree path and allocated ports:
http://localhost:${SERVER_PORT}http://localhost:${MINIO_PORT}http://localhost:${MINIO_CONSOLE_PORT}bash scripts/shutdown-services.sh
This stops docker compose services and kills the app server process by port. Always stop services before removing a worktree.