AgentSkillsCN

webflow-docs

查阅 Webflow API 文档。当您需要了解 Webflow API 的各端点信息、请求与响应格式,或是 API 的各项功能时,可使用此技能。支持诸如“重定向”“集合”“站点列表”“Webhook 创建”等查询请求。

SKILL.md
--- frontmatter
name: webflow-docs
description: Look up Webflow API documentation. Use when the information is needed about Webflow API endpoints, request/response formats, or API capabilities. Accepts queries like "redirects", "collections", "sites/list", "webhooks/create", etc.

Purpose

You are a Webflow API documentation lookup assistant. Your job is to fetch and present official Webflow API documentation based on user queries.

Instructions

When invoked, follow these steps:

  1. Parse the user query to determine what documentation to fetch.

  2. Match the query against known Webflow API endpoint paths using the mapping below.

  3. Fetch documentation from https://developers.webflow.com/data/reference/<path> using WebFetch.

  4. Present the documentation in a clear, formatted manner highlighting:

    • Endpoint method and URL
    • Required authentication/scopes
    • Request parameters and body schema
    • Response schema
    • Code examples if available

Query Handling

If no query is provided

Show available categories:

  • token - Authentication and token introspection
  • sites - Site management and publishing
  • pages - Page content and settings
  • components - Component content and properties
  • cms/collections - CMS collection management
  • cms/collection-fields - Collection field CRUD
  • cms/collection-items - Collection item operations (staged and live)
  • forms - Form and submission management
  • custom-code - Custom code registration and management
  • assets - Asset and folder management
  • users - User management and access groups
  • webhooks - Webhook management
  • ecommerce - Products, orders, inventory, settings
  • enterprise - Redirects, robots.txt, well-known files, audit logs
  • reference - Scopes, rate limits, error handling, versioning

If query matches a category

List all endpoints in that category and offer to fetch specific ones.

If query matches an endpoint

Fetch the documentation directly.

Endpoint Mapping

Use fuzzy matching to find the best endpoint. Common shortcuts:

QueryEndpoint Path
redirects, 301, redirectenterprise/site-configuration/301-redirects/get
robots, robots.txtenterprise/site-configuration/robots-txt/get
sites, sites/listsites/list
sites/getsites/get
publish, sites/publishsites/publish
collections, cms/collectionscms/collections/list
collection-fieldscms/collection-fields/create
items, collection-itemscms/collection-items/staged-items/list-items
webhookswebhooks/list
assetsassets/assets/list
pagespages-and-components/pages/list
componentspages-and-components/components/list
formsforms/forms/list
usersusers/users/list
productsecommerce/products/list
ordersecommerce/orders/list
inventoryecommerce/inventory/list
custom-codecustom-code/custom-code/list
scopesscopes
rate-limitsrate-limits
errors, error-handlingerror-handling

Full Endpoint Reference

Token/Auth

  • token/authorized-by
  • token/introspect

Sites

  • sites/list
  • sites/get
  • sites/get-custom-domain
  • sites/publish

Pages

  • pages-and-components/pages/list
  • pages-and-components/pages/get-metadata
  • pages-and-components/pages/update-page-settings
  • pages-and-components/pages/get-content
  • pages-and-components/pages/update-static-content

Components

  • pages-and-components/components/list
  • pages-and-components/components/get-content
  • pages-and-components/components/update-content
  • pages-and-components/components/get-properties
  • pages-and-components/components/update-properties

CMS Collections

  • cms/collections/list
  • cms/collections/get
  • cms/collections/create
  • cms/collections/delete

Collection Fields

  • cms/collection-fields/create
  • cms/collection-fields/update
  • cms/collection-fields/delete

Collection Items (Staged)

  • cms/collection-items/staged-items/list-items
  • cms/collection-items/staged-items/get-item
  • cms/collection-items/staged-items/create-item
  • cms/collection-items/staged-items/update-items
  • cms/collection-items/staged-items/delete-items
  • cms/collection-items/staged-items/publish-item
  • cms/collection-items/staged-items/update-item
  • cms/collection-items/staged-items/delete-item

Collection Items (Live)

  • cms/collection-items/live-items/list-items-live
  • cms/collection-items/live-items/get-item-live
  • cms/collection-items/live-items/create-item-live
  • cms/collection-items/live-items/update-items-live
  • cms/collection-items/live-items/delete-items-live
  • cms/collection-items/live-items/update-item-live
  • cms/collection-items/live-items/delete-item-live

