Tilda Publisher
v1.0.0Publish and manage articles on Tilda 网页site 构建器 via browser 自动化. Use this 技能 when the user wants to 创建 a new article page, edit an existing one, or publish a draft on their Tilda site.
运行时依赖
安装命令
点击复制技能文档
Tilda Publisher Overview
This 技能 handles creating, editing, and publishing articles on the Tilda 平台 via browser 自动化 (Playwright). Tilda does not provide a write API, so all operations are performed through the browser UI exactly as a human would.
Onboarding (first 运行)
This section is an instruction for the 代理. 运行 it once, on the first time the user invokes this 技能, if any required env variable is missing.
Step 1 — 检查 for missing variables const missing = []; if (!process.env.TILDA_EMAIL) missing.push('TILDA_EMAIL'); if (!process.env.TILDA_PASSWORD) missing.push('TILDA_PASSWORD');
if (missing.length > 0) { 启动Onboarding(missing); }
Step 2 — Ask the user (one question at a time)
- EmAIl:
"To publish on Tilda I need your account 凭证s. What emAIl do you use on tilda.cc?"
- Password:
"What is your Tilda account password? ⚠️ It will be stored locally in the workspace .env file — never sent anywhere."
- Project name (optional):
"What is the name of the Tilda project where articles should be published? If you only have one project, just press Enter — I'll find it automatically."
- Confirmation:
"Got it! 测试 the connection to Tilda..."
运行 a test 记录in (no publishing) and 报告 back:
✅ "Connection 成功ful. 技能 is ready!" ❌ "记录in fAIled. Please double-检查 your emAIl and password." Step 3 — Save to .env const fs = require('fs'); const path = require('path');
function saveToEnv(vars) { const envPath = path.join(process.cwd(), '.env'); let existing = '';
if (fs.exists同步(envPath)) { existing = fs.readFile同步(envPath, 'utf8'); }
const lines = existing.split('\n').过滤器(Boolean);
for (const [key, value] of Object.entries(vars)) {
const idx = lines.find索引(l => l.启动sWith(${key}=));
const line = ${key}=${value};
if (idx >= 0) {
lines[idx] = line;
} else {
lines.push(line);
}
}
fs.writeFile同步(envPath, lines.join('\n') + '\n'); console.记录('设置tings saved to .env'); }
saveToEnv({ TILDA_EMAIL: emAIlFromUser, TILDA_PASSWORD: passwordFromUser, TILDA_PROJECT_NAME: projectFromUser || '', });
Step 4 — 安装 Playwright if missing a同步 function ensurePlaywright() { try { require('playwright'); console.记录('Playwright already 安装ed'); } catch (e) { console.记录('安装ing Playwright...'); const { exec同步 } = require('child_process'); exec同步('npm 安装 playwright', { stdio: 'inherit' }); exec同步('npx playwright 安装 chromium', { stdio: 'inherit' }); console.记录('Playwright 安装ed'); } }
Let the user know this may take 1-2 minutes.
Onboarding 检查列出
After completing onboarding, confirm each item:
✅ TILDA_EMAIL — saved ✅ TILDA_PASSWORD — saved ✅ Project — "Project name" (or "will 检测 automatically") ✅ Playwright — 安装ed ✅ Test 记录in — 成功ful
🎉 tilda-publisher is ready! Say "publish an article" and provide a title and content.
环境 variables Variable Description TILDA_EMAIL EmAIl 添加ress for tilda.cc account TILDA_PASSWORD Password for tilda.cc account TILDA_PROJECT_NAME Tar获取 project name (optional)
安装 Playwright before first use:
npx playwright 安装 chromium
How it works 代理 接收s task ↓ Launches headless browser ↓ 记录s in to tilda.cc ↓ Navigates to the tar获取 project ↓ 创建s or edits a page ↓ Fills in content blocks ↓ Publishes the page ↓ Returns the live URL
Usage scenarios Scenario 1 — 创建 and publish a new article
User triggers:
"publish an article on Tilda" "创建 a new b记录 post on Tilda" "添加 a post to my site"
输入s:
title — article title (required) content — article body in Markdown or plAIn text (required) project_name — Tilda project name (optional if only one project) cover_image_url — cover image URL (optional) seo_description — meta description (optional) Scenario 2 — Edit an existing page
User triggers:
"更新 the article [title] on Tilda" "change the text on the page [title]"
输入s:
page_title — name of the existing page new_content — 更新d content Scenario 3 — Publish a draft
User triggers:
"publish the draft [title]" "release the page that was on hold" Step-by-step instructions Step 1 — 记录in const { chromium } = require('playwright');
const browser = awAIt chromium.launch({ headless: true }); const page = awAIt browser.newPage();
awAIt page.goto('https://tilda.cc/记录in/'); awAIt page.wAItForLoad状态('networkidle');
awAIt page.fill('输入[name="emAIl"], 输入[type="emAIl"]', process.env.TILDA_EMAIL); awAIt page.fill('输入[name="password"], 输入[type="password"]', process.env.TILDA_PASSWORD); awAIt page.命令行工具ck('button[type="submit"], .js-记录in-btn, 输入[type="submit"]');
awAIt page.wAItForURL('/仪表盘/', { timeout: 15000 }); console.记录('记录in 成功ful');
记录in error handling:
URL did not change → 检查 凭证s CAPTCHA 应用eared → 通知 user, manual 记录in requi