Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计提醒

craft-site工艺品网站

Agent Skill

craft-site 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

242

周安装

10

GitHub Stars

38

下载量

79
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:craft-site(工艺品网站)
来源仓库:https://github.com/michtio/craftcms-claude-skills
仓库路径:skills/craft-site
安装命令:
npx skills add https://github.com/michtio/craftcms-claude-skills --skill craft-site
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/michtio/craftcms-claude-skills --skill craft-site

简介

craft-site 提供 Craft CMS 5 的前端 Twig 原子设计系统模板架构指导。

  • 适用于构建组件化、可复用且支持主题定制的站点模板结构。
  • 涵盖路由、布局、部分与构建器等前端工程化最佳实践。
  • 需配合 craft-twig-guidelines 使用,确保模板代码风格统一。
  • craft-site 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Craft CMS 5 — Front-End Twig (Atomic Design)

Atomic design system patterns for Craft CMS 5 site templates. Vanilla Twig — no module dependency. Works with any Craft 5 project.

This skill is scoped to front-end template architecture — component design, routing, composition, theming, and buildchain. For extending Craft (plugins, modules, PHP), see the craftcms skill.

Companion Skills — Always Load Together

When this skill triggers, also load:

  • craft-twig-guidelines — Twig coding standards: variable naming, null handling, whitespace control, include isolation, Craft helpers. Required for any Twig code.
  • craft-content-modeling — Sections, entry types, fields, Matrix, relations. Required when deciding what content to query or how templates access data.
  • ddev — All commands run through DDEV. Required for running Vite, npm, and Craft CLI commands.

Documentation

Use WebFetch on specific doc pages when a reference file doesn't cover enough detail.

Common Pitfalls (Cross-Cutting)

  • Missing only on {% include %} — ambient variables leak in silently.
  • Variant logic via conditionals ({% if variant == 'x' %}) instead of extends/block.
  • Naming atoms by parent context (hero-button) instead of visual treatment (button--primary).
  • utilities prop used as override — it's additive. Override via named-slot merge.
  • Queries inside views — views receive data, they don't fetch it.
  • Missing .eagerly() on relation fields in views — causes N+1 queries.
  • Missing devMode fallback in builders for unknown block types.
  • Hardcoded Tailwind colors (bg-yellow-600) instead of brand tokens (bg-brand-accent).
  • Mixing buttons and links — buttons are actions (resolve to <a>, <button>, or <span> from props), links are navigation (always <a>). Separate atom categories.
  • Tracking/analytics inside components — decouple to data attributes at view/page level.

Reference Files

Read the relevant reference file(s) for your task. Multiple files often apply together.

Task examples:

  • "Build a new card component" → read atomic-patterns.md + composition-patterns.md + component-inventory.md + tailwind-conventions.md
  • "Set up a new project's template structure" → read boilerplate-routing.md + component-inventory.md
  • "Add a content builder for a Matrix field" → read boilerplate-routing.md + composition-patterns.md
  • "Handle responsive images" → read image-presets.md + plugins/image-optimize.md
  • "Add multi-brand theming" → read tailwind-conventions.md
  • "Decide between Alpine and Vue for a feature" → read javascript-boundaries.md
  • "Compose Tailwind classes without conflicts" → read tailwind-conventions.md + twig-collections.md
  • "Understand atomic design methodology" → read atomic-design.md
  • "Set up Vite + Tailwind in a new Craft project" → read vite-buildchain.md
  • "Debug why assets aren't loading in production" → read vite-buildchain.md
  • "Install GTM/analytics/CMP in a Craft project" → read third-party-integration.md
  • "Configure SEOMatic for a section" → read plugins/seomatic.md
  • "Set up Blitz caching with Cloudflare" → read plugins/blitz.md
  • "Add a form to a page" → read plugins/formie.md
  • "Configure CKEditor with nested entries" → read plugins/ckeditor.md
  • "Build a navigation menu" → read plugins/navigation.md
  • "Add a link field to a component" → read plugins/hyper.md
  • "Set up redirects for a site" → read plugins/retour.md
  • "Add recurring/repeating dates to entries" → read plugins/timeloop.md
  • "Create a JSON API endpoint" → read plugins/element-api.md
  • "Debug N+1 queries in templates" → read plugins/elements-panel.md
  • "Run a security audit" → read plugins/sherlock.md
  • "Embed a YouTube/Vimeo video as an asset" → read plugins/embedded-assets.md
  • "Configure email delivery via SES" → read plugins/amazon-ses.md + third-party-integration.md
  • "Build a language switcher" → read multi-site-patterns.md
  • "Set up hreflang tags" → read multi-site-patterns.md
  • "Plan a multi-language site architecture" → read multi-site-patterns.md
  • "Add live search without JavaScript" → read plugins/sprig.md
  • "Build reactive filtering or load-more" → read plugins/sprig.md
  • "Import data from an external feed" → read plugins/feed-me.md
  • "Set up responsive images with Imager-X" → read plugins/imager-x.md
