nax-settings-development

Defines conventions for creating and maintaining NetAlertX settings in config.json.

7.0k|426|Updated Dec 23, 2021
One-click install
npx skills add https://github.com/netalertx/NetAlertX --skill nax-settings-development
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nax-settings-development
Source: https://github.com/netalertx/NetAlertX/tree/main/.gemini/skills/settings
Command: npx skills add https://github.com/netalertx/NetAlertX --skill nax-settings-development

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Adding or modifying settings in NetAlertX involves many conventions—naming, types, validation, localization, defaults, and runtime lifecycle—and inconsistent settings break the auto-generated Settings UI or cause maintenance debt. This Skill codifies the rules so every setting is declarative, localized, and backwards compatible.

Core Features & Use Cases

  • Setting Authoring Standards: Enforces uppercase snake-case naming, correct type selection (string, boolean, select, array, etc.), validation rules, and single-source defaults in config.json.
  • Localization & UI Integration: Requires language strings in en_us.json or inline, with GLOBAL_LANG_FILES references so settings render automatically in the Settings UI.
  • Runtime Access Patterns: Mandates get_setting_value() in Python and getSetting() in JavaScript instead of reading app.conf directly, and prefers plugin-first settings over hardcoded core settings.
  • Use Case: When adding a new MQTT broker timeout option to a NetAlertX plugin, follow this Skill to define the setting in the plugin's config.json with validation, defaults, and localization so it appears in the UI without custom frontend code.

Quick Start

Ask the assistant to add a new NetAlertX plugin setting following the nax-settings-development conventions, including validation and localization strings.

Frequently Asked Questions about nax-settings-development

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

FAQPage Schema
How do I add a new setting to a NetAlertX plugin?

Define the setting in the plugin's config.json under the settings key with a type, default value, validation, and localization strings. Plugin-first settings are preferred over hardcoded core settings added via ccd() in server/initialise.py.

How do I read a NetAlertX setting value in Python or JavaScript?

In the backend, call get_setting_value('SETTING_NAME') from the helper module; in the frontend, call getSetting('SETTING_NAME'). Never read app.conf directly, since the settings API is the generated source of truth at runtime.

What naming convention do NetAlertX settings use?

Setting keys use uppercase snake case, such as SCAN_INTERVAL or MQTT_HOST. Boolean settings should read naturally with verbs like Enable, Require, Hide, or Show, for example 'Enable MQTT'.

How are NetAlertX settings localized for the UI?

Each setting needs name and description strings, either inline in config.json or in en_us.json as SETTING_NAME_name and SETTING_NAME_description keys. External language files require a _GLOBAL_LANG_FILES_ reference in config.json.

Where is the source of truth for NetAlertX configuration values?

app.conf is the source of truth for user-defined values, while config.json defaults apply only when a setting is missing. The database and table_settings.json API are runtime representations regenerated from app.conf during initialization.