linktree-sdk-patterns
FeaturedSdk Patterns for Linktree. Trigger: "linktree sdk patterns".
AI & Automation 2,926 stars
433 forks Updated yesterday MIT
Install
Quality Score: 99/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# Linktree SDK Patterns
## Overview
Linktree's REST API exposes profile management, link CRUD, click analytics, and appearance theming through bearer-token authentication. A structured SDK client matters here because Linktree enforces strict per-minute rate limits on analytics endpoints and returns nested profile objects that benefit from strong typing. These patterns provide a thread-safe singleton, typed error classification, fluent request building for paginated link lists, and test utilities for mocking profile and analytics responses.
## Prerequisites
- Node.js 18+, TypeScript 5+
- `LINKTREE_API_KEY` environment variable (generated in Linktree admin > Settings > Developer)
- `axios` or `node-fetch` for HTTP transport
## Singleton Client
```typescript
interface LinktreeConfig {
apiKey: string;
baseUrl?: string;
timeout?: number;
}
let client: LinktreeClient | null = null;
export function getLinktreeClient(overrides?: Partial<LinktreeConfig>): LinktreeClient {
if (!client) {
const config: LinktreeConfig = {
apiKey: process.env.LINKTREE_API_KEY ?? '',
baseUrl: 'https://api.linktr.ee/v1',
timeout: 10_000,
...overrides,
};
if (!config.apiKey) throw new Error('LINKTREE_API_KEY is required');
client = new LinktreeClient(config);
}
return client;
}
```
## Error Wrapper
```typescript
interface LinktreeError { status: number; code: string; detail: string; }
async function safeLinktree<T>(fn: () => Promise<T>): Promise<T> {...
Details
- Author
- jeremylongshore
- Repository
- jeremylongshore/claude-code-plugins-plus-skills
- Created
- 1 years ago
- Last Updated
- yesterday
- Language
- Python
- License
- MIT
Integrates with
Bundled in these plugins
Similar Skills
Semantically similar based on skill content — not just same category
AI & Automation Featured
linktree-hello-world
Create a minimal working Linktree example. Trigger: "linktree hello world", "linktree example", "test linktree".
2,926 Updated yesterday
jeremylongshore AI & Automation Featured
linktree-reference-architecture
Reference Architecture for Linktree. Trigger: "linktree reference architecture".
2,926 Updated yesterday
jeremylongshore AI & Automation Featured
clickup-sdk-patterns
Production-ready ClickUp API v2 client patterns with typed wrappers, error handling, caching, and multi-tenant support. Trigger: "clickup client wrapper", "clickup SDK patterns", "clickup best practices", "clickup typescript client", "clickup API wrapper", "production clickup code".
2,926 Updated yesterday
jeremylongshore