一键导入
drupal-conventions
Load Drupal-specific conventions (translations, CSS, error handling) on demand. Use when working on theming, translations, or exception handling.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Load Drupal-specific conventions (translations, CSS, error handling) on demand. Use when working on theming, translations, or exception handling.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Analyze autopilot effectiveness and tune the drupal-workflow plugin based on real session data. Use when the autopilot feels too noisy, too quiet, or is being ignored. Also use when you want to check if recent changes to the plugin are actually working, review intervention acceptance rates, or improve classifier accuracy. Trigger on: "tune autopilot", "autopilot stats", "self-improve", "is the autopilot working", "too many warnings", "interventions being ignored", "plugin health", or after any conversation about autopilot effectiveness.
Core Drupal development rules covering code quality, security, services, and testing verification. ALWAYS consult when writing Drupal code.
Docs-first discovery for efficient codebase exploration. Use before Glob/Grep/Explore to get Logic IDs and file paths directly from semantic documentation. Saves tokens by avoiding expensive file searches. Commands include `/discover FEATURE` for feature lookup, `/discover "search terms"` for keyword search, and `/discover --prime` to load the business index.
Explore requirements, constraints, and design options before implementing Drupal features. Use BEFORE writing code — when starting a new feature, module, or significant change. Produces a decision record with entity design, service architecture, and hook/event strategy.
Cache bins, tags, contexts, invalidation strategies, and external caching for Drupal 10/11. Use when implementing caching, optimizing performance, or configuring cache backends.
PHPCS, PHPStan, naming conventions, and code style enforcement for Drupal 10/11. Use when checking coding standards, running static analysis, or enforcing code quality.
| name | drupal-conventions |
| description | Load Drupal-specific conventions (translations, CSS, error handling) on demand. Use when working on theming, translations, or exception handling. |
| metadata | {"status":"stable","drupal-version":"10+","last-reviewed":"2026-04"} |
Load these conventions only when relevant to the current task.
t() or TranslatableMarkup./translations/*.po files with msgctxt.|t filter for strings, {% trans %} blocks for placeholders.msgctxt "my_module" / msgid "English" / msgstr "Translated"..parent .child), not parent containers.block__element--modifier strictly for custom classes.{{ attach_library('my_theme/component') }} for all assets.*.libraries.yml entry.NULL/FALSE returns.\Exception — catch the narrowest exception you can handle.// Good: specific exception, early return.
if (!$entity) {
throw new EntityNotFoundException("Entity $id not found.");
}
// Bad: silently swallowing errors.
try {
$result = $service->process();
} catch (\Exception $e) {
// Never do this.
}