Claude Code skill pack for OneNote (18 skills)
Installation
Open Claude Code and run this command:
/plugin install onenote-pack@claude-code-plugins-plus
Use --global to install for all projects, or --project for current project only.
Skills (18)
Configure OneNote CI/CD integration with GitHub Actions and testing.
OneNote CI Integration
Overview
Set up CI/CD pipelines for OneNote integrations with automated testing.
Prerequisites
- GitHub repository with Actions enabled
- OneNote test API key
- npm/pnpm project configured
Instructions
Step 1: Create GitHub Actions Workflow
Create .github/workflows/onenote-integration.yml:
name: OneNote Integration Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
ONENOTE_API_KEY: ${{ secrets.ONENOTE_API_KEY }}
jobs:
test:
runs-on: ubuntu-latest
env:
ONENOTE_API_KEY: ${{ secrets.ONENOTE_API_KEY }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npm test -- --coverage
- run: npm run test:integration
Step 2: Configure Secrets
gh secret set ONENOTE_API_KEY --body "sk_test_***"
Step 3: Add Integration Tests
describe('OneNote Integration', () => {
it.skipIf(!process.env.ONENOTE_API_KEY)('should connect', async () => {
const client = getOneNoteClient();
const result = await client.healthCheck();
expect(result.status).toBe('ok');
});
});
Output
- Automated test pipeline
- PR checks configured
- Coverage reports uploaded
- Release workflow ready
Error Handling
| Issue | Cause | Solution |
|---|---|---|
| Secret not found | Missing configuration | Add secret via gh secret set |
| Tests timeout | Network issues | Increase timeout or mock |
| Auth failures | Invalid key | Check secret value |
Examples
Release Workflow
on:
push:
tags: ['v*']
jobs:
release:
runs-on: ubuntu-latest
env:
ONENOTE_API_KEY: ${{ secrets.ONENOTE_API_KEY_PROD }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: npm ci
- name: Verify OneNote production readiness
run: npm run test:integration
- run: npm run build
- run: npm publish
Branch Protection
required_status_checks:
- "test"
- "onenote-integration"
Resources
Next Steps
For deployment patterns, see onenote-de
Diagnose and fix OneNote common errors and exceptions.
OneNote Common Errors
Overview
Quick reference for the top 10 most common OneNote errors and their solutions.
Prerequisites
- OneNote SDK installed
- API credentials configured
- Access to error logs
Instructions
Step 1: Identify the Error
Check error message and code in your logs or console.
Step 2: Find Matching Error Below
Match your error to one of the documented cases.
Step 3: Apply Solution
Follow the solution steps for your specific error.
Output
- Identified error cause
- Applied fix
- Verified resolution
Error Handling
Authentication Failed
Error Message:
Authentication error: Invalid API key
Cause: API key is missing, expired, or invalid.
Solution:
# Verify API key is set
echo $ONENOTE_API_KEY
Rate Limit Exceeded
Error Message:
Rate limit exceeded. Please retry after X seconds.
Cause: Too many requests in a short period.
Solution:
Implement exponential backoff. See onenote-rate-limits skill.
Network Timeout
Error Message:
Request timeout after 30000ms
Cause: Network connectivity or server latency issues.
Solution:
// Increase timeout
const client = new Client({ timeout: 60000 });
Examples
Quick Diagnostic Commands
# Check OneNote status
curl -s https://status.onenote.com
# Verify API connectivity
curl -I https://api.onenote.com
# Check local configuration
env | grep ONENOTE
Escalation Path
- Collect evidence with
onenote-debug-bundle - Check OneNote status page
- Contact support with request ID
Resources
Next Steps
For comprehensive debugging, see onenote-debug-bundle.
Execute OneNote primary workflow: Core Workflow A.
OneNote Core Workflow A
Overview
Primary money-path workflow for OneNote. This is the most common use case.
Prerequisites
- Completed
onenote-install-authsetup - Understanding of OneNote core concepts
- Valid API credentials configured
Instructions
Step 1: Initialize
// Step 1 implementation
Step 2: Execute
// Step 2 implementation
Step 3: Finalize
// Step 3 implementation
Output
- Completed Core Workflow A execution
- Expected results from OneNote API
- Success confirmation or error details
Error Handling
| Error | Cause | Solution |
|---|---|---|
| Error 1 | Cause | Solution |
| Error 2 | Cause | Solution |
Examples
Complete Workflow
// Complete workflow example
Common Variations
- Variation 1: Description
- Variation 2: Description
Resources
Next Steps
For secondary workflow, see onenote-core-workflow-b.
Execute OneNote secondary workflow: Core Workflow B.
OneNote Core Workflow B
Overview
Secondary workflow for OneNote. Complements the primary workflow.
Prerequisites
- Completed
onenote-install-authsetup - Familiarity with
onenote-core-workflow-a - Valid API credentials configured
Instructions
Step 1: Setup
// Step 1 implementation
Step 2: Process
// Step 2 implementation
Step 3: Complete
// Step 3 implementation
Output
- Completed Core Workflow B execution
- Results from OneNote API
- Success confirmation or error details
Error Handling
| Aspect | Workflow A | Workflow B |
|---|---|---|
| Use Case | Primary | Secondary |
| Complexity | Medium | Lower |
| Performance | Standard | Optimized |
Examples
Complete Workflow
// Complete workflow example
Error Recovery
// Error handling code
Resources
Next Steps
For common errors, see onenote-common-errors.
Optimize OneNote costs through tier selection, sampling, and usage monitoring.
OneNote Cost Tuning
Overview
Optimize OneNote costs through smart tier selection, sampling, and usage monitoring.
Prerequisites
- Access to OneNote billing dashboard
- Understanding of current usage patterns
- Database for usage tracking (optional)
- Alerting system configured (optional)
Pricing Tiers
| Tier | Monthly Cost | Included | Overage |
|---|---|---|---|
| Free | $0 | 1,000 requests | N/A |
| Pro | $99 | 100,000 requests | $0.001/request |
| Enterprise | Custom | Unlimited | Volume discounts |
Cost Estimation
interface UsageEstimate {
requestsPerMonth: number;
tier: string;
estimatedCost: number;
recommendation?: string;
}
function estimateOneNoteCost(requestsPerMonth: number): UsageEstimate {
if (requestsPerMonth <= 1000) {
return { requestsPerMonth, tier: 'Free', estimatedCost: 0 };
}
if (requestsPerMonth <= 100000) {
return { requestsPerMonth, tier: 'Pro', estimatedCost: 99 };
}
const proOverage = (requestsPerMonth - 100000) * 0.001;
const proCost = 99 + proOverage;
return {
requestsPerMonth,
tier: 'Pro (with overage)',
estimatedCost: proCost,
recommendation: proCost > 500
? 'Consider Enterprise tier for volume discounts'
: undefined,
};
}
Usage Monitoring
class OneNoteUsageMonitor {
private requestCount = 0;
private bytesTransferred = 0;
private alertThreshold: number;
constructor(monthlyBudget: number) {
this.alertThreshold = monthlyBudget * 0.8; // 80% warning
}
track(request: { bytes: number }) {
this.requestCount++;
this.bytesTransferred += request.bytes;
if (this.estimatedCost() > this.alertThreshold) {
this.sendAlert('Approaching OneNote budget limit');
}
}
estimatedCost(): number {
return estimateOneNoteCost(this.requestCount).estimatedCost;
}
private sendAlert(message: string) {
// Send to Slack, email, PagerDuty, etc.
}
}
Cost Reduction Strategies
Step 1: Request Sampling
function shouldSample(samplingRate = 0.1): boolean {
return Math.random() < samplingRate;
}
// Use for non-critical telemetry
if (shouldSample(0.1)) { // 10% sample
await onenoteClient.trackEvent(event);
}
Step 2: Batching Requests
// Instead of N individual calls
await Promise.all(ids.map(id => onenoteClient.get(id)));
// Use batch endpoint (1 call)
await onenoteClient.batchGet(ids);
Step 3: Caching (from P16)
- Cache frequently accessed data
- Use cache inva
Collect OneNote debug evidence for support tickets and troubleshooting.
OneNote Debug Bundle
Overview
Collect all necessary diagnostic information for OneNote support tickets.
Prerequisites
- OneNote SDK installed
- Access to application logs
- Permission to collect environment info
Instructions
Step 1: Create Debug Bundle Script
#!/bin/bash
# onenote-debug-bundle.sh
BUNDLE_DIR="onenote-debug-$(date +%Y%m%d-%H%M%S)"
mkdir -p "$BUNDLE_DIR"
echo "=== OneNote Debug Bundle ===" > "$BUNDLE_DIR/summary.txt"
echo "Generated: $(date)" >> "$BUNDLE_DIR/summary.txt"
Step 2: Collect Environment Info
# Environment info
echo "--- Environment ---" >> "$BUNDLE_DIR/summary.txt"
node --version >> "$BUNDLE_DIR/summary.txt" 2>&1
npm --version >> "$BUNDLE_DIR/summary.txt" 2>&1
echo "ONENOTE_API_KEY: ${ONENOTE_API_KEY:+[SET]}" >> "$BUNDLE_DIR/summary.txt"
Step 3: Gather SDK and Logs
# SDK version
npm list @onenote/sdk 2>/dev/null >> "$BUNDLE_DIR/summary.txt"
# Recent logs (redacted)
grep -i "onenote" ~/.npm/_logs/*.log 2>/dev/null | tail -50 >> "$BUNDLE_DIR/logs.txt"
# Configuration (redacted - secrets masked)
echo "--- Config (redacted) ---" >> "$BUNDLE_DIR/summary.txt"
cat .env 2>/dev/null | sed 's/=.*/=***REDACTED***/' >> "$BUNDLE_DIR/config-redacted.txt"
# Network connectivity test
echo "--- Network Test ---" >> "$BUNDLE_DIR/summary.txt"
echo -n "API Health: " >> "$BUNDLE_DIR/summary.txt"
curl -s -o /dev/null -w "%{http_code}" https://api.onenote.com/health >> "$BUNDLE_DIR/summary.txt"
echo "" >> "$BUNDLE_DIR/summary.txt"
Step 4: Package Bundle
tar -czf "$BUNDLE_DIR.tar.gz" "$BUNDLE_DIR"
echo "Bundle created: $BUNDLE_DIR.tar.gz"
Output
onenote-debug-YYYYMMDD-HHMMSS.tar.gzarchive containing:summary.txt- Environment and SDK infologs.txt- Recent redacted logsconfig-redacted.txt- Configuration (secrets removed)
Error Handling
| Item | Purpose | Included | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Environment versions | Compatibility check | ✓ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SDK version | Version-specific bugs | ✓ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Error logs (redacted) | Root cause analysis | ✓ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Config (redacted) | Configuration issues | ✓ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Network
Deploy OneNote integrations to Vercel, Fly.
ReadWriteEditBash(vercel:*)Bash(fly:*)Bash(gcloud:*)
OneNote Deploy IntegrationOverviewDeploy OneNote-powered applications to popular platforms with proper secrets management. Prerequisites
Vercel DeploymentEnvironment Setup
vercel.json Configuration
Fly.io Deploymentfly.toml
Secrets
Google Cloud RunDockerfile
Deploy Script
Environment Configuration Pattern
Health Check EndpointCreate a minimal working OneNote example.
ReadWriteEdit
OneNote Hello WorldOverviewMinimal working example demonstrating core OneNote functionality. Prerequisites
InstructionsStep 1: Create Entry FileCreate a new file for your hello world example. Step 2: Import and Initialize Client
Step 3: Make Your First API Call
Output
Error Handling
ExamplesTypeScript Example
Python Example
ResourcesNext StepsProceed to Install and configure OneNote SDK/CLI authentication.
ReadWriteEditBash(npm:*)Bash(pip:*)Grep
OneNote Install & AuthOverviewSet up OneNote SDK/CLI and configure authentication credentials. Prerequisites
InstructionsStep 1: Install SDK
Step 2: Configure Authentication
Step 3: Verify Connection
Output
Error Handling
ExamplesTypeScript Setup
Python Setup
ResourcesNext StepsAfter successful auth, proceed to Configure OneNote local development with hot reload and testing.
ReadWriteEditBash(npm:*)Bash(pnpm:*)Grep
OneNote Local Dev LoopOverviewSet up a fast, reproducible local development workflow for OneNote. Prerequisites
InstructionsStep 1: Create Project Structure
Step 2: Configure Environment
Step 3: Setup Hot Reload
Step 4: Configure Testing
Output
Error Handling
ExamplesMock OneNote Responses
Debug Mode
ResourcesOptimize OneNote API performance with caching, batching, and connection pooling.
ReadWriteEdit
OneNote Performance TuningOverviewOptimize OneNote API performance with caching, batching, and connection pooling. Prerequisites
Latency Benchmarks
Caching StrategyResponse Caching
Redis Caching (Distributed)
Request Batching
Connection Optimization
Pagination OptimizationExecute OneNote production deployment checklist and rollback procedures.
ReadBash(kubectl:*)Bash(curl:*)Grep
OneNote Production ChecklistOverviewComplete checklist for deploying OneNote integrations to production. Prerequisites
InstructionsStep 1: Pre-Deployment Configuration
Step 2: Code Quality Verification
Step 3: Infrastructure Setup
Step 4: Documentation Requirements
Step 5: Deploy with Gradual Rollout
Output
Error Handling
ExamplesHealth Check ImplementationImplement OneNote rate limiting, backoff, and idempotency patterns.
ReadWriteEdit
OneNote Rate LimitsOverviewHandle OneNote rate limits gracefully with exponential backoff and idempotency. Prerequisites
InstructionsStep 1: Understand Rate Limit Tiers
Step 2: Implement Exponential Backoff with Jitter
Step 3: Add Idempotency Keys
Output
Error Handling
|