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-code-organization
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 ...
Full skill instructions
Use this skill when splitting Nim code into modules, helpers, and orchestration steps.
Keep shared state explicit. Keep behavior in top-level procs. Keep exports narrow.
object passed by var for orchestration state.ref object state only when identity, aliasing, or shared lifetime is part of the design.{.nimcall.}.procs over runtime dispatch for ordinary orchestration code.case before reaching for method.open/next/close-style procs, and private helpers that mutate var State.object and pass it by var.type
State = object
pos: int
ready: seq[bool]
proc markReady(state: var State; idx: int) =
state.ready[idx] = true
proc flushReady(state: var State; ids: openArray[string]; out: var seq[string]) =
while state.pos < ids.len and state.ready[state.pos]:
out.add ids[state.pos]
inc state.pos
| Mistake | Why it's wrong |
|---|---|
| Hiding shared orchestration flow in outer locals | The data flow becomes implicit instead of visible in proc signatures |
| Using nested helper captures for a multi-step pipeline | It hides shared mutation and makes the control flow harder to inspect |
| Spreading one stateful workflow across many runtime-dispatched types | The state flow becomes harder to follow than a small set of procs and a case split |
| Exporting internal helpers or internal state | It leaks implementation details into the public API |
Starting with ref object state for a plain local pipeline | It adds aliasing where a plain object would keep ownership clearer |
references/orchestration_pattern.md — Explicit state object vs nested closure for a small orchestration flowreferences/parser_state_pattern.md — Stdlib-style parser/state object with top-level mutating procsGenerate 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.
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...
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.
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