evernote-sdk-patterns
Advanced Evernote SDK patterns and best practices. Use when implementing complex note operations, batch processing, search queries, or optimizing SDK usage. Trigger with phrases like "evernote sdk patterns", "evernote best practices", "evernote advanced", "evernote batch operations".
What this skill does
# 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.
```javascript
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.
```javascript
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](references/implementation-guide.md).
## 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
| 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
- [API Reference](https://dev.evernote.com/doc/reference/)
- [Search Grammar](https://dev.evernote.com/doc/articles/search_grammar.php)
- [Core Concepts](https://dev.evernote.com/doc/articles/core_concepts.php)
- [JavaScript SDK](https://github.com/Evernote/evernote-sdk-js)
## 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`.
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.