Source profileQuality 91/100

gaelic-ghost/socket/plugins/server-side-swift/skills/app-sync-workflow/SKILL.md

app-sync-workflow

Plan, implement, test, and diagnose app sync contracts in server-side Swift services, including incremental change feeds, cursor or token semantics, idempotent writes, conflict handling, optimistic concurrency, deleted-record/tombstone behavior, background job handoffs, API-shape coordination, and Vapor or Hummingbird integration.

Source repository stars
6
Declared platforms
2
Static risk flags
0
Last source update
2026-08-21
Source checked
2026-08-25

Decision brief

What it does: where it fits

Plan, implement, test, and diagnose app sync contracts in server-side Swift services, including incremental change feeds, cursor or token semantics, idempotent writes, conflict handling, optimistic concurrency, deleted-record/tombstone behavior, background job handoffs, API-shape coordination, and Vapor or Hummingbird integration.

Best for

  • Use this skill when adding or changing incremental sync endpoints, change feeds, cursor or token semantics, idempotent writes, conflict handling, optimistic concurrency, tombstones, deleted-record feeds, client checkpoi…
  • Use this skill when diagnosing duplicated writes, missed changes, stale cursors, conflict loops, wrong-owner sync data, deleted records reappearing, retry bugs, out-of-order changes, pagination drift, or partial sync fa…
  • Use this skill when a Vapor or Hummingbird service needs a sync contract for an Apple app, web app, CLI, or another service.

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexDeclaredSource recordInstall path and trigger
Claude CodeNot declaredNo explicit evidencePortability before use
CursorDeclaredSource recordInstall path and trigger
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/gaelic-ghost/socket --skill "plugins/server-side-swift/skills/app-sync-workflow"
Safe inspection promptEditorial

Inspect the Agent Skill "app-sync-workflow" from https://github.com/gaelic-ghost/socket/blob/1140bc0b60f2c938b81d67dcee88a5eeb2e2f39d/plugins/server-side-swift/skills/app-sync-workflow/SKILL.md at commit 1140bc0b60f2c938b81d67dcee88a5eeb2e2f39d. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Planning Workflow

    1. Inspect project shape: - Package.swift - Vapor or Hummingbird route and middleware structure - API contract files, generated code, or RPC definitions - persistence models, migrations, indexes, timestamps, version fields, tombstones, and audit tables - auth tenant/account owne…

    Inspect project shape:Package.swiftVapor or Hummingbird route and middleware structure
  2. 02

    Purpose

    Design, implement, test, or diagnose server-side sync behavior without mixing the sync contract into unrelated routing, persistence, OpenAPI, RPC, auth, or background-job work.

    Design, implement, test, or diagnose server-side sync behavior without mixing the sync contract into unrelated routing, persistence, OpenAPI, RPC, auth, or background-job work.The practical decision is how clients and the server agree on state over time: what changed, what the client has already seen, how writes avoid duplication, how conflicts are detected, how deletions are represented, and…
  3. 03

    When To Use

    Use this skill when adding or changing incremental sync endpoints, change feeds, cursor or token semantics, idempotent writes, conflict handling, optimistic concurrency, tombstones, deleted-record feeds, client checkpoi…

    Use this skill when adding or changing incremental sync endpoints, change feeds, cursor or token semantics, idempotent writes, conflict handling, optimistic concurrency, tombstones, deleted-record feeds, client checkpoi…Use this skill when diagnosing duplicated writes, missed changes, stale cursors, conflict loops, wrong-owner sync data, deleted records reappearing, retry bugs, out-of-order changes, pagination drift, or partial sync fa…Use this skill when a Vapor or Hummingbird service needs a sync contract for an Apple app, web app, CLI, or another service.
  4. 04

    Source Check

    Use repo-local Swift files, checked-out dependency sources, Dash MCP or Dash HTTP for installed Swift package DocC, and then official docs or source when Dash/local coverage is missing or stale. Check one of those source-specific paths before claiming framework, protocol, or HTT…

    HTTP Semantics RFC 9110Vapor routingVapor validation
  5. 05

    Contract Shape

    Keep sync contracts boring and explicit.

    resource types included in the syncroute or method used to fetch changesroute or method used to submit writes

