frappe-service

Generate a scalable service-layer blueprint for Frappe v15 applications.

15|Updated Dec 21, 2025
One-click install
npx skills add https://github.com/sergio-bershadsky/ai --skill frappe-service
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: frappe-service
Source: https://github.com/sergio-bershadsky/ai/tree/main/plugins/frappe-dev/skills/frappe-service
Command: npx skills add https://github.com/sergio-bershadsky/ai --skill frappe-service

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Design and implement service layer classes for Frappe Framework v15 with proper business logic separation. Triggers: "create service", "add service layer", "frappe service", "business logic", "/frappe-service". Generates service classes with validation, orchestration, and integration patterns.

Core Features & Use Cases

  • Provides structured service templates that coordinate between controllers and repositories
  • Enforces permissions, transactions, and validation boundaries to ensure reliable workflows
  • Supports multiple DocTypes and integration scenarios via a consistent service pattern

Quick Start

Invoke /frappe-service to generate a new service class for a chosen DocType and do initial wiring.

Frequently Asked Questions about frappe-service

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I separate business logic from controllers in Frappe v15?

A service layer in Frappe encapsulates business logic, orchestrates repository-based data access, and exposes clean controller interfaces for cross-DocType coordination. It enforces permission checks, transaction management, and validation boundaries to ensure reliable workflows.

How do I manage cross-DocType transactions and validation in a Frappe app?

To manage cross-DocType transactions in Frappe, use a service layer to enforce transaction boundaries and orchestrate repository data access. This pattern coordinates multiple DocTypes while maintaining validation and permission checks across the workflow.

What is the repository pattern in Frappe and when should I use it?

The repository pattern in Frappe abstracts data access behind repository classes orchestrated by a service layer. Use it when your application requires cross-DocType coordination, validation boundaries, and testable business logic separation from controllers.

How do I make Frappe business logic testable with dependency injection?

To make Frappe business logic testable, use a service-layer pattern that provides a factory function for service instantiation. This approach supports dependency injection by decoupling service creation from controllers and repository-based data access.

Does the Frappe service layer pattern support permission checks and transaction management?

Yes, the Frappe service layer pattern enforces permission checks and transaction management within its structured service templates. It coordinates between controllers and repositories while maintaining validation boundaries across multiple DocTypes and integration scenarios.

What's the best way to structure scalable business logic in a Frappe application?

The best way to structure scalable Frappe business logic is generating a service-layer blueprint with repository-based data access. This pattern encapsulates logic, orchestrates repositories, and exposes clean controller interfaces for reliable, testable workflows.