Skip to content
Skills Library
DevOps & cloud · Automation

mirror-sync

/mirror-sync

Pull every remote-only n8n workflow into the local repo so it mirrors the instance, via a deterministic JS Workflow (discover remote-only → fan-out pull → verify). Establishes and refreshes the local-first invariant that /n8n-autopilot:build-workflow-v2's edit flow relies on. Auto-triggered by the SessionStart drift probe (check-mirror-drift.sh) and run as the final step of init-repo.

Licence
MIT
Last repository change
15.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
1
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 15.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • 1 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: sync.workflow.js

What it does and when to use it

Pull every remote-only n8n workflow into the local repo so it mirrors the instance, via a deterministic JS Workflow (discover remote-only → fan-out pull → verify). Establishes and refreshes the local-first invariant that /n8n-autopilot:build-workflow-v2's edit flow relies on. Auto-triggered by the SessionStart drift probe (check-mirror-drift.sh) and run as the final step of init-repo.

Original author description

Pull every remote-only n8n workflow into the local repo so it mirrors the instance, via a deterministic JS Workflow (discover remote-only → fan-out pull → verify). Establishes and refreshes the local-first invariant that /n8n-autopilot:build-workflow-v2's edit flow relies on. Auto-triggered by the SessionStart drift probe (check-mirror-drift.sh) and run as the final step of init-repo.

How it works

  1. Why this exists
  2. How to run
  3. Phases (in the script)
  4. Triggers
  5. Boundaries
Original SKILL.md headings · 56 lines, 483 words
SKILL.md preview
---
name: mirror-sync
description: "Pull every remote-only n8n workflow into the local repo so it mirrors the instance, via a deterministic JS Workflow (discover remote-only → fan-out pull → verify). Establishes and refreshes the local-first invariant that /n8n-autopilot:build-workflow-v2's edit flow relies on. Auto-triggered by the SessionStart drift probe (check-mirror-drift.sh) and run as the final step of init-repo."
argument-hint: ""
user-invocable: true
allowed-tools: Read, Grep, Glob, Bash(npx:*), Workflow
---

# Mirror Sync — pull all remote-only workflows

Make the local repo a complete mirror of the instance's workflows. n8nac has no `pull-all`; this skill drives the `list --json` → per-id `pull` loop deterministically via a Workflow script (fan-out, no silent cap, verified).

## Why this exists

The edit flow of `/n8n-autopilot:build-workflow-v2` is **local-first** — it assumes every remote workflow already has a local `.workflow.ts`. Nothing established that invariant before (init pulled *schemas*, never *workflows*). This skill is the enforcement: it pulls the gap and the SessionStart probe keeps it honest.

## How to run

Normalize the script into the scratchpad, then invoke **that copy** via the `Workflow` tool (it runs in
the consumer-repo cwd, so `npx n8nac` still resolves the pinned project + sync folder):

```bash
sed 's/\r$//' "<plugin>/skills/mirror-sync/sync.workflow.js" > "<scratchpad>/sync.workflow.js"
```
```
Workflow({ scriptPath: "<scratchpad>/sync.workflow.js" })
```

> **The `sed` is not optional — and seeing LF once does not excuse skipping it.** Line endings in the
> installed copy are *sporadic*: measured with `file`, this script was CRLF in 5.3.0 and 5.3.1 and LF in
> 5.3.2, while `build.workflow.js` was LF in all three. A version that works proves nothing about the
> next install, so normalize unconditionally — even though the repo blob is LF and
> `.gitattributes` pins `*.js text eol=lf`. `Workflow({scriptPath})` then refuses it outright:
> *"script contains control characters that would be hidden in the approval dialog"*. Normalizing
> costs one command and is content-identical to the blob (`cmp` against `git show HEAD:<path>`).
> Never hand-edit the plugin cache.

Then render the result:
- `{ status:'success', pulled, mirrorComplete:true }` — report how many pulled (0 = already complete).
- `{ status:'partial', failed:[…], remoteOnlyRemaining }` — list the failed ids + reasons; suggest a re-run or a manual `npx n8nac pull <id>`.

Watch live progress with `/workflows`.

## Phases (in the script)

1. **Discover** — `n8n-mirror` runs `npx n8nac list --json` and returns the remote-only set (status matches `/REMOTE/i` — vocabulary-robust across n8nac versions — and not archived). Zero remote-only → returns early, mirror already complete.
2. **Pull** — fan-out: one `n8n-mirror` agent per missing workflow runs `npx n8nac pull <id>`. Failures are collected, not fatal.
3. **Verify** — re-discover; `remoteOnlyRemaining === 0` ⇒ `mirrorComplete`.

## Triggers

| Source | Mechanism |
|---|---|
| SessionStart | `scripts/check-mirror-drift.sh --quiet` emits `AUTOPILOT_ACTION_REQUIRED: /n8n-autopilot:mirror-sync` only when remote-only workflows exist (no blind every-session pull). |
| init-repo | Step 6.5 runs this after schemas, so a fresh repo starts as a full mirror. |
| Manual | `/n8n-autopilot:mirror-sync` any time. |

## Boundaries

- **Workflows only.** Node schemas are a separate concern (`check-schema-versions.sh` → `/n8n-autopilot:pull-schemas`); this skill does not duplicate them.
- **Pull only** — never push/resolve/delete. Archived workflows are skipped (read-only).
- Large instances: fan-out is capped at ~10 concurrent by the Workflow runtime; all queued workflows still complete. The pull list is logged in full — no silent truncation.
Files in this package (2)
  • SKILL.md 4 KB
  • sync.workflow.js 7 KB

Versions

The database has no other skills named mirror-sync.

Database snapshot: 13.11.2026 · package version 0038667ef893 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100x-mirror
    x-mirror is a comprehensive mirror source management tool for various package managers. Use this skill whenever users need to configure, switch, or query package manager download mirrors. This skill handles: setting up and switching mirrors for package managers (pip, npm, brew,…
  • 95mirror
    Use this skill when the user asks about Goldsky Mirror pipelines — creating, deploying, operating, or troubleshooting Mirror. Triggers on: 'Mirror pipeline', 'goldsky pipeline apply', 'sync subgraph to database', 'mirror vs turbo', 'direct indexing', 'mirror pipeline YAML',…
  • 90skills-pull
    Sync skills from the remote GitHub repo Fabian-Kleine/skills down into the local skills folder. Use whenever the user says pull skills, sync skills from remote, update my local skills, download my skills, get my skills onto this machine, or is setting up a new computer and wants…
  • 87pulumi-labs-export
    Mirror a provider (native pulumi-go-provider or Terraform-bridged) from the private pulumi/autoregistry monorepo (lib/providers/<provider>/, stays the source of truth) into a generated public pulumi-labs/pulumi-<provider> repo, and re-sync it on every new version. Use when asked…
  • 100sync
    Bring an existing repo up to date with the current kit templates (CI, hooks, settings, dev container, tooling config) without overwriting what the project changed on purpose, through issues and PRs. Use when the user runs /kit:sync, after the kit's templates changed, or when…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.