Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

skaffold-filesync

БесплатноБез исполняемых скриптовНе проверен

Skaffold file sync — copy changed files to containers without rebuilding. Use when optimizing the dev loop, configuring sync rules, or the user mentions hot…

laurigatesот laurigates★ 61 звезда на GitHub

Об этом скилле

Skaffold File Sync

When to Use This Skill

Use this skill when... Use a sibling Skaffold/container skill instead when...
Configuring Skaffold sync rules (manual / infer / auto) Wiring OrbStack networking or Ingress (skaffold-orbstack)
Optimizing the inner edit -> running-container loop for hot reload Adding pre-deploy test or post-deploy verify stages (skaffold-testing)
Debugging why files are not syncing into a running pod Writing or hardening the Dockerfile itself (container-development)

Overview

File sync copies changed files directly to running containers, avoiding image rebuilds. This dramatically speeds up the development loop for interpreted languages and static assets.

Without sync: Edit → Build Image → Deploy → Restart Pod → Test (~30-60s)
With sync:    Edit → Copy File → Test (~1-2s)

How It Works

  1. Skaffold watches for file changes
  2. Creates a tar archive of modified files matching sync rules
  3. Extracts the archive in the running container
  4. Application picks up changes (hot reload, file watch, etc.)

Three Sync Modes

Mode Configuration Best For
Manual Explicit src/dest mappings Full control, complex layouts
Infer Derived from Dockerfile Docker builds, simple projects
Auto Zero-config for known builders Buildpacks, Jib

Important: Cannot mix modes - choose one per artifact.

Manual Sync

Explicitly map source files to container destinations.

Basic Configuration

apiVersion: skaffold/v4beta13
kind: Config
build:
  artifacts:
    - image: my-app
      context: .
      docker:
        dockerfile: Dockerfile
      sync:
        manual:
          - src: "src/**/*.js"
            dest: /app/src
          - src: "public/**/*"
            dest: /app/public

With Directory Stripping

Use strip to remove directory levels from the source path:

sync:
  manual:
    # src/components/Button.js → /app/Button.js (strips 'src/components/')
    - src: "src/components/**/*.js"
      dest: /app
      strip: "src/components/"

    # assets/images/logo.png → /var/www/static/logo.png
    - src: "assets/images/**/*"
      dest: /var/www/static
      strip: "assets/images/"

Static-asset, Node.js hot-reload (nodemon) and Python hot-reload (uvicorn --reload) manual-sync examples: REFERENCE.md.

Inferred Sync

Skaffold automatically determines destinations from Dockerfile COPY/ADD instructions.

Configuration

build:
  artifacts:
    - image: my-app
      docker:
        dockerfile: Dockerfile
      sync:
        infer:
          - "**/*.js"
          - "**/*.css"
          - "**/*.html"

How Inference Works

Given this Dockerfile:

FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY src/ ./src/        # Skaffold infers: src/* → /app/src/*
COPY public/ ./public/  # Skaffold infers: public/* → /app/public/*

Skaffold analyzes COPY instructions to determine sync destinations.

Limitations

Limitation Workaround
File deletion triggers full rebuild Use manual sync for delete support
Multi-stage builds may confuse inference Use manual sync
Complex COPY patterns Use manual sync

Auto Sync

Zero-configuration sync for supported builders.

Buildpacks (Cloud Native Buildpacks)

build:
  artifacts:
    - image: my-app
      buildpacks:
        builder: gcr.io/buildpacks/builder:v1
      sync:
        auto: true  # Enabled by default for buildpacks

Supported languages:

  • Go: .go files
  • Java: .java, .kt, .properties, .xml files
  • Node.js: .js, .ts, .json files

Disable auto sync:

sync:
  auto: false

Jib (Java)

build:
  artifacts:
    - image: my-app
      jib: {}
      sync:
        auto: true  # Enabled by default for Jib

Auto-syncs:

  • Class files (compiled)
  • Resource files
  • Extra directory files

Full Configuration Examples

Complete skaffold.yaml files for Node.js, Python FastAPI, Go with Air, and a static site with Nginx: REFERENCE.md.

Host-Side Generated Assets

When a build step produces a file the app serves (compiled CSS, bundled JS), run that step's watcher on the host and let an ordinary sync rule ship its output. No rebuild and no sidecar.

# justfile recipe body (e.g. `just k8s-up`)
tailwindcss -i src/app/static/input.css -o src/app/static/app.css --watch=always --silent &
trap 'kill $! 2>/dev/null' EXIT
skaffold dev --port-forward
sync:
  manual:
    - src: "src/**/static/**"   # matches the watcher's OUTPUT (app.css), not its input
      dest: /app

Verified (OrbStack, skaffold v2.25.0): a template class change → the host watcher rewrites app.css → Skaffold logs Syncing 2 files → the class is in th

Полный SKILL.md на GitHub

Установить skaffold-filesync в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Bash(skaffold dev *)
Bash(skaffold build *)
Bash(grep *)
Read
Write
Edit
Grep
Glob
TodoWrite

Вложенные файлы

REFERENCE.md

FAQ

Что делает скилл skaffold-filesync?

Skaffold file sync — copy changed files to containers without rebuilding. Use when optimizing the dev loop, configuring sync rules, or the user mentions hot reload or fast iteration.

Как установить скилл skaffold-filesync?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл skaffold-filesync запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить skaffold-filesync с