data-importer
について
data-importerスキルは、SQLAlchemyモデルを使用してSynnovatorプラットフォームのデータを`.synnovator/*.md`ファイルからSQLiteデータベースに変換します。このスキルは、テストデータの投入、ファイルベースのソースからのデータベース初期化、またはリレーショナル形式へのコンテンツ移行を目的として設計されています。開発者はこれを使用して、実際にインポートされたデータでFastAPIエンドポイントをテストするためのデータベースを迅速に構築できます。
クイックインストール
Claude Code
推奨/plugin add https://github.com/majiayu000/claude-skill-registrygit clone https://github.com/majiayu000/claude-skill-registry.git ~/.claude/skills/data-importerこのコマンドをClaude Codeにコピー&ペーストしてスキルをインストールします
ドキュメント
Data Importer
Import .synnovator/*.md files (YAML frontmatter + Markdown body) into SQLite database via SQLAlchemy models.
Quick Start
# Import all data
python cli.py import \
--source .synnovator \
--db data/synnovator.db \
--models backend/models
# Import specific types only
python cli.py import \
--source .synnovator \
--db data/synnovator.db \
--models backend/models \
--types user,post
# Full import (clear and reimport)
python cli.py import \
--source .synnovator \
--db data/synnovator.db \
--models backend/models \
--mode full
Workflow
- Validate inputs - Check paths exist and models can be loaded
- Load models - Dynamically import SQLAlchemy models module
- Import in order - Follow dependency graph (see import-order.md)
- Parse files - Extract YAML frontmatter and Markdown body
- Convert types - Map values to database column types
- Insert records - Batch insert with error handling
- Report results - Show imported/skipped/failed counts
Import Order
Data must be imported following foreign key dependencies:
- Phase 1: user, category, rule (independent types)
- Phase 2: group, post, resource (depend on user)
- Phase 3: interaction (depends on user and targets)
- Phase 4: All relations (depend on content types)
See references/import-order.md for complete dependency graph.
Field Mapping
.md files use YAML frontmatter for structured fields and Markdown content for body text. The importer maps these to SQLAlchemy model columns with automatic type conversion:
- datetime: ISO 8601 strings → datetime objects
- JSON: Lists/dicts → JSON strings
- enum: Validates against allowed values
- integer/float: Strings → numbers
- boolean: "true"/"false" → bool
See references/mapping.md for complete field mappings for all 7 content types and 7 relation types.
Error Handling
- Duplicate IDs: Skips records that already exist (incremental mode)
- Missing fields: Reports validation errors
- Foreign key violations: Reports missing references
- Type errors: Shows conversion failures
- Partial success: Continues importing after individual failures
Testing
Run the test suite:
cd scripts/
python test_importer.py
Tests validate:
- Parsing .md files with YAML frontmatter
- Type conversion logic
- Import order correctness
Requirements
- Python 3.8+
- SQLAlchemy
- PyYAML
- SQLite database with tables matching .synnovator schema
Limitations
- Only supports SQLite databases
- Requires SQLAlchemy models to be importable
- Does not generate missing tables (use Alembic migrations first)
- Incremental mode skips duplicates by ID only
GitHub リポジトリ
関連スキル
content-collections
メタThis skill provides a production-tested setup for Content Collections, a TypeScript-first tool that transforms Markdown/MDX files into type-safe data collections with Zod validation. Use it when building blogs, documentation sites, or content-heavy Vite + React applications to ensure type safety and automatic content validation. It covers everything from Vite plugin configuration and MDX compilation to deployment optimization and schema validation.
creating-opencode-plugins
メタThis skill provides the structure and API specifications for creating OpenCode plugins that hook into 25+ event types like commands, files, and LSP operations. It offers implementation patterns for JavaScript/TypeScript modules that intercept and extend the AI assistant's lifecycle. Use it when you need to build event-driven plugins for monitoring, custom handling, or extending OpenCode's capabilities.
evaluating-llms-harness
テストThis Claude Skill runs the lm-evaluation-harness to benchmark LLMs across 60+ standardized academic tasks like MMLU and GSM8K. It's designed for developers to compare model quality, track training progress, or report academic results. The tool supports various backends including HuggingFace and vLLM models.
polymarket
メタThis skill enables developers to build applications with the Polymarket prediction markets platform, including API integration for trading and market data. It also provides real-time data streaming via WebSocket to monitor live trades and market activity. Use it for implementing trading strategies or creating tools that process live market updates.
