frappe-agent-migrator
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "frappe-agent-migrator" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-149728153b6d2c7e5628888cffa8e7f73f4c4d1481534da0d86ea6319ed7ee53. Verify the upstream source and version against https://github.com/Impertio-Studio/Frappe_Claude_Skill_Package before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Checks and recommendations to detect breaking API changes and resolve post-migration errors when migrating Frappe apps across major versions. Intended to prevent migration failures caused by undetected deprecated APIs, removed methods, or signature changes; covers v14→v15→v16 breaking-change detection, deprecated API mappings, migration checklists, common migration errors, and suggested automated fixes.
Introduction source: third_party · Impertio-Studio · 2.0 Reference
SkillPi interpretation
- Tasks
- Systematically plans and executes Frappe/ERPNext version migrations by analyzing breaking changes, scanning custom code for compatibility issues, and generating migration plans.
- Software, accounts and paid services
- [ ] Python version: {required} [ ] Node.js version: {required} [ ] MariaDB version: {required} [ ] Redis version: {required} [ ] Disk space: minimum 2x current DB size
- Testing
- Not tested
Browse files
Frontmatter
name: frappe-agent-migrator
description: >
Use when migrating a Frappe app between major versions, detecting breaking API changes, or resolving post-migration errors.
Prevents failed migrations from undetected deprecated APIs, removed methods, and changed function signatures.
Covers breaking change detection v14-v15-v16, deprecated API mapping, migration checklist, common migration errors, automatic fix suggestions.
Keywords: migration, version upgrade, breaking changes, deprecated API, v14, v15, v16, migrate, compatibility, upgrade ERPNext, version change breaks, after update errors, deprecated method..
license: MIT
compatibility: "Claude Code, Claude.ai Projects, Claude API. Frappe v14-v16."
metadata:
author: OpenAEC-Foundation
version: "2.0"Version Migration Assistant
Systematically plans and executes Frappe/ERPNext version migrations by analyzing breaking changes, scanning custom code for compatibility issues, and generating migration plans.
Purpose: Prevent failed migrations by detecting every breaking change BEFORE upgrading.
When to Use This Agent
MIGRATION TRIGGER
|
+-- Planning a version upgrade
| "We need to go from v14 to v15"
| --> USE THIS AGENT
|
+-- Post-upgrade errors
| "Everything broke after bench update"
| --> USE THIS AGENT (Step 2-5 for diagnosis)
|
+-- Checking custom app compatibility
| "Will our custom app work on v16?"
| --> USE THIS AGENT (Step 3 for code scan)
|
+-- Already mid-migration with issues
| "bench migrate fails with errors"
| --> USE THIS AGENT + frappe-agent-debugger
Migration Workflow
STEP 1: IDENTIFY MIGRATION PATH
Source version → Target version (NEVER skip major versions)
STEP 2: CHECK BREAKING CHANGES
Apply breaking changes database for each version jump
STEP 3: SCAN CUSTOM CODE
Grep for deprecated patterns in all custom apps
STEP 4: GENERATE MIGRATION PLAN
Backup → Staging → Test → Production sequence
STEP 5: GENERATE PATCH LIST
Specific code changes needed per custom app
See references/workflow.md for detailed steps.
Step 1: Migration Path Rules
NEVER skip major versions. ALWAYS migrate sequentially:
| Source | Target | Path |
|---|---|---|
| v14 | v15 | v14 → v15 |
| v14 | v16 | v14 → v15 → v16 |
| v15 | v16 | v15 → v16 |
Version Identification
# Check current versions
bench version
# Output shows: frappe X.Y.Z, erpnext X.Y.Z
# Check available versions
cd apps/frappe && git tag | grep "^v1[456]" | tail -5
Step 2: Breaking Changes Summary
v14 → v15 Breaking Changes
| Category | Change | Impact | Detection Pattern |
|---|---|---|---|
| Scheduler | Tick interval 240s → 60s | Jobs may run more frequently | Review scheduler_events |
| Background Jobs | job_id deduplication added |
Duplicate jobs now prevented | Check frappe.enqueue() calls |
| Web Views | Workspace replaces Module Def pages | Custom module pages break | Grep for Module Def references |
| Print Format | HTML to PDF engine changes | Print layout differences | Test all print formats |
| Database | MariaDB 10.6+ required | Server prerequisite | Check mysql --version |
| Python | Python 3.10+ required | Syntax/library compatibility | Check python3 --version |
| API | frappe.client.get_list signature change |
Custom API calls may fail | Grep for frappe.client.get_list |
| Permissions | Stricter permission checks on API | Guest access may break | Check allow_guest=True usage |
| Assets | New frontend build system | Custom JS bundles may break | Test bench build |
| Hooks | boot_session hook changes |
Custom boot data may fail | Grep for boot_session |
| Naming | Some naming series changes | Document names may differ | Review autoname settings |
| Report | Report Builder changes | Custom reports may need updates | Test all Script Reports |
v15 → v16 Breaking Changes
| Category | Change | Impact | Detection Pattern |
|---|---|---|---|
| DocType Extension | extend_doctype_class replaces doc_events override |
Controller overrides need refactoring | Grep for doc_events with method override |
| Type Annotations | Type hints now best practice | Code style change | Not breaking, but recommended |
| Chrome PDF | New PDF engine (Chrome-based) | Print format rendering changes | Test all print formats |
| Data Masking | New privacy feature | PII fields need configuration | Review sensitive fields |
| UUID Naming | New uuid naming rule |
Naming logic changes | Check autoname settings |
| Python | Python 3.11+ required | Library compatibility | Check python3 --version |
| Node.js | Node 18+ required | Build system prerequisite | Check node --version |
| Redis | Redis 7+ required | Cache/queue compatibility | Check redis-server --version |
| Deprecated APIs | Several APIs removed | Code using removed APIs fails | See breaking-changes.md |
| Workflow | Workflow engine updates | Custom workflow states may need review | Test all workflows |
| Portal | Portal page rendering changes | Custom portal pages may break | Test all portal pages |
| Background Jobs | RQ version upgrade | Job serialization changes | Test background jobs |
See references/breaking-changes.md for complete details.
Step 3: Deprecated Pattern Detection
ALWAYS scan custom app code for these patterns:
v14 → v15 Deprecated Patterns
# Run these grep commands in apps/{your_app}/ directory:
# 1. Old-style module page references
grep -rn "Module Def" --include="*.py" --include="*.json"
# 2. Old scheduler API
grep -rn "frappe.utils.scheduler" --include="*.py"
# 3. Deprecated client API
grep -rn "frappe.set_route\|cur_page\|page_container" --include="*.js"
# 4. Old-style print format
grep -rn "frappe.get_print\|standard_format" --include="*.py"
# 5. Deprecated database methods
grep -rn "frappe.db.sql_list\|frappe.db.sql_ddl" --include="*.py"
v15 → v16 Deprecated Patterns
# Run these grep commands in apps/{your_app}/ directory:
# 1. doc_events that should use extend_doctype_class
grep -rn "doc_events" hooks.py
# 2. Old-style controller override
grep -rn "override_doctype_class" --include="*.py"
# 3. Deprecated frappe.utils methods
grep -rn "frappe.utils.now_datetime\b" --include="*.py"
# 4. Old print format API
grep -rn "frappe.utils.pdf\|get_pdf" --include="*.py"
# 5. Removed API calls
grep -rn "frappe.get_hooks\b.*boot_session" --include="*.py"
# 6. Missing type annotations (warning, not error)
grep -rn "def .*whitelist" --include="*.py"
Step 4: Migration Plan Template
ALWAYS generate a migration plan in this format:
## Migration Plan: v{source} → v{target}
### Prerequisites
- [ ] Python version: {required}
- [ ] Node.js version: {required}
- [ ] MariaDB version: {required}
- [ ] Redis version: {required}
- [ ] Disk space: minimum 2x current DB size
### Phase 1: Preparation (Day 1)
1. Full backup: `bench --site {site} backup --with-files`
2. Document current state: `bench version > pre-migration-versions.txt`
3. List all custom apps: `bench --site {site} list-apps`
4. Run deprecated pattern scan (Step 3)
5. Fix all detected issues in custom apps
### Phase 2: Staging (Day 2-3)
1. Clone production to staging environment
2. Restore backup on staging: `bench --site staging restore {backup}`
3. Switch branch: `bench switch-to-branch version-{target} frappe erpnext`
4. Run migration: `bench --site staging migrate`
5. Run full test suite on staging
### Phase 3: Testing (Day 4-5)
- [ ] All DocTypes load correctly
- [ ] All print formats render correctly
- [ ] All workflows transition correctly
- [ ] All scheduled jobs execute correctly
- [ ] All custom reports generate correctly
- [ ] All API endpoints respond correctly
- [ ] All user permissions work correctly
- [ ] Performance is acceptable (page load < 3s)
### Phase 4: Production (Day 6)
1. Schedule maintenance window
2. Enable maintenance mode: `bench --site {site} set-maintenance-mode on`
3. Final backup: `bench --site {site} backup --with-files`
4. Switch branch: `bench switch-to-branch version-{target} frappe erpnext`
5. Run migration: `bench --site {site} migrate`
6. Run `bench build --production`
7. Restart: `bench restart` (or `sudo supervisorctl restart all`)
8. Disable maintenance mode: `bench --site {site} set-maintenance-mode off`
9. Verify (Phase 3 checklist again)
### Rollback Plan
1. Stop all services: `sudo supervisorctl stop all`
2. Restore backup: `bench --site {site} restore {backup_path}`
3. Switch back: `bench switch-to-branch version-{source} frappe erpnext`
4. Run migration: `bench --site {site} migrate`
5. Rebuild: `bench build --production`
6. Restart: `sudo supervisorctl restart all`
Step 5: Custom App Patch List
For each deprecated pattern found in Step 3, generate a specific fix:
| File | Line | Current Code | Required Change | Breaking? |
|---|---|---|---|---|
{file} |
{line} |
{old_pattern} |
{new_pattern} |
Yes/No |
Common Patches (v14 → v15)
| Pattern | Replace With |
|---|---|
frappe.db.sql_list(...) |
frappe.db.get_all(..., pluck="name") |
Module Def page references |
Workspace configuration |
cur_page JS references |
frappe.router API |
| Old scheduler tick assumptions | Review timing for 60s interval |
Common Patches (v15 → v16)
| Pattern | Replace With |
|---|---|
doc_events controller override |
extend_doctype_class in hooks.py |
Missing super() in overrides |
Add super().method() call |
frappe.utils.pdf.get_pdf() |
Updated PDF API |
| No type annotations | Add type hints to public methods |
Agent Output Format
ALWAYS produce migration output in this format:
## Migration Assessment
### Version Path
{source} → {target} (via {intermediate versions if any})
### Prerequisites Status
| Requirement | Current | Required | Status |
|-------------|---------|----------|--------|
| Python | {ver} | {ver} | OK/FAIL |
| Node.js | {ver} | {ver} | OK/FAIL |
| MariaDB | {ver} | {ver} | OK/FAIL |
### Breaking Changes Found: {count}
[List from Step 2]
### Custom Code Issues Found: {count}
[Table from Step 3 scan]
### Migration Plan
[From Step 4]
### Patch List
[From Step 5]
### Risk Assessment
| Risk | Likelihood | Impact | Mitigation |
|------|-----------|--------|------------|
### Estimated Timeline
Preparation: {days} | Staging: {days} | Testing: {days} | Production: {hours}
### Referenced Skills
- `frappe-ops-upgrades`: Version upgrade procedures
- `frappe-ops-backup`: Backup and restore
- `frappe-agent-debugger`: For post-migration error diagnosis
See references/checklists.md for complete migration checklists. See references/breaking-changes.md for full breaking changes database.
Version history
-
v3.1.1
GitHub ↗
Original release notes
## What's new Expanded Keywords in all skill descriptions with user-friendly, non-technical discovery terms. Skills are now easier to find when users describe problems in plain language instead of technical terminology. Examples of added terms: - Symptom-based: "app is slow", "nothing shows", "container won't start" - Beginner-friendly: "how do I start", "what is", "getting started" - Error messages: literal error text users would paste - Alternative names: common synonyms and abbreviations No skill content was changed. Only the Keywords line in SKILL.md frontmatter was expanded.
-
v3.1.0
GitHub ↗
Original release notes
## What's new - package.json with agents.skills[] manifest for external discovery (60 skills) - agents/openai.yaml for OpenAI Codex - GitHub topic agentskills added - SKILLS_LOG.md added to .gitignore - Em-dashes replaced with colons in 31 SKILL.md section headings Enables discovery via npx skills add, skills.sh, LobeHub, and other platforms.
-
v3.0.0
GitHub ↗
Original release notes
## Summary - **60 deterministic skills** for Frappe Framework v14-v16 (up from 53 in v2.0) - **~95% surface area coverage** (up from ~85%) - 7 new skills + 12 existing skills extended with new reference files ## New Skills (7) | Skill | Category | Coverage | |-------|----------|----------| | `frappe-core-translation` | core | i18n, _(), __(), CSV/PO files, string extraction | | `frappe-core-utils` | core | 140+ date, number, string, validation functions | | `frappe-syntax-print` | syntax | Print formats, PDF generation, Letter Head | | `frappe-syntax-query-builder` | syntax | frappe.qb, joins, aggregation, cross-DB | | `frappe-impl-workspace` | impl | Workspace builder, number cards, charts | | `frappe-core-logging` | core | frappe.logger(), Error Log, Sentry integration | | `frappe-core-search` | core | Link search, global search, SQLiteSearch FTS5 | ## Extended Skills (12) 13 new reference files added to existing skills covering: Controls API, Tree View, Portal Generators, Print Format decision tree, Email system, Module/Workspace shipping, complete Document API, custom bench commands, request lifecycle, advanced debugging (VS Code DAP), Frappe Packages, data masking (v16+), and Python type stubs. ## Stats | Category | Count | |----------|:-----:| | syntax/ | 13 | | core/ | 11 | | impl/ | 14 | | errors/ | 7 | | ops/ | 8 | | agents/ | 5 | | testing/ | 2 | | **Total** | **60** | ## Install ```bash git clone https://github.com/OpenAEC-Foundation/Frappe_Claude_Skill_Package.git cp -r Frappe_Claude_Skill_Package/skills/source/* ~/.claude/skills/ ```
-
v2.0.0
GitHub ↗
Original release notes
## Frappe Claude Skill Package v2.0.0 Massive upgrade from 28 ERPNext-specific skills to **53 Frappe Framework skills** covering ~85% of the Frappe surface area. ### What's New - **25 new skills** across 3 new categories (ops, testing, agents) - **28 existing skills** fully rewritten with fresh research - **Renamed** from `erpnext-*` to `frappe-*` (all skills are Frappe Framework, not ERPNext-specific) - **7 categories**: syntax (11), core (7), impl (13), errors (7), ops (8), agents (5), testing (2) ### New Categories - **ops/** — Bench CLI, deployment, backup, performance, upgrades, frontend build, cloud - **testing/** — Unit/integration tests, CI/CD with GitHub Actions - **3 new agents** — debugger, migrator, architect ### Key Improvements - All skills verified against official Frappe docs (March 2026) - v16 features documented: `extend_doctype_class`, data masking, type annotations - MIT license (was LGPL-3.0) - Deterministic language throughout (ALWAYS/NEVER) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
-
v1.1.0
GitHub ↗
Original release notes
V16 compatibility update and documentation improvements. ## Added - USAGE.md with platform-specific guides (Claude.ai, Claude Code, API) - Complete README overhaul with quick start guide ## Changed - All 28 skills updated for ERPNext/Frappe V16 compatibility - Agent Skills now follow standard skill structure - Improved validation: 28/28 skills pass all checks ## Fixed - V16-specific syntax changes in 9 skills - Agent SKILL.md files now under 500 lines
Only the five most recent versions are shown. View full version history at the source ↗
Current listing version
2.0
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 针对 Frappe/ERPNext 跨主版本迁移这一高价值运维场景,提供系统化的破坏性变更检测和迁移规划能力
- 直接解决用户在版本升级过程中避免失败、快速定位兼容性问题的核心痛点,实用性强
Highlights
- 触发词覆盖全面(migration, version upgrade, breaking changes, deprecated API, v14, v15, v16 等),边界清晰
- 详细列出了多种使用场景(升级规划、升级后错误、自定义应用兼容性检查、迁移中问题),用户易于判断适用性
Highlights
- 文档结构非常完整,Phase 划分清晰(Step 1-5),包含详细的执行步骤和出口条件
- 提供了完整的迁移计划模板、具体的命令示例和表格化展示,frontmatter 完整规范
Highlights
- 所有操作基于标准 Frappe bench 命令和 grep 扫描,工具来源明确可靠
- 覆盖了主要异常情况(前置条件检查、回滚方案),对不可逆操作提供了备份和维护模式切换机制
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Administrator or elevated privileges
Elevate only when necessary. Keep protection and certificate validation enabled and avoid broad system access.
Mentioned in main document · lines 216, 221, 226
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
[ ] Python version: {required} [ ] Node.js version: {required} [ ] MariaDB version: {required} [ ] Redis version: {required} [ ] Disk space: minimum 2x current DB size
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.