スキル一覧に戻る
Venkateshvenki404224

frappe-data-migration-generator

by Venkateshvenki404224

A comprehensive Claude Code plugin for Frappe Framework development, providing tools, commands, agents, and Skills to streamline your Frappe application development workflow.

5🍴 3📅 2026年1月23日
GitHubで見るManusで実行

SKILL.md


name: frappe-data-migration-generator description: Generate data migration scripts for Frappe. Use when migrating data from legacy systems, transforming data structures, or importing large datasets.

Frappe Data Migration Generator

Generate robust data migration scripts with validation, error handling, and progress tracking for importing data into Frappe.

When to Use This Skill

Claude should invoke this skill when:

  • User wants to migrate data from legacy systems
  • User needs to import large CSV/Excel files
  • User mentions data migration, ETL, or data import
  • User wants to transform data structures
  • User needs bulk data operations

Capabilities

1. CSV Import Script

Production-Ready CSV Importer:

import csv
import frappe
from frappe.utils import flt, cint, getdate

def import_customers_from_csv(file_path):
    """Import customers with validation and error handling"""
    success = []
    errors = []

    with open(file_path, 'r', encoding='utf-8-sig') as f:
        reader = csv.DictReader(f)

        for idx, row in enumerate(reader, start=2):
            try:
                # Validate required fields
                if not row.get('Customer Name'):
                    raise ValueError('Customer name required')

                # Transform data
                customer = {
                    'doctype': 'Customer',
                    'customer_name': row['Customer Name'].strip(),
                    'customer_group': row.get('Customer Group', 'Commercial'),
                    'territory': row.get('Territory', 'All Territories'),
                    'email_id': row.get('Email', '').strip(),
                    'mobile_no': row.get('Phone', '').strip(),
                    'credit_limit': flt(row.get('Credit Limit', 0))
                }

                # Check duplicate
                exists = frappe.db.exists('Customer',
                    {'customer_name': customer['customer_name']})

                if exists:
                    # Update
                    doc = frappe.get_doc('Customer', exists)
                    doc.update(customer)
                    doc.save()
                else:
                    # Insert
                    doc = frappe.get_doc(customer)
                    doc.insert()

                success.append(row['Customer Name'])

                # Commit every 100
                if len(success) % 100 == 0:
                    frappe.db.commit()
                    print(f"Processed {len(success)} records")

            except Exception as e:
                errors.append({'row': idx, 'data': row, 'error': str(e)})

    frappe.db.commit()
    return {'success': success, 'errors': errors}

References

Frappe Data Import:

スコア

総合スコア

65/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

0/5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です