Permission review

Static risk signals and limitations

No configured static risk pattern was detected

This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score91/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars6SourceRepository attention, not individual Skill quality
Compatibility2 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
gaelic-ghost/socket
Skill path
plugins/server-side-swift/skills/app-sync-workflow/SKILL.md
Commit
1140bc0b60f2c938b81d67dcee88a5eeb2e2f39d
License
Apache-2.0
Collected
2026-08-25
Default branch
main
View the original SKILL.md

App Sync Workflow

Purpose

Design, implement, test, or diagnose server-side sync behavior without mixing the sync contract into unrelated routing, persistence, OpenAPI, RPC, auth, or background-job work.

The practical decision is how clients and the server agree on state over time: what changed, what the client has already seen, how writes avoid duplication, how conflicts are detected, how deletions are represented, and how both sides recover after retries, offline edits, or partial failure.

When To Use

  • Use this skill when adding or changing incremental sync endpoints, change feeds, cursor or token semantics, idempotent writes, conflict handling, optimistic concurrency, tombstones, deleted-record feeds, client checkpointing, sync-related background jobs, or API contracts for app state synchronization.
  • Use this skill when diagnosing duplicated writes, missed changes, stale cursors, conflict loops, wrong-owner sync data, deleted records reappearing, retry bugs, out-of-order changes, pagination drift, or partial sync failures.
  • Use this skill when a Vapor or Hummingbird service needs a sync contract for an Apple app, web app, CLI, or another service.
  • Use this skill when deciding whether sync should be ordinary HTTP routes, OpenAPI-backed endpoints, JSON-RPC, gRPC, server-sent events, WebSockets, polling, or background jobs.
  • Do not use this skill for ordinary CRUD routes, database migrations, generated OpenAPI plumbing, auth, observability, Docker, Fly.io, or local SwiftPM work unless sync semantics are the reason for the change.
  • Do not absorb client-side storage or Apple-platform background task behavior. Hand client persistence and app scheduling to Apple-platform skills.

Source Check

Use repo-local Swift files, checked-out dependency sources, Dash MCP or Dash HTTP for installed Swift package DocC, and then official docs or source when Dash/local coverage is missing or stale. Check one of those source-specific paths before claiming framework, protocol, or HTTP behavior:

Use OpenAPI, RPC, persistence, auth, observability, deployment, or Apple-platform docs when the sync design depends on generated contracts, transport semantics, schema, identity, logging, background jobs, deployment guarantees, or client behavior.

Planning Workflow

  1. Inspect project shape:
    • Package.swift
    • Vapor or Hummingbird route and middleware structure
    • API contract files, generated code, or RPC definitions
    • persistence models, migrations, indexes, timestamps, version fields, tombstones, and audit tables
    • auth tenant/account ownership boundaries
    • background jobs or queues
    • tests for pagination, conflicts, retries, offline edits, and deleted records
  2. Identify the sync job:
    • full initial snapshot
    • incremental changes since cursor
    • push local client changes
    • reconcile conflicts
    • propagate deletes
    • enqueue expensive side effects
    • stream or poll for updates
  3. Define the server-owned truth:
    • stable object identity
    • version or revision token
    • ordering key for changes
    • delete representation
    • ownership and authorization scope
    • retention window for change history
  4. Define client contract:
    • cursor format and lifetime
    • page size and ordering
    • retry behavior
    • idempotency key behavior
    • conflict response shape
    • when clients must restart a full sync
  5. Add tests that prove retry, conflict, pagination, deletion, and authorization behavior.

Contract Shape

Keep sync contracts boring and explicit.

