用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/jeremylongshore/claude-code-plugins-plus-skills --skill linktree-local-dev-loop命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
Implement user sign-up and sign-in flows with Clerk. Use when building authentication UI, customizing sign-in experience, or implementing OAuth social login. Trigger with phrases like "clerk sign-in", "clerk sign-up", "clerk login flow", "clerk OAuth", "clerk social login".
Implement session management and middleware with Clerk. Use when managing user sessions, configuring route protection, or implementing token refresh and custom JWT templates. Trigger with phrases like "clerk session", "clerk middleware", "clerk route protection", "clerk token", "clerk JWT".
Configure enterprise SSO, role-based access control, and organization management. Use when implementing SSO integration, configuring role-based permissions, or setting up organization-level controls. Trigger with phrases like "clerk SSO", "clerk RBAC", "clerk enterprise", "clerk roles", "clerk permissions", "clerk organizations".
正在显示 SKILL.md
| name | linktree-local-dev-loop |
| description | Local Dev Loop for Linktree. Trigger: "linktree local dev loop". |
| allowed-tools | Read, Write, Edit |
| version | 1.7.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","linktree","social"] |
| compatibility | Designed for Claude Code |
Local development workflow for Linktree link-in-bio API integration. Provides a fast feedback loop with mock link profiles, analytics, and appearance data so you can build social management tools without hitting the live Linktree API. Toggle between mock mode for rapid UI iteration and live mode for validating profile updates against the real Linktree platform.
cp .env.example .env
# Set your credentials:
# LINKTREE_API_KEY=lt_xxxxxxxxxxxx
# LINKTREE_BASE_URL=https://api.linktr.ee/v1
# MOCK_MODE=true
npm install express axios dotenv tsx typescript @types/node
npm install -D vitest supertest @types/express
// src/dev/server.ts
import express from "express";
import { createProxyMiddleware } from "http-proxy-middleware";
const app = express();
app.use(express.json());
const MOCK = process.env.MOCK_MODE === "true";
if (!MOCK) {
app.use("/v1", createProxyMiddleware({
target: process.env.LINKTREE_BASE_URL,
changeOrigin: true,
headers: { Authorization: `Bearer ${process.env.LINKTREE_API_KEY}` },
}));
} else {
const { mountMockRoutes } = require("./mocks");
mountMockRoutes(app);
}
app.listen(3005, () => console.log(`Linktree dev server on :3005 [mock=${MOCK}]`));
// src/dev/mocks.ts — realistic link-in-bio profile and analytics responses
export function mountMockRoutes(app: any) {
app.get("/v1/profile", (_req: any, res: any) => res.json({
id: "usr_1", username: "janedoe", displayName: "Jane Doe", bio: "Designer & creator",
links: [
{ id: "lnk_1", title: "Portfolio", url: "https://jane.design", position: 0, enabled: true },
{ id: "lnk_2", title: "Shop", url: "https://shop.jane.design", position: 1, enabled: true },
{ id: "lnk_3", title: "Newsletter", url: "https://jane.substack.com", position: 2, enabled: false },
],
}));
app.(, res.({
: , : , : ,
: [{ : , : , : }],
}));
app.(, res.({ : req.., ...req., : ().() }));
}
npm run dev:mock & # Start mock server in background
npm run test # Unit tests with vitest
npm run test -- --watch # Watch mode for rapid iteration
MOCK_MODE=false npm run test:integration # Integration test against real API
position field when reorderingnull for new links with no click data yetenabled: false to test hidden links without deleting themurl values include protocol (https://) or the API will reject them| Issue | Cause | Fix |
|---|---|---|
401 Unauthorized | Invalid or expired API key | Regenerate at Linktree developer portal |
404 Not Found | Link ID does not exist | Fetch profile first to verify link IDs |
422 Unprocessable | Missing required field (title or url) | Validate payload before PUT/POST |
429 Rate Limited | Too many requests | Add backoff, switch to mock mode |
ECONNREFUSED :3005 | Dev server not running | Run npm run dev:mock first |
See linktree-debug-bundle.