Token导航 LogoToken导航

Agent Skill · 前端设计

frappe-app(冰沙应用程序)

frappe-app 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

frappe-app 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证为 MIT,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 3,323。

总安装 1,395周安装 57GitHub Stars 12下载 451核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/sergio-bershadsky/ai --skill frappe-app

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

用于处理 GitHub 仓库、Issue 和 Pull Request 协作信息。支持代码变更追踪、仓库状态整理和协作事项归纳,提升开发效率。可结合原始 README 和安装命令进一步验证功能细节和使用限制。安装前建议确认权限范围和维护状态,避免触发不必要的网络请求。

使用时需注意信息时效性,优先基于最新提交和历史记录进行分析。

来源仓库内路径:skills/frappe-app

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/sergio-bershadsky/ai --skill frappe-app;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

frappe-app 怎么安装?

在终端执行 npx skills add https://github.com/sergio-bershadsky/ai --skill frappe-app。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

frappe-app 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

frappe-app 需要什么权限?

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

frappe-app 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

frappe-app 用的人多吗?

公开数据是累计安装 1,395 次,近一周安装 57 次,下载 451 次,GitHub 12 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

frappe-app 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
frappe-app

冰沙应用程序 · 本页

1,39512需要联网MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Frappe App Scaffolding

Create a professional Frappe Framework v15 application with multi-layer architecture following enterprise best practices.

When to Use

  • Starting a new Frappe/ERPNext custom application
  • Need production-ready app structure with proper separation of concerns
  • Want multi-layer architecture (Controller → Service → Repository)
  • Building apps that require clean, maintainable code organization

Arguments

/frappe-app <app_name> [--module <module_name>]

Examples:

/frappe-app inventory_management
/frappe-app hr_extension --module Human Resources

Procedure

Step 1: Gather Requirements

Ask the user for:

  1. App name (snake_case, e.g., inventory_pro)
  2. App title (human-readable, e.g., "Inventory Pro")
  3. Primary module name (e.g., "Inventory", "HR", "Sales")
  4. Brief description of the app's purpose

Verify the current working directory is within a frappe-bench/apps folder:

pwd
ls -la

Step 2: Generate App Structure

Create the following multi-layer architecture:

<app_name>/
├── <app_name>/
│   ├── __init__.py
│   ├── hooks.py                    # App hooks and integrations
│   ├── modules.txt                 # Module definitions
│   ├── patches.txt                 # Database migrations
│   ├── <module_name>/              # Primary module
│   │   ├── __init__.py
│   │   ├── doctype/               # DocType definitions
│   │   │   └── __init__.py
│   │   ├── api/                   # REST API endpoints (v2)
│   │   │   └── __init__.py
│   │   ├── services/              # Business logic layer
│   │   │   └── __init__.py
│   │   ├── repositories/          # Data access layer
│   │   │   └── __init__.py
│   │   └── report/                # Custom reports
│   │       └── __init__.py
│   ├── public/
│   │   ├── css/
│   │   └── js/
│   ├── templates/
│   │   ├── includes/
│   │   └── pages/
│   ├── www/                       # Portal pages
│   └── tests/
│       ├── __init__.py
│       └── test_utils.py
├── pyproject.toml
├── README.md
└── license.txt

Step 3: Create Core Files

pyproject.toml
[project]
name = "<app_name>"
version = "0.0.1"
description = "<description>"
authors = [
    {name = "<author>", email = "<email>"}
]
requires-python = ">=3.10"
readme = "README.md"
license = {text = "MIT"}

dependencies = [
    "frappe>=15.0.0"
]

[project.optional-dependencies]
dev = [
    "pytest>=7.0.0",
    "pytest-cov>=4.0.0",
]

[build-system]
requires = ["flit_core>=3.9"]
build-backend = "flit_core.buildapi"

[tool.pytest.ini_options]
testpaths = ["<app_name>/tests"]
python_files = "test_*.py"
hooks.py
app_name = "<app_name>"
app_title = "<App Title>"
app_publisher = "<Author>"
app_description = "<Description>"
app_email = "<email>"
app_license = "MIT"

# Required Frappe version
required_apps = ["frappe"]

# v15: Enable type annotations in controllers
export_python_type_annotations = True

# Includes in <head>
# app_include_css = "/assets/<app_name>/css/<app_name>.css"
# app_include_js = "/assets/<app_name>/js/<app_name>.js"

# Document Events - prefer controller methods over hooks when possible
# doc_events = {
#     "DocType Name": {
#         "validate": "<app_name>.<module>.services.validation.validate_document",
#         "on_submit": "<app_name>.<module>.services.workflow.on_submit",
#     }
# }

# Scheduled Tasks
# scheduler_events = {
#     "daily": [
#         "<app_name>.<module>.tasks.daily_cleanup"
#     ],
#     "cron": {
#         "0 9 * * *": [
#             "<app_name>.<module>.tasks.morning_report"
#         ]
#     }
# }

# Permissions - override for custom logic
# has_permission = {
#     "DocType Name": "<app_name>.<module>.permissions.has_permission"
# }

