Skip to content
Back to skills

Data Import Workflow

ASecurity

Managing the lifecycle of weapon and mod data from external sources to the local database

  • 666 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added February 8, 2026
databasessqldebuggingapidatabase

Works with

  • cli
  • api

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill data-import-workflow --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Data Import Workflow?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Data Import Workflow
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-data-import-workflow/badge)](https://www.skillsdirectory.com/skills/majiayu000-data-import-workflow)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: data-import-workflow
description: Managing the lifecycle of weapon and mod data from external sources to the local database
---

# Data Import Workflow Skill

Use this skill when working on or running the data import pipeline.

---

## Scope

- Running the importer to populate or refresh data
- Extending the importer to handle new fields or types
- Debugging import failures

---

## Running the Importer

| Command | Use Case |
|---------|----------|
| `task importer:start` | Fetch fresh data from tarkov.dev API and update the database. |
| `task importer:start:use-cache` | Use locally cached JSON files (faster, avoids API rate limits). |
| `task importer:start:cache-only` | Fetch from API and update local cache, but skip database writes. |

---

## Import Behavior

1. **Purge**: Existing weapons, mods, trader offers, and optimum builds are deleted.
2. **Fetch**: Data is retrieved from tarkov.dev GraphQL API (or local cache).
3. **Transform**: External schema is mapped to internal `models` structs.
4. **Persist**: Data is written to the database within a transaction.
5. **Invalidate**: `optimum_builds` are purged since they depend on the imported data.

---

## Extending the Importer

When adding new fields or types:

1. **Update GraphQL Query**: Modify `internal/tarkovdev/schemas/queries.graphql`.
2. **Regenerate Client**: Run `task tarkovdev:regenerate`.
3. **Update Models**: Add new fields to structs in `internal/models/`.
4. **Update Mapping**: Adjust conversion logic in `internal/importers/`.
5. **Update SQL**: Modify `Upsert` functions in `internal/models/` to include new columns.

---

## Troubleshooting

- **Rate Limiting**: Use `--use-cache` for repeated runs during development.
- **Schema Mismatch**: Run `task tarkovdev:get-schema` then `task tarkovdev:regenerate`.
- **Connection Issues**: Verify `POSTGRES_HOST` in `.env` and ensure the database is running.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.