Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问许可证需确认审计提醒

frontic-implementation前沿实施

Agent Skill

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

总安装

1,285

周安装

53

GitHub Stars

公开资料未说明

下载量

420
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/frontic/skills --skill frontic-implementation

简介

用于查找、检索和筛选相关信息,支持关键词或任务场景快速定位结果。

  • 适合在需要根据来源线索快速获取候选信息时使用。frontic-implementation 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 可通过来源仓库和原始 README 进一步核验具体用法。
  • 安装前建议确认权限范围和维护状态,注意是否会触发联网或文件读写。
  • 建议结合具体任务场景验证其检索准确性和覆盖范围。

SKILL.md

Frontic Implementation and Configuration

Use this skill when autonomously creating or managing blocks, listings, and pages based on user requests. Prefer Frontic data sources over mocked data at all times.

Before You Start

Use the fetch_api_call tool to inspect the data structure of any block, listing, or page before using it. This prevents displaying non-existent content or illegible IDs to users.


1. Resource Decision Making

Before creating new blocks or listings, analyze the current Frontic configuration:

  • Existing blocks that could be reused or extended
  • Existing listings that match the user's requirements — verify parameter compatibility and data structure
  • Available storages containing relevant data

Reuse vs Extend vs Create

ScenarioAction
Exact match (same user journey, same parameters)Reuse
Close but not perfect fitExtend (if appropriate) or create new
Different parameters or intentCreate new

Rules (Non-Negotiable)

  • Never force-fit: Do NOT use a block or listing for a use case it wasn't designed for, even as a workaround.
  • Parameter compatibility is absolute: If a listing requires parameters (e.g. categoryId) and the user's use case doesn't provide them (e.g. global search), create a new listing — never use dummy/placeholder values.
  • User intent is primary: Match the user's stated intent and user journey exactly.
  • Document your reasoning: Briefly explain why you reused, extended, or created a resource.
⚠️ Warning: If you find yourself using dummy/default parameters to make an existing resource work for a different use case, STOP. Create a new resource instead.

2. Creating Blocks and Listings

Block Creation

  • Analyze data structure: Identify the single record/entity the block represents
  • Define comprehensive schema: Include all relevant e-commerce fields
  • Plan for variations: Account for product types, categories, etc.

Common blocks: ProductDetail, CategoryDetail, UserProfile, OrderDetail, ReviewDetail, BrandDetail

Listing Creation

  • Identify collection type: Products, categories, blog posts, etc.
  • Identify embedded block: The listing must reference a block already created in the project
  • Configure filtering: Price, category, brand, ratings, availability
  • Plan sorting: Price, popularity, newest, ratings
  • Enable search: Where relevant (description, title)
  • Make parameters optional for global use: For listings that serve both global search and scoped contexts, configure parameters as optional with default values:
{
  "name": "categoryId",
  "dataType": "string",
  "required": false,
  "defaultValue": "root-id"
}

This allows listing("GlobalSearch", {}) for global search and listing("GlobalSearch", {categoryId: "xyz"}) for scoped queries.

Common listings: ProductListing, CategoryListing, OrderListing, ReviewListing, SearchResults

Regenerate the Client

After creating or updating a block or listing, always regenerate the Frontic Client:

npx @frontic/cli@latest generate

3. Frontic Client Usage

Import the client (resolve .frontic/ path relative to the application root):

import client from '../../.frontic/generated-client'

Blocks (single items by key)

Single items are always identified by a key. Don't make up placeholder keys like 'root-category', always use actual keys from the storage associated with the block.

const data = await client.block(
  'CategoryDetail',
  'a3f4b5c6-d7e8-49ab-9c2d-3e4f5e6d7c8b'
)
const data = await client.block(
  'ProductDetail',
  '123e4567-e89b-12d3-a456-426614174000'
)

Listings (collections with filtering, sorting, pagination)

Refer to .frontic/query-types.ts and .frontic/fetch-api.d.ts for filters and sort options.

const products = await client.listing('ProductList', {
  categoryId: 'e72b0f5e-1c3d-4a7e-913a-2e4c95cd8f31'
})

