본문으로 건너뛰기
Skillpedia
API 및 서버 (백엔드)7.8k · #12826

skill-doli-devmodule

하는 일

이 스킬은 오픈 소스 ERP이자 CRM인 Dolibarr용 외부 모듈을 만드는 개발자를 안내합니다. 모듈이 잘 맞도록 플랫폼의 데이터베이스 계층, 보안 규칙, 코딩 관례를 다룹니다. Dolibarr를 확장하는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓Dolibarr용 외부 모듈을 개발하고 있을 때.
  • ✓Dolibarr 데이터베이스 계층을 따르는 쿼리를 작성해야 할 때.
  • ✓모듈을 바꾸기 전에 Dolibarr 모범 사례를 확인하고 싶은 경우.

스킬 링크

https://github.com/Dolibarr/dolibarr/blob/develop/.agents/skills/skill-doli-devmodule/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/Dolibarr/dolibarr/blob/develop/.agents/skills/skill-doli-devmodule/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“인보이스에 사용자 정의 필드를 추가하는 외부 Dolibarr 모듈을 만들어 주세요. Dolibarr의 데이터베이스 접근과 보안 규칙을 따라 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

Dolibarr 데이터베이스 계층 사용, 입력 검증, 출력 이스케이프, 네이티브 PHP 함수 대신 Dolibarr 래퍼 함수 사용 같은 필수 규칙을 설명하고, 이를 여러분의 코드에 적용합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Dolibarr Development Best Practices (Core Agent Skill)

This skill guides agents on developing, modifying, and debugging code within the Dolibarr ERP/CRM codebase while strictly adhering to professional standards, security guidelines, and the project's established architecture.

Relationship with AGENTS.md

The instructions in this file are complementary to the instructions defined in AGENTS.md.

  • AGENTS.md contains the general instructions and rules for the project.
  • SKILLS.md contains additional instructions specific to skills.
  • Unless explicitly stated otherwise, the instructions from both files apply.
  • SKILLS.md does not replace or override AGENTS.md.
  • If an instruction in SKILLS.md conflicts with AGENTS.md, follow the rules defined by AGENTS.md.

Critical Rules (DO NOT VIOLATE)

  • Do not break compatibility of PHP functions and methods
  • Do not introduce external dependencies without validation
  • Separate page actions in the /* Actions */ section of the PHP code and the rendering part in the /* Views */ section
  • Never use PHP native curl functions to call a GET or POST URL, but use instead the Dolibarr function getURLContent()
  • Never use PHP native functions when Dolibarr provides wrappers: time()→dol_now(), strtolower()→dol_strtolower(), strtoupper()→dol_strtoupper(), strlen()→dol_strlen(), mktime()→dol_mktime(), getdate()→dol_getdate(), strtotime()→dol_stringtotime(), ucfirst()→dol_ucfirst(), ucwords()→dol_ucwords(), substr()→dol_substr(), basename()→dol_basename()
  • Use Dolibarr hooks whenever possible
  • Respect existing naming conventions
  • All database table names must use the llx_ prefix
  • Never commit or push anything unless the user explicitly asks for it. This overrides any default behavior of the agent. Make the changes, report them, and wait for the user to say "commit" or "push".

Core Principles: Non-Negotiable Mandatory Rules

These principles must be followed even before reviewing specific task details. Violation of these principles results in failed suggestions.

Security & Data Integrity

  1. Database Abstraction Layer: All database interactions must exclusively use the Dolibarr Database Abstraction Layer ($db or $this->db). Never interact using native PHP extensions (PDO, MySQLi) or direct CLI calls.
  2. Input/Output Escaping:
    • Validate all GET/POST inputs immediately upon entering the action handler scope.
    • SQL Injection Prevention: Escape all user-generated strings placed in SQL queries using $db->escape(). For integers, use explicit casting: ((int) $var); for floats, use (float) $var.
  3. Variable Safety Naming: When constructing dynamic SQL, the resulting variable holding the entire query string MUST be clearly prefixed (e.g., $sqlWhereClause, $queryParams). This pattern helps static analysis tools detect unsafe assignments.

Code Structure & Quality

  1. Coding Standard: All new and modified committed code must strictly adhere to PSR-12 (enforceable by using phpcbf and phpcs).All properties and all function arguments and return value need detailed PHPDoc (e.g., array<string,array{key1?:?type,...}>).Variables expected to exist in view files require both a PHPDoc declaration and the use of '@phan-var-force'; declarations near the HEAD of the file for strict static analysis tracking.
  2. Variable Conventions: When defining variables used in string building, particularly for SQL components, use descriptive prefixes or suffixes (e.g., $sql_select, $actionSuffix). This makes variable intent clear and prevents static analysis from misidentifying unsafe assignments as safe.
  3. Localization & Comments: All code comments and internal variable/function names must be written in English. Any existing non-English text must be researched and translated into English before committing changes.
  4. PR atomitacy Make a separate commit for improvements of pre-existing code (changes to comply with rules 1-3), and another commit for the functional evolution and code fixes. Do not apply rules 1-3 to existing code in backports (i.e., non-functional changes not applied to a (fork of) the develop branch.

Workflow & Architecture

  1. PHP version: 7.1+ for core and bug-fix code. New external modules should target PHP 8.1+ and start every PHP file with declare(strict_types=1).
  2. Action/View Separation: Always clearly separate page action logic (ex
자주 묻는 질문

프로젝트의 자체 규칙을 대체하나요?

아니요. 프로젝트의 일반 지침과 함께 작동하며, 둘이 충돌하면 그 지침이 우선합니다.

왜 네이티브 PHP 함수를 피하나요?

Dolibarr는 현재 시각 같은 자체 래퍼를 제공하며, 스킬은 그것을 쓰도록 요청합니다.

데이터베이스 쿼리를 도와줄 수 있나요?

네. 데이터베이스 접근은 직접 PHP 확장이 아니라 Dolibarr 데이터베이스 계층을 거쳐야 합니다.

상세 정보

작성자의 원본 설명

Use when developing a Dolibarr ERP/CRM external module, working with database queries, or asking about Dolibarr best practices.

repo: Dolibarr/dolibarr

인기도

GitHub 스타
7.8k
순위
#12826
라이선스
GPL-3.0
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