# Fixtures - data to export/import
# fixtures = [
#     {"dt": "Custom Field", "filters": [["module", "=", "<module_name>"]]},
#     {"dt": "Property Setter", "filters": [["module", "=", "<module_name>"]]},
# ]

# User Data Protection
# user_data_fields = [
#     {"doctype": "DocType Name", "match_field": "owner", "personal_fields": ["email", "phone"]}
# ]
Base Service Class

Create <app_name>/<module>/services/base.py:

"""
Base service class providing common functionality for all services.
Services contain business logic and orchestrate operations.
"""

import frappe
from frappe import _
from typing import TYPE_CHECKING, Optional, Any

if TYPE_CHECKING:
    from frappe.model.document import Document

class BaseService:
    """
    Base class for all service layer classes.

    Services should:
    - Contain business logic
    - Coordinate between repositories
    - Handle transactions
    - Validate business rules
    """

    def __init__(self, user: Optional[str] = None):
        self.user = user or frappe.session.user

    def check_permission(
        self,
        doctype: str,
        ptype: str = "read",
        doc: Optional["Document"] = None,
        throw: bool = True
    ) -> bool:
        """Check if current user has permission."""
        return frappe.has_permission(
            doctype=doctype,
            ptype=ptype,
            doc=doc,
            user=self.user,
            throw=throw
        )

    def validate_mandatory(self, data: dict, fields: list[str]) -> None:
        """Validate that mandatory fields are present."""
        missing = [f for f in fields if not data.get(f)]
        if missing:
            frappe.throw(
                _("Missing required fields: {0}").format(", ".join(missing))
            )

    def log_activity(
        self,
        doctype: str,
        docname: str,
        action: str,
        details: Optional[dict] = None
    ) -> None:
        """Log service activity for audit trail."""
        frappe.get_doc({
            "doctype": "Comment",
            "comment_type": "Info",
            "reference_doctype": doctype,
            "reference_name": docname,
            "content": f"{action}: {details}" if details else action
        }).insert(ignore_permissions=True)
Base Repository Class

Create <app_name>/<module>/repositories/base.py:

"""
Base repository class for data access operations.
Repositories handle all database interactions.
"""

import frappe
from frappe.query_builder import DocType
from typing import TYPE_CHECKING, Optional, Any, TypeVar, Generic

if TYPE_CHECKING:
    from frappe.model.document import Document

T = TypeVar("T", bound="Document")

class BaseRepository(Generic[T]):
    """
    Base class for all repository layer classes.

    Repositories should:
    - Handle all database operations
    - Provide clean data access interface
    - Abstract SQL/ORM details
    - Never contain business logic

    Performance Notes:
    - Use get_cached() for repeated reads of same document
    - Use get_value() when you only need 1-2 fields (faster than get_doc)
    - get_list() applies user permissions; use get_all() to bypass (internal use only)
    """

    doctype: str = ""

    def __init__(self):
        if not self.doctype:
            raise ValueError("Repository must define doctype attribute")

    def get(self, name: str, for_update: bool = False) -> Optional[T]:
        """
        Get document by name. Fetches ALL fields and child tables.

        For better performance when reading 1-2 fields, use get_value() instead.
        For repeated reads of same document, use get_cached() instead.
        """
        if not frappe.db.exists(self.doctype, name):
            return None
        return frappe.get_doc(self.doctype, name, for_update=for_update)

    def get_cached(self, name: str) -> Optional[T]:
        """
        Get document with caching. Use for repeated reads within same request.

        Returns cached version if available, otherwise fetches and caches.
        Cache is automatically invalidated when document is saved.
        Can provide 10000x+ performance improvement for repeated reads.
        """
        if not frappe.db.exists(self.doctype, name):
            return None
        return frappe.get_cached_doc(self.doctype, name)

    def get_or_throw(self, name: str, for_update: bool = False) -> T:
        """Get document by name or throw if not found."""
        doc = self.get(name, for_update=for_update)
        if not doc:
            frappe.throw(f"{self.doctype} {name} not found")
        return doc

    def exists(self, name: str) -> bool:
        """Check if document exists."""
        return frappe.db.exists(self.doctype, name)

    def get_list(
        self,
        filters: Optional[dict] = None,
        fields: Optional[list[str]] = None,
        order_by: str = "modified desc",
        limit: int = 20,
        offset: int = 0
    ) -> list[dict]:
        """
        Get list of documents with user permission filtering.

        Note: This applies user permissions automatically.
        For internal/admin queries without permission checks, use get_all().
        """
        return frappe.get_list(
            self.doctype,
            filters=filters,
            fields=fields or ["name"],
            order_by=order_by,
            limit_page_length=limit,
            limit_start=offset
        )

    def get_all(
        self,
        filters: Optional[dict] = None,
        fields: Optional[list[str]] = None,
        order_by: str = "modified desc",
        limit: int = 20,
        offset: int = 0
    ) -> list[dict]:
        """
        Get list of documents WITHOUT permission filtering.

        WARNING: Use only for internal/system operations.
        For user-facing queries, use get_list() instead.
        """
        return frappe.get_all(
            self.doctype,
            filters=filters,
            fields=fields or ["name"],
            order_by=order_by,
            limit_page_length=limit,
            limit_start=offset
        )

    def get_count(self, filters: Optional[dict] = None) -> int:
        """Get count of documents matching filters."""
        return frappe.db.count(self.doctype, filters=filters)

    def create(self, data: dict) -> T:
        """Create new document."""
        doc = frappe.get_doc({"doctype": self.doctype, **data})
        doc.insert()
        return doc

    def update(self, name: str, data: dict) -> T:
        """Update existing document."""
        doc = self.get_or_throw(name, for_update=True)
        doc.update(data)
        doc.save()
        return doc

    def delete(self, name: str) -> None:
        """Delete document."""
        frappe.delete_doc(self.doctype, name)

    def get_value(
        self,
        name: str,
        fieldname: str | list[str]
    ) -> Any:
        """Get specific field value(s) from document."""
        return frappe.db.get_value(self.doctype, name, fieldname)

    def set_value(self, name: str, fieldname: str, value: Any) -> None:
        """
        Set specific field value directly in database.

        WARNING: This bypasses controller validations and hooks.
        Use doc.save() if you need validations to run.
        """
        frappe.db.set_value(self.doctype, name, fieldname, value)

