manage-mounts
Configure which host directories agent containers can access. View, add, or remove mount allowlist entries. Triggers on "mounts", "mount allowlist",…
它会碰到什么
这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。
技能内容
Manage Mounts
Configure which host directories NanoClaw agent containers can access. The mount allowlist lives at ~/.config/nanoclaw/mount-allowlist.json.
Show Current Config
cat ~/.config/nanoclaw/mount-allowlist.json 2>/dev/null || echo "No mount allowlist configured"
Show the current config to the user in a readable format: which directories are allowed, and whether each is read-only or read-write.
Add Directories
Ask which directories the user wants agents to access. For each path:
- Validate the path exists
- Ask if it should be read-write (
allowReadWrite: true) or read-only (allowReadWrite: false, the safer default)
Build the JSON config and write it:
pnpm exec tsx setup/index.ts --step mounts --force -- --json '{"allowedRoots":[{"path":"/path/to/dir","allowReadWrite":true}],"blockedPatterns":[]}'
Use --force to overwrite the existing config.
Remove Directories
Read the current config, show it, ask which entry to remove, then write the updated config through the same write path (build the trimmed JSON and pass it to --step mounts --force -- --json):
pnpm exec tsx setup/index.ts --step mounts --force -- --json '{"allowedRoots":[],"blockedPatterns":[]}'
Reset to Empty
pnpm exec tsx setup/index.ts --step mounts --force -- --empty
After Changes
The allowlist is read fresh when a container is spawned, so new mounts apply to newly spawned containers automatically — no service restart needed.
To apply the new config to a group that already has a running container, restart just that group:
ncl groups restart --id <group-id>想直接用这个技能?
本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。