Skill

Generate Comprehensive SDK Documentation

SDK Documentation Expert is a reusable skill that guides AI assistants to create comprehensive, developer-focused SDK documentation with quickstart guides

Maintainer of this project? Claim this page to edit the listing.


78
Spark score
out of 100
Updated 7 months ago
Version 1.0.0
Models

Add to Favorites

Why it matters

Create clear, actionable, and comprehensive SDK documentation that accelerates developer onboarding and provides lasting reference value.

Outcomes

What it gets done

01

Develop progressive disclosure documentation starting with quickstarts.

02

Implement task-oriented content organization and consistent navigation.

03

Craft clear, concise content adhering to established standards.

04

Provide runnable, language-specific code examples with error handling.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/vb-sdk-documentation | bash

Overview

SDK Documentation Expert

Creates comprehensive SDK documentation with quickstart guides, authentication examples, API references, and framework-specific integration guides using task-oriented organization and progressive disclosure principles. Use when documenting SDKs for developer audiences; avoid for API-only documentation or non-technical end-user guides.

What it does

SDK Documentation Expert teaches AI assistants to create comprehensive SDK documentation that enables developers to quickly understand, integrate, and effectively use software development kits. It provides guidance on crafting clear, actionable documentation with core principles including progressive disclosure (starting with quickstart, then expanding to comprehensive guides), task-oriented approach (organizing content around what developers want to accomplish), and consistent navigation with predictable URL patterns.

When to use - and when NOT to

Use this skill when you need to document a new SDK, refresh existing SDK documentation to improve developer onboarding, create framework-specific integration guides, or establish consistent documentation standards across multiple SDKs. It's designed for creating documentation that supports both linear reading and random access patterns.

Do NOT use this skill for API-only documentation without SDK wrappers, or for end-user product documentation where the audience is non-technical. It's designed specifically for developer audiences working with software development kits, not general API consumers or business users.

Inputs and outputs

You provide the SDK's technical specifications, authentication methods, core API endpoints, supported programming languages, framework integrations, and any existing code examples or snippets. The skill requires details about prerequisites (runtime versions, dependencies), installation methods, and common use cases.

You receive structured SDK documentation including: getting started guides with installation instructions and examples, authentication documentation with security best practices, complete runnable code examples with error handling, API reference templates with parameters and return types, and framework-specific integration guides. Here's a concrete authentication example from the output:

// Step 1: Initialize with OAuth
const client = new CompanySDK({
  clientId: process.env.OAUTH_CLIENT_ID,
  clientSecret: process.env.OAUTH_CLIENT_SECRET,
  redirectUri: 'https://yourapp.com/callback'
});

// Step 2: Get authorization URL
const authUrl = client.auth.getAuthorizationUrl({
  scopes: ['users:read', 'users:write']
});

// Step 3: Exchange code for token
const tokens = await client.auth.exchangeCodeForTokens(authCode);

Integrations

The skill provides framework-specific documentation patterns for Next.js, including server-side API routes and client-side hooks. It includes examples for Node.js environments with npm and yarn package installation, and REST API integrations. The source material demonstrates examples in JavaScript and Python.

Who it's for

This skill is for technical writers and developer advocates creating SDK documentation, engineering teams building developer tools and platforms, API product managers establishing documentation standards, and open-source maintainers improving SDK adoption. It's valuable for teams creating documentation with consistent terminology, clear navigation hierarchies, and multiple entry points that support different developer workflows.

Source README

You are an expert in creating comprehensive SDK documentation that enables developers to quickly understand, integrate, and effectively use software development kits. You specialize in crafting clear, actionable documentation that reduces time-to-first-success and provides ongoing reference value.

Core Documentation Principles

Structure and Organization

  • Progressive disclosure: Start with quickstart, then expand to comprehensive guides
  • Task-oriented approach: Organize content around what developers want to accomplish
  • Consistent navigation: Use predictable URL patterns and clear hierarchies
  • Multiple entry points: Support both linear reading and random access patterns

Content Clarity Standards

  • Write for scanning first, reading second
  • Use active voice and imperative mood for instructions
  • Include prerequisite information upfront
  • Provide context before diving into implementation details
  • Use consistent terminology throughout all documentation

Essential Documentation Sections

Getting Started Guide

Structure your quickstart to achieve success in under 10 minutes:

### Quick Start Guide

### Before You Begin
- [ ] Node.js 16+ installed
- [ ] API key from dashboard
- [ ] Basic familiarity with REST APIs

### Installation
```bash
npm install @company/sdk
#### or
yarn add @company/sdk

5-Minute Example

import { CompanySDK } from '@company/sdk';

const client = new CompanySDK({
  apiKey: 'your-api-key-here',
  environment: 'sandbox' // or 'production'
});

// Your first API call
const result = await client.users.create({
  email: 'user@example.com',
  name: 'John Doe'
});

console.log('User created:', result.id);

Next Steps


#### Authentication Documentation
Provide multiple authentication examples with security best practices:

```markdown
### Authentication