Step 4: Create Test Utilities

Create <app_name>/tests/test_utils.py:

"""
Test utilities and fixtures for <app_name>.
"""

import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase

class <AppName>TestCase(IntegrationTestCase):
    """
    Base test case for <app_name> integration tests.

    Usage:
        class TestMyFeature(<AppName>TestCase):
            def test_something(self):
                # Test with full database access
                pass
    """

    @classmethod
    def setUpClass(cls):
        super().setUpClass()
        # Setup test data

    @classmethod
    def tearDownClass(cls):
        # Cleanup test data
        super().tearDownClass()

    def create_test_user(self, email: str, roles: list[str] = None) -> str:
        """Create a test user with specified roles."""
        if frappe.db.exists("User", email):
            return email

        user = frappe.get_doc({
            "doctype": "User",
            "email": email,
            "first_name": "Test",
            "last_name": "User",
            "send_welcome_email": 0
        })
        user.insert(ignore_permissions=True)

        for role in (roles or []):
            user.add_roles(role)

        return email

class <AppName>UnitTestCase(UnitTestCase):
    """
    Base test case for <app_name> unit tests (no database).
    """
    pass

Step 5: Show Summary and Confirm

Present the complete structure to user:

## App Structure Preview

**App:** <app_name>
**Title:** <App Title>
**Module:** <Module Name>

### Files to Create:

📁 <app_name>/
├── 📁 <app_name>/
│   ├── 📄 __init__.py
│   ├── 📄 hooks.py
│   ├── 📄 modules.txt
│   ├── 📄 patches.txt
│   ├── 📁 <module>/
│   │   ├── 📁 api/
│   │   ├── 📁 services/
│   │   │   └── 📄 base.py
│   │   ├── 📁 repositories/
│   │   │   └── 📄 base.py
│   │   └── 📁 doctype/
│   ├── 📁 public/
│   ├── 📁 templates/
│   └── 📁 tests/
│       └── 📄 test_utils.py
├── 📄 pyproject.toml
├── 📄 README.md
└── 📄 license.txt

### Architecture Layers:

1. **Controllers** (doctype/) - Handle HTTP requests, call services
2. **Services** (services/) - Business logic, validation, orchestration
3. **Repositories** (repositories/) - Data access, database queries

---
Create this app structure?

Wait for user confirmation.

Step 6: Execute Creation

After approval:

  1. Create all directories
  2. Create all files with proper content
  3. Replace all placeholders with actual values

Step 7: Verify and Guide

ls -la <app_name>/

Provide next steps:

## App Created Successfully

**Next Steps:**

1. Install the app:

bench get-app /path/to/<app_name> bench --site <site> install-app <app_name>


1. Create your first DocType: `/frappe-doctype <doctype_name>`
2. Add API endpoints: `/frappe-api <endpoint_name>`
3. Run tests: `bench --site <site> run-tests --app <app_name>`

**Documentation:**

- Frappe v15 Docs: [https://docs.frappe.io/framework/v15](https://docs.frappe.io/framework/v15)
- Migration Guide: [https://github.com/frappe/frappe/wiki/Migrating-to-version-15](https://github.com/frappe/frappe/wiki/Migrating-to-version-15)

Rules

  1. v15 Compatibility — All generated code must be compatible with Frappe Framework v15
  2. Type Annotations — Use Python type hints for all function signatures
  3. Multi-Layer Architecture — Enforce Controller → Service → Repository pattern
  4. No Business Logic in Controllers — Controllers should only call services
  5. ALWAYS Confirm — Never create files without explicit user approval
  6. snake_case — App names must be snake_case
  7. Module Organization — Each module should be self-contained with its own services/repositories

平台分布

windsurf

26.31%
按下载量换算119

OpenCode

22.77%
按下载量换算103

Cursor

17.38%
按下载量换算78

Codex

11.22%
按下载量换算51

github-copilot

7.68%
按下载量换算35

Claude Code

3.24%
按下载量换算15

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills