Truenas Ops 标志

Truenas Ops

组织
serversathome
truenas-ops

Troubleshoot and manage TrueNAS SCALE over SSH. Use this whenever the user mentions TrueNAS, the NAS, ZFS, a pool or dataset, a scrub, a snapshot, replication, a failing or degraded disk, SMART data, an SMB/NFS/iSCSI share, a TrueNAS app, or storage that is full, slow, or throwing errors. Trigger this for anything storage-layer even when the symptom first shows up as an app or VM that lost its data mount. Prefer this over generic shell reasoning for pool, disk, dataset, and share work.

Add to TypingMind

概览

发布者serversathome
代码仓库homelabhero
技能名称truenas-ops
星标数
104
复刻数
4
附带文件
仅含指令
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 指令自成一体

    模型所需的一切都包含在指令中,无需同步额外文件。

  • 开源

    由 serversathome 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Truenas Ops AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/serversathome/homelabhero/tree/main/ops/.claude/skills/truenas-ops
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/serversathome/homelabhero.git /tmp/homelabhero
mkdir -p .claude/skills
cp -r /tmp/homelabhero/ops/.claude/skills/truenas-ops .claude/skills/truenas-ops
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Truenas Ops,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Truenas Ops。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Truenas Ops 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

TrueNAS ops

Reached over SSH as truenas. Read infra/truenas.md for pool names, datasets, and schedules before acting. Bias hard toward read-only until the cause is clear. midclt (the middleware) is the preferred way to inspect and change TrueNAS - it covers pools, datasets, disks, apps, and shares (see the truenas-middleware skill), and needs no sudo. The raw tools below (zpool, zfs, smartctl, docker) need root: if this host connects as truenas_admin, prefix them with sudo -n (works when passwordless sudo is enabled for that user; hh doctor shows whether it is, and if not, use the midclt equivalent). As root they run bare.

When a raw tool fails with sudo: a password is required, or hh doctor says the host has no passwordless sudo, do not work around it silently: say so, keep going through midclt, and give the user the one-time fix so they can decide. In the TrueNAS web UI: Credentials -> Users -> select truenas_admin -> Edit -> check "Allow all sudo commands with no password" (so that both "Allowed sudo commands" and "Allowed sudo commands (no password)" include all) -> Save. After that hh doctor shows passwordless sudo available and the raw tools work. The alternative is to re-register the host as root, which needs no sudo at all.

For the complete command surface of this platform, read capabilities/truenas.md. For a method that is not documented there, use the truenas-middleware skill to discover it live.

Diagnose first

hh run truenas "zpool status -x"     # fast "all healthy?" verdict
hh run truenas "zpool list"          # capacity + health per pool
hh run truenas "zpool status -v"     # per-vdev/per-disk errors if not healthy
hh run truenas "midclt call alert.list | jq '.[] | {level, formatted}'"
hh run truenas "df -h; zfs list -o name,used,avail,refer,mountpoint"

Mandatory before you call it healthy - scan the kernel log. Pools, SMART, and alert.list miss PCIe AER, NIC link flaps, ATA/disk resets, MCEs, and OOM kills; those only surface here:

hh run truenas "journalctl -k -b -p warning --no-pager | grep -viE 'veth|br-[0-9a-f]{12}' | tail -40"

Empty output is the pass; read it before reporting green. See "Health check must-dos" in infra/truenas.md for the full rationale.

Common cases

  • Pool DEGRADED / disk errors: zpool status -v names the vdev and disk. Map the disk to a serial with lsblk -o NAME,SERIAL,MODEL, confirm with smartctl -a /dev/<disk>. Do not zpool replace or offline a disk without an explicit go-ahead and a confirmed replacement plan.
  • Dataset "missing" / app lost its data: check the mount zfs get mounted,mountpoint <pool>/<dataset> and whether the app's host path still resolves. Often a mount or app-config issue, not data loss.
  • Pool nearly full: zpool list capacity, then find the heavy datasets zfs list -o name,used -s used. Old snapshots are a common hidden consumer: zfs list -t snapshot -o name,used -s used | tail.
  • Replication failing: midclt call replication.query | jq '.[] | {name, state: .state.state}' then the task's error, plus SSH connectivity to the target.
  • SMART concern: smartctl -H /dev/<disk> for the verdict, smartctl -a /dev/<disk> for the full attribute table.

State-changing (confirm first)

hh run truenas "zpool scrub <pool>"                    # safe but I/O heavy
hh run truenas "zfs snapshot <pool>/<dataset>@manual-$(date +%F)"

For a full backup / restore / rollback workflow (clone vs rollback, verifying that recoverability actually exists), use the backup-restore skill.

Never without explicit go-ahead: zfs destroy, zpool destroy, zpool offline/replace, wipefs, or anything that writes to a raw disk. Recoverability comes from snapshots and replication, so verify those exist before any risky change.

Apps on TrueNAS

hh run truenas "midclt call app.query | jq '.[] | {name, state}'"
hh run truenas "docker ps"      # if custom Docker apps are in use

VMs and containers (backend changed by version - detect first)

The virtualization backend is different across releases, so the midclt namespace is different too. Do not assume: read the version, then use the matching API. midclt runs over the local socket, so the REST API removal in 26 does not affect this path.

hh run truenas "midclt call system.version"
  • 24.10 and earlier: libvirt VMs only, vm.* (vm.query, vm.start, vm.stop).
  • 25.04 / 25.10: Incus for containers AND VMs, virt.instance.* (type = CONTAINER or VM). Instance disks live in the hidden .ix-virt dataset. virt.global.config shows the instances pool.
  • 27 (pre-release; its betas were numbered 26): Incus removed, libvirt runs QEMU/KVM VMs (vm.*) and libvirt_lxc containers (own namespace). Upgrades migrate .ix-virt zvols to libvirt VMs; expect orphaned LXCs and VMs missing from the UI (zvols usually survive under .ix-virt).

See "Virtualization" in capabilities/truenas.md for the full command set. When a method name is unclear (common on 27), use the truenas-middleware skill to list the live vm.* / virt.* / container.* methods and read their schemas instead of guessing. Confirm before any start/stop/create/update/delete.

常见问题

Truenas Ops AI 技能有什么作用?

Troubleshoot and manage TrueNAS SCALE over SSH. Use this whenever the user mentions TrueNAS, the NAS, ZFS, a pool or dataset, a scrub, a snapshot, replication, a failing or degraded disk, SMART data, an SMB/NFS/iSCSI share, a TrueNAS app, or storage that is full, slow, or throwing errors. Trigger this for anything storage-layer even when the symptom first shows up as an app or VM that lost its data mount. Prefer this over generic shell reasoning for pool, disk, dataset, and share work.

为什么在 TypingMind 中使用 Truenas Ops?

因为您只需安装一次,就能搭配任何模型使用。Truenas Ops 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Truenas Ops?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/serversathome/homelabhero/tree/main/ops/.claude/skills/truenas-ops。TypingMind 会读取其中的 SKILL.md,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Truenas Ops?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Truenas Ops 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Truenas Ops 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Truenas Ops AI 技能免费吗?

serversathome 已在 GitHub 上发布了该技能。请查看代码仓库了解许可条款。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