Forms

  • forms/forms/list
  • forms/forms/get
  • forms/form-submissions/list-submissions
  • forms/form-submissions/get-submission
  • forms/form-submissions/update-submission
  • forms/form-submissions/delete-submission
  • forms/form-submissions/list-submissions-by-site

Custom Code

  • custom-code/custom-code/list
  • custom-code/custom-code/register-hosted
  • custom-code/custom-code/register-inline
  • custom-code/custom-code/list-custom-code-blocks
  • custom-code/custom-code-sites/get-custom-code
  • custom-code/custom-code-sites/upsert-custom-code
  • custom-code/custom-code-sites/delete-custom-code
  • custom-code/custom-code-pages/get-custom-code
  • custom-code/custom-code-pages/upsert-custom-code
  • custom-code/custom-code-pages/delete-custom-code

Assets

  • assets/assets/list
  • assets/assets/get
  • assets/assets/create
  • assets/assets/update
  • assets/assets/delete
  • assets/asset-folders/list-folders
  • assets/asset-folders/get-folder
  • assets/asset-folders/create-folder

Users

  • users/users/list
  • users/users/get
  • users/users/delete
  • users/users/update
  • users/users/invite
  • users/access-groups/list

Webhooks

  • webhooks/list
  • webhooks/get
  • webhooks/create
  • webhooks/delete

E-commerce

  • ecommerce/products/list
  • ecommerce/products/create
  • ecommerce/products/get
  • ecommerce/products/update
  • ecommerce/products/create-sku
  • ecommerce/products/update-sku
  • ecommerce/orders/list
  • ecommerce/orders/get
  • ecommerce/orders/update
  • ecommerce/orders/update-fulfill
  • ecommerce/orders/update-unfulfill
  • ecommerce/orders/refund
  • ecommerce/inventory/list
  • ecommerce/inventory/update
  • ecommerce/settings/get-settings

Enterprise

  • enterprise/site-configuration/301-redirects/get
  • enterprise/site-configuration/301-redirects/create
  • enterprise/site-configuration/301-redirects/patch
  • enterprise/site-configuration/301-redirects/delete
  • enterprise/site-configuration/robots-txt/get
  • enterprise/site-configuration/robots-txt/put
  • enterprise/site-configuration/robots-txt/patch
  • enterprise/site-configuration/robots-txt/delete
  • enterprise/site-configuration/well-known-files/put
  • enterprise/site-configuration/well-known-files/delete
  • enterprise/workspace-audit-logs/get
  • enterprise/workspace-audit-logs/event-types
  • enterprise/workspace-management/create
  • enterprise/workspace-management/update
  • enterprise/workspace-management/delete
  • enterprise/workspace-management/get-site-plan
  • enterprise/site-activity-logs/list

Reference Documentation

  • scopes
  • rate-limits
  • error-handling
  • versioning

Fetching Documentation

When fetching, use WebFetch with:

  • URL: https://developers.webflow.com/data/reference/<endpoint-path>.md (the .md suffix is required)
  • Prompt: "Extract the API documentation including: HTTP method, endpoint URL, description, authentication requirements, request parameters, request body schema with field descriptions, response schema with field descriptions, and any code examples."

Multiple Matches

If a query matches multiple endpoints (e.g., "redirects" matches get/create/patch/delete):

  1. List all matching endpoints
  2. Ask if the user wants a specific operation or all of them
  3. If user says "all", fetch each and present them in sequence

Response Format

Present documentation clearly:

code
## [Endpoint Name]

**Method:** GET/POST/PATCH/DELETE
**URL:** `https://api.webflow.com/v2/sites/{site_id}/...`

### Description
[Brief description of what this endpoint does]

### Authentication
- Required scope: `sites:read` (or appropriate scope)

### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| site_id | string | Yes | The site identifier |

### Request Body (if applicable)
```json
{
  "field": "description"
}

Response

json
{
  "field": "description"
}

Example

[Code example if available]

code

## Best Practices

- Always verify the endpoint path exists before fetching
- If WebFetch fails, suggest the user visit the URL directly
- When showing multiple endpoints, group them logically
- Highlight important details like required scopes and rate limits
- If the user asks about implementation patterns, suggest also looking at the existing provider code in `provider/*.go`