onenote-sdk-patterns

Featured

Production SDK patterns for OneNote Graph API: retry logic, batch requests, and safe file uploads. Use when building production OneNote integrations that need rate limit handling and reliable uploads. Trigger with "onenote sdk patterns", "onenote retry logic", "onenote batch requests".

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# OneNote SDK Patterns ## Overview Production-grade patterns for the OneNote Graph API. The two biggest production issues are rate limits (600 requests per 60 seconds per user, 10,000 per 10 minutes per tenant) and silent upload failures where files >4MB return 200 OK with an empty response body — the page is never created but no error is raised. This skill provides middleware chains, retry decorators, batch request patterns, and silent failure detection for both TypeScript and Python. ## Prerequisites - Completed `onenote-install-auth` — working Graph API authentication - Understanding of async/await patterns in your target language - Node.js 18+ or Python 3.10+ ## Instructions ### Pattern 1: Retry Middleware with Retry-After Header Parsing (TypeScript) The Graph API returns a `Retry-After` header (in seconds) with 429 responses. Hardcoding a fixed retry delay wastes time or hits limits again. ```typescript import { Client, ClientOptions } from "@microsoft/microsoft-graph-client"; class RetryHandler { private maxRetries = 3; async execute( context: { request: Request; options: RequestInit }, next: (context: any) => Promise<Response> ): Promise<Response> { let lastError: Error | null = null; for (let attempt = 0; attempt <= this.maxRetries; attempt++) { try { const response = await next(context); if (response.status === 429) { const retryAfter = response.headers.get("Retry-After"); const waitSeconds ...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

onenote-rate-limits

Implement proper rate limit handling for OneNote Graph API with queue-based throttling. Use when building high-throughput OneNote integrations or debugging 429 errors. Trigger with "onenote rate limit", "onenote 429", "onenote throttling", "graph api throttle".

2,266 Updated today
jeremylongshore
AI & Automation Featured

onenote-performance-tuning

Optimize OneNote Graph API performance for large notebooks, image handling, and batch operations. Use when dealing with slow API responses, large notebooks, image uploads, or HTTP 507 errors. Trigger with "onenote performance", "onenote slow", "onenote large notebook", "onenote image upload".

2,266 Updated today
jeremylongshore
AI & Automation Featured

notion-reliability-patterns

Graceful degradation when Notion is down: offline cache, retry with exponential backoff, circuit breaker, health checks, and fallback content. Use when building fault-tolerant Notion integrations for production. Trigger with phrases like "notion reliability", "notion circuit breaker", "notion offline fallback", "notion health check", "notion graceful degradation".

2,266 Updated today
jeremylongshore
AI & Automation Featured

onenote-prod-checklist

Production readiness checklist for OneNote Graph API integrations covering auth, rate limits, and failure modes. Use when preparing a OneNote integration for production deployment or conducting a launch review. Trigger with "onenote production checklist", "onenote launch review", "onenote prod ready".

2,266 Updated today
jeremylongshore
AI & Automation Featured

attio-sdk-patterns

Production-ready patterns for the Attio REST API: typed client, retry with backoff, pagination iterators, and multi-tenant factory. Trigger: "attio SDK patterns", "attio best practices", "attio client wrapper", "idiomatic attio", "attio TypeScript patterns".

2,266 Updated today
jeremylongshore