Name:

  • resource types included in the sync
  • route or method used to fetch changes
  • route or method used to submit writes
  • cursor, token, timestamp, revision, or ETag fields
  • ordering rule
  • page size and next-page behavior
  • conflict and validation errors
  • deletion/tombstone representation

Do not expose database row order as the sync order unless it is intentionally stable, indexed, and documented.

Opaque cursors are usually safer than client-parsed cursors because the server can evolve internal ordering. If cursors expire, define the exact restart behavior.

Idempotent Writes And Retries

Assume clients, proxies, and background tasks may retry after timeouts or network loss.

For write APIs:

  • use client-generated stable IDs or explicit idempotency keys when duplicate creation is a risk
  • define whether repeated identical writes return the existing result or an error
  • keep idempotency scope bounded by actor, resource, operation, and retention window
  • make side effects such as emails, notifications, webhooks, or jobs idempotent too
  • test retry after success-but-lost-response

Do not rely on clients "not retrying" as a correctness rule.

Conflict Handling

A conflict exists when a client writes based on state the server no longer accepts.

Use a clear mechanism:

  • revision field
  • ETag or conditional request
  • updated-at version with documented precision limits
  • server-side compare-and-swap
  • domain-specific merge policy

Return conflict information that lets the client decide what to do next without leaking data from resources the actor cannot access.

Use 409 Conflict for domain conflicts and 412 Precondition Failed for failed HTTP preconditions when the API uses conditional request semantics. Keep the repository's existing status-code style when it already documents one.

Deletes And Tombstones

Deleted state must be syncable.

Decide:

  • soft delete, tombstone table, audit log, or hard delete with change-feed record
  • how long deleted records remain visible to sync
  • whether deletes include actor, timestamp, reason, or version
  • whether child records cascade, detach, or remain independently syncable
  • what happens when a client updates a deleted record

Do not hard-delete records from sync history before all active clients can learn about the deletion unless the app has a full-resync fallback.

Background Work And Streams

Use background jobs when sync writes trigger expensive side effects that should not block the request.

Use streaming, WebSockets, or server-sent events only when polling or ordinary incremental sync is not enough. Streaming transports still need replay or catch-up behavior after disconnects.

Hand transport-specific decisions to openapi-rpc-workflow when the main question is API style, generated contracts, JSON-RPC, gRPC, MCP-style tools, WebSockets, or plain HTTP.

Use persistence-workflow when the main risk is schema, indexes, migrations, query performance, or transaction boundaries.

Auth, Privacy, And Observability

Every sync query and write must be scoped to the authenticated actor and tenant.

Test:

  • actor only receives authorized records
  • actor cannot advance a cursor into another tenant's data
  • conflict responses do not leak private resource state
  • deleted records remain scoped correctly

Use auth-authorization-workflow for identity and policy design.

Use observability-tracing-workflow for safe sync diagnostics, including cursor names, page counts, operation IDs, conflict counts, retry counts, and latency. Do not log raw cursors if they contain sensitive state.

Testing

Choose tests that prove sync correctness:

  • initial empty sync
  • initial full sync
  • incremental sync after one change
  • pagination with stable ordering
  • retry of a successful write
  • duplicate create attempt
  • stale revision conflict
  • delete propagation
  • update after delete
  • cursor expiration or retention-window miss
  • unauthorized cross-tenant read and write
  • background job idempotency if side effects are queued

Prefer deterministic fixtures with explicit clocks, IDs, and revision values when the repository's test setup allows it.

Handoffs

Use vapor-server-workflow or hummingbird-server-workflow for framework route, middleware, request context, and handler structure.

Use openapi-rpc-workflow when the sync API contract, generated types, or transport style is the primary work.

Use persistence-workflow for models, migrations, query design, transactions, indexes, and data-retention behavior.

Use auth-authorization-workflow for identity, tenant scoping, permissions, tokens, and session behavior.

Use observability-tracing-workflow for logs, metrics, traces, conflict counters, and privacy-safe diagnostics.

