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.zipInstalls 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.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
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-authandevernote-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
NoteFilterandNotesMetadataResultSpec - Async generator for paginated note retrieval
- Attachment creation with MD5 hash and MIME type
- Tag and notebook find-or-create utilities
EvernoteErrorwrapper class withisRateLimit,isNotFound,isInvalidData- Batch processor with rate limit retry and progress tracking
Error Handling
| Error | Cause | Solution |
|---|---|---|
RATE_LIMIT_REACHED | Too many API calls | Use rateLimitDuration, add delays between batch items |
BAD_DATA_FORMAT | Invalid ENML | Validate with wrapInENML() before sending |
DATA_CONFLICT | Concurrent modification | Refetch note metadata and retry update |
QUOTA_REACHED | Account storage full | Check 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
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.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| evernote-sdk-patterns (this skill) | 0 | 27d | No flags | Intermediate |
| effective-go | 323 | 9mo | No flags | Beginner |
| architect-review | 109 | 4mo | No flags | Advanced |
| resolve-conflicts | 81 | 8mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by jeremylongshore
View all by jeremylongshore →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.
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.
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.
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.
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.
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.