stamic-skill
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesestamic-skill (Statamic 6 Dev)
stamic-skill(Statamic 6 开发)
Provide Statamic 6 documentation-backed guidance and implementation help, optimized for developer workflows.
提供基于Statamic 6官方文档的开发指导与实现帮助,为开发者工作流优化。
Workflow (recommended)
推荐工作流
-
Clarify target + context
- Confirm: Statamic 6 (and Laravel version), project type (fresh vs existing), and whether the request is Statamic-specific (content model, Antlers, blueprints, structures) vs Laravel-specific (DB, Eloquent, queues, debugging).
-
Prefer canonical docs, but keep it searchable
- Ensure the local docs mirror exists before searching:
bash
./scripts/update_statamic_docs.sh - If you need parallel searches, do this:
- Bootstrap once with .
./scripts/update_statamic_docs.sh --docs-dir <shared-path> - Run parallel calls with the same
search_statamic_docs.shand--docs-dir <shared-path>.--no-bootstrap
- Bootstrap once with
- Use statamic.dev for canonical explanations.
- Use GitHub mirror (statamic/docs) for fast full-text search, diffs, and linking to exact Markdown.
- If information conflicts, treat statamic.dev as source of truth and mention the discrepancy.
- Ensure the local docs mirror exists before searching:
-
Search → quote → answer
- Search for the relevant page/section.
- Answer with short, actionable steps.
- Include links (statamic.dev and/or specific docs file paths) so the team can verify.
-
Separate Statamic vs Laravel concerns
- Use this skill for Statamic concepts and conventions (blueprints/fieldsets, entries, taxonomies, Antlers, tags/modifiers, Stache/cache, sites).
- For Laravel framework mechanics (Artisan, Eloquent, queues, debugging, environment), rely on official Laravel documentation and project conventions.
-
明确目标与上下文
- 确认:使用的是Statamic 6(及对应的Laravel版本)、项目类型(全新项目 vs 现有项目),以及需求是Statamic专属(内容模型、Antlers、blueprints、结构)还是Laravel专属(数据库、Eloquent、队列、调试)。
-
优先使用官方文档,同时确保可搜索性
- 搜索前先确认本地文档镜像是否存在:
bash
./scripts/update_statamic_docs.sh - 如需并行搜索,请执行以下操作:
- 执行一次初始化命令:。
./scripts/update_statamic_docs.sh --docs-dir <shared-path> - 使用相同的参数和
--docs-dir <shared-path>参数,并行调用--no-bootstrap。search_statamic_docs.sh
- 执行一次初始化命令:
- 使用statamic.dev获取官方权威解释。
- 使用GitHub镜像(statamic/docs)进行快速全文搜索、对比差异,并链接到具体的Markdown文件。
- 若信息存在冲突,以statamic.dev为权威来源,并提及差异之处。
- 搜索前先确认本地文档镜像是否存在:
-
搜索 → 引用 → 解答
- 搜索相关页面/章节。
- 以简短、可执行的步骤进行解答。
- 附上链接(statamic.dev及/或具体文档文件路径),以便团队验证。
-
区分Statamic与Laravel的关注点
- 本技能适用于Statamic相关概念与规范(blueprints/字段集、条目、分类法、Antlers、标签/修饰符、Stache/缓存、站点)。
- 对于Laravel框架机制(Artisan、Eloquent、队列、调试、环境配置),请参考Laravel官方文档及项目规范。
What to do for common requests
常见需求的处理方式
“Find the latest docs for X”
“查找X的最新文档”
- Search the GitHub mirror first (fast), then open the canonical statamic.dev page.
- Provide: the best page link, the key excerpt/summary, and 1–3 do/don’t bullets.
- 优先搜索GitHub镜像(速度更快),再查看statamic.dev的官方页面。
- 提供:最优页面链接、关键摘录/摘要,以及1-3条注意事项(应做/不应做)。
“How do we implement X in Statamic 6?”
“如何在Statamic 6中实现X?”
- Return a minimal implementation plan + code/config snippets.
- Call out:
- where files live (blueprints, templates, addons)
- expected conventions/naming
- caches to clear (when relevant)
- 返回最简实现方案 + 代码/配置片段。
- 重点说明:
- 文件存放位置(blueprints、模板、插件)
- 预期的规范/命名规则
- 需要清除的缓存(如有相关需求)
“Is this best practice / is this supported in v6?”
“这是最佳实践吗?/v6版本支持这个功能吗?”
- Confirm version explicitly.
- Prefer citing a doc section or a clear upstream source.
- 明确确认版本。
- 优先引用文档章节或明确的上游来源。
Bundled resources
内置资源
references/
references/
- : canonical sources and how to treat them.
references/sources.md - : domain taxonomy + response checklist for consistent Statamic 6 answers.
references/response-guidelines.md
- :权威来源列表及使用说明。
references/sources.md - :领域分类法 + 响应检查清单,确保Statamic 6相关解答的一致性。
references/response-guidelines.md
scripts/
scripts/
Use these scripts when you need deterministic, repeatable doc lookup.
- Update/bootstrap local docs mirror (runtime-safe):
bash
./scripts/update_statamic_docs.shFrom this repository root, maintainers may also use:
bash
./dev-scripts/update_statamic_docs.sh- Search locally:
bash
./scripts/search_statamic_docs.sh "your query"If the mirror is missing, this command auto-runs unless is provided.
Use (or with ) for non-interactive fuzzy ranking. If is unavailable, search continues with plain output.
./scripts/update_statamic_docs.sh--no-bootstrap--rank-mode fzf--rank-mode hybrid--topfzfrg/grepParallel-safe pattern:
bash
./scripts/update_statamic_docs.sh --docs-dir /tmp/statamic-docs-shared
./scripts/search_statamic_docs.sh --docs-dir /tmp/statamic-docs-shared --no-bootstrap --top 20 "antlers"If the query is broad, narrow it with ripgrep flags:
bash
./scripts/search_statamic_docs.sh --top 20 "antlers"
./scripts/search_statamic_docs.sh --rank-mode hybrid --top 20 "assets container"当你需要确定性、可重复的文档查询时,使用以下脚本。
- 更新/初始化本地文档镜像(运行时安全):
bash
./scripts/update_statamic_docs.sh从仓库根目录,维护者也可以使用:
bash
./dev-scripts/update_statamic_docs.sh- 本地搜索:
bash
./scripts/search_statamic_docs.sh "your query"如果本地镜像不存在,该命令会自动运行,除非指定参数。
使用(或搭配的)进行非交互式模糊排序。如果没有安装,将使用普通的输出结果。
./scripts/update_statamic_docs.sh--no-bootstrap--rank-mode fzf--top--rank-mode hybridfzfrg/grep并行安全模式:
bash
./scripts/update_statamic_docs.sh --docs-dir /tmp/statamic-docs-shared
./scripts/search_statamic_docs.sh --docs-dir /tmp/statamic-docs-shared --no-bootstrap --top 20 "antlers"如果查询范围过宽,可使用ripgrep参数缩小范围:
bash
./scripts/search_statamic_docs.sh --top 20 "antlers"
./scripts/search_statamic_docs.sh --rank-mode hybrid --top 20 "assets container"