Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计提醒

espocrm-developmentespocrm 发展

Agent Skill

espocrm-development 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

3,683

周安装

149

GitHub Stars

40

下载量

1,156
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:espocrm-development(espocrm 发展)
来源仓库:https://github.com/bobmatnyc/claude-mpm-skills
仓库路径:skills/espocrm-development
安装命令:
npx skills add https://github.com/bobmatnyc/claude-mpm-skills --skill espocrm-development
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/bobmatnyc/claude-mpm-skills --skill espocrm-development

简介

espocrm-development 提供 EspoCRM 开发过程中的架构指导和模式约束,帮助开发者避免常见错误。

  • 适用于开发自定义模块、实体、服务或 API 接口时,确保遵循元数据驱动的设计原则。
  • 可辅助 ORM 操作、业务逻辑实现和系统集成,提升代码质量和维护性。
  • 需结合具体项目环境使用,建议在安装前核对仓库状态及所需依赖项。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

EspoCRM Development

Overview

EspoCRM is a metadata-driven CRM platform where configuration lives in JSON files, business logic belongs in Services, and data access happens through ORM EntityManager. This skill enforces architectural patterns to prevent common mistakes like passing Container dependencies, bypassing the service layer, or implementing business logic in hooks.

When to Use This Skill

Activate when developing custom EspoCRM modules, entities, relationships, hooks, services, API endpoints, or integrations. Use especially when: working with ORM (EntityManager required), implementing business logic (belongs in Services), creating hooks (use interfaces), modifying metadata (requires cache rebuild), building custom field types, creating complex queries with SelectBuilder, implementing custom API actions, or packaging extensions.

The Iron Law

BUSINESS LOGIC IN SERVICES, NOT HOOKS | DATA ACCESS VIA ENTITYMANAGER, NEVER DIRECT PDO | NEVER PASS CONTAINER AS DEPENDENCY

Accessing Container directly or writing business logic in hooks violates architecture.

Core Architecture Principles

  1. Metadata-Driven: Entity definitions, layouts, field configs live in JSON
  2. Service Layer: All business logic implemented in Service classes
  3. ORM EntityManager: Central access point for all database operations
  4. Dependency Injection: Constructor injection, never pass Container
  5. Hook System: Lifecycle events for validation and side effects (not business logic)
  6. Repository Pattern: Entities accessed through repositories

Quick Start

  1. Setup Development Environment - Use ext-template, work in src/ directory (EspoCRM 7.4+), understand metadata structure: custom/Espo/Modules/{ModuleName}/Resources/metadata/
  2. Access Data with EntityManager use Espo\ORM\EntityManager; public function __construct(private EntityManager $entityManager) {} // Find entity $account = $this->entityManager->getEntityById('Account', $id); // Query with conditions $collection = $this->entityManager ->getRDBRepository('Contact') ->where(['accountId' => $accountId]) ->find();
  3. Implement Business Logic in Services namespace Espo\Modules\MyModule\Services; use Espo\Services\Record; class MyEntity extends Record {public function customAction(string $id, object $data): object {// Business logic here $entity = $this->entityManager->getEntityById($this->entityType, $id); //... process... $this->entityManager->saveEntity($entity); return $entity;}}
  4. Register Hooks for Lifecycle Events namespace Espo\Modules\MyModule\Hooks\Account; use Espo\ORM\Entity; use Espo\Core\Hook\Hook\BeforeSave; class MyHook implements BeforeSave {public function beforeSave(Entity $entity, array $options): void {// Validation or side effects only if ($entity->isAttributeChanged('status')) {// React to changes}}}
  5. Rebuild Cache After Changes bin/command rebuild

Hook Types (Interfaces)

EspoCRM provides 7 hook types - ALWAYS use interfaces: BeforeSave (validation before save), AfterSave (side effects after save), BeforeRemove (validation before delete), AfterRemove (cleanup after delete), AfterRelate (relationship creation), AfterUnrelate (relationship removal), AfterMassRelate (bulk relationship operations).

Navigation

Core Concepts

  • Architecture: Metadata system, ORM, DI container, repository pattern, and core architectural patterns
  • Development Workflow: Module creation, custom entities, fields, APIs, and extension development process
  • Hooks and Services: Service layer implementation, hook types, dependency injection, and business logic patterns

Advanced Topics

  • SelectBuilder: Advanced querying with SelectBuilder - complex queries, joins, aggregations, and query optimization
  • API Actions: Creating custom API endpoints - action handlers, request/response patterns, and authentication
  • Custom Field Types: Building custom field types - backend, frontend, metadata, and integration

UI and Integration

  • Frontend Customization: View system, client-side development, and UI customization
  • Common Tasks: Scheduled jobs, emails, PDFs, ACL, workflows, and integration patterns
  • Extension Packages: Packaging and distributing extensions - manifest files, installation, and versioning

Quality Assurance

Key Patterns

Correct Pattern:

✅ Service with injected dependencies
✅ EntityManager for data access
✅ Hooks using interfaces
✅ Type declarations on all methods
✅ Exceptions for error handling

Incorrect Patterns:

❌ Passing Container as dependency
❌ Direct PDO database access
❌ Business logic in hooks
❌ Hook base classes instead of interfaces
❌ Missing type declarations

Common Mistakes to Avoid

  • Never pass Container - Inject specific dependencies instead
  • Don't bypass EntityManager - Use ORM, not raw queries
  • Business logic doesn't belong in hooks - Use Services
  • Always rebuild cache - After metadata changes (bin/command rebuild)
  • Use interfaces for hooks - Not base classes
  • Type everything - PHP 7.4+ requires type declarations
  • Throw exceptions - Don't return booleans for errors

Integration with Other Skills

  • systematic-debugging: Debug EspoCRM issues using logs and step debugging
  • verification-before-completion: Always test with cache rebuild before claiming complete
  • test-driven-development: Write unit tests for Services and hooks

The Bottom Line

EspoCRM is metadata-driven with a service layer architecture.

Understand the metadata system. Use EntityManager for data. Implement business logic in Services. Use hooks for lifecycle events only. Rebuild cache after changes.

This is the EspoCRM way.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

26.82%
按下载量换算310

Gemini CLI

26.33%
按下载量换算304

OpenCode

16.78%
按下载量换算194

Antigravity

11.63%
按下载量换算134

github-copilot

7.57%
按下载量换算88

Codex

3.38%
按下载量换算39

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills