notion-upgrade-migration
Upgrade @notionhq/client SDK versions and migrate between Notion API versions. Use when updating SDK packages, handling breaking changes between API versions, adopting new SDK features like comments API or status properties, or migrating Python notion-client. Trigger with phrases like "upgrade notion SDK", "notion migration", "notion breaking changes", "update notionhq client", "notion API version upgrade", "notion deprecation".
What this skill does
# Notion Upgrade & Migration
## Overview
Step-by-step guide for upgrading `@notionhq/client` (Node.js) and `notion-client` (Python) SDK versions, migrating between Notion API versions, handling breaking changes, and adopting newly released features. Covers the current stable API version `2022-06-28` and the SDK feature timeline through v2.x.
## Prerequisites
- Existing project with `@notionhq/client` or `notion-client` installed
- Git repository with clean working tree (no uncommitted changes)
- Test suite covering Notion API calls (or willingness to add verification tests)
- `NOTION_TOKEN` environment variable configured
## Instructions
### Step 1: Audit Current Versions and API Surface
Determine what you are running today before changing anything.
```bash
# Node.js — check installed SDK version
npm ls @notionhq/client
# Node.js — check latest available
npm view @notionhq/client version
# Python — check installed SDK version
pip show notion-client 2>/dev/null | grep Version
# Python — check latest available
pip index versions notion-client 2>/dev/null | head -1
# Find which API version your code specifies
grep -rn "notionVersion\|Notion-Version\|notion_version" src/ lib/ app/ 2>/dev/null
```
Record the current SDK version and API version before proceeding. If no `notionVersion` is set explicitly, the SDK uses its built-in default (typically `2022-06-28` for current releases).
**SDK version history — key milestones:**
| SDK Version | Notable Additions |
|-------------|-------------------|
| `2.2.0` | Comments API support (`notion.comments.create`, `notion.comments.list`) |
| `2.2.3` | Status property type in database schemas |
| `2.2.4` | Unique ID property, verification property |
| `2.2.13` | Improved TypeScript discriminated unions for block types |
| `2.2.15` | Current stable — bug fixes, dependency updates |
**API version timeline:**
| API Version | Key Changes |
|-------------|-------------|
| `2022-02-22` | Rich text standardization, consistent pagination |
| `2022-06-28` | **Current stable** — most tutorials and production apps use this |
### Step 2: Perform the Upgrade
Create an isolated branch, upgrade the package, and address breaking changes before merging.
**Node.js upgrade:**
```bash
# Create upgrade branch
git checkout -b upgrade/notionhq-client-$(npm view @notionhq/client version)
# Upgrade to latest
npm install @notionhq/client@latest
# Review what changed
npm ls @notionhq/client
git diff package.json package-lock.json
```
**Python upgrade:**
```bash
git checkout -b upgrade/notion-client-$(pip show notion-client 2>/dev/null | grep Version | awk '{print $2}')
pip install --upgrade notion-client
# Verify
pip show notion-client | grep Version
```
**Breaking changes to check after any major version bump:**
```typescript
// 1. Import paths — endpoint types moved in some releases
// OLD (pre-2.2.x):
import type { QueryDatabaseResponse } from '@notionhq/client/build/src/api-endpoints';
// CURRENT (2.2.x):
import type {
PageObjectResponse,
DatabaseObjectResponse,
BlockObjectResponse,
QueryDatabaseResponse,
} from '@notionhq/client/build/src/api-endpoints';
// 2. Error handling imports are stable across all 2.x versions
import { Client, isNotionClientError, APIErrorCode, ClientErrorCode } from '@notionhq/client';
// 3. New property types — code must handle unknown types gracefully
function extractProperty(prop: any): string {
switch (prop.type) {
case 'title': return prop.title.map((t: any) => t.plain_text).join('');
case 'rich_text': return prop.rich_text.map((t: any) => t.plain_text).join('');
case 'status': return prop.status?.name ?? ''; // Added in 2.2.3
case 'unique_id': return String(prop.unique_id?.number ?? ''); // Added in 2.2.4
default: return `[unhandled: ${prop.type}]`;
}
}
// 4. Pin API version explicitly for reproducible behavior
const notion = new Client({
auth: process.env.NOTION_TOKEN,
notionVersion: '2022-06-28', // Always pin — do not rely on SDK default
});
```
**Python breaking changes:**
```python
from notion_client import Client, APIResponseError
# Pin API version explicitly
notion = Client(
auth=os.environ["NOTION_TOKEN"],
notion_version="2022-06-28", # Explicit pin
)
# New in recent versions: comments API
comments = notion.comments.list(block_id=page_id)
# Status property (requires SDK that supports it)
# Returns: {"type": "status", "status": {"name": "In Progress", "color": "blue"}}
```
### Step 3: Verify and Test the Upgrade
Run targeted verification tests to confirm nothing broke. Test each API surface your application uses.
```typescript
import { Client } from '@notionhq/client';
const notion = new Client({
auth: process.env.NOTION_TOKEN,
notionVersion: '2022-06-28',
});
// Test 1: Authentication and user listing
async function verifyAuth(): Promise<void> {
const { results } = await notion.users.list({});
console.log(`Auth OK — ${results.length} users found`);
}
// Test 2: Database query (most common operation)
async function verifyDatabaseQuery(databaseId: string): Promise<void> {
const response = await notion.databases.query({
database_id: databaseId,
page_size: 5,
});
console.log(`Query OK — ${response.results.length} pages, has_more=${response.has_more}`);
// Verify property types are still parsed correctly
for (const page of response.results) {
if ('properties' in page) {
const types = Object.values(page.properties).map(p => p.type);
console.log(` Property types: ${[...new Set(types)].join(', ')}`);
}
}
}
// Test 3: Page creation and archival (write path)
async function verifyPageLifecycle(databaseId: string): Promise<void> {
const page = await notion.pages.create({
parent: { database_id: databaseId },
properties: {
Name: { title: [{ text: { content: `Upgrade test ${Date.now()}` } }] },
},
});
console.log(`Create OK — page ${page.id}`);
await notion.pages.update({ page_id: page.id, archived: true });
console.log('Archive OK');
}
// Test 4: Block operations (read + append)
async function verifyBlocks(pageId: string): Promise<void> {
const { results } = await notion.blocks.children.list({ block_id: pageId });
console.log(`Block list OK — ${results.length} blocks`);
await notion.blocks.children.append({
block_id: pageId,
children: [{
paragraph: { rich_text: [{ text: { content: 'Upgrade verification block' } }] },
}],
});
console.log('Block append OK');
}
// Test 5: Comments API (available since SDK 2.2.0)
async function verifyComments(pageId: string): Promise<void> {
try {
const { results } = await notion.comments.list({ block_id: pageId });
console.log(`Comments OK — ${results.length} comments`);
} catch (err) {
console.log('Comments API not available in this SDK version');
}
}
// Run all verification
await verifyAuth();
await verifyDatabaseQuery(process.env.TEST_DB_ID!);
await verifyPageLifecycle(process.env.TEST_DB_ID!);
await verifyBlocks(process.env.TEST_PAGE_ID!);
await verifyComments(process.env.TEST_PAGE_ID!);
```
After all tests pass, merge the upgrade branch:
```bash
npm test # Run project test suite
git add -A
git commit -m "chore: upgrade @notionhq/client to $(npm ls @notionhq/client --depth=0 | grep @notionhq)"
git checkout main && git merge -
```
## Output
- SDK upgraded to the latest stable release with exact version pinned in `package.json`
- API version explicitly set in client initialization (not relying on SDK default)
- New property types (status, unique_id) handled in extraction logic
- All existing API calls verified — database queries, page CRUD, block operations
- Upgrade branch merged with clean test run
## Error Handling
| Issue | Cause | Solution |
|-------|-------|----------|
| `TypeError: Cannot read properties of undefined` | New property type returned by API that code does not handle | Add a default case to property type switch — see SteRelated 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.