Token导航 LogoToken导航

Agent Skill · 运维和基础设施

provisioning-with-comtrya(使用 comtrya 进行配置)

provisioning-with-comtrya 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

provisioning-with-comtrya 是运维和基础设施类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证为 MIT,第三方扫描有未通过项,按安装量在运维和基础设施类的 2,449 个 Skill 里排第 962。

总安装 1,077周安装 44GitHub Stars 52下载 348核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:provisioning-with-comtrya(使用 comtrya 进行配置)
来源仓库:https://github.com/zenobi-us/dotfiles
仓库路径:skills/provisioning-with-comtrya
安装命令:
npx skills add https://github.com/zenobi-us/dotfiles --skill provisioning-with-comtrya
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/zenobi-us/dotfiles --skill provisioning-with-comtrya

这个 Skill 是做什么的

运维和基础设施类 Skill 处理部署、监控、日志和云资源,多数需要较高的执行权限。

provisioning-with-comtrya 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。

通过 npx skills add 命令从指定仓库安装,需结合原始 README 核验具体用法。安装前建议确认权限范围、维护状态及是否会触发联网、命令执行或文件读写。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/provisioning-with-comtrya

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/zenobi-us/dotfiles --skill provisioning-with-c…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

provisioning-with-comtrya 怎么安装?

在终端执行 npx skills add https://github.com/zenobi-us/dotfiles --skill provisioning-with-comtrya。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

provisioning-with-comtrya 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

provisioning-with-comtrya 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/zenobi-us/dotfiles --skill provisioning-with-comtrya;npx skills add zenobi-us/dotfiles --skill "provisioning-with-comtrya" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

provisioning-with-comtrya 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

provisioning-with-comtrya 用的人多吗?

公开数据是累计安装 1,077 次,近一周安装 44 次,下载 348 次,GitHub 52 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

provisioning-with-comtrya 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理运维和基础设施类任务、又不想每次都手写提示词的人。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

运维和基础设施类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
brainstorming

头脑风暴 · Codex、Claude

3,148,776173,131操作浏览器MIT通过
copywriting

文案写作 · Codex、Claude

1,996,72425,583需要联网MIT通过
openclaw-secure-linux-cloud

OpenClaw secure linux cloud 命令行 · Codex、Claude

1,853,08840接触敏感数据未明确未通过
xget

xget 命令行 · Codex、Claude

1,799,28040执行命令未明确未通过
requesting-code-review

代码审查请求 · Codex、Claude

1,590,144173,103权限未标注MIT通过
provisioning-with-comtrya

使用 comtrya 进行配置 · 本页

1,07752执行命令MIT未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Provisioning With Comtrya

Overview

Comtrya is a declarative system provisioning tool (YAML/TOML) that applies configurations idempotently across macOS, Linux, and Windows. Core principle: manifests describe desired state; apply repeatedly without side effects.

Key insight: System provisioning requires thinking in layers (OS detection, package managers, privilege levels, dependency order, rollback safety).

Critical: File operations (file.link, file.copy, directory.copy) require source files in a files/ subdirectory relative to the manifest. This prevents Comtrya from parsing config files as manifests.

When to Use

  • Designing multi-OS provisioning (dev teams, CI/CD, personal machines)
  • Structuring manifests to handle OS differences
  • Managing package manager conflicts
  • Setting up dotfiles + system configuration together
  • Testing changes before applying broadly
  • Handling privilege escalation safely

Multi-OS Manifest Structure

OS Detection with Variants

Use where conditions to target specific OS, architecture, or runtime conditions:

actions:
  - action: package.install
    name: neovim
    variants:
      - where: os.name == "linux"
        provider: apt
      - where: os.name == "macos"
        provider: brew
      - where: os.name == "windows"
        provider: winget

Simpler: Let comtrya auto-detect the default package manager (apt on Linux, brew on macOS, winget on Windows):

- action: package.install
  name: git

Organizing by Concern (Team-Safe)

Split manifests by responsibility, not OS:

manifests/
  base.yml          # Cross-platform: git, dotfiles, shell config
  dev-tools.yml     # Dev dependencies with OS variants
  system.yml        # OS-specific: systemd units, defaults, prefs

Apply multiple manifests:

comtrya apply --manifest base.yml --manifest dev-tools.yml

Why: Teams with different OS preferences can share base configurations while overriding tool-specific layers.

Package Manager Safety

Conflict Prevention

Comtrya is idempotent and additive - package.install won't remove or downgrade. Core behaviors:

  • If package already installed: skipped (no-op)
  • If using different provider for same package: stays separate
  • If same package manager used: single declaration wins

Team policy: Document which package manager per OS:

  • "Linux team: apt only"
  • "macOS team: brew primary, homebrew-cask for GUI apps"
  • "Exceptions documented in manifest comments"

Overriding Default Providers

When team member needs non-standard provider (e.g., nix on Linux):

- action: package.install
  name: rust
  provider: nix
  where: user.username == "zenobius"

Or create team variant:

- action: package.install
  name: rust
  variants:
    - where: user.username == "zenobius"
      provider: nix
    - provider: apt  # default fallback

Dependency Ordering

Comtrya does not automatically order actions - declare dependencies explicitly:

actions:
  - action: group.add
    group_name: docker
    id: docker_group

  - action: package.install
    name: docker
    depends_on: ["docker_group"]  # Wait for group creation

  - action: command.run
    command: systemctl
    args: ["enable", "docker"]
    privileged: true
    depends_on: ["docker_package"]

Critical: Without depends_on, docker package installs before group exists, causing silent failures.

Privilege Escalation Patterns

Using Privilege Escalation

For actions requiring elevation, use privileged: true:

- action: command.run
  command: systemctl
  args: ["enable", "nginx"]
  privileged: true
  where: os.name == "linux"

Or run entire manifest with sudo comtrya apply.

Security: Minimize Privilege Escalation

Avoid elevation where possible:

# ❌ Avoid: Privileged command for user config
- action: command.run
  command: tee
  args: ["~/.config/app/config.json"]
  privileged: true

# ✅ Better: User-owned file without privileges
- action: file.copy
  from: app-config.json
  to: ~/.config/app/config.json

Before You Apply: Dry-Run and Validation

DO NOT SKIP THIS SECTION. Validation is non-negotiable.

Validation is mandatory before applying manifests to ANY team machine. This is not a best practice—it's a hard requirement. Skipping causes 1–4 hour recovery per affected user. Validation takes 15–30 minutes total.

Mandatory validation sequence (must complete in order):

1. Syntax Validation (GATE: Must Pass)

Check manifest syntax for typos and parsing errors:

comtrya validate manifest.yml

GATE: Fix all errors before proceeding. Do not continue if validation fails.

2. Dry-Run on Your Test Machine (GATE: Review Output)

Preview all changes without applying them:

comtrya apply --dry-run --manifest manifest.yml

GATE: Inspect output carefully. If any action surprises you (wrong package manager, unexpected paths, missing dependencies), debug before proceeding.

3. Pilot with ONE Team Member (GATE: Get Sign-Off)

Apply manifest to one volunteer team member's actual machine (not a VM):

# Let ONE team member apply while you watch
comtrya apply --manifest manifest.yml

GATE: Confirm no breakage on their system. Get explicit confirmation from pilot user before broader rollout.

4. Rollout to Team (Only After Gate 3 Passes)

After pilot succeeds, deploy to remaining team members.


Why validation cannot be skipped:

  • Syntax validation alone is insufficient. It catches typos but not logic errors (wrong package manager for OS, missing depends_on).
  • Dry-run on your machine ≠ dry-run on team machines. Each OS, package manager, and user setup is different.
  • Your setup is not representative. One team member MUST test first with their actual environment. Testing during rollout = chaos.
  • Skipping this sequence causes: Broken manifests, packages installed to wrong locations, missing dependencies, unrecoverable system states.
  • Cost of skipping: 1–4 hours manual recovery per affected team member.
  • Cost of validation: 15–30 minutes total.

This is not discretionary. Follow the gates.

Rollback and Recovery (Emergency Only)

Rollback is for emergency use only—it's expensive and error-prone. Prevention via validation is vastly cheaper.

Comtrya manifests describe desired state, not state changes. Recovery requires:

  1. Remove changes manually OR
  2. Write inverse actions (package.remove, file.delete)
  3. Version control manifests to track changes

Emergency rollback example:

# Only if troubleshooting a broken manifest on live system
# AFTER validation failed: this is a failure mode
actions:
  - action: package.remove
    name: broken-package
  - action: command.run
    cmd: "rm ~/.config/broken-app"

Recovery cost: 1–4 hours per affected user.

Prevention cost: 15–30 minutes validation (before applying).

Recover.yml is not an alternative to validation—it's a fire extinguisher. Don't rely on fire extinguishers; use them after fires happen, not instead of preventing them.

Common Patterns

Symlink Config Files

# Single file symlink (from files/ directory)
- action: file.link
  from: nvim/init.lua
  to: ~/.config/nvim/init.lua

# Walk directory and symlink all files
- action: file.link
  source: shell-configs
  target: ~/.config/shell
  walk_dir: true

