The Definitive Agentic AI Skills, Rules & Tooling Suite for OpenWrt & LuCI Development.
Built for embedded networking, low-footprint hardware (16 MB SPI Flash / 128–256 MB RAM), and dual-generation OpenWrt architectures (fw3/iptablesvsfw4/nftablesandopkgvsapk).
Keywords / SEO: OpenWrt AI skills, Google Antigravity OpenWrt, Cursor rules OpenWrt, Claude Code embedded Linux, LuCI UI development, BusyBox ash scripting, nftables firewall4, CAKE bufferbloat OpenWrt, embedded Linux developer tools.
OpenWrt-Skills equips modern AI coding assistants (Google Antigravity, Cursor AI, Claude Code, Windsurf, Roo Code, ChatGPT) with deep, production-grade domain knowledge of OpenWrt firmware engineering, embedded POSIX shell scripting, LuCI web user interface design, and kernel networking.
Developing for resource-constrained routers (e.g. 16 MB SPI Flash and 128 MB RAM) is unforgiving:
- Standard LLMs hallucinate non-existent bashisms (
[[ ]],${var//}) that crash BusyBox ash. - Generic code writes large logs to
/etc, exhausting the writable/overlaypartition and bricking the router. - Frontend code uses heavy npm libraries and synchronous
alert(), freezing the LuCI event loop on mobile phones. - Firewall scripts assume
iptablesand fail silently on modern OpenWrt 23.05–25.x runningnftables(firewall4).
OpenWrt-Skills fixes this completely.
Each skill adheres to the open Agentic Skill format (SKILL.md with standard YAML frontmatter) located in both .agents/skills/ and skills/:
| # | Skill Name | Domain & Scope | Key Capabilities |
|---|---|---|---|
| 1 | posix-shell |
BusyBox ash & Shell Compliance | Forbids bashisms, enforces safe variable quoting, atomic UCI batch commits, memory efficiency. |
| 2 | security-auditor |
Embedded Security & RPC ACLs | Command injection prevention in sys.exec, ubus ACL auditing, ephemeral tokens in /tmp. |
| 3 | systematic-debugging |
Root-Cause Diagnostics | Enforces log analysis (dmesg, logread, ubus status) before proposing any code edits. |
| 4 | openwrt-network-firewall |
Dual Firewall & DSA Switch | Dynamic detection of fw3/iptables vs fw4/nftables, DSA bridge VLAN filtering, anti-lockout safety. |
| 5 | ark-theme-ui |
LuCI Mobile UI & Theming | 40px touch targets, .main-right scroll lock, modal backdrop decoupling, esbuild asset minification (<60 KB). |
| 6 | openwrt-imagebuilder |
Custom Firmware Compilation | Exact 16 MB Flash partition budgeting, package manifests, zero-waste /overlay, Cudy SPI flash revisions. |
| 7 | openwrt-hardware-offloading |
Silicon Acceleration | MediaTek PPE (Packet Processing Engine) + WED (Wireless Ethernet Dispatch) vs Qualcomm NSS, SQM conflicts. |
| 8 | openwrt-wifi-mesh |
Roaming & 802.11s Mesh | 802.11r/k/v Fast Transition, lightweight usteer band steering (-73 dBm threshold), SAE mesh backhaul. |
| 9 | openwrt-sqm-bufferbloat |
CAKE & Latency Mitigation | CAKE (piece_of_cake.qos), OpenWrt 25.12 multi-core cake-mq, PPPoE/fiber framing overhead, A+ grade tuning. |
| 10 | openwrt-storage-failsafe |
MTD & Unbrick Recovery | /proc/mtd partition tables, factory/ART backup preservation, Telnet Failsafe mode, U-Boot TFTP rescue. |
| 11 | openwrt-luci-modern |
Modern LuCI Client-Side JS | Pure JS views (L.view.extend), E() DOM builder, JSON menus, RPC ACLs, no legacy Lua CBI. |
Included in scripts/openwrt_hardware_query.py, this tool queries a local compressed database (data/openwrt_toh_cache.json.gz) of 3,030 official OpenWrt devices across 74 attributes.
# Query any router model (instant offline search)
python scripts/openwrt_hardware_query.py "Cudy WR3000"
# Query by brand, SoC, or architecture
python scripts/openwrt_hardware_query.py "Archer C7"
python scripts/openwrt_hardware_query.py "filogic"The query tool analyzes chipset combinations (e.g. MediaTek MT7981 + MT7976C) to accurately report Wi-Fi 6 channel capabilities (HE160 vs HE80 vs VHT80) along with stock vs sysupgrade installation methods.
Need a second opinion on a pull request, shell script, or LuCI modification?
We include a battle-tested master reviewer prompt in docs/PROMPT-REVISOR-MESTRE-IA.md.
Paste this prompt into Claude, ChatGPT, or Gemini before submitting code to enforce:
- Flash & RAM budget impact analysis.
- Dual OpenWrt generation compatibility (
fw3vsfw4,opkgvsapk). - POSIX shell verification (no bashisms).
- Mobile-first LuCI DOM containment (
min-width: 0, 40px touch). - Anti-lockout and brick risk assessment.
Clone or copy the skills into your workspace:
cp -r .agents/skills/ /path/to/your/workspace/.agents/skills/Add this repository to your project or reference the rules in .cursor/rules/:
cp AGENTS.md /path/to/your/workspace/.cursorrulesSimply point your agent workspace to skills/ or .agents/skills/. All SKILL.md files feature standard YAML frontmatter recognized automatically by agentic frameworks.
-
Hardware Budget: Maintain
/overlayfree space$> 2.0\text{ MB}$ . Keep theme compressed assets$< 60\text{ KB}$ . -
Dual Generation: Dynamically detect package manager (
which apk opkg) and firewall backend (command -v nft). - Touch Targets: Minimum 40px useful height for buttons, badges, and toggles.
-
Scroll Isolation: Trapping scroll in LuCI requires locking
.main-right, notbody. -
No Synchronous Popups: Never use
alert()orconfirm(). -
Git Hygiene & Zero Binary Bloat: Never commit compiled firmware images (
.bin,.img,.iso, full toolchains) or OpenWrt build trees (bin/,build_dir/,staging_dir/) to Git. Publish compiled sysupgrade artifacts, packages and rootfs dumps exclusively via GitHub Releases (up to 2 GB per file) or CI pipelines. Keep repositories well within GitHub Free account guidelines (< 1 GB soft limit, 100 MB single-file hard limit).
Contributions, bug reports, and new hardware profiles are welcome! Feel free to open an issue or submit a pull request.
Distributed under the MIT License.
