mikrotik-routeros-rsc
Creation, editing, and review of RouterOS scripts (.rsc) with focus on idempotency, security, and best practices. Use when you need to generate, adjust, or import .rsc files for MikroTik: (1) create new configurations via script, (2) edit existing scripts with safe corrections, (3) review risks and execution policies, (4) validate with import dry-run and error handling.
How do I install this agent skill?
npx skills add https://github.com/alexandre-machado/ai-stuffs --skill mikrotik-routeros-rscIs this agent skill safe to install?
- Gen Agent Trust Hubpass
This skill is safe and provides comprehensive tools for managing MikroTik RouterOS configurations. It promotes security best practices such as idempotency, safe command usage, and least privilege. It includes a local Python linter script for static analysis and provides validation workflows to prevent accidental misconfiguration.
- Socketwarn
1 alert: gptAnomaly
- Snykpass
Risk: LOW · No issues
- Runlayerwarn
7/7 files flagged
What does this agent skill do?
Skill: RouterOS .rsc
This skill guides the creation, editing, and review of RouterOS (.rsc) scripts with safe and idempotent patterns, plus validation before import.
Quick workflow
- Define script objective and scope.
- Apply idempotent patterns (see References).
- Validate syntax and risks with the linter (scripts/lint_rsc.py).
- Test import with
dry-runandon-error. - Import in a controlled manner to production.
Essential practices
- Prefer
find where ...+ conditionals beforeadd/set. - Avoid broad policies in
/system script add policy=.... - Use
:onerrorand:jobnamefor robustness and single instance. - Never include destructive commands (
system reset-configuration, etc.). - Parameterize and isolate scopes (
:localvs:global).
Validation and testing
- Lint:
python scripts/lint_rsc.py path/to/script.rsc. - Safe import (RouterOS ≥ 7.16.x):
import test.rsc verbose=yes dry-runreports every syntax error in the file without applying any change.:do { import test.rsc } on-error={ :put "Failure" }—on-error=is an import-specific parameter added in 7.16.x. Catches errors fromimportitself (missing file, syntax errors). Errors produced inside the imported script are not caught here.:onerror e in={ import test.rsc } do={ :put "Failure - $e" }—:onerroris the general error-handling command (any RouterOS version that supports it). The error message is bound to the named variable.
References (use as needed)
- Language and syntax: see references/LANGUAGE.md
- .rsc export/import,
dry-runandonerror: see references/RSC_GUIDE.md - Security and idempotency best practices: see references/SAFE_PRACTICES.md
- Common examples and patterns: see references/EXAMPLES.md
- Linter rules: see references/LINTER_RULES.md
Notes
- Scripts should be consistent with RouterOS v7 (preferred) and compatible with v6 where possible.
- Use
print as-value, arrays, andwherefilters for robust queries. - For scheduled execution, use Scheduler with appropriate permissions.
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/alexandre-machado/ai-stuffs/mikrotik-routeros-rsc">View mikrotik-routeros-rsc on skillZs</a>