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

query查询工具

Agent Skill

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

总安装

309

周安装

13

GitHub Stars

4

下载量

108
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/crystallizeapi/ai --skill query

简介

通过 GraphQL 查询 Crystallize 的商品、内容与订单数据。

  • 区分 Discovery(搜索/过滤)与 Catalogue(精确路径读取)两种查询模式。
  • 适用于商店前台、管理后台与 API 集成等多样化数据获取需求。
  • 安装需通过 npx 添加指定仓库,建议先明确所需数据类型与使用场景。
  • query 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Crystallize Query Skill

Query product data, content, and commerce information from Crystallize using GraphQL APIs. This skill covers reading data for storefronts, admin interfaces, product pages, search, and cart operations.

Consultation Approach

Before writing queries, understand the context. Ask clarifying questions:

  1. What data do you need? Products, orders, customers, content, shapes?
  2. Is this for a storefront or admin interface? Discovery/Catalogue for storefronts, Core for admin.
  3. Do you need search/filtering or exact path reads? Discovery for search and faceted navigation, Catalogue for deterministic reads by path.
  4. Do you have authentication configured? Core API requires access tokens. Discovery/Catalogue can be open but should be secured in production.
  5. What volume of results? Pagination strategy matters — cursor-based is recommended for all APIs.

Choosing the Right API

  • Need search, filtering, or faceting? → Discovery API
  • Know the exact path? Need strong consistency? → Catalogue API
  • Admin interface? Orders, customers, shapes? → Core API
  • Cart/checkout operations? → Shop API

How It Works

Crystallize provides four main APIs for querying data:

  1. Core API - Full read/write API with advanced filtering. Best for admin interfaces, customer/order management.
  2. Discovery API - Semantic API for search, browse, filter, and faceting. Best for storefronts.
  3. Catalogue API - Path-based reads for deterministic data access.
  4. Shop API - Cart and checkout queries at the edge.

API Endpoints

APIEndpointAuth RequiredUse For
Corehttps://api.crystallize.com/@{tenant}Yes (access tokens)Admin, customers, orders
Discoveryhttps://api.crystallize.com/{tenant}/discoveryOptional (configurable)Storefront search/filter
Cataloguehttps://api.crystallize.com/{tenant}/catalogueOptional (configurable)Storefront path-based reads
Shop /carthttps://shop-api.crystallize.com/{tenant}/cartYes (JWT)Cart hydration, checkout flows
Shop /orderhttps://shop-api.crystallize.com/{tenant}/orderYes (JWT)Order queries by ID/customer

Usage

Core API (Admin & Advanced Queries)

The Core API provides full read/write access with advanced filtering capabilities:

  • Read items by ID with full component data
  • List items with pagination and filtering
  • Query customers and orders with complex filters
  • Filter orders by customer, SKU, payment provider, metadata
  • Access shape and piece definitions
  • Manage flows and archives
# Example: Get item with components
query GetItem {
    item(id: "item-id", language: "en") {
        ... on Product {
            id
            name
            components {
                componentId
                content
            }
            defaultVariant {
                sku
                price
                stock
            }
        }
    }
}

# Example: List orders filtered by customer
query ListOrders {
    orders(
        tenantId: "tenant-id"
        first: 20
        filter: { customerIdentifier: "customer@example.com" }
        sort: { field: createdAt, direction: desc }
    ) {
        edges {
            node {
                id
                total {
                    gross
                    currency
                }
                customer {
                    identifier
                }
            }
        }
    }
}

See Core API Queries Reference for complete documentation.

Discovery API (Recommended for Storefronts)

The Discovery API is the primary API for frontend development. It supports:

  • Full-text search
  • Filtering by any component or attribute
  • Faceted navigation
  • Sorting and cursor-based pagination

The Discovery API has two entry points: search for full-text queries with facets, and browse for shape-typed access where each shape becomes its own query type.

Note: The Discovery API uses lowercase type names in inline fragments (... on product, ... on category) because types are derived from your shape identifiers. You can still use it for interface (... on Product, ... on Folder).
# Example: Browse products by shape with pagination
{
    browse {
        product(language: en, pagination: { limit: 25 }) {
            summary {
                totalHits
                hasMoreHits
                endCursor
            }
            hits {
                name
                path
                ... on Product {
                    defaultVariant {
                        sku
                        defaultPrice
                        firstImage {
                            url
                        }
                    }
                }
            }
        }
    }
}

# Example: Search with facets and filtering
{
    search(
        language: en
        term: "green"
        filters: { type_in: [product] }
        facets: { shape: { limit: 5 } }
        pagination: { limit: 20 }
    ) {
        summary {
            totalHits
            hasMoreHits
            endCursor
            facets
        }
        hits {
            name
            path
            ... on product {
                defaultVariant {
                    defaultPrice
                }
            }
        }
    }
}

Catalogue API (Path-Based Reads)

Use for deterministic reads when you know the exact path:

{
    catalogue(language: "en", path: "/shop/plants") {
        name
        ... on Product {
            variants {
                sku
                name
                price
            }
        }
    }
}

Shop API Queries

Retrieve cart and order intent data:

query {
    cart(id: "cart-id") {
        id
        items {
            sku
            name
            quantity
            price {
                gross
                net
            }
        }
        total {
            gross
            net
        }
    }
}

Best Practices

  1. Choose the right API - Core for admin, Discovery for storefront search, Catalogue for path-based reads
  2. Use Discovery API for storefronts - It's optimized for performance and supports search/filter
  3. Include deterministic sorting - Always add a secondary sort field (like itemId) for stable pagination
  4. Request only needed fields - GraphQL allows precise field selection to minimize payload
  5. Handle async updates - Discovery API may have sub-second delay for recently published content
  6. Protect APIs in production - Configure authentication for sensitive data
  7. Use Core API for complex filters - Only Core API supports filtering orders by customer, SKU, payment provider

References

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

34.58%
按下载量换算37

Claude

33.81%
按下载量换算37

Cursor

18.03%
按下载量换算19

Gemini CLI

9.66%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

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

来源信息

继续浏览同类 Skills