Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Implement security best practices for Evernote integrations. Use when securing API credentials, implementing OAuth securely, or hardening Evernote integrations. Trigger with phrases like "evernote security", "secure evernote", "evernote credentials", "evernote oauth security".
.claude/skills/jeremylongshore-evernote-security-basics/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 35% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 26% | 0% |
| case-10 | ✓→✗ | ▼ Worse | 15% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 22% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 40% | 0% |
Security best practices for Evernote API integrations, covering credential management, OAuth hardening, token storage, data protection, and secure logging patterns.
Store consumerKey, consumerSecret, and access tokens in environment variables or a secrets manager (AWS Secrets Manager, GCP Secret Manager, HashiCorp Vault). Never commit credentials to source control. Add .env to .gitignore.
javascript// Load from environment, fail fast if missing const requiredVars = ['EVERNOTE_CONSUMER_KEY', 'EVERNOTE_CONSUMER_SECRET']; for (const v of requiredVars) { if (!process.env[v]) throw new Error(`Missing required env var: ${v}`); }
Add CSRF protection with a state parameter stored in the session. Validate the callback URL matches your registered domain. Use HTTPS-only for all OAuth endpoints. Set secure cookie flags for session tokens.
javascript// Generate CSRF token for OAuth state const csrfToken = crypto.randomBytes(32).toString('hex'); req.session.oauthCsrf = csrfToken; // Verify on callback if (req.query.state !== req.session.oauthCsrf) { return res.status(403).send('CSRF validation failed'); }
Encrypt access tokens at rest using AES-256-GCM before storing in your database. Decrypt only when making API calls. Store the encryption key separately from the database.
Sanitize all user input before embedding in ENML. Validate note titles (max 255 chars), tag names (max 100 chars, no commas), and notebook names (max 100 chars). Strip forbidden HTML elements and attributes.
Redact access tokens, consumer secrets, and user email addresses from log output. Log only the first 8 characters of tokens for debugging correlation.
javascriptfunction redactToken(token) { if (!token || token.length < 12) return '***'; return token.slice(0, 8) + '...[REDACTED]'; }
Track token expiration (edam_expires), implement proactive refresh before expiry, and handle AUTH_EXPIRED errors gracefully. Tokens default to 1-year validity but users can set shorter durations.
For the complete security implementation including encrypted storage, CSRF-protected OAuth, input validation, and audit logging, see Implementation Guide.
| Error | Cause | Solution | |-------|-------|----------| | INVALID_AUTH | Token revoked or invalid | Re-authenticate via OAuth; check token not corrupted during encryption | | AUTH_EXPIRED | Token past expiration date | Implement proactive refresh before edam_expires | | PERMISSION_DENIED | API key lacks required scope | Request appropriate permissions from Evernote | | CSRF mismatch | Session expired or attack attempt | Regenerate CSRF token and restart OAuth flow |
For production deployment checklist, see evernote-prod-checklist.
Secure credential setup: Store credentials in AWS Secrets Manager, load at startup, validate all required values are present, and fail fast on missing configuration.
Token rotation: Monitor edam_expires for all stored tokens, send re-authentication emails 30 days before expiry, and gracefully degrade to read-only mode when tokens expire.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 20,689 | 15,863 | -23% | 1 | 1 | 0% | 3,120 | 4,210 | +35% | 0 | 0 | — |
case-02 | pass→pass | 16,961 | 15,376 | -9% | 1 | 1 | 0% | 3,274 | 3,999 | +22% | 0 | 0 | — |
case-03 | pass→pass | 15,687 | 15,162 | -3% | 1 | 1 | 0% | 2,782 | 3,888 | +40% | 0 | 0 | — |
case-04 | pass→pass | 11,043 | 6,216 | -44% | 1 | 1 | 0% | 1,563 | 1,888 | +21% | 0 | 0 | — |
case-05 | pass→pass | 13,087 | 8,474 | -35% | 1 | 1 | 0% | 2,146 | 2,169 | +1% | 0 | 0 | — |
case-06 | pass→pass | 5,840 | 3,055 | -48% | 1 | 1 | 0% | 807 | 1,377 | +71% | 0 | 0 | — |
case-07 | pass→pass | 9,359 | 3,369 | -64% | 1 | 1 | 0% | 1,393 | 1,494 | +7% | 0 | 0 | — |
case-08 | fail→pass | 15,179 | 10,681 | -30% | 1 | 1 | 0% | 2,218 | 2,804 | +26% | 0 | 0 | — |
case-09 | pass→pass | 15,208 | 22,172 | +46% | 1 | 1 | 0% | 2,432 | 4,333 | +78% | 0 | 0 | — |
case-10 | pass→fail | 17,248 | 13,313 | -23% | 1 | 1 | 0% | 2,608 | 2,990 | +15% | 0 | 0 | — |
case-11 | pass→pass | 11,614 | 9,916 | -15% | 1 | 1 | 0% | 1,924 | 2,478 | +29% | 0 | 0 | — |
case-12 | pass→pass | 8,212 | 4,543 | -45% | 1 | 1 | 0% | 1,337 | 1,770 | +32% | 0 | 0 | — |
case-13 | pass→pass | 10,665 | 5,039 | -53% | 1 | 1 | 0% | 1,579 | 1,843 | +17% | 0 | 0 | — |
case-14 | pass→pass | 22,198 | 24,854 | +12% | 1 | 1 | 0% | 3,139 | 4,780 | +52% | 0 | 0 | — |
case-15 | pass→pass | 7,867 | 10,197 | +30% | 1 | 1 | 0% | 1,425 | 2,553 | +79% | 0 | 0 | — |
case-16 | pass→pass | 10,080 | 4,121 | -59% | 1 | 1 | 0% | 1,353 | 1,530 | +13% | 0 | 0 | — |
case-17 | pass→pass | 15,547 | 14,208 | -9% | 1 | 1 | 0% | 2,512 | 3,247 | +29% | 0 | 0 | — |
case-18 | pass→pass | 13,024 | 9,591 | -26% | 1 | 1 | 0% | 1,448 | 2,205 | +52% | 0 | 0 | — |
case-19 | pass→pass | 14,602 | 11,544 | -21% | 1 | 1 | 0% | 2,180 | 2,887 | +32% | 0 | 0 | — |
case-20 | pass→pass | 14,671 | 12,082 | -18% | 1 | 1 | 0% | 2,092 | 3,161 | +51% | 0 | 0 | — |
case-21 | pass→pass | 19,326 | 20,914 | +8% | 1 | 1 | 0% | 2,893 | 4,166 | +44% | 0 | 0 | — |
case-22 | pass→pass | 16,873 | 21,198 | +26% | 1 | 1 | 0% | 2,385 | 3,974 | +67% | 0 | 0 | — |
case-23 | fail→fail | 12,388 | 10,340 | -17% | 1 | 1 | 0% | 2,055 | 2,599 | +26% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +4 percentage points is the difference between those two pass rates over the 23 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.