Use deployment skills when background workers, queue processes, or hosted runtime config must be deployed.

Output Shape

Return:

  1. Sync shape: resources, routes or transport, cursor, ordering, idempotency, conflict model, delete model, jobs, auth scope, and tests.
  2. Docs used: HTTP, Vapor, Hummingbird, OpenAPI/RPC, persistence, auth, observability, jobs, deployment, or Apple-platform docs consulted.
  3. Behavior: fetch, write, retry, conflict, delete, pagination, retention, authorization, and background work.
  4. Command path: exact build, test, migrate, run, job, or HTTP commands run or recommended.
  5. Validation: tests, migration checks, manual HTTP checks, job checks, or diagnostic evidence.
  6. Handoffs: framework, OpenAPI/RPC, persistence, auth, observability, background jobs, deployment, or client follow-up when the task crosses this skill's boundary.

Guardrails

  • Do not design sync around unstable database row order.
  • Do not rely on clients avoiding retries.
  • Do not leak cross-tenant or private resource state through cursors, conflicts, logs, or deleted-record feeds.
  • Do not hard-delete sync history without a documented full-resync fallback or retention decision.
  • Do not turn sync into a custom transport when ordinary HTTP routes or existing OpenAPI/RPC guidance fits.
  • Do not duplicate Apple-platform client storage or background-execution guidance in this server-side workflow.

Frequently asked questions

What to verify before installation and use

What does the app-sync-workflow source document cover?

Plan, implement, test, and diagnose app sync contracts in server-side Swift services, including incremental change feeds, cursor or token semantics, idempotent writes, conflict handling, optimistic concurrency, deleted-record/tombstone behavior, background job handoffs, API-shape coordination, and Vapor or Hummingbird integration.

How do I install app-sync-workflow?

The source record exposes this install command: npx skills add https://github.com/gaelic-ghost/socket --skill "plugins/server-side-swift/skills/app-sync-workflow". Inspect the command and pinned source before running it.

Which Agent platforms does the source record declare?

The pinned source record declares support for: codex, cursor.

Alternatives

Compare before choosing

Computed 967

aomi-labs/skills

aomi-build

Scaffold new Aomi apps and plugins from API docs, OpenAPI/Swagger specs, or SDK references. aomi-build generates production-ready Rust SDK crates (lib.rs, client.rs, tool.rs) with tool schemas, preambles, host-interop flows, and validation — turning a vendor's API surface into AI-agent-callable tools. It covers the current `aomi-build` OpenAPI pipeline (`gen-specs` → `gen-client` → `gen-tool` → curate → compile/test) as well as greenfield apps. Use when the user wants to scaffold a new Aomi app

Computed 95203

PramodDutta/qaskills

API Test Suite Generator

Automatically generate comprehensive API test suites from OpenAPI specifications covering CRUD operations, error handling, authentication, pagination, and edge cases

Computed 9420

upex-galaxy/agentic-qa-boilerplate

test-automation

Plan, write, and review automated tests following KATA (Komponent Action Test Architecture) on Playwright + TypeScript, or explain existing automated tests in a sealed read-only mode. Use when writing E2E or API/integration tests, creating Page or Api components, designing ATCs, parameterizing test data, registering fixtures, reviewing test code for KATA compliance, or requesting break-down-tests / a plain-English test breakdown. The explain mode reads source and reports assertions without enter

Computed 9420

upex-galaxy/agentic-qa-boilerplate

test-documentation

Analyze, prioritize, and document test cases in TMS (Jira/Xray), or repair an existing Story-ATS-ATP-ATR-TC cascade through a sealed explicit mode. Use for Test/ATP/ATR artifacts, ROI and automation verdicts, maintaining traceability, fix-traceability, or broken TMS links. The repair-traceability mode audits, plans, waits for explicit approval, applies, and verifies without launching the general documentation workflow. Do NOT use for writing test code (test-automation) or running suites (regress