Create and run NetAlertX plugins. Use this when asked to create plugin, run plugin, test plugin, plugin development, or execute plugin script.
server/plugins/<code_name>/.config.json and script.py to understand its functionality and settings.python3 server/plugins/<code_name>/script.py./tmp/log/plugins/last_result.<PREF>.log) quickly, as the backend may delete it after processing.python3 server/plugins/<code_name>/script.py
Ensure sys.path includes /app/server/plugins and /app/server (as in the template).
server/plugins/<code_name>/
├── config.json # Manifest with settings
├── script.py # Main script
└── ...
server/plugins/<code_name>/config.json
code_name == folder nameunique_prefix drives settings and filenames (e.g., ARPSCAN)<PREF>_RUN: execution phase<PREF>_RUN_SCHD: cron-like schedule<PREF>_CMD: script path<PREF>_RUN_TIMEOUT: timeout in seconds — this is enforced by the core plugin runner as the whole script's kill-timeout (server/plugin.py passes it straight to subprocess(..., timeout=...)). It is not a safe per-HTTP-call timeout — don't reuse it for individual network calls in a loop, or one slow call can burn the whole budget and get the process killed before it writes its result file.<PREF>_WATCH: columns to watch for changesScripts write to /tmp/log/plugins/last_result.<PREF>.log
Important: The backend will almost immediately process this result file and delete it after ingestion. If you need to inspect the output, run the plugin and immediately retrieve the result file before the backend processes it.
Use server/plugins/plugin_helper.py:
from plugin_helper import Plugin_Objects
plugin_objects = Plugin_Objects()
plugin_objects.add_object(...) # During processing
plugin_objects.write_result_file() # Exactly once at end
once: runs once at startupschedule: runs on cron schedulealways_after_scan: runs after every scanbefore_name_updates: runs before name resolutionon_new_device: runs when new device detectedon_notification: runs when notification triggered| Format | Purpose | Runs |
|--------|---------|------|
| publisher | Send notifications | on_notification |
| dev scanner | Create/manage devices | schedule |
| name discovery | Discover device names | before_name_updates |
| importer | Import from services | schedule |
| system | Core functionality | schedule |
Check the plugin against the Conventions Checklist in docs/PLUGINS_DEV.md — RUN default, schedule precedent, RUN_TIMEOUT semantics, reusing core settings, description length, and the multi-instance settings pattern. Most plugin PR review comments trace back to one of these.
Copy from server/plugins/__template and customize.
npx skills add netalertx/netalertx-plugin-run-development下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer