unraid-xml-generator
Generate Unraid DockerMan user template XML files from structured input. Use when: the user asks to "生成 Unraid XML 模板", "创建 Docker 模板", "为 XXX 写 Unraid 模板", or "生成 DockerMan XML" for any container. Key technique learned (2026-04-02): Unraid DockerMan templates support <ExtraParams>--entrypoint /bin/sh</ExtraParams> + <PostArgs> to bypass the container image's ENTRYPOINT. This allows overriding any image's startup command from the template. Config variables use: <Config Name="..." Target="ENV_VAR" Default="..." Type="..." Display="..." Required="..." Mask="..."> These become environment variables passed into the container. The skill generates a complete, valid XML and optionally deploys it to /boot/config/plugins/dockerMan/templates-user/my-<name>.xml (requires user confirmation before writing).
Best use case
unraid-xml-generator is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Generate Unraid DockerMan user template XML files from structured input. Use when: the user asks to "生成 Unraid XML 模板", "创建 Docker 模板", "为 XXX 写 Unraid 模板", or "生成 DockerMan XML" for any container. Key technique learned (2026-04-02): Unraid DockerMan templates support <ExtraParams>--entrypoint /bin/sh</ExtraParams> + <PostArgs> to bypass the container image's ENTRYPOINT. This allows overriding any image's startup command from the template. Config variables use: <Config Name="..." Target="ENV_VAR" Default="..." Type="..." Display="..." Required="..." Mask="..."> These become environment variables passed into the container. The skill generates a complete, valid XML and optionally deploys it to /boot/config/plugins/dockerMan/templates-user/my-<name>.xml (requires user confirmation before writing).
Teams using unraid-xml-generator should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/ashanzzz-unraid-xml-generator/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How unraid-xml-generator Compares
| Feature / Agent | unraid-xml-generator | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Generate Unraid DockerMan user template XML files from structured input. Use when: the user asks to "生成 Unraid XML 模板", "创建 Docker 模板", "为 XXX 写 Unraid 模板", or "生成 DockerMan XML" for any container. Key technique learned (2026-04-02): Unraid DockerMan templates support <ExtraParams>--entrypoint /bin/sh</ExtraParams> + <PostArgs> to bypass the container image's ENTRYPOINT. This allows overriding any image's startup command from the template. Config variables use: <Config Name="..." Target="ENV_VAR" Default="..." Type="..." Display="..." Required="..." Mask="..."> These become environment variables passed into the container. The skill generates a complete, valid XML and optionally deploys it to /boot/config/plugins/dockerMan/templates-user/my-<name>.xml (requires user confirmation before writing).
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Startups
Explore AI agent skills for startup validation, product research, growth experiments, documentation, and fast execution with small teams.
AI Agent for SaaS Idea Validation
Use AI agent skills for SaaS idea validation, market research, customer discovery, competitor analysis, and documenting startup hypotheses.
AI Agents for Marketing
Discover AI agents for marketing workflows, from SEO and content production to campaign research, outreach, and analytics.
SKILL.md Source
# Unraid XML Generator ## Core Pattern The key insight for Unraid Docker templates: ```xml <Container version="2"> <Name>mycontainer</Name> <Repository>image:tag</Repository> <Network>bridge</Network> <!-- KEY: override ENTRYPOINT to /bin/sh --> <ExtraParams>--entrypoint /bin/sh</ExtraParams> <!-- KEY: pass real startup command through shell -ec --> <PostArgs>-ec 'real startup command here'</PostArgs> <!-- User-configurable variables --> <Config Name="Display Name" Target="ENV_VAR" Default="..." Type="Variable" Display="always" Required="false" Mask="true">default_value</Config> <Config Name="Port" Target="PORT" Default="8080" Mode="tcp" Type="Port" Display="always" Required="true">8080</Config> <Config Name="Data Path" Target="/data" Default="/mnt/user/appdata/mycontainer" Mode="rw" Type="Path" Display="always" Required="true">/mnt/user/appdata/mycontainer</Config> </Container> ``` ## Template Field Reference | Field | Purpose | |-------|---------| | `<Name>` | Unique container identifier | | `<Repository>` | Docker image with tag | | `<Registry>` | Registry URL (optional, informational) | | `<Network>` | Network mode: `bridge`, `host`, `none` | | `<Shell>` | Default shell (`bash` / `sh`) | | `<ExtraParams>` | Extra docker run flags (e.g. `--entrypoint /bin/sh`) | | `<PostArgs>` | Startup command passed to shell `-ec` | | `<WebUI>` | Format: `http://[IP]:[PORT:nnnn]/` — shows button in Unraid UI | | `<Icon>` | URL to icon image | | `<Category>` | Unraid category string | | `<Config>` | User-configurable parameter | ## Config Types | Type | Example | |------|---------| | `Variable` | Environment variable (`Target` = env var name) | | `Port` | Port mapping (`Mode="tcp"/"udp"`) | | `Path` | Volume path (`Mode="rw"/"ro"`) | | `Slider` | Numeric slider (requires `Min`, `Max`, `Step`) | | `Description` | Read-only description text | ## Config Display Options | Display value | When shown | |----------------|-----------| | `always` | Always visible in UI | | `advanced` | Hidden behind "Advanced" toggle | | `hidden` | Never shown (manual config) | ## Masked Variables (secrets) Set `Mask="true"` on `Type="Variable"` Config entries to: - Hide the value from the UI (shown as `••••••`) - Treat as sensitive (API keys, tokens, passwords) ## PostArgs Shell Pattern ```bash # Correct way to write PostArgs in XML: <PostArgs>-ec 'export VAR1="value1" && export VAR2="value2" && exec real_command --flag arg'</PostArgs> # Breaking down: # -e : exit on error # -c : read command from string (not stdin) # '...' : single-quoted command string ``` ## Standard Config Variables to Include For any container: ```xml <Config Name="HTTP Proxy" Target="HTTP_PROXY" Default="" Type="Variable" Display="advanced" Required="false" Mask="false">http://192.168.8.30:7893</Config> <Config Name="HTTPS Proxy" Target="HTTPS_PROXY" Default="" Type="Variable" Display="advanced" Required="false" Mask="false">http://192.168.8.30:7893</Config> <Config Name="NO Proxy" Target="NO_PROXY" Default="" Type="Variable" Display="advanced" Required="false" Mask="false">localhost,127.0.0.1,192.168.0.0/16</Config> <Config Name="TZ" Target="TZ" Default="Asia/Shanghai" Type="Variable" Display="advanced" Required="false" Mask="false">Asia/Shanghai</Config> ``` ## Script Usage ```bash python3 scripts/generate_template.py \ --name opencode \ --image ghcr.io/anomalyco/opencode:latest \ --port 4096 \ --web-port 4097 \ --output /tmp/opencode.xml # Generate with all standard env vars: python3 scripts/generate_template.py \ --name opencode \ --image ghcr.io/anomalyco/opencode:latest \ --port 4096 \ --web-port 4097 \ --proxy 192.168.8.30:7893 \ --tz Asia/Shanghai \ --output /tmp/opencode.xml ``` ## Common Pitfalls 1. **Double quotes in PostArgs** → escape as `"` in XML 2. **ENTRYPOINT bypass** → always use `<ExtraParams>--entrypoint /bin/sh</ExtraParams>` 3. **Shell variable substitution** → use single quotes for PostArgs to prevent `$VAR` expansion by XML parser 4. **Template filename** → must start with `my-` and end with `.xml` 5. **Path permissions** → Unraid runs containers as PUID/PGID = 99/100 by default ## Output The generated XML file is placed at: ``` /boot/config/plugins/dockerMan/templates-user/my-<name>.xml ``` User must confirm before deploying (writing) to that path.
Related Skills
Invoice Generator
Creates professional invoices in markdown and HTML
Incident Postmortem Generator
Generate blameless incident postmortems from raw notes, Slack threads, or bullet points.
Partnership Agreement Generator
Generate comprehensive partnership agreements, joint venture frameworks, and strategic alliance documents for B2B relationships.
Employee Onboarding Generator
Build a structured 90-day onboarding plan for any role. Covers pre-boarding, Day 1, Week 1, 30/60/90-day milestones, buddy assignments, and success metrics.
Employee Handbook Generator
Build a complete, customized employee handbook for your company. Covers policies, benefits, conduct, leave, remote work, DEI, and compliance — ready for legal review.
IT Disaster Recovery Plan Generator
Build production-ready disaster recovery plans that actually get followed when things break.
Compliance Audit Generator
Run internal compliance audits against major frameworks without hiring a consultant.
API Documentation Generator
Generate production-ready API documentation from endpoint descriptions. Outputs OpenAPI 3.0, markdown reference docs, and SDK quickstart guides.
Annual Report Generator
Build a complete annual business report from raw data. Covers financial performance, operational metrics, strategic highlights, and forward-looking guidance.
daily-report-generator
Automatically generate daily/weekly work reports from git commits, calendar events, and task lists. Use when you need to quickly create professional work reports without manual effort.
hr-policy-generator
Comprehensive HR policy development covering attendance, time-off, overtime, remote work, and compliance. Generates structured policy documents, legal checklists, exception handling frameworks, and employee communication plans tailored to company size, work arrangement, and jurisdiction.
hr-policy-generator-cn
综合性 HR 政策设计工具,覆盖考勤、休假、加班、远程办公及合规要求。根据公司规模、办公模式、适用法律等输入,生成完整的政策文档、法律合规清单、例外处理机制及员工沟通方案。