$npx -y skills add Impertio-Studio/Frappe_Claude_Skill_Package --skill frappe-agent-interpreterUse when receiving vague or unclear ERPNext/Frappe development requests that need interpretation. Transforms requirements like 'make invoice auto-calculate' or 'add approval workflow' into concrete technical specifications. Determines which Frappe mechanisms to use and maps to th
| 1 | # Frappe Code Interpreter Agent |
| 2 | |
| 3 | Transforms vague or incomplete Frappe/ERPNext development requests into clear, actionable technical specifications mapped to the full 61-skill catalog. |
| 4 | |
| 5 | **Purpose**: Bridge the gap between "what the user wants" and "what needs to be built" |
| 6 | |
| 7 | ## When to Use This Agent |
| 8 | |
| 9 | ``` |
| 10 | USER REQUEST ANALYSIS |
| 11 | | |
| 12 | +-- Request is vague/incomplete |
| 13 | | "Make the invoice do something when submitted" |
| 14 | | --> USE THIS AGENT |
| 15 | | |
| 16 | +-- Request lacks technical specifics |
| 17 | | "Add approval before order confirmation" |
| 18 | | --> USE THIS AGENT |
| 19 | | |
| 20 | +-- Multiple implementation paths possible |
| 21 | | "Automate inventory updates" |
| 22 | | --> USE THIS AGENT |
| 23 | | |
| 24 | +-- Request has clear technical specs already |
| 25 | | "Create Server Script on validate for Sales Invoice" |
| 26 | | --> Skip agent, use relevant frappe-* skills directly |
| 27 | ``` |
| 28 | |
| 29 | ## Interpretation Workflow |
| 30 | |
| 31 | ``` |
| 32 | STEP 1: EXTRACT INTENT |
| 33 | - What is the business problem? |
| 34 | - What should happen? When? To what data? |
| 35 | - Who should be affected (roles/users)? |
| 36 | |
| 37 | STEP 2: IDENTIFY TRIGGER CONTEXT |
| 38 | - Document lifecycle event? (save/submit/cancel) |
| 39 | - User action? (button click, field change) |
| 40 | - Time-based? (daily, hourly, cron) |
| 41 | - External event? (webhook, API call) |
| 42 | |
| 43 | STEP 3: DETERMINE MECHANISM |
| 44 | - Client Script, Server Script, or Controller? |
| 45 | - Hooks configuration needed? |
| 46 | - Custom app required? |
| 47 | - v16 extend_doctype_class applicable? |
| 48 | |
| 49 | STEP 4: GENERATE SPECIFICATION |
| 50 | - DocType(s), event/trigger, mechanism, data flow |
| 51 | - Error handling requirements |
| 52 | - Version compatibility (v14/v15/v16) |
| 53 | |
| 54 | STEP 5: MAP TO SKILLS |
| 55 | - List required frappe-* skills from full catalog |
| 56 | - Note dependencies between skills |
| 57 | ``` |
| 58 | |
| 59 | See [references/workflow.md](references/workflow.md) for detailed steps. |
| 60 | |
| 61 | ## Mechanism Selection Matrix |
| 62 | |
| 63 | | Requirement Pattern | Mechanism | Custom App? | |
| 64 | |---------------------|-----------|:-----------:| |
| 65 | | "Auto-calculate on form" | Client Script + Server Script | No | |
| 66 | | "Validate before save" | Server Script (validate) | No | |
| 67 | | "Send notification after submit" | Server Script (on_submit) | No | |
| 68 | | "Add button to form" | Client Script | No | |
| 69 | | "Scheduled report/sync" | hooks.py scheduler_events | Yes | |
| 70 | | "Filter list per user" | Server Script (Permission Query) | No | |
| 71 | | "Custom REST API" | Server Script (API) or @frappe.whitelist() | Depends | |
| 72 | | "Complex transaction with rollback" | Controller | Yes | |
| 73 | | "External library needed (requests)" | Controller | Yes | |
| 74 | | "Approval workflow" | Built-in Workflow + optional Server Script | No | |
| 75 | | "Print format customization" | Jinja template (Print Format) | No | |
| 76 | | "Custom report" | Script Report or Query Report | Depends | |
| 77 | | "Background processing" | frappe.enqueue() | Yes | |
| 78 | | "File upload handling" | Controller + File hooks | Yes | |
| 79 | | "Cache invalidation" | Cache API + hooks | Yes | |
| 80 | | "Website/portal page" | Web template + routing | Yes | |
| 81 | | "UI component (dashboard, etc.)" | Page or Custom Page | Yes | |
| 82 | |
| 83 | ## Clarifying Questions Framework |
| 84 | |
| 85 | ### 1. WHAT Questions |
| 86 | - What DocType(s) are involved? |
| 87 | - What data needs to change? |
| 88 | - What should the outcome be? |
| 89 | |
| 90 | ### 2. WHEN Questions |
| 91 | - On form load? On field change? Before/after save? |
| 92 | - Before/after submit? On a schedule? Button click? |
| 93 | |
| 94 | ### 3. WHO Questions |
| 95 | - All users? Specific roles? Document owner only? |
| 96 | |
| 97 | ### 4. WHERE Questions |
| 98 | - In the form (UI)? Database only? Report? External system? |
| 99 | |
| 100 | ### 5. ERROR Questions |
| 101 | - Block the operation? Show warning? Log silently? |
| 102 | |
| 103 | ### 6. VERSION Questions (v16 considerations) |
| 104 | - Target single version or multi-version compatibility? |
| 105 | - Can we use `extend_doctype_class` (v16) or need `doc_events` (v14+)? |
| 106 | - Type annotations desired? (v16 best practice) |
| 107 | |
| 108 | ## Output Specification Template |
| 109 | |
| 110 | ALWAYS generate specifications in this format: |
| 111 | |
| 112 | ```markdown |
| 113 | ## Technical Specification |
| 114 | |
| 115 | ### Summary |
| 116 | [One sentence describing what will be built] |
| 117 | |
| 118 | ### Business Requirement |
| 119 | [Original user request, clarified] |
| 120 | |
| 121 | ### Implementation |
| 122 | |
| 123 | | Aspect | Value | |
| 124 | |--------|-------| |
| 125 | | **DocType(s)** | [List] | |
| 126 | | **Trigger** | [Event/action] | |
| 127 | | **Mechanism** | [Client Script / Server Script / Controller / etc.] | |
| 128 | | **Version** | [v14 / v15 / v16 / all] | |
| 129 | |
| 130 | ### Data Flow |
| 131 | 1. [Step 1] |
| 132 | 2. [Step 2] |
| 133 | |
| 134 | ### Error Handling |
| 135 | [Strategy] |
| 136 | |
| 137 | ### Required Skills |
| 138 | - [ ] frappe-skill-name - for [purpose] |
| 139 | |
| 140 | ### Validation Criteria |
| 141 | [How to verify it works] |
| 142 | ` |