ReferenceScope
references/atomic-design.mdMethodology: Brad Frost's atomic design principles, 5-to-3 tier compression, composability, context-agnostic naming, classification problem, decompose-downward workflow. Technology-independent.
references/atomic-patterns.mdIndividual component construction: props/extends/block pattern, variant file mechanics, button/link/text/icon atom implementations
references/composition-patterns.mdComponent composition: molecule pattern, organism pattern, structural embed pattern, include/extends/embed decision table, calling conventions, creating new components
references/component-inventory.mdClassification methodology: decision tree, naming conventions, file naming, props design, scaffold guidelines, tier promotion, audit checklist
references/boilerplate-routing.mdTemplate chain: layout hierarchy, Craft section template paths, global variables, routers, views, content builders, directory structure
references/tailwind-conventions.mdClass composition: named-key collections, standard key names, utilities prop, variant-based dark mode, spacing preference. Assumes Tailwind CSS — adapt patterns to your CSS framework.
references/vite-buildchain.mdCraft CMS Vite setup: nystudio107 plugin bridge, config/vite.php, vite.config.ts, craft.vite.script(), conditional per-page loading, Tailwind v4 integration, DDEV configuration
references/image-presets.mdImage handling: single atom with presets, srcset/sizes, ImageOptimize vs Craft Cloud, hosting strategies
references/javascript-boundaries.mdJS decision tree: Twig → Alpine/DataStar → Vue, mount points, data handoff, coexistence rules
references/twig-collections.mdcollect() method reference: creating, accessing, transforming, filtering, sorting, slicing, arrow functions
references/third-party-integration.mdScript loading order, CMP (UserCentrics/CookieBot), GTM/sGTM data layer, analytics (Fathom/Plausible), AWS SES transport, n8n webhooks, Blitz compatibility, full head template example
references/multi-site-patterns.mdLanguage switchers, hreflang tags, site architectures (subfolder/domain/subdomain/multi-brand), cross-site queries, static translations, site-specific templates, multi-site forms, site detection

Plugin References

Detailed configuration, Twig API, and pitfalls for Craft plugins. Located in references/plugins/.

