generate-config
Write a deployable configuration for a real network device. Use when the user asks for the config, CLI, or commands to set up a feature on a specific platform — BGP peering, OSPF, VLANs and trunks, ACLs, NAT, VPN, QoS, AAA/TACACS, SNMPv3, NTP — on Cisco IOS/IOS-XE/NX-OS, Arista EOS, Juniper Junos, Palo Alto, or Fortinet. Also fires on "give me the commands for..." and "how do I set up X on a 9300". Not for lab topologies (use generate-lab), not for fleet-wide automation (use generate-playbook), and not for reviewing a config that already exists (use config-audit).
- License 许可
- MIT
- 最近更新
- 2026-11-02
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- generate-config
- description
- Write a deployable configuration for a real network device. Use when the user asks for the config, CLI, or commands to set up a feature on a specific platform — BGP peering, OSPF, VLANs and trunks, ACLs, NAT, VPN, QoS, AAA/TACACS, SNMPv3, NTP — on Cisco IOS/IOS-XE/NX-OS, Arista EOS, Juniper Junos, Palo Alto, or Fortinet. Also fires on "give me the commands for..." and "how do I set up X on a 9300". Not for lab topologies (use generate-lab), not for fleet-wide automation (use generate-playbook), and not for reviewing a config that already exists (use config-audit).
03 SKILL.md 正文
Network Config Generation
Generate production-ready device configuration files.
Step 1: Gather requirements
- Device — Cisco ISR4451, Arista 7050X, Palo Alto PA-3260, Juniper MX204, …
- Platform / OS version — IOS-XE 17.9, EOS 4.28, PAN-OS 11.1
- Features — BGP, OSPF, VLANs, ACLs, NAT, NTP, AAA, SNMP
- Interfaces — addresses, descriptions, link types
- Hostname — used for the filename
Step 2: Verify syntax
For any feature where you are not fully certain of the syntax on that platform and version:
~/.damira/bin/damira search-vendor-docs \
"<feature> configuration <platform> <version>" --vendor "<vendor>"
Pay particular attention to:
- version-specific differences (IOS vs IOS-XE vs NX-OS)
- feature availability on the specific hardware
- defaults that changed between versions
If the lookup exits non-zero, say so. Do not emit syntax you could not verify without labelling it. The engineer is going to paste this into a device.
Step 3: Write the config
hostname, management, AAA, NTP, logging, SNMP baseline- all requested features, correct syntax
- comments (
!for Cisco,#for Juniper/Arista) explaining each section - vendor best practice —
enable secretnotenable password, SNMPv3 not v2c
Step 4: Save
configs/{hostname}.cfg — e.g. configs/chi-rtr-01.cfg, configs/fw-dmz-01.conf
Step 5: Validate
Delegate this loop to the damira-fixer subagent (pinned to a cheap model). Give it the path and --skill generate-config. It runs the command below, fixes only what the findings name, and stops after 3 rounds. Read its report: a change to a device command, module or resource is your call, not its. If the subagent isn't available, run the loop yourself as below.
After writing the files, run:
~/.damira/bin/damira validate configs/{hostname}.cfg
It lints and syntax-checks locally (no API call) and exits non-zero on any failure. Fix every
FAIL and re-run until it passes, at most 3 rounds; if it still fails, tell the user what is
left. A skipped check means the tool isn't installed — pass the install hint on, don't
treat it as a pass. (Saving under configs/, automation/ or playbooks/ also runs it
automatically.)
Step 6: Summarise
- what was configured
- every assumption you made — call these out explicitly, they are where deployments break
- recommended pre-deployment checks
Offer to run config-audit over what you just wrote. Catching a missing service password-encryption before deployment is cheaper than after.
04 同仓库更多 Skills
upgrade-plan
Ask Damira to assess a version-to-version upgrade of a network platform and produce the MOP and change control. Use when the user names a product and a target release — "IOS-XE 17.6.5 to 17.9.5", "CUCM 12.5 SU7 to 15", "PAN-OS 10.2 to 11.1" — or asks what breaks, what the risk is, or how long a maintenance window needs to be. Covers CUCM, IOS-XE, IOS-XR, NX-OS, PAN-OS, FortiOS, Junos, ISE, ASA, WLC/Catalyst 9800. Not for platform-to-platform migration (CUCM to Webex Calling, on-prem to cloud) and not for diagnosing a fault after an upgrade — use troubleshoot for that.
troubleshoot
Ask Damira to diagnose an active, in-progress network fault. Use when the user reports something broken right now — an outage, a flapping interface, a BGP or OSPF adjacency down, dropped or blackholed traffic, failed calls, users unable to connect — or pastes show/log output for analysis. Also fires on direct questions like "why is BGP down" or "why is OSPF stuck in EXSTART". Returns vendor-specific diagnosis with exact CLI commands. Do NOT use for "how does X work" protocol questions, for reviewing a config that is not currently broken (use config-audit), or for planning an upgrade (use upgrade-plan).
source-of-truth-change
Turn intended state in the engineer's source of truth (NetBox or Nautobot) into a validated change, then hand it to the automation they already run — an Ansible Automation Platform job in check mode, a pyATS/Genie before-and-after diff, or a Terraform plan. Use when the user asks to make a change "from NetBox" or "from Nautobot", to push what the source of truth says, to bring devices in line with intended state, or to run a validated playbook through AAP or pyATS. Damira never applies the change; the engineer does. For a playbook with no source of truth use generate-playbook, for Terraform alone use generate-terraform, and for an active outage use troubleshoot.
lab-test-change
Test a network change in a throwaway ContainerLab lab before it goes near production — deploy the lab, apply the playbook or script, run show-command or pyATS/Genie checks, report pass/fail, and always destroy the lab. Use when the user says "test this in a lab first", "prove this change before the window", "dry-run this playbook against a lab", or wants evidence a change works before a CAB. Needs docker and containerlab on the engineer's machine; without them it validates only and says so. To only build a lab, use generate-lab; to write the change, use generate-playbook, generate-automation or generate-terraform.
generate-workbook
Build an Excel workbook (.xlsx) for a network procedure — a migration, platform migration, security audit, change control, or incident-response workbook — grounded in Damira evidence, with an HTML preview. Use when the user asks for a spreadsheet, workbook, tracker, or Excel version of a migration plan, cutover, audit findings, change record, or incident timeline. For a version-to-version upgrade, use upgrade-plan (it offers the workbook itself). Not for diagnosing an active fault — use troubleshoot.
generate-tests
Write network tests — pyATS/Genie learn, change, learn, diff jobs that prove a change did what it should and nothing else, and pytest tests for automation scripts — then validate them locally. Use when the user asks for pyATS, Genie, AEtest, a testbed file, pre/post change verification, state snapshots, or unit tests for a Nornir/Netmiko script. For the change itself use generate-playbook, generate-automation or generate-terraform.