data-export
БесплатноБез исполняемых скриптовНе проверенGenerates data export/import infrastructure for JSON, CSV, PDF formats with GDPR data portability, share sheet integration, and file import. Use when user…
от rshankras★ 922 звезды на GitHubОб этом скилле
Data Export Generator
Generate production data export and import infrastructure -- JSON export via Codable, CSV generation with proper escaping, PDF report rendering with UIGraphicsPDFRenderer, GDPR-compliant full data export, file import with UTType-based picker, and share sheet integration. No third-party dependencies.
When This Skill Activates
Use this skill when the user:
- Asks to "add data export" or "export user data"
- Wants "CSV export" or "JSON export" or "PDF export"
- Mentions "GDPR data portability" or "right to data portability"
- Asks about "exporting all user data" for compliance
- Wants to "import data" from files or competitor apps
- Mentions "share sheet" for exporting data
- Asks about "data backup" or "data download"
Pre-Generation Checks
1. Project Context Detection
- Check deployment target (iOS 16+ / macOS 13+)
- Check Swift version (requires Swift 5.9+)
- Identify data model layer (SwiftData, Core Data, custom structs)
- Identify source file locations
2. Existing Export Detection
Search for existing export code:
Glob: **/*Export*.swift, **/*Import*.swift, **/*CSV*.swift, **/*PDF*.swift
Grep: "UIGraphicsPDFRenderer" or "CSVExport" or "UIActivityViewController" or "ShareLink" or "fileExporter"
If existing export code found:
- Ask if user wants to replace or add additional formats
- Identify which formats are already supported
3. Data Model Detection
Search for data models that need exporting:
Grep: "@Model" or "NSManagedObject" or "struct.*Codable" or "class.*Codable"
Identify the models to build export conformances for.
Configuration Questions
Ask user via AskUserQuestion:
Export formats needed?
- JSON (structured, machine-readable, best for GDPR)
- CSV (tabular data, spreadsheet-compatible)
- PDF (formatted reports with headers, tables, branding)
- Multiple (select which combination)
What data needs exporting?
- All user data -- GDPR compliance (every piece of stored user data)
- Specific data types (user selects which models to export)
- Reports/summaries (aggregated data, not raw records)
Do you need import capability?
- No -- export only
- Yes -- from files (JSON, CSV via file picker)
- Yes -- from competitor apps (custom format parsing)
How should users trigger export?
- Share sheet (system share UI with multiple destinations)
- Settings screen (dedicated export section)
- Export button (inline in content views)
- Automatic backup (periodic export to iCloud/local)
Generation Process
Step 1: Read Templates
Read templates.md for production Swift code.
Step 2: Create Core Files
Generate these files:
DataExportManager.swift-- Central export coordinator with format routingDataExportable.swift-- Protocol for models that support export
Step 3: Create Format-Specific Files
Based on configuration:
3. CSVExporter.swift -- If CSV format selected
4. PDFExporter.swift -- If PDF format selected
Step 4: Create Import Files
If import capability selected:
5. DataImporter.swift -- File picker and format parser
Step 5: Determine File Location
Check project structure:
- If
Sources/exists ->Sources/DataExport/ - If
App/exists ->App/DataExport/ - Otherwise ->
DataExport/
Output Format
After generation, provide:
Files Created
DataExport/
├── DataExportable.swift # Protocol for exportable models
├── DataExportManager.swift # Central export coordinator
├── CSVExporter.swift # CSV generation (optional)
├── PDFExporter.swift # PDF rendering (optional)
└── DataImporter.swift # File import (optional)
Integration with Data Models
Make a model exportable:
struct Expense: Codable, DataExportable {
let id: UUID
let title: String
let amount: Double
let date: Date
let category: String
// DataExportable conformance
static var csvHeaders: [String] {
["ID", "Title", "Amount", "Date", "Category"]
}
var csvRow: [String] {
[id.uuidString, title, String(format: "%.2f", amount),
ISO8601DateFormatter().string(from: date), category]
}
var pdfDescription: String {
"\(title) - $\(String(format: "%.2f", amount)) (\(category))"
}
}
Export from a view:
struct ExpenseListView: View {
let expenses: [Expense]
@State private var exportURL: URL?
@State private var showShareSheet = false
var body: some View {
List(expenses) { expense in
ExpenseRow(expense: expense)
}
.toolbar {
Menu {
Button("Export as JSON") {
Task { await exportAs(.json) }
}
Button("Export as CSV") {
Task { await exportAs(.csv) }
}
Button("Export as PDF") {
Task { await exportAs(.pdf) }
}
Установить data-export в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteEditGlobGrepBashAskUserQuestionВложенные файлы
FAQ
Что делает скилл data-export?
Generates data export/import infrastructure for JSON, CSV, PDF formats with GDPR data portability, share sheet integration, and file import. Use when user wants data export functionality, CSV/JSON/PDF export, GDPR compliance data portability, import from files, or share sheet for data.
Как установить скилл data-export?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл data-export запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic