Token导航 LogoToken导航

Agent Skill · 研究检索

statamic-with-eloquent(静态与雄辩)

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

statamic-with-eloquent 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 62,606。

总安装 329周安装 14GitHub Stars 公开资料未说明下载 115核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/jordidolphiq/statamic-with-eloquent-skill --skill statamic-with-eloquent

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

statamic-with-eloquent 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。适用于需要根据关键词或任务场景进行信息检索的场景,如静态站点生成、Laravel 集成。

通过 npx skills add 命令从 GitHub 仓库安装,需结合原始 README 确认具体用法。安装前建议确认权限范围和维护状态,注意是否会触发联网或文件读写操作。建议核验来源仓库内容,确保功能与预期一致后再投入实际使用。

来源仓库内路径:skills/statamic-with-eloquent

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/jordidolphiq/statamic-with-eloquent-skill --sk…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

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

常见问题

6 条

statamic-with-eloquent 怎么安装?

在终端执行 npx skills add https://github.com/jordidolphiq/statamic-with-eloquent-skill --skill statam…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

statamic-with-eloquent 支持哪些 AI 工具?

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

statamic-with-eloquent 需要什么权限?

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

statamic-with-eloquent 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

statamic-with-eloquent 用的人多吗?

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

statamic-with-eloquent 安全吗?

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

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

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

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
statamic-with-eloquent

静态与雄辩 · 本页

329—需要联网未明确通过

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

SKILL.md 原文

Statamic CMS Development

When to Apply

Activate this skill when:

  • Creating or editing Statamic collections, blueprints, fieldsets, or globals
  • Working with Statamic entries, taxonomies, or navigations
  • Building page templates or content block partials
  • Creating or modifying View Composers for Statamic views
  • Working with Bard, Replicator, or other Statamic fieldtypes
  • Querying content via Statamic facades
  • Running php please commands

Documentation

Use search-docs with packages: ["statamic/cms"] for version-specific Statamic documentation.

Blade-Only Templating

This project uses Blade exclusively — no Antlers. All templates are .blade.php files. Statamic variables are accessed as regular PHP variables in Blade.

{{-- Correct: Blade syntax --}}
<h1>{{ $title }}</h1>

{{-- WRONG: Antlers syntax — never use this --}}
{{ title }}

Eloquent Driver

This project uses the Statamic Eloquent Driver with a hybrid storage strategy. Check config/statamic/eloquent-driver.php to see which resources use eloquent (database) vs file (disk).

  • Entries, terms, globals variables, nav trees, revisions → stored in database
  • Blueprints, fieldsets, collections, forms → stored as YAML files on disk
  • All Eloquent tables use a configurable prefix (see STATAMIC_ELOQUENT_PREFIX env var)

Always query content via Statamic facades — they abstract the storage driver.

Querying Content

Use Statamic facades, never raw DB queries:

use Statamic\Facades\Entry;
use Statamic\Facades\GlobalSet;
use Statamic\Facades\Collection;
use Statamic\Facades\Term;

// Query entries from a collection
$entries = Entry::query()
    ->where('collection', 'pages')
    ->where('status', 'published')
    ->get();

// Find a single entry
$entry = Entry::find($id);

// Get a global set's values
$globalData = GlobalSet::findByHandle('footer')?->inCurrentSite()?->values();

// Collection tree (hierarchical content)
$tree = Collection::findByHandle('knowledge_base')?->structure()?->in('default');
$page = $tree->find($entryId);
$parent = $page?->parent();

Field Access in Blade Templates (Critical)

Statamic injects entry fields into Blade templates. This is the primary way data reaches templates and how you should access it. There are two patterns:

1. Top-Level Variables (Most Common)

Statamic cascades all entry fields as individual Blade variables. Blueprint field handles become variable names directly:

{{-- Blueprint fields are available as top-level $variables --}}
{{ $title }}
{{ $hero_title ?? '' }}
{{ $hero_subtitle ?? '' }}

{{-- Always null-coalesce optional fields --}}
@if ($hero_intro ?? false)
    {!! $hero_intro !!}
@endif

{{-- Replicator/Bard fields are iterable --}}
@foreach ($page_content as $set)
    @include('partials.sets.' . $set->type, [...$set])
@endforeach

{{-- Pre-unwrapped blocks (from View Composers) --}}
@foreach ($blocks ?? [] as $block)
    @include("partials.sets.{$block['type']}", $block)
@endforeach

2. Via the $page Entry Object

The current entry is also available as $page. Use this for accessing the entry directly:

{{-- Dynamic property access on the entry --}}
<h1>{{ $page->title }}</h1>
<h2>{{ $page->subtitle }}</h2>

{{-- Conditionals on entry fields --}}
@if ($page->hero_title && $page->show_hero)
    @include('partials.hero')
@endif

{{-- URL and metadata --}}
<a href="{{ $page->url() }}">{{ $page->title }}</a>

Which to Use

  • Top-level $variables — Use for fields that may need null-coalescing or when passing to components. This is what Statamic injects by default.
  • $page->field — Use when you need to access the entry object directly, check multiple fields, or when the field name might conflict with a Blade variable.
  • $entry->get('field') — Use in PHP code (View Composers, helpers) to avoid PHPStan ignores.

Important: Fields Are Value Objects

All field variables in templates are Statamic\Fields\Value objects, not raw PHP values. Blade's {{}} syntax calls __toString() automatically for simple fields, but for complex fields (arrays, relationships) you must handle them explicitly:

{{-- Simple fields: Value auto-casts to string in {{ }} --}}
{{ $title }}

{{-- Complex fields: use unwrap() or check type --}}
@php $items = unwrap($usps ?? []) @endphp
@foreach ($items as $item)
    <li>{{ $item['text'] }}</li>
@endforeach

Value Object Handling in PHP

In PHP code (View Composers, helpers), Statamic wraps field data in Statamic\Fields\Value and Statamic\Fields\Values objects. These must be unwrapped explicitly.

Checking and Unwrapping Values

use Statamic\Fields\Value;

// Check if a field is a Value with actual content
if ($field instanceof Value && $field->value()) {
    $raw = $field->value();  // Get the underlying data
}

// For relationship fields (entries fieldtype)
if ($entries instanceof Value && $entries->value()) {
    foreach ($entries as $entry) {
        // Each $entry is a Statamic Entry object
    }
}

Field Access in PHP Code

// Preferred in PHP — no PHPStan ignores needed
$value = $entry->get('field_name');

// Dynamic property access — works but needs @phpstan-ignore
$title = $entry->title;  // @phpstan-ignore property.notFound

Blueprints

Blueprints are YAML files in resources/blueprints/. They define the field structure for collections, globals, navigations, and asset containers.

Common Fieldtypes

FieldtypeDescription
textSingle-line text
textareaMulti-line text
bardRich text editor with sets
replicatorRepeatable content blocks
entriesRelationship to other entries
assetsFile/image upload
toggleBoolean
selectDropdown
colorColor picker
linkURL or entry reference
iconIcon picker
taxonomyTaxonomy term relationship
gridTable-like repeating rows

Blueprint Conventions

  • Use import for shared fieldsets (e.g., hero, seo)
  • Group fields into tabs: main, seo, sidebar
  • Use required: true on essential fields
  • Handles use snake_case
tabs:
  main:
    sections:
      - fields:
          - handle: title
            field:
              type: text
              required: true
          - import: page_blocks
  seo:
    sections:
      - import: seo

Content Blocks (Replicator Pattern)

Content blocks are Replicator sets rendered as Blade partials. Each block type has a corresponding partial:

@foreach ($page_content as $set)
    @include('partials.sets.' . $set->type, [...$set])
@endforeach

When creating a new block:

  1. Add the set definition to the Replicator field in the blueprint
  2. Create the Blade partial (e.g., block_<name>.blade.php)

View Composers

Use View Composers to enrich Statamic template data with additional queries or transformations:

use Illuminate\Contracts\View\View;
use Illuminate\View\Composer as ViewComposer;

class PageComposer implements ViewComposer
{
    public function compose(View $view): void
    {
        $data = $view->getData();

        // Transform or add data
        $view->with('extraData', $this->fetchRelated($data));
    }
}

Register in a ServiceProvider:

View::composer('pages.show', PageComposer::class);

Asset Handling

Statamic asset fields can return different types. Always handle defensively:

// Asset field might be a Value, an Asset object, an array, or a string path
$asset = $entry->get('logo');

// Safe resolution patterns:
if ($asset instanceof Value) {
    $asset = $asset->value();
}

// If it's an array of assets, take the first
if (is_array($asset) && isset($asset[0])) {
    $asset = $asset[0];
}

// Get the URL
$url = $asset?->url();

Navigation

Navigations are hierarchical structures for building site menus. They support entry references, hardcoded URLs, and text-only nodes — all managed via drag-and-drop in the CP.

Storage

  • Nav definitions → content/navigation/<handle>.yaml (file driver)
  • Tree data → stored via Eloquent (navigation_trees driver)
  • Blueprints → resources/blueprints/navigation/<handle>.yaml (file driver)

Rendering Navs in Blade (Preferred)

Always prefer the <statamic:nav:handle> Blade tag. It handles entry resolution, URL generation, and variable scoping automatically — no manual Nav::find() or resolveNavEntry() needed for standard menus.

<ul>
    <statamic:nav:footer_main>
        <li>
            <a href="{{ $url }}" @if ($is_current || $is_parent) class="active" @endif>
                {{ $title }}
            </a>
        </li>
    </statamic:nav:footer_main>
</ul>
Available Variables Inside the Tag
VariableTypeDescription
$urlstringResolved URL (entry URL or hardcoded)
$titlestringItem title (nav override or entry title)
$is_currentboolWhether this is the exact current page
$is_parentboolWhether this is a parent of the current page
$is_entryboolWhether the item references an entry
$is_externalboolWhether the URL is external
$childrenarrayChild nav items
$depthintCurrent nesting level
Custom fieldsmixedAny fields from the nav blueprint
Nested Children with @recursive_children

For multi-level navs, use @recursive_children to repeat the tag contents for child items:

<ul>
    <statamic:nav:main_navigation>
        <li>
            <a href="{{ $url }}">{{ $title }}</a>
            @if (count($children))
                <ul>
                    @recursive_children
                </ul>
            @endif
        </li>
    </statamic:nav:main_navigation>
</ul>
Tag Parameters

Control output with parameters on the tag:

<statamic:nav:main_navigation
    max_depth="2"
    include_home="true"
    select="title|url"
>
    ...
</statamic:nav:main_navigation>
  • max_depth — Limit nesting depth (performance optimization)
  • include_home — Include the home page in the tree
  • show_unpublished — Include unpublished entries
  • select — Limit fields retrieved (pipe-separated, improves performance)

When to Use Nav::find() Instead

The <statamic:nav> tag covers most cases. Only fall back to the PHP facade when you need to pre-process nav data before rendering — e.g., serializing to JSON for Alpine.js, pre-rendering icons server-side, or building complex dropdown structures:

use Statamic\Facades\Nav;

$tree = Nav::find('main_navigation')?->in('default')?->tree() ?? [];

Each item in the tree is an array with keys: title, url, entry (UUID if linked), children, plus any custom blueprint fields. When using this approach, resolve items with the project's resolveNavEntry() helper:

$resolved = resolveNavEntry($item);
// Returns: ['url' => '/some-page', 'title' => 'Page Title']

The helper checks entry, reference, data.reference, and data.entry for an entry UUID, resolves it via Entry::find(), and falls back to the item's url field.

Note: Custom blueprint fields may appear at the top level or under data.*. Defensively check both:

$icon = $item['icon'] ?? ($item['data']['icon'] ?? null);

Nav Config Options

In the nav definition YAML (content/navigation/<handle>.yaml):

title: 'Main Navigation'
collections:          # Which collections appear in the CP entry selector
  - pages
  - integrations
max_depth: 2          # Maximum nesting depth

Best Practices

  • Use <statamic:nav> by default — It resolves entries, builds URLs, and provides $is_current/$is_parent automatically. Only use Nav::find() when you need PHP pre-processing.
  • Restrict collections — Configure collections in the nav YAML to limit which entries editors can link to.
  • Set max_depth — Match the frontend's rendering capability (e.g., 2 for a mega nav with one level of children).
  • Filter empty items — After manual resolution, filter out items where title is empty (entry may have been deleted).
  • Pre-process for Alpine/JS — When passing nav data to JavaScript, resolve entries and render server-side components (like icons) in PHP before encoding to JSON.

Routing

Statamic handles routing via collection URLs defined in each collection's YAML config. Custom middleware can control which requests Statamic handles.

Key config: config/statamic/routes.php

Artisan / Please Commands

Use php please for Statamic-specific operations:

php please make:collection      # Create a new collection
php please make:fieldset        # Create a reusable fieldset
php please make:nav             # Create a navigation
php please make:widget          # Create a CP dashboard widget
php please stache:refresh       # Rebuild the content cache
php please static:clear         # Clear static cache
php please support:details      # Debug Statamic setup info

PHPStan Considerations

Statamic's dynamic properties trigger PHPStan errors. Common patterns:

$entry->title           // @phpstan-ignore property.notFound
$entry->url()           // @phpstan-ignore method.notFound

Prefer $entry->get('field_name') in PHP code to avoid ignores. Dynamic property access is fine in Blade templates where PHPStan doesn't analyze.

Common Pitfalls

  1. Forgetting to unwrap Values — Statamic field data is wrapped in Value objects. Always unwrap before using in conditions or passing to components.
  2. Asset fields returning arrays — An assets field may return an array even for max_files: 1. Handle both single and array returns.
  3. Link fields with entry:: prefix — Link fieldtype stores entry references as entry::<uuid>. Resolve via Entry::find().
  4. Global sets need site context — Always chain ->inCurrentSite() when reading global set values for multi-site support.
  5. Tree/structure queries — Use Collection::findByHandle()->structure()->in('default') for hierarchical collections, not flat Entry::query().
  6. Bard content is augmented — Bard fields return augmented HTML when accessed as Values. Use ->value() for raw ProseMirror JSON.
  7. Component name conflicts — When using Flux UI alongside Statamic Blade components, watch for name collisions (e.g., header, footer). Register explicit Blade aliases if needed.

平台分布

Codex

35.45%
按下载量换算41

Claude

28.4%
按下载量换算33

Cursor

18.69%
按下载量换算21

Gemini CLI

8.79%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills