tts-tool
Generate a natural-sounding `.opus` audio file from text or markdown. Use when a user wants spoken audio, especially for content with markdown, URLs, formulas, paths, or technical notation that should be rewritten for speech.
nim-api-design
Design clear public Nim APIs for libraries and modules, including exported types, constructors, lookup functions, error contracts, and container-style interfaces. Use when creating or reviewing a Nim library API, designing an exported module surface, or deciding how callers should construct, acce...
Full skill instructions
Use this skill when designing or reviewing a public Nim API.
Default to plain data, one clear surface, and names that match the standard library.
Reference examples live in references/.
object types for public data models.ref object only when identity, aliasing, shared mutation, graph structure, or handle lifetime is part of the contract.object types for public semantic data.(key, val).len, contains/hasKey, [], []=, items/mitems, pairs/mpairs, incl/excl, push/pop.Natural, Positive, ranges, enums, sets, and distinct types instead of weakening to int and re-checking manually.distinct when two values share a base type but must not mix.func for pure query operations when purity is part of the public contract.{.raises.} only when it keeps the public exception surface clear and easy to maintain.initX() and return T.newX() and return ref T.toX() name for common conversions. Overload on input type.openArray for batch inputs when callers naturally have arrays, seqs, or literals.contains, hasKey, getOrDefault, or Option[T].{.noinline, noreturn.} helper.lent T for read accessors that return storage owned by the receiver.var T, mitems, or mpairs only when caller mutation is part of the API.var accessors such as var int, var bool, or enum fields from internal state.lent and var accessors, return directly from storage. Do not route through a temp local.when (NimMajor, NimMinor) >= (x, y). Do not use stdlib-internal {.since.}.withValue as opt-in compatibility choices, not defaults.object. Switch to ref object only if the contract needs identity or aliasing.distinct or range types for domain constraints.initX, newX, and toX in the stdlib style.lent for reads into owned storage. Add mutable access only where the caller must edit stored data.lent or var accessors, verify the borrow compiles. If you use func, make sure the body stays pure. If you gate by Nim version, use when guards.| Mistake | Why it is wrong |
|---|---|
Starting with ref object for plain data | It adds aliasing and shared mutation where the API does not need them |
| Defaulting to methods or runtime dispatch | It hides behavior behind runtime polymorphism when a proc surface is simpler and clearer |
Weakening Natural or Positive to int and re-checking manually | It throws away a stronger type-level contract |
| Returning a silent default for required data | It hides missing-data bugs |
Exporting scalar var accessors | It leaks mutable internal state |
Returning a lent or var result through a temp local | ORC rejects the borrow because the temp escapes |
references/representation_default.md — Plain object default and ref object only when aliasing is requiredreferences/constructors.md — initX, newX, and toX constructor patternsreferences/collection_accessors.md — One coherent container surface with stdlib-style namesreferences/accessor_pair.md — Minimal borrowed and mutable accessor pair with one shared error helperreferences/distinct_types.md — Domain types with distinct and borrowed operationsreferences/parameter_and_result_shapes.md — Parameter defaults, options objects, and named result objectsfunc purity tests.Generate a natural-sounding `.opus` audio file from text or markdown. Use when a user wants spoken audio, especially for content with markdown, URLs, formulas, paths, or technical notation that should be rewritten for speech.
Extract raw text from PDF files with OCR, including full-document extraction, selected page ranges, and reuse of cached pages. Use when a user asks to OCR a PDF, extract text from a scanned PDF, or read selected PDF pages.
Turn low-level C FFI bindings into an idiomatic Nim API, with safer types, cleaner module boundaries, resource management, callbacks, enums, bitflags, and exception-based error handling. Use when building a high-level Nim wrapper around a C library or improving the usability of existing raw bindi...
Write clear, consistent Nim code in a simple stdlib-aligned style, covering imports, naming, proc vs func vs template choices, local variables, constructors, formatting, and control flow. Use when writing new Nim code or reviewing a Nim module for readability, consistency, and low-noise style dec...
Store and search text or markdown as semantic chunks in a reusable local vector store. Use when a user wants to ingest documents or retrieve relevant passages from previously stored material.
Study assistant workflow for turning provided study material into exam-focused deliverables such as verbatim transcriptions, study notes, lecture-style explanations, ELI5 explanations, flashcards, Mermaid mind maps, quizzes, and essay questions.
Organize Nim code into clear modules and multi-step workflows, with explicit state, top-level helper procs, narrow exports, and easy-to-follow orchestration. Use when refactoring a large Nim file, splitting logic across modules, designing parser-style stateful code, or cleaning up nested helpers ...
Implement and review Nim ARC/ORC ownership hooks for types that manually manage resources, including move-only, deep-copy, refcounted, and copy-on-write patterns. Use when a Nim type owns pointers, buffers, file descriptors, or custom heap memory and you need correct `=destroy`, `=copy`, `=dup`, ...
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience