/factory-kit:factory-data-pipeline-engineerfrom factory-kit
Designs and implements data ingestion pipelines following factory conventions: CSV imports with Papa Parse, JSONB time-series storage, Python services (CLI/Cloud Run API/Pub/Sub), and YAML config for reference data. Guides decisions on TS vs Python, storage shape, deployment, and idempotency.
Ships in factory-kit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Apply the data-pipeline-engineer specialist workflow. Design data flow that fits the factory's pipeline conventions, not bespoke ETL plumbing. Load factory-data-pipelines and factory-stack through the host's skill capability when needed.
What's the data shape? Pick one:
scripts/data_processing/If it doesn't match one, that's the finding — name it.
TS or Python? Default: Next.js side (TS). Move to Python when:
Storage shape? Drizzle table with structured columns for what drives queries + JSONB for what doesn't. Rule: if you need to filter or sort by it at app speed, it earns a column.
Deployment shape?
Migrations? Run in CI, not at runtime. Drizzle's generate + push, or dbmate for raw SQL projects.
Idempotency? Default to upsert-on-conflict for CSV imports. Wrap in a transaction. Don't assume "imported once."
Converter vs service split? Pure transforms in *-converter.ts (client-safe). I/O in *-service.ts (server-only). Don't blur.
// scripts/data_processing/import-foo.ts
import { readFileSync } from 'fs';
import Papa from 'papaparse';
import { db } from '@/db';
import { foo } from '@/db/schema';
const csvText = readFileSync(process.argv[2], 'utf8');
const { data, errors } = Papa.parse<FooRow>(csvText, {
header: true,
skipEmptyLines: true,
dynamicTyping: true,
});
if (errors.length) {
console.error('Parse errors:', errors);
process.exit(1);
}
await db.transaction(async (tx) => {
for (const row of data) {
await tx.insert(foo).values({
externalId: row.external_id,
name: row.name,
// ... map every column
}).onConflictDoUpdate({
target: foo.externalId,
set: { name: row.name, updatedAt: new Date() },
});
}
});
console.log(`Imported ${data.length} rows`);
models/<service>/
├── Dockerfile # Pub/Sub variant
├── Dockerfile.api # API variant
├── pyproject.toml
├── main.py # CLI entry
├── main_api.py # FastAPI entry — Cloud Run HTTP
├── main_pubsub.py # Pub/Sub handler entry
├── config/
│ ├── routes.yaml
│ └── vehicles.yaml
├── src/
│ ├── api/
│ │ └── deps.py # API key, request context
│ ├── models/
│ │ ├── request.py # Pydantic
│ │ └── message.py # Pub/Sub message shape
│ ├── services/
│ │ ├── data_service.py # YAML loader
│ │ ├── mapbox_service.py
│ │ └── gcs_service.py
│ └── simulation/
│ └── simulation_runner.py # core work; mode-aware
└── tests/
└── conftest.py
## Restated request
<one sentence>
## Pipeline shape
- Data shape: <CSV / event stream / external API / reference data / compute>
- Runtime: <TS / Python / mixed — why>
- Storage: <columns / JSONB envelope / both>
- Deploy: <local script / Vercel scripts / Cloud Run API / Cloud Run Pub/Sub>
## Files to create or modify
<bulleted list with paths>
## Code
<organized by file>
## Operational details
- Idempotency: <how>
- Migrations: <CI step, not runtime>
- Trace ID: <yes — middleware in place>
- Logging: <PostHog / Sentry / structured logs>
## Open questions
<things the user should confirm>
libs/py-libs/ shared utilities. Wait for the second consumer.models/, import everywhere.*-converter.ts; I/O in *-service.ts.pg style. If you're considering raw SQL with row-mappers, you're doing it wrong.If the user asks for a one-off query, a single Drizzle insert, or "just read this CSV once," do it directly without the full pipeline framework. The framework is for recurring or productionized data flow.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
47 skills in this plugin
/factory-animationMotion discipline distilled across builds. Attention as a fixed per-viewport budget, figure/ground separation (calm the ground, load motion into the figure), one focal point of motion per screen, diegetic-over-decorative test, trigger-on-intent-then-settle over perpetual loops, and the prefers-reduced-motion fallback. Recipe pairs Astro with a Remotion video kit (rendered assets in public/). Read whenever you add motion to a marketing surface or any page where movement competes with reading. Paired with factory-design, which owns the static visual vocabulary motion sits on top of./factory-apiAPI conventions for both server actions and tRPC builds. Covers the decision between them, per-mutation Zod input schemas, central router composition, pagination shape, multi-field search via Drizzle `ilike` + `or()`, mutation lifecycle hooks, conditional query enabling, stale-time defaults, error response shape and custom error class taxonomy, mutation-boundary audit logging, fetch adapter for tRPC routes. Read when designing or implementing any data-mutation endpoint./factory-api-route-engineerUse when designing or implementing API endpoints — server actions, tRPC procedures, REST routes for external consumers. Carries the factory's API conventions — the server actions vs tRPC decision, procedure tier stacking, per-mutation Zod schemas, central router composition with manual registration, pagination (limit/offset/orderBy default; cursor only when needed), multi-field search via `ilike` + `or()`, aggregated stats in list queries, mutation lifecycle hooks, stale-time defaults, custom error class taxonomy, fetch adapter for tRPC in App Router. Outputs endpoints that fit the house style — not bespoke per-route handlers./factory-authAuth and authorization conventions distilled across builds with three different auth stacks (Better Auth + orgs, Supabase Auth + RLS, Clerk). Covers the provider decision matrix, the unified wrapper interface (`requireAuth` / `requireRole` / `withOrgContext`), procedure tier stacking, session handling, OAuth callback safety, plugin composition with Better Auth, and the anti-patterns (hardcoded allowlists, admin client at module scope, triple-fallback auth surfaces)./factory-auth-wiring-specialistUse when wiring auth into a new project, switching auth providers, or adding role/org features. Carries the factory's auth conventions — the provider decision matrix (Better Auth + orgs primary, Supabase + RLS for RLS-heavy cases, Clerk for consumer/SSO), the unified `requireAuth` / `requireRole` / `withOrgContext` wrapper interface, procedure tier stacking, OAuth callback safety (`safeNext`), JWT signature verification with fallback user-linking, admin-client bypass guardrails, role-conditional post-login redirects. Produces auth code that fits the house seam — provider is a swap point, not a leak./factory-autopilotThe contract for an unattended build run started by `factory-kit autopilot run`. The agent edits and verifies in its assigned worktree; the runner owns the gate, commits, push, draft PR and Linear handoff. Read when a prompt says you are running under autopilot.npx claudepluginhub nonlinear-xyz/factory-kit --plugin factory-kitOther plugins' skills for the same job