canva-policy-guardrails

Featured

Implement Canva Connect API lint rules, policy enforcement, and automated guardrails. Use when setting up code quality rules for Canva integrations, implementing pre-commit hooks, or configuring CI policy checks. Trigger with phrases like "canva policy", "canva lint", "canva guardrails", "canva best practices check", "canva eslint".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Canva Policy & Guardrails ## Overview Automated policy enforcement for Canva Connect API integrations — prevent token leaks, enforce rate limit handling, require error handling, and validate OAuth configuration. ## ESLint Rules ### No Hardcoded Credentials ```javascript // eslint-rules/no-canva-credentials.js module.exports = { meta: { type: 'problem', docs: { description: 'Disallow hardcoded Canva OAuth credentials' }, }, create(context) { return { Literal(node) { if (typeof node.value !== 'string') return; const val = node.value; // Canva client IDs start with "OCA" if (/^OCA[A-Za-z0-9]{10,}/.test(val)) { context.report({ node, message: 'Hardcoded Canva client ID detected. Use environment variable.' }); } // Canva access tokens start with "cnvat_" if (/^cnvat_[A-Za-z0-9]{20,}/.test(val)) { context.report({ node, message: 'Hardcoded Canva access token detected. Use environment variable.' }); } }, }; }, }; ``` ### Require Rate Limit Handling ```javascript // eslint-rules/require-canva-retry.js module.exports = { meta: { type: 'suggestion', docs: { description: 'Canva API calls should handle 429 responses' }, }, create(context) { return { CallExpression(node) { // Check for fetch calls to api.canva.com if (node.callee.name === 'fetch' && node.arguments[0]?.value?.includes('api.canva.com')) { ...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category