Skip to content
Back to skills

Skill: Module Codebase (Perfex Module)

ASecurity

This skill is used to create and manage codebase structure for Perfex CRM modules following Perfex best practices.

  • 26 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added February 7, 2026
developmentgophptestingrefactoringapidatabasedocumentation

Works with

  • api

Security analysis

A100/100

Pro scans all 21 files and shows the line behind each finding

Scanned February 12, 2026

npx -y skills add PolyXGO/HeraSpec --skill module-codebase --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Skill: Module Codebase (Perfex Module)?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Skill: Module Codebase (Perfex Module)
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/polyxgo-skill-module-codebase-perfex-module/badge)](https://www.skillsdirectory.com/skills/polyxgo-skill-module-codebase-perfex-module)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Skill: Module Codebase (Perfex Module)

## Purpose

This skill is used to create and manage codebase structure for Perfex CRM modules following Perfex best practices.

## When to Use

- When creating a new module for Perfex CRM
- When refactoring existing module structure
- When ensuring module follows Perfex conventions
- When creating standard folder and file structure for module

## Step-by-Step Process

### Step 1: Analyze Requirements
- Identify main functionality of module
- Identify required database tables
- Identify hooks and filters to use
- Identify permissions to create

### Step 2: Scaffold Structure
- Run script: `scripts/scaffold-module.sh <module-name>`
- Script will create standard folder structure:
  - `modules/<module-name>/`
  - `modules/<module-name>/controllers/`
  - `modules/<module-name>/models/`
  - `modules/<module-name>/views/`
  - `modules/<module-name>/language/`
  - `modules/<module-name>/assets/`
- Copy templates to correct locations

### Step 3: Configure Module
- Fill information in `module-config.php` (from template)
- Register module in Perfex system
- Set up permissions and menu items

### Step 4: Implement Core Logic
- Create controllers following Perfex structure
- Create models with Eloquent patterns
- Implement hooks and filters
- Create database migrations

### Step 5: Testing & Documentation
- Test module with Perfex core
- Write documentation (use documents skill)
- Create user guide (use documents skill)

## Required Input

- **Module name**: Module name (kebab-case, e.g., `category-management`)
- **Module description**: Module functionality description
- **Database tables**: List of tables to create
- **Hooks required**: List of hooks to implement
- **Permissions**: List of permissions to create
- **Menu items**: List of menu items to add

## Expected Output

- Complete module folder structure
- Fully configured files
- Database migrations
- Module registration code
- Basic documentation structure

## Tone & Rules

### Code Style
- Follow PSR-12 coding standards
- Use camelCase for functions
- Use PascalCase for classes
- Comment in English

### Naming Conventions
- Module folder: `perfex-<module-name>`
- Class names: `Perfex<ModuleName>`
- Function names: `perfex_<module_name>_<action>`
- Database tables: `tbl<ModuleName>`

### Limitations
- ❌ DO NOT create global functions (except hooks)
- ❌ DO NOT hardcode database credentials
- ❌ DO NOT bypass Perfex permission system
- ❌ DO NOT modify core Perfex files
- ❌ DO NOT use deprecated Perfex APIs

## Available Templates

- `templates/module-structure.php` - Basic module structure
- `templates/module-config.php` - Module configuration file
- `templates/module-hooks.php` - Template for hooks
- `templates/module-migration.php` - Database migration template

## Available Scripts

- `scripts/scaffold-module.sh` - Automatically create module structure

## Examples

See `examples/` directory for reference:
- `good-module-structure/` - Example of well-organized module
- `bad-module-structure/` - Example to avoid

## Links to Other Skills

- **documents**: Use to create technical docs and user guide
- **ui-ux**: Use when module has admin interface
- **content-optimization**: Use for module marketing pages
- **module-registration**: Use to register module with Perfex
- **permission-group**: Use to create permissions for module

Files in this skill

  • CHANGELOG.md3 KB
  • README-template.md1.4 KB
  • README.md1.8 KB
  • content-optimization-skill.md3 KB
  • data/charts.csv7.5 KB
  • data/colors.csv12.7 KB
  • data/landing.csv14.1 KB
  • data/pages-proposed.csv11.1 KB
  • data/pages.csv5 KB
  • data/products.csv29.1 KB
  • data/prompts.csv17 KB
  • data/stacks/flutter.csv10.2 KB
  • data/stacks/html-tailwind.csv11.1 KB
  • data/stacks/nextjs.csv12.3 KB
  • data/stacks/react-native.csv9.8 KB
  • data/stacks/react.csv12.7 KB
  • data/stacks/svelte.csv10.8 KB
  • data/stacks/swiftui.csv10.6 KB
  • data/stacks/vue.csv10.8 KB
  • data/styles.csv41 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…