nimonyplugins

Construct and traverse Nimony plugin Tree and Node structures with the nimonyplugins.nim API.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/planetis-m/skills_experiment --skill nimonyplugins
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nimonyplugins
Source: https://github.com/planetis-m/skills_experiment/tree/main/original_skills/nimonyplugins
Command: npx skills add https://github.com/planetis-m/skills_experiment --skill nimonyplugins

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you write and review Nimony plugins that correctly build and traverse plugin trees using the real nimonyplugins.nim API, avoiding subtle mistakes around Tree vs Node, traversal, and validation.

Core Features & Use Cases

  • Accurate API usage: Guides you to use the installed nimonyplugins.nim directly so your plugin matches the exact node kinds, constructors, traversal primitives, and rendering helpers.
  • Safe traversal & mutation patterns: Explains how to traverse with Node safely (inc vs skip), when to clone for lookahead, and when to consume vs preserve subtrees (takeTree vs addSubtree).
  • Correct construction & validation: Provides canonical writing patterns using withTree, createTree, snapshot, balanced emission order, and errorTree for invalid cases.
  • Use cases: Refactoring or reviewing existing Nim-based Nimony plugins, implementing new transformations that rewrite parts of an input tree, and producing reliable plugin outputs suitable for downstream tooling.

Quick Start

Use this skill while editing a Nimony plugin to look up the exact installed nimonyplugins.nim, then rewrite your traversal and emission logic to follow the canonical Tree/Node read/write and takeTree/addSubtree patterns.

Frequently Asked Questions about nimonyplugins

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely traverse and mutate a Nim plugin syntax tree?

To safely traverse a Nim plugin syntax tree, use `inc` for single-step advancement and `skip` to bypass subtrees, while cloning nodes for lookahead and choosing `takeTree` to consume or `addSubtree` to preserve subtrees during mutation.

What is the correct way to construct Nimony plugin trees without validation errors?

Construct Nimony plugin trees correctly by using `withTree` and `createTree` for structured node emission, maintaining a balanced emission order, and generating an `errorTree` for invalid cases to ensure well-formed outputs.

When do I need to use snapshot withTree in Nimony compiler tooling?

You need to use `snapshot` withTree in Nimony compiler tooling when performing code transformation tasks that require safe lookahead handling, validated node emission, and structured error reporting during syntax tree traversal.

Why does my Nimony plugin output malformed nodes during code transformation?

Your Nimony plugin outputs malformed nodes during code transformation when confusing `Tree` vs `Node` structures, misusing `inc` vs `skip` for traversal, or failing to use `withTree` for balanced emission and `errorTree` for invalid cases.

Can I use nimonyplugins to review and refactor existing Nim-based compiler plugins?

Yes, you can use nimonyplugins to review and refactor existing Nim-based compiler plugins by validating their traversal logic against the installed `nimonyplugins.nim` API and rewriting emission patterns to follow canonical `takeTree` and `addSubtree` usage.

What is the difference between takeTree and addSubtree for Nimony plugin development?

In Nimony plugin development, `takeTree` consumes and removes a subtree from its original location, while `addSubtree` preserves and copies the subtree into the target structure, ensuring safe syntax tree traversal and mutation.