首页龙虾技能列表 › Netlify — Netlify工具

Netlify — Netlify工具

v1.0.2

[AI辅助] Netlify API integration with managed OAuth. Deploy sites, manage builds, configure DNS, and handle environment variables. Use this skill when users want to manage Netlify sites, deployments, build set...

2· 1,214·1 当前·1 累计
by @byungkyu·MIT-0
下载技能包
License
MIT-0
最后更新
2026/2/26
安全扫描
VirusTotal
无害
查看报告
OpenClaw
安全
high confidence
The skill's requirements and runtime instructions align with a Netlify integration proxied through Maton (MATON_API_KEY); nothing requested or instructed appears disproportionate or unrelated to its stated purpose.
评估建议
This skill proxies Netlify API calls through Maton and requires a MATON_API_KEY. That key lets the Maton gateway act on your Netlify connections via managed OAuth, so treat it as sensitive: create/assign a key with least privilege where possible, store it securely, and rotate it if compromised. Because the skill is instruction-only, there is no bundled code to inspect — your primary trust decision is whether to trust the Maton service (maton.ai / gateway.maton.ai / ctrl.maton.ai). Before install...
详细分析 ▾
用途与能力
Name/description advertise a Netlify integration using managed OAuth. The only required environment variable is MATON_API_KEY and all example endpoints target Maton gateway/ctrl domains that proxy to Netlify; this is coherent with the stated purpose.
指令范围
SKILL.md contains only HTTP examples and instructions to call Maton gateway and control endpoints using MATON_API_KEY and an optional Maton-Connection header. It does not instruct reading arbitrary local files, system paths, or other environment variables, nor does it direct data to unexpected external endpoints beyond Maton and Netlify proxying.
安装机制
No install spec or code files are present — the skill is instruction-only, which minimizes on-disk execution risk.
凭证需求
The single required env var (MATON_API_KEY) is proportionate for a managed-OAuth gateway integration. Note: MATON_API_KEY is a high-value credential for the Maton gateway — it may permit actions across your Netlify connections (and possibly other Maton-managed integrations). Ensure you understand Maton's scope and rotate/limit the key as appropriate.
持久化与权限
always is false and the skill is user-invocable with normal autonomous invocation allowed (platform default). The skill does not request persistent agent-level privileges or modify other skills/configs in the instructions.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.0.22026/2/13

- No user-visible changes in this release. - Internal version update; no files were modified.

● 无害

安装命令 点击复制

官方npx clawhub@latest install netlify-api
镜像加速npx clawhub@latest install netlify-api --registry https://cn.clawhub-mirror.com

技能文档

Access the Netlify API with managed OAuth authentication. Manage sites, deploys, builds, DNS zones, environment variables, and webhooks.

Quick 开始

# List all sites
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://gateway.maton.ai/netlify/api/v1/sites')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

Base URL

https://gateway.maton.ai/netlify/{native-api-path}

Replace {native-api-path} with the actual Netlify API endpoint path. The gateway proxies requests to api.netlify.com and automatically injects your OAuth token.

Authentication

All requests require the Maton API key in the Authorization header:

Authorization: Bearer $MATON_API_KEY

Environment 变量: 设置 API 键 作为 MATON_API_KEY:

export MATON_API_KEY="YOUR_API_KEY"

Getting API 键

连接 Management

Manage your Netlify OAuth connections at https://ctrl.maton.ai.

列表 Connections

python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections?app=netlify&status=ACTIVE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

创建 连接

python <<'EOF'
import urllib.request, os, json
data = json.dumps({'app': 'netlify'}).encode()
req = urllib.request.Request('https://ctrl.maton.ai/connections', data=data, method='POST')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

获取 连接

python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

响应:

{
  "connection": {
    "connection_id": "9e674cd3-2280-4eb4-9ff7-b12ec8ca3f55",
    "status": "ACTIVE",
    "creation_time": "2026-02-12T11:15:33.183756Z",
    "last_updated_time": "2026-02-12T11:15:51.556556Z",
    "url": "https://connect.maton.ai/?session_token=...",
    "app": "netlify",
    "metadata": {}
  }
}

Open the returned url in a browser to complete OAuth authorization.

删除 连接

python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}', method='DELETE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

Specifying 连接

If you have multiple Netlify connections, specify which one to use with the Maton-Connection header:

python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://gateway.maton.ai/netlify/api/v1/sites')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Maton-Connection', '9e674cd3-2280-4eb4-9ff7-b12ec8ca3f55')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

If omitted, the gateway uses the default (oldest) active connection.

API Reference

用户 & Accounts

获取 Current 用户

GET /netlify/api/v1/user

列表 Accounts

GET /netlify/api/v1/accounts

获取 账户

GET /netlify/api/v1/accounts/{account_id}

Sites

列表 Sites

GET /netlify/api/v1/sites

With filtering:

GET /netlify/api/v1/sites?filter=all&page=1&per_page=100

获取 Site

GET /netlify/api/v1/sites/{site_id}

创建 Site

POST /netlify/api/v1/{account_slug}/sites
Content-Type: application/json

{ "name": "my-new-site" }

更新 Site

PUT /netlify/api/v1/sites/{site_id}
Content-Type: application/json

{ "name": "updated-site-name" }

删除 Site

DELETE /netlify/api/v1/sites/{site_id}

Deploys

列表 Deploys

GET /netlify/api/v1/sites/{site_id}/deploys

获取 Deploy

GET /netlify/api/v1/deploys/{deploy_id}

创建 Deploy

POST /netlify/api/v1/sites/{site_id}/deploys
Content-Type: application/json

{ "title": "Deploy from API" }

Lock Deploy

POST /netlify/api/v1/deploys/{deploy_id}/lock

Unlock Deploy

POST /netlify/api/v1/deploys/{deploy_id}/unlock

恢复 Deploy (Rollback)

PUT /netlify/api/v1/deploys/{deploy_id}

Builds

列表 Builds

GET /netlify/api/v1/sites/{site_id}/builds

获取 Build

GET /netlify/api/v1/builds/{build_id}

Trigger Build

POST /netlify/api/v1/sites/{site_id}/builds

Environment Variables

Environment variables are managed at the account level with optional site scope.

列表 Environment Variables

GET /netlify/api/v1/accounts/{account_id}/env?site_id={site_id}

创建 Environment Variables

POST /netlify/api/v1/accounts/{account_id}/env?site_id={site_id}
Content-Type: application/json

[ { "key": "MY_VAR", "values": [ {"value": "my_value", "context": "all"} ] } ]

Context values: 所有, production, deploy-预览, branch-deploy, dev

更新 Environment 变量

PUT /netlify/api/v1/accounts/{account_id}/env/{key}?site_id={site_id}
Content-Type: application/json

{ "key": "MY_VAR", "values": [ {"value": "updated_value", "context": "all"} ] }

删除 Environment 变量

DELETE /netlify/api/v1/accounts/{account_id}/env/{key}?site_id={site_id}

DNS Zones

列表 DNS Zones

GET /netlify/api/v1/dns_zones

创建 DNS Zone

POST /netlify/api/v1/dns_zones
Content-Type: application/json

{ "name": "example.com", "account_slug": "my-account" }

获取 DNS Zone

GET /netlify/api/v1/dns_zones/{zone_id}

删除 DNS Zone

DELETE /netlify/api/v1/dns_zones/{zone_id}

DNS Records

列表 DNS Records

GET /netlify/api/v1/dns_zones/{zone_id}/dns_records

创建 DNS 记录

POST /netlify/api/v1/dns_zones/{zone_id}/dns_records
Content-Type: application/json

{ "type": "A", "hostname": "www", "value": "192.0.2.1", "ttl": 3600 }

删除 DNS 记录

DELETE /netlify/api/v1/dns_zones/{zone_id}/dns_records/{record_id}

Build Hooks

列表 Build Hooks

