coding-nim
coding-nim
Purpose
This skill equips the AI to handle Nim 2.x programming tasks, focusing on advanced features like macros, templates, compile-time execution, memory management (ARC/ORC), FFI for interoperability, Nimble for package handling, and systems programming. Use it to generate, debug, and optimize Nim code efficiently.
When to Use
Apply this skill for systems-level programming needing low-level control, such as embedded systems, performance-critical apps, or when integrating with C/C++ via FFI. Use it for projects requiring compile-time metaprogramming (e.g., via macros) or automatic memory management with ARC/ORC to avoid manual garbage collection.
Key Capabilities
- Macros for code generation: Define reusable code transformations at compile-time.
- Templates for type-safe string-based metaprogramming.
- Compile-time execution: Run code during compilation using
staticblocks. - Memory management: Switch between ARC (automatic reference counting) and ORC (optional reference counting) via compiler flags.
- FFI: Call external libraries (e.g., C functions) without wrappers.
- Nimble: Manage dependencies and build projects like a package manager.
- Systems programming: Direct hardware access, concurrency, and cross-platform compilation.
Usage Patterns
To accomplish tasks, structure Nim code with modules and use the compiler for builds. For macros, define them in a separate proc and invoke at compile-time. When writing FFI code, use the importc pragma for C functions. For memory management, specify --gc:arc or --gc:orc flags during compilation. Always test code with nim check before full builds to catch errors early. Integrate templates for generic functions to reduce boilerplate.
More from alphaonedev/openclaw-graph
playwright-scraper
Playwright web scraping: dynamic content, auth flows, pagination, data extraction, screenshots
1.4Kgcp-iam
Manages identity and access control for Google Cloud resources using IAM policies and roles.
370humanize-ai-text
AI text humanization: reduce AI-detection patterns, natural phrasing, tone adjustment
260macos-automation
AppleScript, JXA, Shortcuts, Automator, osascript, System Events, accessibility API
173tavily-web-search
Tavily: web search optimized for AI agents, answer synthesis, domain filtering, depth control
155clawflows
OpenClaw workflow automation: multi-step task chains, conditional logic, triggers, schedule
102