Files
our-claude-skills/custom-skills/31-notion-organizer/code/CLAUDE.md
Andrew Yim b69e4b6f3a refactor: Reorganize skill numbering and update documentation
Skill Numbering Changes:
- 01-03: OurDigital core (was 30-32)
- 31-32: Notion tools (was 01-02)
- 99_archive: Renamed from _archive for sorting

New Files:
- AGENTS.md: Claude Code agent routing guide
- requirements.txt for 00-claude-code-setting, 32-notion-writer, 43-jamie-youtube-manager

Documentation Updates:
- CLAUDE.md: Updated skill inventory (23 skills)
- AUDIT_REPORT.md: Current completion status (91%)
- Archived REFACTORING_PLAN.md (most tasks complete)

Removed:
- ga-agent-skills/ (moved to separate repo ~/Project/dintel-ga4-agent)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 18:42:39 +07:00

1.8 KiB

CLAUDE.md

Overview

Notion workspace management toolkit for database organization, schema migration, and bulk operations.

Quick Start

pip install -r scripts/requirements.txt

# Schema migration
python scripts/schema_migrator.py --source [DB_ID] --target [DB_ID] --dry-run

# Async bulk operations
python scripts/async_organizer.py --database [DB_ID] --action cleanup

Scripts

Script Purpose
schema_migrator.py Migrate data between databases with property mapping
async_organizer.py Async bulk operations (cleanup, restructure, archive)

Schema Migrator

# Dry run (preview changes)
python scripts/schema_migrator.py \
  --source abc123 \
  --target def456 \
  --mapping mapping.json \
  --dry-run

# Execute migration
python scripts/schema_migrator.py \
  --source abc123 \
  --target def456 \
  --mapping mapping.json

Mapping File Format

{
  "properties": {
    "OldName": "NewName",
    "Status": "Status"
  },
  "transforms": {
    "Date": "date_to_iso"
  }
}

Async Organizer

# Cleanup empty/stale pages
python scripts/async_organizer.py --database [ID] --action cleanup

# Archive old pages
python scripts/async_organizer.py --database [ID] --action archive --days 90

# Restructure hierarchy
python scripts/async_organizer.py --database [ID] --action restructure

Rate Limits

Limit Value
Requests/second 3 max
Items per request 100 max
Retry on 429 Exponential backoff

Configuration

Environment variables:

NOTION_TOKEN=secret_xxx

Notes

  • Always use --dry-run first for destructive operations
  • Large operations (1000+ pages) use async with progress reporting
  • Scripts implement automatic rate limiting