erpnext-code-interpreter by openaec-foundation/erpnext_anthropic_claude_development_skill_package
npx skills add https://github.com/openaec-foundation/erpnext_anthropic_claude_development_skill_package --skill erpnext-code-interpreter此代理将模糊或不完整的 ERPNext 开发请求转化为清晰、可执行的技术规范。
目的:弥合“用户想要什么”和“需要构建什么”之间的差距
┌─────────────────────────────────────────────────────────────────────┐
│ 用户请求分析 │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ ► 请求模糊/不完整 │
│ "提交发票时让它做点什么" │
│ └── 使用此代理 │
│ │
│ ► 请求缺乏技术细节 │
│ "在订单确认前添加审批" │
│ └── 使用此代理 │
│ │
│ ► 存在多种可能的实现路径 │
│ "自动化库存更新" │
│ └── 使用此代理 │
│ │
│ ► 请求已有清晰的技术规范 │
│ "为销售发票创建验证时的服务器脚本" │
│ └── 跳过代理,直接使用相关语法/实现技能 │
│ │
└─────────────────────────────────────────────────────────────────────┘
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
┌─────────────────────────────────────────────────────────────────────┐
│ 代码解释器工作流程 │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ 步骤 1: 提取意图 │
│ ═══════════════════════ │
│ • 业务问题是什么? │
│ • 应该发生什么?何时发生?对什么数据? │
│ • 谁应该受到影响(角色/用户)? │
│ │
│ 步骤 2: 识别触发上下文 │
│ ════════════════════════════════ │
│ • 文档生命周期事件?(保存/提交/取消) │
│ • 用户操作?(按钮点击,字段变更) │
│ • 基于时间?(每日,每小时,定时任务) │
│ • 外部事件?(Webhook,API 调用) │
│ │
│ 步骤 3: 确定机制 │
│ ═══════════════════════════ │
│ • 客户端脚本、服务器脚本,还是控制器? │
│ • 需要配置钩子吗? │
│ • 需要自定义应用吗? │
│ │
│ 步骤 4: 生成规范 │
│ ══════════════════════════════ │
│ • 涉及的 DocType │
│ • 事件/触发类型 │
│ • 实现机制 │
│ • 数据流 │
│ • 错误处理要求 │
│ • 版本兼容性 │
│ │
│ 步骤 5: 映射到技能 │
│ ══════════════════════ │
│ • 列出实现所需的技能 │
│ • 注意技能之间的任何依赖关系 │
│ │
└─────────────────────────────────────────────────────────────────────┘
→ 查看 references/workflow.md 获取详细工作流程步骤。
使用此矩阵来确定哪种机制符合要求:
┌─────────────────────────────────────────────────────────────────────┐
│ 需求 → 机制映射 │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ "表单上自动计算" │
│ └── 客户端脚本 (refresh_field) + 服务器脚本 (validate) │
│ │
│ "保存前验证" │
│ └── 服务器脚本 (Document Event: validate) │
│ │
│ "提交后发送通知" │
│ └── 服务器脚本 (Document Event: on_submit) │
│ │
│ "向表单添加按钮" │
│ └── 客户端脚本 (custom_buttons) │
│ │
│ "计划报告/同步" │
│ └── 服务器脚本 (Scheduler) 或 hooks.py scheduler_events │
│ │
│ "按用户区域筛选列表" │
│ └── 服务器脚本 (Permission Query) │
│ │
│ "自定义 REST API" │
│ └── 服务器脚本 (API) 或 @frappe.whitelist() │
│ │
│ "具有回滚的复杂事务" │
│ └── 控制器 (需要自定义应用) │
│ │
│ "需要外部库" │
│ └── 控制器 (需要自定义应用) │
│ │
│ "审批工作流" │
│ └── 内置工作流 + 服务器脚本用于自定义逻辑 │
│ │
│ "打印格式自定义" │
│ └── Jinja 模板 (Print Format) │
│ │
└─────────────────────────────────────────────────────────────────────┘
当请求不明确时,询问以下问题:
• 涉及哪些 DocType?
• 哪些数据需要更改?
• 结果应该是什么?
• 这应该在何时发生?
- 表单加载时?
- 字段变更时?
- 保存前/后?
- 提交前/后?
- 按计划?
- 用户点击某物时?
• 这应该影响谁?
- 所有用户?
- 特定角色?
- 仅文档所有者?
• 谁不应该受到影响?
• 更改应该出现在哪里?
- 在表单(UI)中?
- 仅在数据库中?
- 在报告中?
- 在外部系统中?
• 如果操作失败怎么办?
- 阻止操作?
- 显示警告但继续?
- 记录日志并静默继续?
→ 查看 references/examples.md 获取解释示例。
按此格式生成规范:
## 技术规范
### 摘要
[一句话描述将要构建的内容]
### 业务需求
[澄清后的原始用户请求]
### 实现
| 方面 | 值 |
|--------|-------|
| **DocType(s)** | [列表] |
| **触发** | [事件/操作] |
| **机制** | [客户端脚本 / 服务器脚本 / 控制器 / 等] |
| **版本** | [v14 / v15 / v16 / 全部] |
### 数据流
1. [步骤 1]
2. [步骤 2]
3. [步骤 3]
### 错误处理
[应如何处理错误]
### 所需技能
- [ ] skill-name-1 - 用于 [目的]
- [ ] skill-name-2 - 用于 [目的]
### 验证标准
[如何验证实现是否正确工作]
根据机制,需要以下技能:
| 机制 | 所需技能 |
|---|---|
| 客户端脚本 | erpnext-syntax-clientscripts, erpnext-impl-clientscripts, erpnext-errors-clientscripts |
| 服务器脚本 (文档事件) | erpnext-syntax-serverscripts, erpnext-impl-serverscripts, erpnext-errors-serverscripts |
| 服务器脚本 (API) | erpnext-syntax-serverscripts, erpnext-api-patterns, erpnext-errors-api |
| 服务器脚本 (调度器) | erpnext-syntax-serverscripts, erpnext-syntax-scheduler, erpnext-impl-scheduler |
| 服务器脚本 (权限) | erpnext-syntax-serverscripts, erpnext-permissions, erpnext-errors-permissions |
| 控制器 | erpnext-syntax-controllers, erpnext-impl-controllers, erpnext-errors-controllers |
| 钩子 | erpnext-syntax-hooks, erpnext-impl-hooks, erpnext-errors-hooks |
| 自定义应用 | erpnext-syntax-customapp, erpnext-impl-customapp |
| Jinja 模板 | erpnext-syntax-jinja, erpnext-impl-jinja |
| 数据库操作 | erpnext-database, erpnext-errors-database |
| 白名单方法 | erpnext-syntax-whitelisted, erpnext-impl-whitelisted |
解释:
• 需要在表单上实时更新 → 客户端脚本
• 需要在保存时进行验证计算 → 服务器脚本 (validate)
• 通常两者都需要以获得最佳用户体验
规范:
- 客户端脚本:字段变更触发,refresh_field
- 服务器脚本:validate 事件,相同的计算作为备份
解释:
• 文档操作后 → 服务器脚本 (on_update/on_submit)
• 计划摘要 → 服务器脚本 (Scheduler)
规范:
- 使用 frappe.sendmail() 或 Notification DocType
- 考虑:接收者、模板、附件
解释:
• 阻止保存 → 服务器脚本 (validate) 配合 frappe.throw()
• 阻止提交 → 服务器脚本 (before_submit) 配合 frappe.throw()
• 阻止取消 → 服务器脚本 (before_cancel) 配合 frappe.throw()
规范:
- 确定正确的事件 (validate 与 before_submit)
- 为用户定义清晰的错误消息
解释:
• 保存时实时同步 → 控制器 (需要 requests 库)
• 批量同步 → hooks.py 中的调度器 (需要 requests 库)
• 不能使用服务器脚本 (导入被阻止)
规范:
- 必须使用自定义应用
- 控制器类或 hooks.py scheduler_events
- API 失败的错误处理
→ 查看 references/examples.md 获取更多模式。
始终考虑版本兼容性:
| 特性 | v14 | v15 | v16 |
|---|---|---|---|
| 服务器脚本沙箱 | ✓ | ✓ | ✓ |
extend_doctype_class 钩子 | ✗ | ✗ | ✓ |
| Chrome PDF 渲染 | ✗ | ✗ | ✓ |
| 数据脱敏 | ✗ | ✗ | ✓ |
| UUID 命名规则 | ✗ | ✗ | ✓ |
| 调度器间隔(秒) | 240 | 60 | 60 |
在完成解释之前,请验证:
→ 查看 references/checklists.md 获取详细检查清单。
每周安装量
105
代码仓库
GitHub 星标数
37
首次出现
2026年2月5日
安全审计
安装于
github-copilot96
codex96
opencode96
gemini-cli95
kimi-cli94
amp94
This agent transforms vague or incomplete ERPNext development requests into clear, actionable technical specifications.
Purpose : Bridge the gap between "what the user wants" and "what needs to be built"
┌─────────────────────────────────────────────────────────────────────┐
│ USER REQUEST ANALYSIS │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ ► Request is vague/incomplete │
│ "Make the invoice do something when submitted" │
│ └── USE THIS AGENT │
│ │
│ ► Request lacks technical specifics │
│ "Add approval before order confirmation" │
│ └── USE THIS AGENT │
│ │
│ ► Multiple implementation paths possible │
│ "Automate inventory updates" │
│ └── USE THIS AGENT │
│ │
│ ► Request already has clear technical specs │
│ "Create Server Script on validate for Sales Invoice" │
│ └── Skip agent, use relevant syntax/impl skills directly │
│ │
└─────────────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────────────┐
│ CODE INTERPRETER WORKFLOW │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ STEP 1: EXTRACT INTENT │
│ ═══════════════════════ │
│ • What is the business problem? │
│ • What should happen? When? To what data? │
│ • Who should be affected (roles/users)? │
│ │
│ STEP 2: IDENTIFY TRIGGER CONTEXT │
│ ════════════════════════════════ │
│ • Document lifecycle event? (save/submit/cancel) │
│ • User action? (button click, field change) │
│ • Time-based? (daily, hourly, cron) │
│ • External event? (webhook, API call) │
│ │
│ STEP 3: DETERMINE MECHANISM │
│ ═══════════════════════════ │
│ • Client Script, Server Script, or Controller? │
│ • Hooks configuration needed? │
│ • Custom app required? │
│ │
│ STEP 4: GENERATE SPECIFICATION │
│ ══════════════════════════════ │
│ • DocType(s) involved │
│ • Event/trigger type │
│ • Implementation mechanism │
│ • Data flow │
│ • Error handling requirements │
│ • Version compatibility │
│ │
│ STEP 5: MAP TO SKILLS │
│ ══════════════════════ │
│ • List required skills for implementation │
│ • Note any dependencies between skills │
│ │
└─────────────────────────────────────────────────────────────────────┘
→ See references/workflow.md for detailed workflow steps.
Use this to determine WHICH mechanism fits the requirement:
┌─────────────────────────────────────────────────────────────────────┐
│ REQUIREMENT → MECHANISM MAPPING │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ "Auto-calculate on form" │
│ └── Client Script (refresh_field) + Server Script (validate) │
│ │
│ "Validate before save" │
│ └── Server Script (Document Event: validate) │
│ │
│ "Send notification after submit" │
│ └── Server Script (Document Event: on_submit) │
│ │
│ "Add button to form" │
│ └── Client Script (custom_buttons) │
│ │
│ "Scheduled report/sync" │
│ └── Server Script (Scheduler) or hooks.py scheduler_events │
│ │
│ "Filter list per user territory" │
│ └── Server Script (Permission Query) │
│ │
│ "Custom REST API" │
│ └── Server Script (API) or @frappe.whitelist() │
│ │
│ "Complex transaction with rollback" │
│ └── Controller (custom app required) │
│ │
│ "External library needed" │
│ └── Controller (custom app required) │
│ │
│ "Approval workflow" │
│ └── Built-in Workflow + Server Script for custom logic │
│ │
│ "Print format customization" │
│ └── Jinja template (Print Format) │
│ │
└─────────────────────────────────────────────────────────────────────┘
When a request is ambiguous, ask these questions:
• What DocType(s) are involved?
• What data needs to change?
• What should the outcome be?
• When should this happen?
- On form load?
- On field change?
- Before/after save?
- Before/after submit?
- On a schedule?
- When user clicks something?
• Who should this affect?
- All users?
- Specific roles?
- Document owner only?
• Who should NOT be affected?
• Where should changes appear?
- In the form (UI)?
- In the database only?
- In a report?
- In an external system?
• What if the action fails?
- Block the operation?
- Show warning but continue?
- Log and continue silently?
→ See references/examples.md for interpretation examples.
Generate specifications in this format:
## Technical Specification
### Summary
[One sentence describing what will be built]
### Business Requirement
[The original user request, clarified]
### Implementation
| Aspect | Value |
|--------|-------|
| **DocType(s)** | [List] |
| **Trigger** | [Event/action] |
| **Mechanism** | [Client Script / Server Script / Controller / etc.] |
| **Version** | [v14 / v15 / v16 / all] |
### Data Flow
1. [Step 1]
2. [Step 2]
3. [Step 3]
### Error Handling
[How errors should be handled]
### Required Skills
- [ ] skill-name-1 - for [purpose]
- [ ] skill-name-2 - for [purpose]
### Validation Criteria
[How to verify the implementation works correctly]
Based on the mechanism, these skills are needed:
| Mechanism | Required Skills |
|---|---|
| Client Script | erpnext-syntax-clientscripts, erpnext-impl-clientscripts, erpnext-errors-clientscripts |
| Server Script (Doc Event) | erpnext-syntax-serverscripts, erpnext-impl-serverscripts, erpnext-errors-serverscripts |
| Server Script (API) | erpnext-syntax-serverscripts, erpnext-api-patterns, |
Interpretation:
• Need real-time update on form → Client Script
• Need validated calculation on save → Server Script (validate)
• Usually BOTH for best UX
Specification:
- Client Script: field change triggers, refresh_field
- Server Script: validate event, same calculation as backup
Interpretation:
• After document action → Server Script (on_update/on_submit)
• Scheduled digest → Server Script (Scheduler)
Specification:
- Use frappe.sendmail() or Notification DocType
- Consider: who receives, template, attachments
Interpretation:
• Block save → Server Script (validate) with frappe.throw()
• Block submit → Server Script (before_submit) with frappe.throw()
• Block cancel → Server Script (before_cancel) with frappe.throw()
Specification:
- Determine correct event (validate vs before_submit)
- Define clear error message for user
Interpretation:
• Real-time sync on save → Controller (needs requests library)
• Batch sync → Scheduler in hooks.py (needs requests library)
• Cannot use Server Script (imports blocked)
Specification:
- Custom app REQUIRED
- Controller class or hooks.py scheduler_events
- Error handling for API failures
→ See references/examples.md for more patterns.
Always consider version compatibility:
| Feature | v14 | v15 | v16 |
|---|---|---|---|
| Server Script sandbox | ✓ | ✓ | ✓ |
extend_doctype_class hook | ✗ | ✗ | ✓ |
| Chrome PDF rendering | ✗ | ✗ | ✓ |
| Data masking | ✗ | ✗ | ✓ |
| UUID naming rule | ✗ | ✗ | ✓ |
| Scheduler tick (seconds) | 240 | 60 | 60 |
Before completing interpretation, verify:
→ See references/checklists.md for detailed checklists.
Weekly Installs
105
Repository
GitHub Stars
37
First Seen
Feb 5, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
github-copilot96
codex96
opencode96
gemini-cli95
kimi-cli94
amp94
通过 LiteLLM 代理让 Claude Code 对接 GitHub Copilot 运行 | 高级变通方案指南
40,000 周安装
Java开发专家技能:Spring Boot、Quarkus、企业级设计模式与性能优化指南
104 周安装
FastAPI 安全开发指南:构建高性能、安全的 REST API 与 WebSocket 服务
104 周安装
Django REST API开发指南:使用DRF构建可扩展、高性能的API接口
104 周安装
Salesforce DX 开发专家指南:Apex代码规范、LWC组件与SFDX CLI最佳实践
104 周安装
Nanobanana图像生成技能 - 使用Google Gemini API生成和编辑AI图像
104 周安装
Mind Elixir 纯文本格式详解:思维导图数据转换与AI编辑规范
erpnext-errors-api| Server Script (Scheduler) | erpnext-syntax-serverscripts, erpnext-syntax-scheduler, erpnext-impl-scheduler |
| Server Script (Permission) | erpnext-syntax-serverscripts, erpnext-permissions, erpnext-errors-permissions |
| Controller | erpnext-syntax-controllers, erpnext-impl-controllers, erpnext-errors-controllers |
| Hooks | erpnext-syntax-hooks, erpnext-impl-hooks, erpnext-errors-hooks |
| Custom App | erpnext-syntax-customapp, erpnext-impl-customapp |
| Jinja Template | erpnext-syntax-jinja, erpnext-impl-jinja |
| Database Operations | erpnext-database, erpnext-errors-database |
| Whitelisted Method | erpnext-syntax-whitelisted, erpnext-impl-whitelisted |