nixpacks
Expert guidance for Nixpacks, the build system created by Railway that automatically detects your application's language and framework, installs dependencies, and produces optimized Docker images — all without writing a Dockerfile. Helps developers configure Nixpacks for custom build steps, multi-language projects, and CI/CD integration.
What this skill does
# Nixpacks — App Source to Docker Image
## Overview
Nixpacks, the build system created by Railway that automatically detects your application's language and framework, installs dependencies, and produces optimized Docker images — all without writing a Dockerfile. Helps developers configure Nixpacks for custom build steps, multi-language projects, and CI/CD integration.
## Instructions
### Basic Usage
Build any application into a Docker image:
```bash
# Install Nixpacks
curl -sSL https://nixpacks.com/install.sh | bash
# Build an image (auto-detects language and framework)
nixpacks build ./my-node-app -n my-app
# Detects: Node.js + Next.js → installs Node, npm ci, npm run build
nixpacks build ./my-python-api -n my-api
# Detects: Python + FastAPI → installs Python, pip install, uvicorn start
nixpacks build ./my-rust-service -n my-service
# Detects: Rust + Cargo → installs Rust, cargo build --release
# Run the built image
docker run -p 3000:3000 my-app
# Generate a Dockerfile without building (inspect what Nixpacks would do)
nixpacks plan ./my-node-app
# Shows: detected providers, install/build/start commands, Nix packages
# Generate Dockerfile for manual editing
nixpacks build ./my-node-app --out . --name my-app
# Creates .nixpacks/Dockerfile that you can customize
```
### Configuration
Override auto-detected settings:
```toml
# nixpacks.toml — Custom build configuration
[phases.setup]
# Additional system packages (via Nix)
nixPkgs = ["ffmpeg", "imagemagick", "poppler_utils"]
aptPkgs = ["libvips-dev"] # Debian packages (fallback)
[phases.install]
cmds = ["npm ci --production=false"] # Override install command
[phases.build]
cmds = [
"npx prisma generate", # Generate Prisma client
"npm run build", # Build the application
]
[start]
cmd = "node dist/server.js" # Override start command
# Environment variables available during build
[variables]
NODE_ENV = "production"
NEXT_TELEMETRY_DISABLED = "1"
```
```toml
# nixpacks.toml — Python project with system dependencies
[phases.setup]
nixPkgs = ["postgresql"] # For psycopg2 compilation
pythonVersion = "3.12"
[phases.install]
cmds = ["pip install -r requirements.txt"]
[phases.build]
cmds = [
"python manage.py collectstatic --noinput",
"python manage.py migrate --check",
]
[start]
cmd = "gunicorn myapp.wsgi:application --bind 0.0.0.0:$PORT --workers 4"
```
### Multi-Language Projects
Handle monorepos and multi-language apps:
```toml
# nixpacks.toml — Monorepo with frontend + backend
[phases.setup]
nixPkgs = ["nodejs-20_x", "python312"]
[phases.install]
cmds = [
"cd frontend && npm ci",
"cd backend && pip install -r requirements.txt",
]
[phases.build]
cmds = [
"cd frontend && npm run build",
"cp -r frontend/dist backend/static",
"cd backend && python manage.py collectstatic --noinput",
]
[start]
cmd = "cd backend && gunicorn app:app --bind 0.0.0.0:$PORT"
```
### CI/CD Integration
Use Nixpacks in GitHub Actions:
```yaml
# .github/workflows/deploy.yml — Build and push with Nixpacks
name: Deploy
on:
push:
branches: [main]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Nixpacks
run: curl -sSL https://nixpacks.com/install.sh | bash
- name: Build image
run: |
nixpacks build . \
--name ghcr.io/${{ github.repository }}:${{ github.sha }} \
--env NODE_ENV=production
- name: Login to GHCR
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Push image
run: |
docker push ghcr.io/${{ github.repository }}:${{ github.sha }}
docker tag ghcr.io/${{ github.repository }}:${{ github.sha }} ghcr.io/${{ github.repository }}:latest
docker push ghcr.io/${{ github.repository }}:latest
```
### Supported Languages
```markdown
## Auto-Detected Languages and Frameworks
| Language | Detection File | Frameworks |
|-----------|------------------------|--------------------------------------|
| Node.js | package.json | Next.js, Nuxt, Remix, Express, Nest |
| Python | requirements.txt/pyproject.toml | Django, Flask, FastAPI, Streamlit |
| Rust | Cargo.toml | Actix, Axum, Rocket |
| Go | go.mod | Gin, Echo, Fiber, net/http |
| Ruby | Gemfile | Rails, Sinatra |
| PHP | composer.json | Laravel, Symfony |
| Java | pom.xml/build.gradle | Spring Boot, Quarkus |
| Elixir | mix.exs | Phoenix |
| Haskell | stack.yaml | - |
| Zig | build.zig | - |
| Crystal | shard.yml | - |
| Dart | pubspec.yaml | - |
| Swift | Package.swift | Vapor |
| .NET | *.csproj | ASP.NET |
| Static | index.html | - |
```
## Examples
### Example 1: Setting up Nixpacks for a microservices project
**User request:**
```
I have a Node.js API and a React frontend running in Docker. Set up Nixpacks for monitoring/deployment.
```
The agent creates the necessary configuration files based on patterns like `# Install Nixpacks`, sets up the integration with the existing Docker setup, configures appropriate defaults for a Node.js + React stack, and provides verification commands to confirm everything is working.
### Example 2: Troubleshooting configuration issues
**User request:**
```
Nixpacks is showing errors in our configuration. Here are the logs: [error output]
```
The agent analyzes the error output, identifies the root cause by cross-referencing with common Nixpacks issues, applies the fix (updating configuration, adjusting resource limits, or correcting syntax), and verifies the resolution with appropriate health checks.
## Guidelines
1. **Start without config** — Try `nixpacks build .` first; auto-detection handles most projects correctly
2. **Use nixpacks.toml for system deps** — Need FFmpeg, ImageMagick, or native libraries? Add them to `nixPkgs`
3. **Pin language versions** — Specify `pythonVersion = "3.12"` or use `.nvmrc`/`.python-version` files
4. **Check the plan first** — Run `nixpacks plan .` to see what Nixpacks will do before building
5. **Cache layers** — Nixpacks caches install and build phases; put dependency files (package.json) before source code
6. **Generate Dockerfile for debugging** — Use `--out .` to get the generated Dockerfile; inspect and customize if needed
7. **Environment variables in build** — Use `[variables]` in nixpacks.toml for build-time vars; runtime vars come from your platform
8. **Nix packages over apt** — Prefer `nixPkgs` over `aptPkgs`; Nix packages are more reproducible and better cached
Related in Cloud & DevOps
appbuilder-action-scaffolder
IncludedCreate, implement, deploy, and debug Adobe Runtime actions with consistent layout, validation, and error handling. Use this skill whenever the user needs to add actions to an App Builder project, understand action structure (params, response format, web/raw actions), configure actions in the manifest, use App Builder SDKs (State, Files, Events, database), deploy and invoke actions via CLI, debug action issues, or implement patterns such as webhook receivers, custom event providers, journaling consumers, large payload redirects, action sequence pipelines, and Asset Compute workers. Also trigger when users mention serverless functions in Adobe context, action logging, IMS authentication for actions, or cron-style scheduled actions.
orchestrating-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. Use this skill when the user needs a multi-step Data Cloud pipeline, cross-phase troubleshooting, or data space and data kit management. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase sf data360 workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching phase-specific skill), the task is STDM/session tracing/parquet telemetry (use observing-agentforce), standard CRM SOQL (use querying-soql), or Apex implementation (use generating-apex).
github-project-automation
IncludedAutomate GitHub repository setup with CI/CD workflows, issue templates, Dependabot, and CodeQL security scanning. Includes 12 production-tested workflows and prevents 18 errors: YAML syntax, action pinning, and configuration. Use when: setting up GitHub Actions CI/CD, creating issue/PR templates, enabling Dependabot or CodeQL scanning, deploying to Cloudflare Workers, implementing matrix testing, or troubleshooting YAML indentation, action version pinning, secrets syntax, runner versions, or CodeQL configuration. Keywords: github actions, github workflow, ci/cd, issue templates, pull request templates, dependabot, codeql, security scanning, yaml syntax, github automation, repository setup, workflow templates, github actions matrix, secrets management, branch protection, codeowners, github projects, continuous integration, continuous deployment, workflow syntax error, action version pinning, runner version, github context, yaml indentation error
sf-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase `sf data360` workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching sf-datacloud-* skill), the task is STDM/session tracing/parquet telemetry (use sf-ai-agentforce-observability), standard CRM SOQL (use sf-soql), or Apex implementation (use sf-apex).
fabric-cli
IncludedUse this skill for Fabric.so CLI workflows with the `fabric` terminal command: diagnose/install/login, search or browse a Fabric library, save notes/links/files, create folders, ask the Fabric AI assistant, manage tasks/workspaces, generate shell completion, check subscription usage, produce JSON output, and use Fabric as persistent agent memory. Do not use for Microsoft Fabric/Azure/Power BI `fab`, Daniel Miessler's Fabric framework, Python Fabric SSH, Fabric.js, or textile/fashion fabric.
lark
IncludedLark/Feishu CLI skills: lark-cli operations for docs, markdown, sheets, base, calendar, im, mail, task, okr, drive, wiki, slides, whiteboard, apps, approval, attendance, contact, vc, minutes, event. Use when the user needs to operate Lark/Feishu resources via lark-cli, send messages, manage documents, spreadsheets, calendars, tasks, OKRs, deploy web pages, or any Feishu/Lark workspace operations.