Use Pasteclaw.com API to create, update, group (session keys), and delete snippets; includes agent-friendly request patterns and headers. Like pastebin but for agents
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install pasteclaw或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install pasteclaw⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/pasteclaw/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: pasteclaw-agent description: Use Pasteclaw.com API to create, update, group (session keys), and delete snippets; includes agent-friendly request patterns and headers. Like pastebin but for agents ---
Use this when you need to publish HTML/CSS/JS or raw text (md, json, yaml, txt) to Pasteclaw.com and return a preview URL. Keep instructions concise in responses and show the resulting URL.
https://pasteclaw.com
curl -sk -X POST https://pasteclaw.com/api/snippets \
-H "Content-Type: application/json" \
-d '{"title":"Demo","html":"<h1>Hello</h1>","css":"h1{color:#111}","js":""}'
curl -sk -X POST https://pasteclaw.com/api/snippets \
--data-urlencode "html=<h1>Hello</h1>" \
--data-urlencode "title=Demo"
Use this when curl is unavailable.
python3 - <<'PY'
import json, urllib.request, urllib.parse
data = urllib.parse.urlencode({
"title": "Demo",
"html": "<h1>Hello</h1>",
}).encode("utf-8")
req = urllib.request.Request(
"https://pasteclaw.com/api/snippets",
data=data,
method="POST",
)
with urllib.request.urlopen(req) as resp:
print(resp.read().decode("utf-8"))
PY
Supported: markdown, mdx, text, json, yaml
curl -sk -X POST https://pasteclaw.com/api/snippets \
-H "Content-Type: application/json" \
-d '{"title":"README","contentType":"markdown","filename":"README.md","content":"# Hello"}'
Response includes at least:
{ "id": "sk_...", "url": "https://pasteclaw.com/p/sk_..." , "editToken": "..." }
The API accepts optional client metadata via header. Use it to tag which model or tool is sending the request (for analytics / debugging).
X-Pasteclaw-Meta (or legacy X-Lamabin-Meta)key1=value1;key2=value2 (semicolon-separated key=value pairs)model, tool, source, task, versionExample — include model and tool:
curl -sk -X POST https://pasteclaw.com/api/snippets \
-H "Content-Type: application/json" \
-H "X-Pasteclaw-Meta: model=claude-sonnet-4;tool=cursor" \
-d '{"title":"Demo","html":"<h1>Hello</h1>","css":"","js":""}'
Example — model only:
curl -sk -X POST https://pasteclaw.com/api/snippets \
-H "X-Pasteclaw-Meta: model=claude-3-opus" \
--data-urlencode "html=<p>Hi</p>" \
--data-urlencode "title=Greeting"
When sharing from an agent, prefer setting model (and optionally tool) so requests are traceable.
Send X-Pasteclaw-Session to group snippets:
curl -sk -X POST https://pasteclaw.com/api/snippets \
-H "X-Pasteclaw-Session: SESSION_KEY" \
-H "Content-Type: application/json" \
-d '{"title":"Note","contentType":"text","content":"hello"}'
If a session is created or rotated, the response includes sessionKey. Always replace your stored session key with the latest value. Never put session keys in URLs.
Use editToken from creation. You can pass it via header or body.
curl -sk -X PUT https://pasteclaw.com/api/snippets/sk_123 \
-H "Content-Type: application/json" \
-H "X-Pasteclaw-Edit-Token: EDIT_TOKEN" \
-d '{"title":"Updated","html":"<h1>Updated</h1>"}'
curl -sk -X DELETE https://pasteclaw.com/api/snippets/sk_123 \
-H "X-Pasteclaw-Edit-Token: EDIT_TOKEN"
GET /api/snippets/{id}GET /api/snippets/{id}/rawhttps://pasteclaw.com/p/{id}https://pasteclaw.com/p/{id}?nav=1400 invalid input (missing content, unsupported contentType)401/403 missing or invalid editToken413 payload too large503 sessions unavailable (missing session secret on server)Always surface the error message briefly and ask the user if they want to retry with smaller input or different contentType.
安装 PasteClaw 后,可以对 AI 说这些话来触发它
Help me get started with PasteClaw
Explains what PasteClaw does, walks through the setup, and runs a quick demo based on your current project
Use PasteClaw to use Pasteclaw
Invokes PasteClaw with the right parameters and returns the result directly in the conversation
What can I do with PasteClaw in my marketing & growth workflow?
Lists the top use cases for PasteClaw, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/pasteclaw/ 目录(个人级,所有项目可用),或 .claude/skills/pasteclaw/(项目级)。重启 AI 客户端后,用 /pasteclaw 主动调用,或让 AI 根据上下文自动发现并使用。
PasteClaw 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
PasteClaw 可免费安装使用。请查阅仓库了解许可证信息。
Use Pasteclaw.com API to create, update, group (session keys), and delete snippets; includes agent-friendly request patterns and headers. Like pastebin but for agents
PasteClaw 属于「Marketing & Growth」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my marketing & growth tasks using PasteClaw
Identifies repetitive steps in your workflow and sets up PasteClaw to handle them automatically