ninox-scripting
Scannednpx machina-cli add skill christianphilie/ninox-agent-skill/ninox-scripting --openclawNinox Scripting Skill
This skill provides expert knowledge for scripting in Ninox databases, preventing hallucinations and enforcing strict rules. Use when writing, debugging, or explaining Ninox scripts (NX).
Critical Rules
Follow these rules strictly to avoid hallucinations (inventing non-existent functions):
- ALWAYS read
references/function-whitelist.mdbefore writing code. If a function is not in this list, DO NOT USE IT unless you verify it yourself in the official documentation. - ALWAYS read
references/forbidden-patterns.mdto avoid common errors (e.g., using JS array methods likemap,filter, etc., which do NOT exist in Ninox). - ASK FOR CONTEXT: If field names, table names, or relations are unclear, ASK instead of guessing. See
references/context-queries.md. - CONSULT ALL RULES: Review all relevant documents in the
references/directory before writing code. See Resources section below for all available rule documents.
Resources
Core Rules
- Strict Rules - Critical documentation compliance rules
- Function Whitelist - All documented Ninox functions
- Forbidden Patterns - Common errors to avoid
- Common Mistakes - Best practices and common pitfalls
- Context Queries - When to ask instead of guessing
- Relations and Loops - Correct usage of relations and for-loops
- Performance Rules - Optimization guidelines
- Undocumented Features - Working but undocumented features
- Style Guide - Coding standards
Documentation
- Functions - All documented Ninox functions
- Performance Guide - Performance optimizations
- API - HTTP and REST API
- Tables - Database table concepts
Examples
- Basic Select - Basic select statements
- Aggregate Functions - Using aggregate functions instead of loops
- Select Optimization - Optimizing select queries
- Transaction Pattern - Using transaction blocks
- Count with Filter - Undocumented count() with filter pattern
- Select with Brackets - Undocumented bracket syntax
Source
git clone https://github.com/christianphilie/ninox-agent-skill/blob/main/ninox-scripting/SKILL.mdView on GitHub Overview
Provides expert Ninox scripting guidance to prevent hallucinations and enforce project rules. Use when writing, debugging, or explaining Ninox scripts (NX), or when you need help with Ninox formulas, automation, or database operations.
How This Skill Works
Before coding, it enforces a compliance workflow: consults the Function Whitelist and Forbidden Patterns references, then validates context (fields, tables, relations) before generating or debugging NX scripts. It uses only documented Ninox functions and avoids non-existent ones, and it prompts for missing context instead of guessing.
When to Use It
- When starting a Ninox script and you need to ensure only documented functions are used.
- When debugging an NX script and you want to avoid common Ninox pitfalls.
- When explaining Ninox formulas, automation, or database operations to a teammate.
- When building a Ninox database operation that must follow strict rules and be safe.
- When refactoring an NX script and aiming for clarity and performance.
Quick Start
- Step 1: Review References (Whitelist, Forbidden Patterns, Context Queries) before coding.
- Step 2: Clarify context—list field names, table names, and relations with the user.
- Step 3: Write or explain the NX script using only documented functions and approved patterns.
Best Practices
- Always read the Function Whitelist (references/function-whitelist.md) before coding.
- Always check Forbidden Patterns (references/forbidden-patterns.md) to avoid common errors.
- Ask for context when field names, tables, or relations are unclear (do not guess).
- Review all relevant rule documents in references/ before writing code.
- Follow the Style Guide and Performance Rules to keep scripts clean and efficient.
Example Use Cases
- A script that computes a due date using only documented Ninox functions.
- A transactional update of related records to ensure data integrity.
- A validation rule that enforces project naming conventions during data entry.
- An NX explanation snippet that clarifies a complex formula for a teammate.
- A debugging session that identifies and replaces a forbidden pattern in a script.