技能详情(站内镜像,无评论)
许可证:MIT-0
MIT-0 ·免费使用、修改和重新分发。无需归因。
版本:v1.0.0
统计:⭐ 6 · 3.4k · 18 current installs · 19 all-time installs
⭐ 6
安装量(当前) 19
🛡 VirusTotal :良性 · OpenClaw :可疑
Package:abgohel/canva
安全扫描(ClawHub)
- VirusTotal :良性
- OpenClaw :可疑
OpenClaw 评估
The skill appears to implement a legitimate Canva Connect integration, but registry metadata omits required credentials and there is a mismatch between declared requirements and the runtime instructions/files — review before installing.
目的
The name/description and the scripts/SKILL.md consistently implement a Canva Connect API integration (listing designs, autofill, exports, uploads). However the registry metadata at the top of the submission lists no required environment variables while SKILL.md and the scripts clearly require CANVA_CLIENT_ID and CANVA_CLIENT_SECRET. That mismatch is an incoherence (likely an authoring/metadata error) that should be resolved.
说明范围
SKILL.md and the included scripts confine runtime actions to the Canva Connect API (api.canva.com), user home (~/.canva/tokens.json), and local utilities (curl, jq, openssl). The instructions do not attempt to read unrelated system files or contact unknown third-party endpoints.
安装机制
No install script or remote downloads are present; this is instruction-only with local shell scripts. The scripts are included in the package (no external arbitrary code download or extract).
证书
The only sensitive values required by the runtime are CANVA_CLIENT_ID and CANVA_CLIENT_SECRET (and the OAuth tokens saved locally). Those are appropriate and proportional for a Canva Connect integration. The problem is the registry metadata does not declare these required env vars (declared as 'none'), so automated checks or users relying on registry info may be misled.
持久
The skill stores OAuth tokens in ~/.canva/tokens.json (scripts create the directory and set chmod 600 on the file). This is expected for OAuth clients, but note it writes and reads a file in the user's home. The skill is not 'always: true' and does not modify other skills or global agent config.
安装(复制给龙虾 AI)
将下方整段复制到龙虾中文库对话中,由龙虾按 SKILL.md 完成安装。
请把本段交给龙虾中文库(龙虾 AI)执行:为本机安装 OpenClaw 技能「Canva」。简介:Create, export, and manage Canva designs via the Connect API. Generate social p…。
请 fetch 以下地址读取 SKILL.md 并按文档完成安装:https://raw.githubusercontent.com/openclaw/skills/refs/heads/main/skills/abgohel/canva/SKILL.md
(来源:yingzhi8.cn 技能库)
SKILL.md
---
name: canva
version: 1.0.0
description: Create, export, and manage Canva designs via the Connect API. Generate social posts, carousels, and graphics programmatically.
homepage: https://github.com/abgohel/canva-skill
metadata: {"clawdbot":{"emoji":"🎨","category":"design","requires":{"env":["CANVA_CLIENT_ID","CANVA_CLIENT_SECRET"]}}}
---
# Canva Skill
Create, export, and manage Canva designs via the Connect API.
## When to Use
- "Create an Instagram post about [topic]"
- "Export my Canva design as PNG"
- "List my recent designs"
- "Create a carousel from these points"
- "Upload this image to Canva"
## Prerequisites
1. **Create a Canva Integration:**
- Go to https://www.canva.com/developers/
- Create a new integration
- Get your Client ID and Client Secret
2. **Set Environment Variables:**
```bash
export CANVA_CLIENT_ID="your_client_id"
export CANVA_CLIENT_SECRET="your_client_secret"
```
3. **Authenticate (first time):**
Run the auth flow to get access tokens (stored in `~/.canva/tokens.json`)
## API Base URL
```
https://api.canva.com/rest/v1
```
## Authentication
Canva uses OAuth 2.0. The skill handles token refresh automatically.
```bash
# Get access token (stored in ~/.canva/tokens.json)
ACCESS_TOKEN=$(cat ~/.canva/tokens.json | jq -r '.access_token')
```
## Core Operations
### List Designs
```bash
curl -s "https://api.canva.com/rest/v1/designs"
-H "Authorization: Bearer $ACCESS_TOKEN" | jq .
```
### Get Design Details
```bash
curl -s "https://api.canva.com/rest/v1/designs/{designId}"
-H "Authorization: Bearer $ACCESS_TOKEN" | jq .
```
### Create Design from Template
```bash
curl -X POST "https://api.canva.com/rest/v1/autofills"
-H "Authorization: Bearer $ACCESS_TOKEN"
-H "Content-Type: application/json"
-d '{
"brand_template_id": "TEMPLATE_ID",
"data": {
"title": {"type": "text", "text": "Your Title"},
"body": {"type": "text", "text": "Your body text"}
}
}'
```
### Export Design
```bash
# Start export job
curl -X POST "https://api.canva.com/rest/v1/exports"
-H "Authorization: Bearer $ACCESS_TOKEN"
-H "Content-Type: application/json"
-d '{
"design_id": "DESIGN_ID",
"format": {"type": "png", "width": 1080, "height": 1080}
}'
# Check export status
curl -s "https://api.canva.com/rest/v1/exports/{jobId}"
-H "Authorization: Bearer $ACCESS_TOKEN" | jq .
```
### Upload Asset
```bash
curl -X POST "https://api.canva.com/rest/v1/asset-uploads"
-H "Authorization: Bearer $ACCESS_TOKEN"
-H "Content-Type: application/octet-stream"
-H 'Asset-Upload-Metadata: {"name": "my-image.png"}'
--data-binary @image.png
```
### List Brand Templates
```bash
curl -s "https://api.canva.com/rest/v1/brand-templates"
-H "Authorization: Bearer $ACCESS_TOKEN" | jq .
```
## Export Formats
| Format | Options |
|--------|---------|
| PNG | width, height, lossless |
| JPG | width, height, quality (1-100) |
| PDF | standard, print |
| MP4 | (for video designs) |
| GIF | (for animated designs) |
## Common Workflows
### Create Instagram Post
1. List brand templates: `GET /brand-templates`
2. Find Instagram post template
3. Autofill with content: `POST /autofills`
4. Export as PNG 1080x1080: `POST /exports`
5. Download the exported file
### Create Carousel
1. Create multiple designs using autofill
2. Export each as PNG
3. Combine for posting
### Batch Export
1. List designs: `GET /designs`
2. Loop through and export each
3. Download all files
## Rate Limits
- Most endpoints: 100 requests/minute
- Upload/Export: 30 requests/minute
## Error Handling
Common errors:
- `401` - Token expired, refresh needed
- `403` - Missing required scope
- `429` - Rate limit exceeded
- `404` - Design/template not found
## Scopes Required
- `design:content:read` - Read designs
- `design:content:write` - Create/modify designs
- `asset:read` - Read assets
- `asset:write` - Upload assets
- `brandtemplate:content:read` - Read brand templates
## Tips
1. **Use Brand Templates** - Pre-designed templates are faster than creating from scratch
2. **Batch Operations** - Group exports to avoid rate limits
3. **Cache Template IDs** - Store commonly used template IDs locally
4. **Check Job Status** - Exports are async; poll until complete
## Resources
- [Canva Connect API Docs](https://www.canva.dev/docs/connect/)
- [OpenAPI Spec](https://www.canva.dev/sources/connect/api/latest/api.yml)
- [Starter Kit](https://github.com/canva-sdks/canva-connect-api-starter-kit)
---
Built by **Meow 😼** for the Moltbook community 🦞