const results = await client.listing(
  'ProductList',
  { categoryId: '...' },
  {
    query: {
      filter: [
        {
          type: 'and',
          filter: [
            { type: 'equals', field: 'attributes.size', value: '10' },
            { type: 'range', field: 'price.amount', from: 10 }
          ]
        },
        { type: 'range', field: 'price.amount', from: 2000, to: 10000 },
        { type: 'equals', field: 'sale', value: true }
      ],
      sort: { field: 'price.amount', order: 'asc' },
      search: 'Red',
      page: 1,
      limit: 20
    }
  }
)

Pages (retrieve by route)

// The route path is the full path including the domain without the protocol
const pageData = await client.page('demo-shop.com/uk/women/shoes')

Type Reference

Check .frontic/generated-types.d.ts and .frontic/query-types.ts for blocks, listings, pages, parameters, and return types.


4. Page Integration and Dynamic Updates

Use Pages for Dynamic Routing

Always use pages for dynamic routing unless the user requests otherwise. Pages are containers for blocks identified by slug. Page slugs include domain, locale (if configured), and path. Blocks can have pageRoute fields for route information.

For root-level dynamic routing, create a catch-all page that calls client.page() with the assembled slug. Handle the root case / separately (e.g. with a hardcoded block).

Page Structure Hierarchy

Page (e.g. CategoryDetail)
 ├── Block (e.g. CategoryDetailShopware)
 └── Nested Listing (e.g. ProductListShopware)

Implementation Pattern

  1. Initial load: Use client.page() or client.block() — provides full page context and embedded content.
  2. Filtering/sorting/pagination: Use client.listing()client.page() and client.block() do not accept query parameters.
// 1. Initial page load
const pageData = await client.page('domain.com/category-name')

// 2. Dynamic updates — extract params, call embedded listing directly
const categoryId = pageData.data.key
const filteredData = await client.listing('ProductListShopware', { categoryId }, {
  query: { filter: [...], sort: {...}, page: 2 }
})

Summary: Always start with client.page() for initial load. For dynamic updates, identify the nested listing, extract required parameters from page data, and call client.listing() with query parameters. Update only the listing portion of component state.


5. Field Configuration

Filter Field Naming with Paths

When a filter field is configured with a path parameter, you must use the full dotted path in queries:

// Configuration:
{ "name": "price", "source": "blockField", "path": "amount" }

// In queries — use "price.amount", NOT "price":
{ "type": "range", "field": "price.amount", "from": 2000, "to": 10000 }

Rule: If a filter field has path: "X", always reference it as fieldName.X in queries.

Sort Field Configuration

Frontic does not support duplicate sort field names with different directions. Add each sort field once — the API automatically supports both asc and desc. Specify direction at query time:

// One sort field configured, direction chosen per query:
sort: { field: 'price.amount', order: 'asc' }  // or 'desc'

Field Source Selection

Always prefer blockField over storageField when configuring search, filter, and sort fields:

  • Block fields are already exposed and configured
  • Storage fields may not be accessible or properly typed
  • Block fields maintain consistency with the nested block structure
// Prefer:
{ type: "filter", name: "price", source: "blockField" }

// Avoid:
{ type: "filter", name: "price", source: "storageField" }

Validating Field Paths

Before using a filter or sort field, verify the exact name:

  1. Use list_resources to see configured fields
  2. Use fetch_api_call to test the listing and inspect the response structure
// Test listing response reveals field structure:
// items: [{ price: { amount: 49595 } }]
// → filter field is "price.amount"

6. Price Format

Frontic prices use an integer format with precision:

{ "amount": 49595, "currency": "EUR", "precision": 2, "ref": 0 }

Display calculation:

const displayPrice = price.amount / Math.pow(10, price.precision)
// 49595 / 100 = 495.95

7. Troubleshooting

Browser and Build Cache

After regenerating the client, caching can cause stale code to persist.

  • Clear the framework build cache (e.g. .next/, .nuxt/, dist/)
  • Hard refresh browser: Cmd+Shift+R (Mac) / Ctrl+Shift+F5 (Windows/Linux)
  • Disable cache in DevTools: Network tab → "Disable cache"

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

34.74%
按下载量换算146

Claude

30.77%
按下载量换算129

Cursor

20.56%
按下载量换算86

Gemini CLI

8.69%
按下载量换算36

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

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

来源信息

继续浏览同类 Skills