Token导航 LogoToken导航TokenDH.com
开发规范需要联网github未标认证来源可访问clear审计提醒

shopware6-best-practices商店软件 6 个最佳实践

Agent Skill

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

总安装

5,214

周安装

213

GitHub Stars

8

下载量

1,687
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:shopware6-best-practices(商店软件 6 个最佳实践)
来源仓库:https://github.com/bartundmett/skills
仓库路径:skills/shopware6-best-practices
安装命令:
npx skills add https://github.com/bartundmett/skills --skill shopware6-best-practices
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/bartundmett/skills --skill shopware6-best-practices

简介

shopware6-best-practices 用于指导 Shopware 6 项目的开发与协作规范。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中统一代码风格、提交信息与分支管理。
  • 提供 Issue 分类、PR 模板和安全检查清单,提升团队效率。
  • 安装命令:npx skills add https://github.com/bartundmett/skills --skill shopware6-best-practices。
  • 应根据实际项目调整规则,避免生搬硬套标准模板。

SKILL.md

Shopware 6 Best Practices

Comprehensive best practices guide for Shopware 6.6+ development, designed for AI agents and LLMs helping agency developers. Contains 77 rules across 22 categories, prioritized by impact to guide automated refactoring and code generation.

When to Apply

Reference these guidelines when:

  • Developing custom Shopware 6 plugins
  • Creating or modifying Store API or Admin API endpoints
  • Working with the Data Abstraction Layer (DAL)
  • Implementing event subscribers and decorators
  • Configuring message queue handlers
  • Writing database migrations
  • Optimizing performance (caching, Elasticsearch)
  • Implementing security measures
  • Writing unit and integration tests
  • Customizing storefront templates and JavaScript
  • Building administration modules and components
  • Creating Shopware apps with webhooks and actions
  • Implementing payment or shipping integrations
  • Building CMS elements and blocks
  • Creating CLI commands for automation
  • Setting up multi-channel or B2B shops
  • Configuring development environments and CI/CD

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Plugin ArchitectureCRITICALplugin-
2Customization & ExtensionCRITICALcustom-
3Performance & CachingCRITICALperf-
4SecurityCRITICALsecurity-
5Data Abstraction LayerHIGHdal-
6API DevelopmentHIGHapi-
7TestingHIGHtest-
8Event SystemMEDIUM-HIGHevent-
9Database & MigrationsMEDIUM-HIGHdb-
10Message QueueMEDIUMqueue-
11Dependency InjectionMEDIUMdi-
12LoggingMEDIUMlogging-
13ConfigurationMEDIUMconfig-
14Scheduled TasksMEDIUMscheduled-
15Storefront DevelopmentHIGHstorefront-
16Administration DevelopmentHIGHadmin-
17App SystemHIGHapp-
18Integration PatternsHIGHintegration-
19CLI CommandsMEDIUMcli-
20Multi-Channel & B2BMEDIUM-HIGHmultichannel-
21DevOps & ToolingMEDIUMdevops-
22Common PatternsHIGHpattern-

Quick Reference

1. Plugin Architecture (CRITICAL)

  • plugin-structure - Follow proper plugin directory structure and composer.json
  • plugin-services - Register services correctly with proper tags

2. Customization & Extension (CRITICAL)

  • custom-decorator-pattern - Use decorator pattern for upgrade-safe service customization
  • custom-event-subscribers - Implement event subscribers correctly with proper priorities

3. Performance & Caching (CRITICAL)

  • perf-http-cache - Configure HTTP cache correctly with proper invalidation
  • perf-dal-optimization - Optimize DAL queries to prevent N+1 problems
  • perf-elasticsearch - Use Elasticsearch correctly for large catalogs

4. Security (CRITICAL)

  • security-input-validation - Validate all inputs with RequestDataBag and validators
  • security-authentication - Implement proper route authentication
  • security-authorization - Use ACL for permission checks
  • security-csrf-protection - Implement CSRF protection for storefront
  • security-sql-injection - Use DAL or parameterized queries

5. Data Abstraction Layer (HIGH)

  • dal-criteria-usage - Use Criteria objects correctly with filters and pagination
  • dal-associations - Load associations explicitly to avoid N+1 queries
  • dal-write-operations - Use batch operations and proper sync patterns
  • dal-entity-extensions - Extend entities without modifying core
  • dal-custom-entities - Create custom entity definitions properly

6. API Development (HIGH)

  • api-store-api-routes - Create decoratable Store API routes
  • api-admin-api-routes - Create Admin API endpoints with proper ACL
  • api-response-handling - Handle responses and errors consistently
  • api-rate-limiting - Configure rate limiting for protection
  • api-versioning - Version APIs for backwards compatibility

7. Testing (HIGH)

  • test-unit-tests - Write unit tests with proper mocking
  • test-integration-tests - Use IntegrationTestBehaviour correctly
  • test-store-api-tests - Test Store API routes with HTTP tests
  • test-fixtures - Create reusable test fixtures

