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".
What this skill does
# OneNote Production Checklist
## Overview
OneNote integrations that work perfectly in development break in production in predictable ways: SharePoint document libraries exceed the 5,000-item view threshold and stop returning notebooks, image uploads silently truncate above 4MB, rate limits compound across users during business hours, and MSAL token caches lose state across container restarts. This skill is a comprehensive go/no-go checklist organized by failure category. Each item references the specific Graph API behavior that causes the production failure and provides the fix. Use this checklist during launch reviews — every unchecked item is a production incident waiting to happen.
## Prerequisites
- A functional OneNote integration that works in development/staging
- Azure AD app registration with delegated permissions configured
- Access to production monitoring infrastructure (logging, alerting)
- Familiarity with your deployment environment (containers, VMs, serverless)
- Completed `onenote-security-basics` and `onenote-rate-limits` skills
## Instructions
### 1. Authentication Checklist
| # | Check | Why it matters |
|:-:|-------|---------------|
| 1.1 | Using delegated auth (DeviceCodeCredential or InteractiveBrowserCredential) | App-only auth (ClientSecretCredential) deprecated for OneNote March 31, 2025 |
| 1.2 | MSAL token cache serialized to persistent storage | Container restarts lose in-memory cache; users forced to re-authenticate |
| 1.3 | Silent token renewal tested (call `acquire_token_silent` before every request) | Access tokens expire in 1 hour; without silent renewal, users hit 401 hourly |
| 1.4 | Refresh token 90-day expiry monitored | Inactive users' refresh tokens expire silently; need re-auth flow |
| 1.5 | Token cache file permissions set to 0600 (owner-only) | Cache contains refresh tokens — world-readable is a credential leak |
| 1.6 | Multi-tenant: `tid` claim validated on every token | Prevents cross-tenant data leakage from token reuse |
**Verification test:**
```python
import os, time
def verify_auth_resilience(client):
"""Test that auth survives token expiry cycle."""
# 1. Make a call to confirm auth works
response = client.me.onenote.notebooks.get()
assert response.value is not None, "Initial auth failed"
# 2. Verify token cache exists on disk
cache_path = os.path.expanduser("~/.onenote-token-cache.json")
assert os.path.exists(cache_path), "Token cache not persisted"
stat = os.stat(cache_path)
assert oct(stat.st_mode)[-3:] == "600", f"Cache permissions {oct(stat.st_mode)} not 600"
# 3. Verify silent renewal works (simulate expired access token)
response2 = client.me.onenote.notebooks.get()
assert response2.value is not None, "Silent renewal failed"
print("Auth resilience: PASS")
```
### 2. Rate Limit Checklist
| # | Check | Why it matters |
|:-:|-------|---------------|
| 2.1 | Retry-After header parsed and honored on 429 responses | Ignoring Retry-After escalates throttling duration |
| 2.2 | Exponential backoff implemented (not fixed delay) | Fixed delays waste time on short throttles, not enough on long ones |
| 2.3 | Per-user call tracking in place | One power user can consume the entire 600/min budget |
| 2.4 | Tenant-level rate tracked (10,000/10min across all users) | Dev testing per-user never reveals the tenant ceiling |
| 2.5 | Queue-based throttling for batch operations | Bursting 200 requests fails; queuing 20/second succeeds |
| 2.6 | 429 alert configured (threshold: >1% of requests) | Early warning before users notice degradation |
**Retry-After implementation:**
```typescript
async function callWithRetry(
client: any,
apiPath: string,
maxRetries: number = 3
): Promise<any> {
for (let attempt = 0; attempt <= maxRetries; attempt++) {
try {
return await client.api(apiPath).get();
} catch (error: any) {
if (error.statusCode === 429 && attempt < maxRetries) {
const retryAfter = parseInt(error.headers?.["retry-after"] || "5", 10);
console.warn(
`Rate limited. Retry-After: ${retryAfter}s (attempt ${attempt + 1}/${maxRetries})`
);
await new Promise((resolve) => setTimeout(resolve, retryAfter * 1000));
} else {
throw error;
}
}
}
}
```
### 3. Error Handling Checklist
All seven Graph API error codes must have explicit handlers:
| # | Code | Handler required |
|:-:|:----:|-----------------|
| 3.1 | `400 Bad Request` | Validate XHTML before sending; log request body for debugging |
| 3.2 | `403 Forbidden` | Check scope in token; detect app-only auth usage; surface to user as "permissions needed" |
| 3.3 | `404 Not Found` | Handle deleted notebooks/sections/pages gracefully; clear local cache entry |
| 3.4 | `429 Too Many Requests` | Retry with Retry-After header (see section 2) |
| 3.5 | `500 Internal Server Error` | Retry with exponential backoff; log `request-id` header for Microsoft support |
| 3.6 | `502 Bad Gateway` | Retry once; if persistent, check for expired token edge case |
| 3.7 | `507 Insufficient Storage` | Section page limit hit; alert admin; suggest archival |
**Critical: Always log the `request-id` response header.** Microsoft support requires this for incident investigation:
```python
import logging
logger = logging.getLogger("onenote")
async def safe_api_call(client, api_path: str):
try:
return await client.api(api_path).get()
except Exception as e:
request_id = getattr(e, "headers", {}).get("request-id", "unknown")
logger.error(
f"Graph API error: {e} | path={api_path} | request-id={request_id}"
)
raise
```
### 4. Content Validation Checklist
| # | Check | Why it matters |
|:-:|-------|---------------|
| 4.1 | HTML validated as XHTML before POST (all tags closed, UTF-8) | Graph API silently strips invalid HTML — pages render incorrectly with no error |
| 4.2 | Page content size checked (< 4MB per page) | Oversized content silently truncates or returns 400 |
| 4.3 | Image format validated (PNG, JPEG, GIF only) | Unsupported formats (WebP, AVIF) silently fail |
| 4.4 | Image size checked (< 10MB per image) | Large images cause timeout during page creation |
| 4.5 | Embedded file count checked (< 10 per page) | Too many attachments cause 507 errors |
**XHTML validation before send:**
```python
from html.parser import HTMLParser
SELF_CLOSING_TAGS = {"br", "hr", "img", "input", "meta", "link"}
class XHTMLValidator(HTMLParser):
def __init__(self):
super().__init__()
self.errors = []
self.open_tags = []
def handle_starttag(self, tag, attrs):
if tag not in SELF_CLOSING_TAGS:
self.open_tags.append(tag)
def handle_endtag(self, tag):
if tag in SELF_CLOSING_TAGS:
return
if not self.open_tags or self.open_tags[-1] != tag:
self.errors.append(f"Mismatched close tag: </{tag}>")
else:
self.open_tags.pop()
def validate(self, html: str) -> list[str]:
self.feed(html)
if self.open_tags:
self.errors.append(f"Unclosed tags: {self.open_tags}")
return self.errors
def validate_page_content(html_body: str) -> tuple[bool, list[str]]:
"""Validate content before sending to OneNote API."""
issues = []
# Size check
size_bytes = len(html_body.encode("utf-8"))
if size_bytes > 4 * 1024 * 1024:
issues.append(f"Content too large: {size_bytes / 1024 / 1024:.1f}MB (max 4MB)")
# XHTML validation
validator = XHTMLValidator()
html_errors = validator.validate(html_body)
issues.extend(html_errors)
return len(issues) == 0, issues
```
### 5. SharePoint-Specific Checklist
| # | Check | Why it matters |
|:-:|-------|---------------|
| 5.1 | Site-id resolved via Graph API (not hardcoded) | Site-ids change when sites are recreated or migrated |
| 5.2 | Document library item count monitored | LibraRelated in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.