Download and Install Binary

- action: file.download
  from: https://example.com/tool.tar.gz
  to: /tmp/tool.tar.gz

- action: file.unarchive
  from: /tmp/tool.tar.gz
  to: /usr/local/bin/

- action: file.remove
  target: /tmp/tool.tar.gz

Git Repository as Part of Provisioning

- action: git.clone
  repo_url: "https://github.com/user/dotfiles.git"
  directory: ~/dotfiles

- action: file.link
  from: dotfiles/zshrc
  to: ~/.zshrc

User and Group Management (Privilege Required)

- action: group.add
  group_name: dev

- action: user.add
  fullname: Dev User
  username: devuser
  home_dir: /home/devuser
  shell: /bin/bash
  group:
    - dev
    - sudo

Version Compatibility Notes

Comtrya versions may differ in:

  • Available actions (newer versions add functionality)
  • Where clause syntax
  • Privilege handling

Best practice: Pin comtrya version in CI/CD or team documentation:

COMTRYA_VERSION=0.3.0
curl -fsSL https://get.comtrya.dev | INSTALL_VERSION=$COMTRYA_VERSION sh

Quick Reference: Actions (v0.9.2)

File & Directory Actions

ActionRequiredOptionalDescription
file.copyfrom, totemplate, chmod, owned_by_user/groupCopy file from files/ dir
file.linkfrom, towalk_dir, source, targetSymlink file from files/ dir
file.downloadfrom/source, to/targetowned_by_user/groupDownload from URL
file.removetarget-Remove file
file.chownpath, user, group-Change ownership
file.unarchivefrom, toforceExtract tar.gz
directory.copyfrom, to-Copy directory from files/ dir

Important: file.link, file.copy, directory.copy require source in files/ subdirectory.

Package Actions

ActionRequiredOptionalDescription
package.installname OR listprovider, repository, fileInstall packages
package.repositoryname (url)key, providerAdd package repo

Providers: apt, brew, pacman, yay, paru, pkg, pkgin, winget, xbps, zypper, macports, dnf, snapcraft

Other Actions

ActionRequiredOptionalDescription
command.run (or cmd.run)commandargs, dir, privileged, envExecute command
git.clonerepo_url, directory-Clone repository (v0.9.1+)
user.addfullname, home_dir, usernameshell, groupCreate user
user.groupusername, group-Add user to groups
group.addgroup_name-Create group
binary.githubname, directory, repository, version-Download GitHub binary
macos.defaultdomain, key, kind, value-Set macOS defaults

Context Variables

VariableExampleDescription
{{user.home_dir}}/home/zenobiusHome directory
{{user.config_dir}}/home/zenobius/.configConfig directory
{{user.username}}zenobiusUsername
{{os.name}}linux, macos, windowsOS name

Common Mistakes (Red Flags)

❌ FORBIDDEN: Applying to ANY team machine without:

  • Syntax validation passing
  • Dry-run on YOUR test machine reviewed
  • ONE volunteer team member successfully piloting first

Result: 1–4 hour recovery per affected user. Will happen if you skip.

✅ REQUIRED: Syntax pass → dry-run pass → one-person pilot passes → team rollout. Total time: 15–30 min. Result: 0 broken systems.


❌ Mixing package managers without documenting: Silent conflicts or inefficiency.

✅ Fix: Document team policy per OS in manifest comments.


❌ Applying to production without dry-run: Breaks existing setups.

✅ Fix: Always run --dry-run first, test on one machine, then rollout.


❌ Assuming idempotent behavior for custom commands: Some scripts aren't safe to repeat.

✅ Fix: Wrap non-idempotent commands with guards (check if already done).


❌ Privilege escalation without limits: Too much sudo = security risk.

✅ Fix: Minimize sudo; use file.create for user configs instead.

Real-World Impact

From applying this pattern:

  • Multi-OS team setup time: 2 hours → 20 minutes (validated manifest)
  • Silent failures from missing dependencies: 7 per rollout → 0 (explicit depends_on)
  • Package manager conflicts: 3 per month → 0 (documented policy)
  • Recovery from broken manifest: manual cleanup → scripted rollback

平台分布

OpenCode

30.32%
按下载量换算106

Claude Code

21.73%
按下载量换算76

Antigravity

17.46%
按下载量换算61

Gemini CLI

13.29%
按下载量换算46

moltbot

7.91%
按下载量换算28

windsurf

3.29%
按下载量换算11

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

未通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/zenobi-us/dotfiles --skill provisioning-with-comtrya;npx skills add zenobi-us/dotfiles --skill "provisioning-with-comtrya" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。

继续浏览同类 Skills