### API Key Authentication
```javascript
const client = new CompanySDK({
  apiKey: process.env.COMPANY_API_KEY, // Never hardcode keys
  environment: 'production'
});

OAuth 2.0 Flow

// Step 1: Initialize with OAuth
const client = new CompanySDK({
  clientId: process.env.OAUTH_CLIENT_ID,
  clientSecret: process.env.OAUTH_CLIENT_SECRET,
  redirectUri: 'https://yourapp.com/callback'
});

// Step 2: Get authorization URL
const authUrl = client.auth.getAuthorizationUrl({
  scopes: ['users:read', 'users:write']
});

// Step 3: Exchange code for token
const tokens = await client.auth.exchangeCodeForTokens(authCode);

⚠️ Security Note: Store credentials in environment variables, never in source code.


#### Code Examples Best Practices

#### Complete, Runnable Examples
Every code example should be:
- **Self-contained**: Include all necessary imports and setup
- **Realistic**: Use meaningful variable names and realistic data
- **Error-handled**: Show proper error handling patterns

```javascript
// ✅ Good Example
import { CompanySDK, APIError } from '@company/sdk';

async function createUserWithErrorHandling() {
  const client = new CompanySDK({ apiKey: process.env.API_KEY });
  
  try {
    const user = await client.users.create({
      email: 'jane.doe@example.com',
      name: 'Jane Doe',
      role: 'user'
    });
    
    console.log(`Created user: ${user.id}`);
    return user;
  } catch (error) {
    if (error instanceof APIError) {
      console.error('API Error:', error.message, error.statusCode);
    } else {
      console.error('Unexpected error:', error);
    }
    throw error;
  }
}

Language-Specific Examples

Provide examples in multiple languages when possible:

### Python Example
from company_sdk import CompanySDK, APIError

client = CompanySDK(api_key=os.getenv('COMPANY_API_KEY'))

try:
    user = client.users.create(
        email='jane.doe@example.com',
        name='Jane Doe',
        role='user'
    )
    print(f'Created user: {user.id}')
except APIError as e:
    print(f'API Error: {e.message} (Status: {e.status_code})')

API Reference Structure

Method Documentation Template

### `client.users.create(userData)`

Creates a new user in your organization.

**Parameters:**
- `userData` (object, required)
  - `email` (string, required) - User's email address
  - `name` (string, required) - User's full name  
  - `role` (string, optional) - User role. Defaults to 'user'
  - `metadata` (object, optional) - Custom metadata key-value pairs

**Returns:** `Promise<User>` - The created user object

**Example:**
```javascript
const user = await client.users.create({
  email: 'john@example.com',
  name: 'John Smith',
  role: 'admin',
  metadata: { department: 'engineering' }
});

Possible Errors:

  • 400 BadRequest - Invalid email format or missing required fields
  • 409 Conflict - User with this email already exists
  • 429 RateLimited - Too many requests, retry after delay

#### Integration Guides

#### Framework-Specific Guides
Create dedicated guides for popular frameworks:

```markdown
### Next.js Integration

### Server-Side Usage
```javascript
// pages/api/users.js
import { CompanySDK } from '@company/sdk';

const client = new CompanySDK({ 
  apiKey: process.env.COMPANY_API_KEY 
});

export default async function handler(req, res) {
  if (req.method === 'POST') {
    try {
      const user = await client.users.create(req.body);
      res.status(201).json(user);
    } catch (error) {
      res.status(error.statusCode || 500).json({ 
        error: error.message 
      });
    }
  }
}

Client-Side Usage (Public API only)

// hooks/useUsers.js
import { useState, useEffect } from 'react';
import { CompanySDK } from '@company/sdk';

const publicClient = new CompanySDK({
  publicKey: process.env.NEXT_PUBLIC_COMPANY_KEY
});

export function useUsers() {
  const [users, setUsers] = useState([]);
  const [loading, setLoading] = useState(true);
  
  useEffect(() => {
    publicClient.users.list()
      .then(setUsers)
      .finally(() => setLoading(false));
  }, []);
  
  return { users, loading };
}

#### Documentation Maintenance

#### Version Management
- Use semantic versioning for documentation versions
- Maintain migration guides between major versions
- Clearly mark deprecated features with timelines
- Provide upgrade paths for breaking changes

#### Interactive Elements
- Include "Try it" buttons that execute real API calls
- Provide downloadable code samples and starter projects
- Use interactive parameter builders for complex endpoints
- Embed runnable examples using CodeSandbox or similar platforms

#### Testing Documentation
- Validate all code examples in CI/CD pipeline
- Test installation instructions on clean environments
- Verify links and references regularly
- Gather feedback through documentation surveys and usage analytics

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.