EV

evernote-sdk-patterns

Best practices for batch processing, metadata filtering, and optimized Evernote SDK usage.

Install

mkdir -p .claude/skills/evernote-sdk-patterns && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/8155" && unzip -o skill.zip -d .claude/skills/evernote-sdk-patterns && rm skill.zip

Installs to .claude/skills/evernote-sdk-patterns

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Advanced Evernote SDK patterns and best practices.
50 charsno explicit “when” trigger
Intermediate

Key capabilities

  • Search notes using NoteFilter and metadata result specifications
  • Create notes with file attachments using MD5 hashing
  • Implement idempotent tag and notebook management
  • Wrap API calls for error handling and rate limit retries
  • Process batch operations with configurable delays

How it works

It provides specific patterns for SDK usage, such as using NoteFilter to minimize data transfer and wrapping API calls to handle specific Evernote exceptions.

Inputs & outputs

You give it
Evernote SDK API calls
You get back
Optimized note operations and error-handled responses

When to use evernote-sdk-patterns

  • Implement pagination
  • Search with NoteFilter
  • Handle batch operations
  • Attach files to notes

About this skill

Evernote SDK Patterns

Overview

Production-ready patterns for working with the Evernote SDK, including search with NoteFilter, pagination, attachments, tags, error handling wrappers, and batch operations with rate limit handling.

Prerequisites

  • Completed evernote-install-auth and evernote-hello-world
  • Understanding of Evernote data model (Notes, Notebooks, Tags, Resources)
  • Familiarity with async/await and Promises

Instructions

Pattern 1: Search with NoteFilter

Use NoteFilter for query terms and sort order, paired with NotesMetadataResultSpec to select returned fields. This avoids fetching full note content when only metadata is needed.

const filter = new Evernote.NoteStore.NoteFilter({
  words: 'tag:important notebook:Work',
  ascending: false,
  order: Evernote.Types.NoteSortOrder.UPDATED
});

const spec = new Evernote.NoteStore.NotesMetadataResultSpec({
  includeTitle: true, includeUpdated: true,
  includeTagGuids: true, includeNotebookGuid: true
});

const result = await noteStore.findNotesMetadata(filter, 0, 100, spec);

Pattern 2: Creating Notes with Attachments

Compute the MD5 hash of the file buffer, create a Resource with the binary data and MIME type, embed it in ENML with <en-media type="..." hash="..."/>, and attach it to the note.

const hash = crypto.createHash('md5').update(fileBuffer).digest('hex');
const resource = new Evernote.Types.Resource();
resource.data = new Evernote.Types.Data();
resource.data.body = fileBuffer;
resource.mime = 'image/png';

const note = new Evernote.Types.Note();
note.title = 'Note with Attachment';
note.content = wrapInENML(`<en-media type="image/png" hash="${hash}"/>`);
note.resources = [resource];
await noteStore.createNote(note);

Pattern 3: Error Handling Wrapper

Wrap API calls to distinguish EDAMUserException (client errors), EDAMSystemException (rate limits, maintenance), and EDAMNotFoundException (invalid GUIDs). Use error.rateLimitDuration for automatic retry delays.

Pattern 4: Batch Operations

Process items sequentially with configurable delay between operations. On rate limit errors, wait for rateLimitDuration seconds then retry. Track progress with callbacks.

Pattern 5: Tag and Notebook Management

Implement getOrCreateTag() and getOrCreateNotebook() for idempotent operations. Use listTags() / listNotebooks() to check existence before creating.

For all nine patterns with complete implementations, see Implementation Guide.

Output

  • Search patterns using NoteFilter and NotesMetadataResultSpec
  • Async generator for paginated note retrieval
  • Attachment creation with MD5 hash and MIME type
  • Tag and notebook find-or-create utilities
  • EvernoteError wrapper class with isRateLimit, isNotFound, isInvalidData
  • Batch processor with rate limit retry and progress tracking

Error Handling

ErrorCauseSolution
RATE_LIMIT_REACHEDToo many API callsUse rateLimitDuration, add delays between batch items
BAD_DATA_FORMATInvalid ENMLValidate with wrapInENML() before sending
DATA_CONFLICTConcurrent modificationRefetch note metadata and retry update
QUOTA_REACHEDAccount storage fullCheck remaining quota via user.accounting

Resources

Next Steps

