Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add magic3007/dotfiles --skill mihomo-tun-user-systemdgit clone --depth 1 https://github.com/magic3007/dotfilesWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/magic3007/dotfiles/mihomo-tun-user-systemd)<a href="https://agentmods.dev/skills/magic3007/dotfiles/mihomo-tun-user-systemd"><img src="https://agentmods.dev/badge/skills/magic3007/dotfiles/mihomo-tun-user-systemd/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/magic3007/dotfiles/mihomo-tun-user-systemd"><img src="https://agentmods.dev/badge/skills/magic3007/dotfiles/mihomo-tun-user-systemd.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00172 | $0.01256 |
| Opus 5.5 | $0.00069 | $0.00502 |
| Sonnet 5.5 | $0.00034 | $0.00251 |
| Haiku 4.5 | $0.00017 | $0.00126 |
Grade B, and why
mihomo-tun-user-systemd scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Asks for rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
on a box where sudo works but `sudo systemctl` / `iptables` are forbidden. Use when: Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl -s -o /dev/null -w "%{http_code}\n" https://www.google.com # 302 without -x How it starts
The opening of the file, as written. The whole thing — 95 lines — stays where its author put it; the contents beside it link to each section on GitHub.
mihomo TUN mode under a systemd user service
Problem
A user-level mihomo service with the usual hardening can't create a TUN device.
File capabilities are silently dropped, and the obvious fixes either fail or need
sudo systemctl, which isn't allowed here.
Context / Trigger Conditions
- The unit has hardening such as
NoNewPrivileges=true,RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX,RestrictSUIDSGID,PrivateTmp,ProtectSystemorProtectHome. grep CapEff /proc/$(pgrep -x mihomo)/statusshows0000000000000000andNoNewPrivs: 1even thoughgetcapshows caps on the binary.sudo -lexcludes/usr/bin/systemctl, so a system unit can't be installed.
Solution
- Give the binary file capabilities.
setcapitself is allowed under sudo:
Don't usesudo setcap cap_net_admin,cap_net_bind_service,cap_net_raw+ep ~/.local/bin/mihomoAmbientCapabilities=in a user unit. The user manager has no caps to grant, so the unit fails with status 218/CAPABILITIES. - Add a drop-in that turns off every option that implies no-new-privileges or a user
namespace. In a user manager, any seccomp-based option such as
RestrictAddressFamiliessilently forces NNP, and NNP disables file caps:
The empty# ~/.config/systemd/user/mihomo.service.d/tun.conf [Service] NoNewPrivileges=false PrivateTmp=false ProtectSystem=false ProtectHome=false RestrictSUIDSGID=false RestrictAddressFamilies=RestrictAddressFamilies=resets the list. You need AF_NETLINK for mihomo's route monitor. - Write the TUN config, and keep the intranet and SSH out of the tunnel. If the config
is regenerated from a subscription, put this in the normalizer, not in the file:
Keepinterface-name: eth0 tun: enable: true stack: mixed device: mihomo0 auto-route: true auto-detect-interface: false strict-route: false dns-hijack: [] # keep system DNS; sniffer recovers domains route-exclude-address: [10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 100.64.0.0/10, 127.0.0.0/8, 169.254.0.0/16]sniffer.enable: trueso domain rules still work without DNS hijack. - Restart and check:
systemctl --user daemon-reload && systemctl --user restart mihomo.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago Changed b4cd64b607da
- 18d ago First seen · 95 lines · 172 tokens per session scan B 7f2e4805d940
mihomo-tun-user-systemd is a skill published in the GitHub repository magic3007/dotfiles (11 stars, last pushed 5d ago), licensed MIT. It adds 172 tokens to every session and 1,256 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it B with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-12.
mihomo-tun-user-systemd compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| mihomo-tun-user-systemdmagic3007/dotfiles | Skill | 11 | 5d ago | MIT | B | 172 | Claude Code, Codex |
| assess-qualityurmzd/dotfiles | Skill | 6 | 4d ago | Apache-2.0 | A | 120 | Claude Code |
| create-oss-skillurmzd/dotfiles | Skill | 6 | 4d ago | Apache-2.0 | A | 63 | Claude Code |
| extend-oss-skills-to-claudeurmzd/dotfiles | Skill | 6 | 4d ago | Apache-2.0 | A | 74 | Claude Code |
| scaffold-nodeurmzd/dotfiles | Skill | 6 | 4d ago | Apache-2.0 | A | 119 | Claude Code |
| test-codeurmzd/dotfiles | Skill | 6 | 4d ago | Apache-2.0 | A | 101 | Claude Code |
| scaffold-docsurmzd/dotfiles | Skill | 6 | 4d ago | Apache-2.0 | A | 196 | Claude Code |