ReferencePluginKey Surface
references/plugins/seomatic.mdSEOMatic (nystudio107)Meta cascade, Twig get/set API, JSON-LD, custom element SEO bundles, sitemaps, GraphQL
references/plugins/blitz.mdBlitz (putyourlightson)Refresh modes, Twig dynamic content, driver architecture (storage/purger/deployer), Nginx rewrite, Cloudflare integration
references/plugins/formie.mdFormie (verbb)Form rendering (one-line/granular), theme config for Tailwind, submission querying, hooks, integrations
references/plugins/image-optimize.mdImageOptimize (nystudio107)OptimizedImages field, imgTag()/pictureTag() builders, loading strategies, transform methods, console commands
references/plugins/ckeditor.mdCKEditor (craftcms)Toolbar config, nested entries with chunk rendering, HTML Purifier, custom styles, Redactor migration
references/plugins/sprig.mdSprig (putyourlightson)Reactive Twig components (htmx), live search, load more, pagination, filtering, form submissions without JS
references/plugins/colour-swatches.mdColour Swatches (craftpulse)Palette config, multi-colour swatches, Tailwind class mapping, Twig model API
references/plugins/password-policy.mdPassword Policy (craftpulse)Validation rules, HIBP check, retention/expiry, console commands, recommended settings
references/plugins/hyper.mdHyper (verbb)Link types, getLinkAttributes(), getText(), single/multi-link, element access, button atom integration
references/plugins/retour.mdRetour (nystudio107)Redirect types (exact/regex), 404 tracking, CSV import, auto slug-change redirects, config
references/plugins/navigation.mdNavigation (verbb)Node querying, custom rendering, active states, custom fields on nodes, GraphQL
references/plugins/typogrify.mdTypogrify (nystudio107)`\typogrify, \widont, \truncateOnWord`, smart quotes, widow prevention
references/plugins/cache-igniter.mdCache Igniter (putyourlightson)GlobalPing warmer, geographic locations, refresh delay, Blitz companion
references/plugins/knock-knock.mdKnock Knock (verbb)Staging password protection, environment-aware config, URL exclusions
references/plugins/timeloop.mdTimeloop (craftpulse)Repeating date field, craft.timeloop variable API, recurringDates() function, GraphQL, period frequencies
references/plugins/element-api.mdElement API (craftcms)JSON API via config file, Fractal transformers, endpoint routing, pagination, caching
references/plugins/elements-panel.mdElements Panel (putyourlightson)Debug toolbar panels for element population counts, duplicate detection, eager-loading opportunities
references/plugins/sherlock.mdSherlock (putyourlightson)Security scanning, HTTP headers, CMS config checks, scheduled scans, IP restriction, monitoring
references/plugins/embedded-assets.mdEmbedded Assets (spicyweb)oEmbed as first-class assets, craft.embeddedAssets.get(), iframe customization, GraphQL
references/plugins/amazon-ses.mdAmazon SES (putyourlightson)SES mail transport adapter, AWS credential config, SNS bounce tracking
references/plugins/feed-me.mdFeed Me (craftcms)Data import from XML/JSON/CSV, field mapping, duplicate handling, CLI automation
references/plugins/imager-x.mdImager-X (spacecrafttechnologies)Advanced image transforms, batch generation, named presets, effects, optimizers, external storage

Component System Conventions

One canonical component system across all projects. Atoms are context-agnostic — always named by visual treatment, never by parent. HTML element type is resolved from props (url<a>, type<button>, fallback → <span>).

External link detection is derived from the URL, never passed as a prop. Components auto-apply target="_blank", rel="noopener noreferrer", external icon, and sr-only text when a URL is external.

FontAwesome is the universal icon system. Icons are passed as FA class strings.

Visual variants use extends/block — base template defines structure, variant overrides classes. Never use conditional logic to switch between variant styles. For structural skeletons with content slots, use {% embed %} — see composition-patterns.md.

Image handling uses a single atom with config-driven presets, not separate variant files per context.

CSS & Theming Conventions

This skill assumes Tailwind CSS for class composition examples. Adapt patterns to your CSS framework — the architectural principles (named keys, additive utilities, semantic tokens) are framework-agnostic.

Class collections use named keys per style concern — this is the primary mechanism for preventing conflicts. The utilities prop is additive (extending), not overriding. Override specific concerns via named-slot merge.

Multi-brand theming uses CSS custom properties activated by data-brand="{{currentSite.handle}}" on <html>. Components reference semantic Tailwind classes (bg-brand-accent) resolved via CSS variables. Template-level brand overrides only exist when the HTML structure itself differs between brands — not for color/font/spacing differences.

Token naming follows three layers: primitives (--brand-{color}-{shade}), semantics (--brand-{purpose}), and framework mapping (--color-brand-{purpose}).

Tailwind v4 cascade layers don't fix class conflicts within the same utilities layer. Named-key collections remain necessary.

Routing Conventions

PHP handles data, Twig handles presentation. Views receive data through includes — they never query it themselves.

collect() is used for both props and class building. The full Collection API is available in Twig via Craft.

The JS boundary follows a decision tree: Twig is the default → Alpine/DataStar for UI state → Vue for application state.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

37.87%
按下载量换算30

Claude

28.13%
按下载量换算22

Cursor

21.01%
按下载量换算17

Gemini CLI

10.61%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills