canva-data-handling
Implement Canva Connect API data handling, PII protection, and GDPR/CCPA compliance. Use when handling user design data, implementing data retention policies, or ensuring privacy compliance for Canva integrations. Trigger with phrases like "canva data", "canva PII", "canva GDPR", "canva data retention", "canva privacy", "canva CCPA".
What this skill does
# Canva Data Handling
## Overview
Handle Canva Connect API data responsibly. The API exposes user identifiers, design metadata, design content (via exports), uploaded assets, and comments. Apply proper classification, retention, and privacy controls.
## Data Classification — Canva API Responses
| Data Type | Source Endpoint | Sensitivity | Handling |
|-----------|----------------|-------------|----------|
| User ID, Team ID | `GET /v1/users/me` | Internal | Don't expose externally |
| User profile | `GET /v1/users/me/profile` | PII | Encrypt at rest, minimize |
| Design metadata | `GET /v1/designs` | Business | Standard protection |
| Design content | Export URLs from `/v1/exports` | Confidential | Time-limited URLs, don't cache |
| OAuth tokens | `/v1/oauth/token` | Secret | Encrypt, never log |
| Asset files | `/v1/asset-uploads` | Business | Validate, scan for malware |
| Comments | `/v1/designs/{id}/comment_threads` | PII | May contain personal data |
| Webhook payloads | Incoming POST | Mixed | Verify signature first |
## Token Protection
```typescript
// NEVER log tokens — they grant full access to a user's Canva account
function redactCanvaData(data: any): any {
const sensitiveKeys = [
'access_token', 'refresh_token', 'authorization',
'client_secret', 'code_verifier',
];
if (typeof data !== 'object' || data === null) return data;
const redacted = Array.isArray(data) ? [...data] : { ...data };
for (const key of Object.keys(redacted)) {
if (sensitiveKeys.includes(key.toLowerCase())) {
redacted[key] = '[REDACTED]';
} else if (typeof redacted[key] === 'object') {
redacted[key] = redactCanvaData(redacted[key]);
}
}
return redacted;
}
// Safe logging
console.log('Canva response:', JSON.stringify(redactCanvaData(apiResponse)));
```
## Temporary URL Handling
Canva API responses include URLs with limited lifetimes. Never cache beyond expiry.
```typescript
interface CanvaUrlPolicy {
type: string;
ttl: number; // milliseconds
cacheable: boolean;
}
const URL_POLICIES: Record<string, CanvaUrlPolicy> = {
thumbnail: { type: 'thumbnail', ttl: 15 * 60 * 1000, cacheable: false }, // 15 min
edit_url: { type: 'edit_url', ttl: 30 * 24 * 60 * 60 * 1000, cacheable: true }, // 30 days
view_url: { type: 'view_url', ttl: 30 * 24 * 60 * 60 * 1000, cacheable: true }, // 30 days
export_url: { type: 'export_url', ttl: 24 * 60 * 60 * 1000, cacheable: false }, // 24 hours
};
// Track URL expiry
class CanvaUrlTracker {
private urls = new Map<string, { url: string; expiresAt: number }>();
store(id: string, type: string, url: string): void {
const policy = URL_POLICIES[type];
this.urls.set(`${id}:${type}`, {
url,
expiresAt: Date.now() + (policy?.ttl || 0),
});
}
get(id: string, type: string): string | null {
const entry = this.urls.get(`${id}:${type}`);
if (!entry || Date.now() > entry.expiresAt) return null;
return entry.url;
}
}
```
## Data Retention
| Data Type | Retention | Reason |
|-----------|-----------|--------|
| OAuth tokens | Until user disconnects | Active session |
| Design metadata (cached) | 5-60 minutes | Performance cache |
| Export download URLs | Max 24 hours | Canva-enforced expiry |
| API request logs | 30 days | Debugging |
| Error logs | 90 days | Root cause analysis |
| Audit logs | 7 years | Compliance |
| Webhook events | 30 days | Processing/replay |
### Automatic Cleanup
```typescript
async function cleanupCanvaData(): Promise<void> {
const now = Date.now();
// Remove expired export URLs
await db.exportUrls.deleteMany({ expiresAt: { $lt: new Date(now) } });
// Remove old API logs
const thirtyDaysAgo = new Date(now - 30 * 24 * 60 * 60 * 1000);
await db.canvaApiLogs.deleteMany({
createdAt: { $lt: thirtyDaysAgo },
type: { $nin: ['audit'] },
});
// Remove tokens for deleted/inactive users
await db.canvaTokens.deleteMany({ userId: { $in: await getDeletedUserIds() } });
}
```
## GDPR/CCPA Compliance
### Data Subject Access Request
```typescript
async function exportCanvaUserData(userId: string): Promise<object> {
const tokens = await tokenStore.get(userId);
return {
source: 'Canva Connect API',
exportedAt: new Date().toISOString(),
data: {
identity: tokens ? await canvaAPI('/users/me', tokens.accessToken) : null,
hasActiveConnection: !!tokens,
// Note: Canva stores the user's designs — their data is in Canva's system
// Your app only stores: tokens, cached metadata, and integration state
},
};
}
```
### Right to Deletion
```typescript
async function deleteCanvaUserData(userId: string): Promise<void> {
// 1. Revoke tokens (disconnects from Canva)
const tokens = await tokenStore.get(userId);
if (tokens) {
await revokeCanvaToken(tokens.accessToken, clientId, clientSecret);
}
// 2. Delete stored tokens
await tokenStore.delete(userId);
// 3. Clear cached design metadata
await cache.deletePattern(`canva:user:${userId}:*`);
// 4. Audit log (required — do not delete)
await auditLog.record({
action: 'GDPR_DELETION',
userId,
service: 'canva',
timestamp: new Date(),
});
}
```
## Error Handling
| Issue | Cause | Solution |
|-------|-------|----------|
| Token in logs | Missing redaction | Wrap all logging with redactCanvaData |
| Expired URL served | No expiry tracking | Use CanvaUrlTracker |
| DSAR incomplete | Missing data inventory | Document all Canva data stored |
| Orphaned tokens | User deleted without cleanup | Run periodic cleanup job |
## Resources
- [Canva Privacy Policy](https://www.canva.com/policies/privacy-policy/)
- GDPR Developer Guide
- Canva API Reference
## Next Steps
For enterprise access control, see `canva-enterprise-rbac`.
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.