nixpacks
Railwayが開発したNixpacksは、Dockerfileなしでアプリの言語やフレームワークを自動検出し、最適化されたDockerイメージを生成しますが、そのNixpacksを開発者がより使いこなせるよう、カスタムビルドやCI/CD連携などを支援するSkill。
📜 元の英語説明(参考)
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.
🇯🇵 日本人クリエイター向け解説
Railwayが開発したNixpacksは、Dockerfileなしでアプリの言語やフレームワークを自動検出し、最適化されたDockerイメージを生成しますが、そのNixpacksを開発者がより使いこなせるよう、カスタムビルドやCI/CD連携などを支援するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o nixpacks.zip https://jpskill.com/download/15174.zip && unzip -o nixpacks.zip && rm nixpacks.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/15174.zip -OutFile "$d\nixpacks.zip"; Expand-Archive "$d\nixpacks.zip" -DestinationPath $d -Force; ri "$d\nixpacks.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
nixpacks.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
nixpacksフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Nixpacks — アプリケーションソースから Docker イメージへ
概要
Nixpacks は Railway によって作成されたビルドシステムで、アプリケーションの言語とフレームワークを自動的に検出し、依存関係をインストールし、最適化された Docker イメージを生成します。これらすべてを Dockerfile を記述することなく行います。開発者がカスタムビルドステップ、多言語プロジェクト、および CI/CD 統合のために Nixpacks を構成するのに役立ちます。
手順
基本的な使い方
任意のアプリケーションを Docker イメージにビルドします。
# Nixpacks をインストール
curl -sSL https://nixpacks.com/install.sh | bash
# イメージをビルド (言語とフレームワークを自動検出)
nixpacks build ./my-node-app -n my-app
# 検出: Node.js + Next.js → Node, npm ci, npm run build をインストール
nixpacks build ./my-python-api -n my-api
# 検出: Python + FastAPI → Python, pip install, uvicorn start をインストール
nixpacks build ./my-rust-service -n my-service
# 検出: Rust + Cargo → Rust, cargo build --release をインストール
# ビルドされたイメージを実行
docker run -p 3000:3000 my-app
# ビルドせずに Dockerfile を生成 (Nixpacks が何をするかを確認)
nixpacks plan ./my-node-app
# 表示: 検出されたプロバイダー、install/build/start コマンド、Nix パッケージ
# 手動編集用に Dockerfile を生成
nixpacks build ./my-node-app --out . --name my-app
# カスタマイズ可能な .nixpacks/Dockerfile を作成
構成
自動検出された設定をオーバーライドします。
# nixpacks.toml — カスタムビルド構成
[phases.setup]
# 追加のシステムパッケージ (Nix 経由)
nixPkgs = ["ffmpeg", "imagemagick", "poppler_utils"]
aptPkgs = ["libvips-dev"] # Debian パッケージ (フォールバック)
[phases.install]
cmds = ["npm ci --production=false"] # install コマンドをオーバーライド
[phases.build]
cmds = [
"npx prisma generate", # Prisma クライアントを生成
"npm run build", # アプリケーションをビルド
]
[start]
cmd = "node dist/server.js" # start コマンドをオーバーライド
# ビルド中に利用可能な環境変数
[variables]
NODE_ENV = "production"
NEXT_TELEMETRY_DISABLED = "1"
# nixpacks.toml — システム依存関係を持つ Python プロジェクト
[phases.setup]
nixPkgs = ["postgresql"] # psycopg2 コンパイル用
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"
多言語プロジェクト
モノレポおよび多言語アプリケーションを処理します。
# nixpacks.toml — フロントエンド + バックエンドを持つモノレポ
[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 統合
GitHub Actions で Nixpacks を使用します。
# .github/workflows/deploy.yml — 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
サポートされている言語
## 自動検出される言語とフレームワーク
| 言語 | 検出ファイル | フレームワーク |
|-----------|------------------------|----------------------------------------------|
| 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 | - |
例
例 1: マイクロサービスプロジェクトのために Nixpacks をセットアップする
ユーザーリクエスト:
Node.js API と React フロントエンドを Docker で実行しています。監視/デプロイのために Nixpacks をセットアップしてください。
エージェントは、# Install Nixpacks のようなパターンに基づいて必要な構成ファイルを作成し、既存の Docker セットアップとの統合をセットアップし、Node.js + React スタックに適切なデフォルトを構成し、すべてが動作していることを確認するための検証コマンドを提供します。
例 2: 構成の問題のトラブルシューティング
ユーザーリクエスト:
Nixpacks が構成でエラーを表示しています。ログは次のとおりです: [error outp
(原文はここで切り詰められています) 📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
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:
# 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:
# 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"
# 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:
# 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:
# .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
## 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
- Start without config — Try
nixpacks build .first; auto-detection handles most projects correctly - Use nixpacks.toml for system deps — Need FFmpeg, ImageMagick, or native libraries? Add them to
nixPkgs - Pin language versions — Specify
pythonVersion = "3.12"or use.nvmrc/.python-versionfiles - Check the plan first — Run
nixpacks plan .to see what Nixpacks will do before building - Cache layers — Nixpacks caches install and build phases; put dependency files (package.json) before source code
- Generate Dockerfile for debugging — Use
--out .to get the generated Dockerfile; inspect and customize if needed - Environment variables in build — Use
[variables]in nixpacks.toml for build-time vars; runtime vars come from your platform - Nix packages over apt — Prefer
nixPkgsoveraptPkgs; Nix packages are more reproducible and better cached