GET /netlify/api/v1/sites/{site_id}/build_hooks

创建 Build 钩子

POST /netlify/api/v1/sites/{site_id}/build_hooks
Content-Type: application/json

{ "title": "My Build Hook", "branch": "main" }

Response includes a url that can be POSTed to trigger a build.

删除 Build 钩子

DELETE /netlify/api/v1/hooks/{hook_id}

Webhooks

列表 Webhooks

GET /netlify/api/v1/hooks?site_id={site_id}

创建 Webhook

POST /netlify/api/v1/hooks?site_id={site_id}
Content-Type: application/json

{ "type": "url", "event": "deploy_created", "data": { "url": "https://example.com/webhook" } }

Events: deploy_created, deploy_building, deploy_failed, deploy_succeeded, form_submission

删除 Webhook

DELETE /netlify/api/v1/hooks/{hook_id}

Forms

列表 Forms

GET /netlify/api/v1/sites/{site_id}/forms

列表 表单 Submissions

GET /netlify/api/v1/sites/{site_id}/submissions

删除 表单

DELETE /netlify/api/v1/sites/{site_id}/forms/{form_id}

Functions

列表 Functions

GET /netlify/api/v1/sites/{site_id}/functions

Services/添加-ons

列表 可用 Services

GET /netlify/api/v1/services

获取 服务 Details

GET /netlify/api/v1/services/{service_id}

分页

Use page and per_page query parameters:

GET /netlify/api/v1/sites?page=1&per_page=100

Default per_page varies by endpoint. Check response headers for pagination info.

Code Examples

JavaScript

const response = await fetch(
  'https://gateway.maton.ai/netlify/api/v1/sites',
  {
    headers: {
      'Authorization': Bearer ${process.env.MATON_API_KEY}
    }
  }
);
const sites = await response.json();

Python

import os
import requests

response = requests.get( 'https://gateway.maton.ai/netlify/api/v1/sites', headers={'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}'} ) sites = response.json()

创建 Site 和 设置 Environment 变量

import os
import requests

headers = {'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}'}

# Create site site = requests.post( 'https://gateway.maton.ai/netlify/api/v1/my-account/sites', headers=headers, json={'name': 'my-new-site'} ).json()

# Add environment variable requests.post( f'https://gateway.maton.ai/netlify/api/v1/accounts/{site["account_id"]}/env', headers=headers, params={'site_id': site['id']}, json=[{'key': 'API_KEY', 'values': [{'value': 'secret', 'context': 'all'}]}] )

Notes

  • Site IDs UUIDs (e.g., d37d1ce4-5444-40f5-a4ca-a2c40a8b6835)
  • 账户 slugs used 对于 creating sites 在...内 team (e.g., my-team-slug)
  • Deploy IDs returned 当...时 creating deploys 和 可以 used 到 track deploy status
  • Build hooks return URL 可以 POSTed 到 externally trigger builds
  • Environment 变量 contexts control 在哪里 variables 可用: 所有, production, deploy-预览, branch-deploy, dev
  • IMPORTANT: 当...时 使用 curl commands, 使用 curl -g 当...时 URLs contain brackets 到 disable glob parsing
  • IMPORTANT: 当...时 piping curl 输出 到 jq 或 其他 commands, environment variables 点赞 $MATON_API_KEY 可能 不 expand correctly 在...中 一些 shell environments

错误 Handling

StatusMeaning
400Missing Netlify connection
401Invalid or missing Maton API key
404Resource not found
429Rate limited
4xx/5xxPassthrough error from Netlify API

Troubleshooting: API 键 Issues

  • Check MATON_API_KEY environment 变量 设置:
echo $MATON_API_KEY
  • 验证 API 键 有效 由 listing connections:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

Troubleshooting: 无效 App Name

  • Ensure URL path starts 带有 netlify. 对于 示例:
  • 正确: https://gateway.maton.ai/netlify/api/v1/sites
  • 错误: https://gateway.maton.ai/api/v1/sites

Resources

数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务