Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Reference Architecture for Linktree. Trigger: "linktree reference architecture".
.claude/skills/jeremylongshore-linktree-reference-architecture/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | 17% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 74% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 49% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 74% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 60% | 0% |
Design a read-optimized integration layer for the Linktree link-in-bio platform. The extreme read-to-write ratio on public profiles drives a two-tier cache with async analytics, keeping the hot path free from downstream blocking.
profile:read and links:write scopesClient --> API Gateway --> LinktreeService --> Linktree API
|
+--------------+--------------+
v v v
Redis Cache Event Queue Analytics DB
(profiles) (clicks/views) (aggregates)typescriptclass LinktreeService { constructor( private api: LinktreeApiClient, private cache: ProfileCache, private events: EventPublisher ) {} async getProfile(username: string): Promise<Profile> { const cached = await this.cache.get(`profile:${username}`); if (cached) return cached; const profile = await this.api.fetchProfile(username); await this.cache.set(`profile:${username}`, profile, 300); return profile; } async updateLinks(profileId: string, links: LinkUpdate[]): Promise<void> { await this.api.patchLinks(profileId, links); await this.cache.invalidate(`profile:${profileId}`); await this.events.publish('links.updated', { profileId, count: links.length }); } }
typescriptclass ProfileCache { constructor(private redis: RedisClient) {} async get(key: string): Promise<Profile | null> { const raw = await this.redis.get(key); return raw ? JSON.parse(raw) : null; } async set(key: string, data: Profile, ttl: number): Promise<void> { await this.redis.setEx(key, ttl, JSON.stringify(data)); } async invalidate(pattern: string): Promise<void> { const keys = await this.redis.keys(pattern); if (keys.length) await this.redis.del(keys); } } // TTLs: profiles 5 min, link lists 2 min, analytics summaries 15 min
typescriptclass ClickEventConsumer { constructor(private queue: MessageQueue, private db: AnalyticsStore) {} async start(): Promise<void> { await this.queue.subscribe('link.clicked', async (evt: ClickEvent) => { await this.db.incrementClickCount(evt.linkId, evt.timestamp); await this.db.recordReferrer(evt.linkId, evt.referrer); }); } } class WebhookIngester { async handle(payload: WebhookPayload): Promise<void> { if (payload.event === 'profile.updated') { await this.cache.invalidate(`profile:${payload.profileId}`); } await this.queue.publish(payload.event, payload.data); } }
typescriptinterface Profile { id: string; username: string; displayName: string; bio: string; avatarUrl: string; links: Link[]; theme: ThemeConfig; lastModified: Date; } interface Link { id: string; title: string; url: string; position: number; clickCount: number; enabled: boolean; } interface ClickEvent { linkId: string; profileId: string; referrer: string; timestamp: Date; geo: { country: string; region: string }; }
Running this architecture produces a cached profile API, a real-time click analytics pipeline, and webhook-driven cache invalidation that keeps profiles fresh within 5 minutes of any update.
| Component | Failure Mode | Recovery | |-----------|-------------|----------| | Linktree API | 429 rate limit | Exponential backoff with jitter, serve stale cache | | Redis | Connection lost | Fall through to API direct, warm cache on reconnect | | Event Queue | Consumer lag | Dead-letter after 3 retries, alert on DLQ depth | | Webhook Ingester | Duplicate delivery | Idempotent upsert keyed on event ID | | Analytics Store | Write timeout | Buffer in memory, flush on recovery |
bash# Fetch a profile through the cached service layer curl http://localhost:3000/api/profiles/myusername # Trigger a manual cache invalidation after bulk link update curl -X POST http://localhost:3000/api/cache/invalidate/myusername
See linktree-deploy-integration.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | pass→pass | 56,720 | 24,049 | -58% | 1 | 1 | 0% | 8,183 | 5,320 | -35% | 0 | 0 | — |
case-02 | fail→fail | 58,814 | 46,120 | -22% | 1 | 1 | 0% | 8,099 | 7,655 | -5% | 0 | 0 | — |
case-03 | fail→pass | 42,837 | 50,702 | +18% | 1 | 1 | 0% | 7,224 | 8,429 | +17% | 0 | 0 | — |
case-04 | fail→pass | 21,736 | 23,599 | +9% | 1 | 1 | 0% | 2,637 | 4,600 | +74% | 0 | 0 | — |
case-05 | fail→pass | 12,816 | 16,310 | +27% | 1 | 1 | 0% | 2,155 | 3,203 | +49% | 0 | 0 | — |
case-06 | pass→pass | 12,282 | 6,454 | -47% | 1 | 1 | 0% | 1,945 | 2,293 | +18% | 0 | 0 | — |
case-07 | pass→pass | 43,275 | 19,486 | -55% | 1 | 1 | 0% | 2,489 | 3,785 | +52% | 0 | 0 | — |
case-22 | pass→pass | 19,988 | 14,274 | -29% | 1 | 1 | 0% | 1,901 | 2,777 | +46% | 0 | 0 | — |
case-08 | fail→pass | 12,428 | 12,989 | +5% | 1 | 1 | 0% | 1,233 | 2,142 | +74% | 0 | 0 | — |
case-09 | pass→pass | 16,926 | 2,342 | -86% | 1 | 1 | 0% | 2,305 | 1,690 | -27% | 0 | 0 | — |
case-10 | pass→pass | 22,813 | 27,001 | +18% | 1 | 1 | 0% | 2,905 | 4,519 | +56% | 0 | 0 | — |
case-11 | fail→pass | 22,177 | 23,696 | +7% | 1 | 1 | 0% | 2,850 | 4,548 | +60% | 0 | 0 | — |
case-12 | fail→pass | 18,757 | 3,556 | -81% | 1 | 1 | 0% | 2,559 | 1,796 | -30% | 0 | 0 | — |
case-13 | pass→pass | 19,134 | 6,877 | -64% | 1 | 1 | 0% | 2,457 | 2,303 | -6% | 0 | 0 | — |
case-14 | pass→pass | 17,134 | 10,583 | -38% | 1 | 1 | 0% | 2,111 | 2,313 | +10% | 0 | 0 | — |
case-15 | pass→fail | 14,375 | 2,411 | -83% | 1 | 1 | 0% | 1,289 | 1,763 | +37% | 0 | 0 | — |
case-16 | pass→pass | 14,145 | 9,251 | -35% | 1 | 1 | 0% | 1,350 | 1,832 | +36% | 0 | 0 | — |
case-17 | pass→pass | 16,008 | 15,999 | -0% | 1 | 1 | 0% | 2,279 | 3,588 | +57% | 0 | 0 | — |
case-18 | pass→pass | 17,544 | 13,613 | -22% | 1 | 1 | 0% | 1,813 | 2,815 | +55% | 0 | 0 | — |
case-19 | fail→pass | 22,337 | 24,391 | +9% | 1 | 1 | 0% | 2,737 | 4,762 | +74% | 0 | 0 | — |
case-20 | fail→fail | 28,741 | 20,403 | -29% | 1 | 1 | 0% | 3,297 | 4,040 | +23% | 0 | 0 | — |
case-21 | pass→pass | 14,604 | 13,658 | -6% | 1 | 1 | 0% | 1,572 | 2,807 | +79% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +27 percentage points is the difference between those two pass rates over the 22 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.