用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/jeremylongshore/tons-of-skills-marketplace --skill linktree-webhooks-events命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Deploy a LangChain 1.0 / LangGraph 1.0 app to Cloud Run, Vercel, or LangServe correctly — with timeouts sized for chain length, cold-start mitigation, SSE anti-buffering headers, and Secret Manager over .env. Use when prepping a first production deploy, debugging a stream that hangs behind a proxy, or diagnosing p99 latency spikes. Trigger with "langchain deploy", "langchain cloud run", "langchain vercel python", "langchain langserve", or "langchain docker".
Build a correct LangGraph 1.0 ReAct agent with create_react_agent — typed tools, error propagation, recursion caps, and stop conditions that actually stop. Use when writing a first tool-calling agent, migrating from AgentExecutor or initialize_agent, or diagnosing an agent that loops on vague prompts. Trigger with "langgraph agent", "create_react_agent", "langgraph tool calling", "AgentExecutor migration", or "agent loop cost".
Build LangGraph 1.0 human-in-the-loop approval flows with interrupt_before / interrupt_after and Command(resume=...) — JSON-serializable state, clean resume semantics, and UI wiring for approval decisions. Use when adding an approval gate before an expensive tool call, wiring a Slack/web UI for agent approvals, or debugging a graph that crashes on interrupt. Trigger with "langgraph human in loop", "langgraph interrupt_before", "langgraph approval flow", "Command resume", "langgraph HITL".
正在显示 SKILL.md
| name | linktree-webhooks-events |
| description | Webhooks Events for Linktree. Trigger: "linktree webhooks events". |
| allowed-tools | Read, Write, Edit, Grep |
| version | 1.7.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","linktree","social"] |
| compatibility | Designed for Claude Code |
Linktree emits real-time webhook events whenever links, profiles, or analytics milestones change. These events enable automations such as syncing new bio links to a CMS, triggering social media posts when a profile is updated, alerting marketing teams when traffic milestones are hit, and auditing link lifecycle changes for compliance dashboards. All payloads are JSON over HTTPS with HMAC-SHA256 signature verification to guarantee authenticity.
LINKTREE_WEBHOOK_SECRET)raw body parsing enabled for signature verificationimport axios from "axios";
const res = await axios.post(
"https://api.linktr.ee/v1/webhooks",
{
url: "https://your-app.com/webhooks/linktree",
events: ["link.created", "link.updated", "link.deleted",
"profile.updated", "analytics.milestone"],
},
{ headers: { Authorization: `Bearer ${process.env.LINKTREE_API_TOKEN}` } }
);
console.log("Subscription ID:", res.data.id);
import crypto from "crypto";
import { Request, Response, NextFunction } from "express";
function verifyLinktreeSignature(req: Request, res: Response, next: NextFunction) {
const signature = req.headers["x-linktree-signature"] as string;
const timestamp = req.headers["x-linktree-timestamp"] as string;
if (!signature || !timestamp) return res.status(401).send("Missing signature");
const payload = `${timestamp}.${(req as any).rawBody}`;
const expected = crypto
.createHmac("sha256", process.env.LINKTREE_WEBHOOK_SECRET!)
.update(payload)
.digest("hex");
if (!crypto.timingSafeEqual(Buffer.from(signature), .(expected))) {
res.().();
}
();
}
app.post("/webhooks/linktree", verifyLinktreeSignature, (req, res) => {
const { type, data, timestamp } = req.body;
switch (type) {
case "link.created":
console.log(`New link: ${data.title} → ${data.url}`);
break;
case "link.updated":
console.log(`Link edited: ${data.link_id}, position: ${data.position}`);
break;
case "link.deleted":
console.log(`Link removed: ${data.link_id}`);
break;
case "profile.updated":
console.log(`Profile changed: bio=${data.bio}, avatar=${data.avatar_url}`);
break;
case "analytics.milestone":
console.log(`Milestone: ${data.metric} hit ${data.threshold} on ${data.link_id}`);
break;
default:
.();
}
res.().({ : });
});
| Event | Payload Fields | Use Case |
|---|---|---|
link.created | link_id, title, url, position | Sync new links to CMS or dashboard |
link.updated | link_id, title, url, position, thumbnail_url | Detect reordering or URL changes |
link.deleted | link_id, deleted_at | Clean up external references |
profile.updated | username, bio, avatar_url, theme | Mirror profile changes to marketing sites |
analytics.milestone | link_id, metric, value, threshold | Alert when a link hits click milestones |
const processed = new Set<string>();
function ensureIdempotent(req: Request, res: Response, next: NextFunction) {
const deliveryId = req.headers["x-linktree-delivery-id"] as string;
if (processed.has(deliveryId)) {
return res.status(200).json({ duplicate: true });
}
processed.add(deliveryId);
next();
}
// Linktree retries up to 5 times with exponential backoff (10s, 30s, 90s, 270s, 810s).
// Webhooks are disabled after 72 hours of consecutive failures.
| Issue | Cause | Fix |
|---|---|---|
| 401 on every delivery | Signing secret rotated in dashboard | Re-copy secret and redeploy |
| Duplicate events processed | Retry after timeout | Implement idempotency check on x-linktree-delivery-id |
Missing analytics.milestone events | Milestone thresholds not configured | Set thresholds in Linktree dashboard under Analytics |
| Payload body is empty | Body parser consuming raw body | Use express.raw({ type: "application/json" }) before route |
| Webhook auto-disabled | Endpoint returned 5xx for 72 hours | Fix endpoint, then re-enable subscription via API |
See linktree-security-basics.