8. Event System (MEDIUM-HIGH)

  • event-business-events - Create Flow Builder compatible events
  • event-flow-actions - Implement configurable flow actions

9. Database & Migrations (MEDIUM-HIGH)

  • db-migrations - Implement safe database migrations

10. Message Queue (MEDIUM)

  • queue-message-handlers - Implement async message handling
  • queue-worker-config - Configure workers for production
  • queue-low-priority - Separate low-priority background tasks

11. Dependency Injection (MEDIUM)

  • di-service-container - Use Symfony DI correctly

12. Logging (MEDIUM)

  • logging-best-practices - Implement structured logging

13. Configuration (MEDIUM)

  • config-plugin-settings - Implement plugin configuration correctly

14. Scheduled Tasks (MEDIUM)

  • scheduled-tasks - Implement reliable scheduled tasks

15. Storefront Development (HIGH)

  • storefront-controller-pattern - Extend StorefrontController with page loaders
  • storefront-twig-extension - Template inheritance with sw_extends and blocks
  • storefront-js-plugins - JavaScript plugin registration and lifecycle
  • storefront-themes - Theme structure, inheritance, and configuration
  • storefront-scss-variables - SCSS variables and responsive mixins
  • storefront-http-client - AJAX requests and Store API calls from JS

16. Administration Development (HIGH)

  • admin-module-structure - Module registration, routes, and navigation
  • admin-components - Vue component patterns and templates
  • admin-data-handling - Repository factory and Criteria API in admin
  • admin-acl-permissions - ACL-based UI visibility and actions
  • admin-mixins-composables - Mixins, directives, and extensibility
  • admin-extension-api - App iframe modules and Extension SDK

17. App System (HIGH)

  • app-manifest - Complete manifest.xml configuration
  • app-webhooks - Webhook handling and signature verification
  • app-custom-actions - Action buttons with notifications, modals, redirects
  • app-payment-methods - App payment handlers for pay/finalize/capture/refund
  • app-custom-fields - Custom field definitions via manifest
  • app-scripts - Twig-based app scripts and hook points

18. Integration Patterns (HIGH)

  • integration-payment-handler - Sync/async payment handler patterns
  • integration-shipping-method - Shipping calculators and delivery times
  • integration-cms-elements - CMS element creation with data resolvers
  • integration-import-export - Import/export profiles and converters
  • integration-external-api - HTTP client patterns with retry and caching

19. CLI Commands (MEDIUM)

  • cli-commands - Custom command creation with arguments and options
  • cli-command-lifecycle - Configure/initialize/interact/execute lifecycle
  • cli-progress-output - SymfonyStyle, progress bars, and formatting

20. Multi-Channel & B2B (MEDIUM-HIGH)

  • multichannel-saleschannel - Sales channel awareness and visibility
  • multichannel-b2b-patterns - Company handling, roles, and budgets
  • multichannel-pricing - Currency, customer groups, and tax handling
  • multichannel-context - Context types, scopes, and permissions

21. DevOps & Tooling (MEDIUM)

  • devops-development-setup - Dockware, docker-compose, Makefile patterns
  • devops-deployment - Deployment scripts, builds, and rollbacks
  • devops-static-analysis - PHPStan, PHP-CS-Fixer, Rector configuration
  • devops-debugging - Profiler, Xdebug, logging, and data collectors
  • devops-ci-cd - GitHub Actions and GitLab CI workflows

22. Common Patterns (HIGH)

  • pattern-error-handling - Custom exceptions and error pages
  • pattern-translations - Snippets and entity translations
  • pattern-media-handling - Media service, uploads, and thumbnails
  • pattern-rule-builder - Custom rule conditions for pricing/shipping
  • pattern-upgrade-migration - Version-aware code and update migrations

Core Principles

The Decorator Pattern is Key

Never modify core files. Always use:

  • Decorators for services
  • Event subscribers for hooks
  • Entity extensions for data

DAL Over Raw SQL

Use Shopware's Data Abstraction Layer instead of raw SQL:

  • Type safety and validation
  • Automatic association handling
  • Built-in versioning and translation

Performance First

Shopware can be slow if misused:

  • Enable HTTP cache in production
  • Use Elasticsearch for 10K+ products
  • Load only needed associations
  • Use message queue for heavy tasks

How to Use

Read individual rule files for detailed explanations and code examples:

rules/plugin-structure.md
rules/custom-decorator-pattern.md
rules/perf-http-cache.md
rules/security-input-validation.md
rules/dal-criteria-usage.md

Each rule file contains:

  • Brief explanation of why it matters
  • Incorrect code example with explanation
  • Correct code example with explanation
  • Additional context and references

Full Compiled Document

For the complete guide with all rules expanded: AGENTS.md

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

能力 5

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

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

平台分布

Claude Code

29.85%
按下载量换算504

OpenCode

24.09%
按下载量换算406

Gemini CLI

16.41%
按下载量换算277

Antigravity

13.51%
按下载量换算228

Cursor

7.37%
按下载量换算124

windsurf

3.65%
按下载量换算62

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

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

安装前确认

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

来源信息

继续浏览同类 Skills