See evernote-core-workflow-a for note creation and management workflows.

Examples

Bulk tagging: Search for all notes matching a query, then batch-add a tag to each result with 200ms delay between operations and automatic rate limit retry.

Attachment upload: Read a PDF from disk, compute its MD5 hash, create a note with the PDF as an <en-media> resource, and verify the upload via getNote() with withResources: true.

When not to use it

  • When fetching full note content for metadata-only tasks

Prerequisites

Completed evernote-install-auth and evernote-hello-worldUnderstanding of Evernote data modelFamiliarity with async/await and Promises

Limitations

  • Requires validation with wrapInENML before sending data

How it compares

This workflow provides structured error handling and optimized search patterns compared to basic SDK implementation.

Compared to similar skills

evernote-sdk-patterns side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
evernote-sdk-patterns (this skill)027dNo flagsIntermediate
effective-go3239moNo flagsBeginner
architect-review1094moNo flagsAdvanced
resolve-conflicts818moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

More by jeremylongshore

View all by jeremylongshore

analyzing-logs

jeremylongshore

Analyze application logs to detect performance issues, identify error patterns, and improve stability by extracting key insights.

14123

ollama-setup

jeremylongshore

Configure auto-configure Ollama when user needs local LLM deployment, free AI alternatives, or wants to eliminate hosted API costs. Trigger phrases: "install ollama", "local AI", "free LLM", "self-hosted AI", "replace OpenAI", "no API costs". Use when appropriate context detected. Trigger with relevant phrases based on skill purpose.

1167

backtesting-trading-strategies

jeremylongshore

Backtest crypto and traditional trading strategies against historical data. Calculates performance metrics (Sharpe, Sortino, max drawdown), generates equity curves, and optimizes strategy parameters. Use when user wants to test a trading strategy, validate signals, or compare approaches. Trigger with phrases like "backtest strategy", "test trading strategy", "historical performance", "simulate trades", "optimize parameters", or "validate signals".

1071

generating-database-seed-data

jeremylongshore

Process this skill enables AI assistant to generate realistic test data and database seed scripts for development and testing environments. it uses faker libraries to create realistic data, maintains relational integrity, and allows configurable data volumes. u... Use when working with databases or data models. Trigger with phrases like 'database', 'query', or 'schema'.

1033

cursor-codebase-indexing

jeremylongshore

Execute set up and optimize Cursor codebase indexing. Triggers on "cursor index setup", "codebase indexing", "index codebase", "cursor semantic search". Use when working with cursor codebase indexing functionality. Trigger with phrases like "cursor codebase indexing", "cursor indexing", "cursor".

885

testing-mobile-apps

jeremylongshore

Execute mobile app testing on iOS and Android devices/simulators. Use when performing specialized testing. Trigger with phrases like "test mobile app", "run iOS tests", or "validate Android functionality".

810

You might also like

effective-go

openshift

Apply Go best practices, idioms, and conventions from golang.org/doc/effective_go. Use when writing, reviewing, or refactoring Go code to ensure idiomatic, clean, and efficient implementations.

323536

architect-review

sickn33

Master software architect specializing in modern architecture patterns, clean architecture, microservices, event-driven systems, and DDD. Reviews system designs and code changes for architectural integrity, scalability, and maintainability. Use PROACTIVELY for architectural decisions.

109320

resolve-conflicts

antinomyhq

Use this skill immediately when the user mentions merge conflicts that need to be resolved. Do not attempt to resolve conflicts directly - invoke this skill first. This skill specializes in providing a structured framework for merging imports, tests, lock files (regeneration), configuration files, and handling deleted-but-modified files with backup and analysis.

81334

solid-principles

SmidigStorm

Enforce SOLID principles (Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, Dependency Inversion) in object-oriented design. Use when writing or reviewing classes and modules.

57236

python-testing-patterns

wshobson

Implement comprehensive testing strategies with pytest, fixtures, mocking, and test-driven development. Use when writing Python tests, setting up test suites, or implementing testing best practices.

77204

codex

Lucklyric

Invoke Codex CLI for complex coding tasks requiring high reasoning capabilities. This skill should be invoked when users explicitly mention "Codex", request complex implementation challenges, advanced reasoning, or need high-reasoning model assistance. Automatically triggers on codex-related requests and supports session continuation for iterative development.

32238

Search skills

Search the agent skills registry