Skip to content
Agentmart
Submit a tool

setup-env

统一设置本机各 agent harness 的全局代理规则并做环境体检。新设备初始化、全局约定变更后重同步时使用。仅限用户主动调用。

Skill by gitbobobo

IndexedMIT
Write a review

Chalk Labs

Need help deploying setup-env?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/gitbobobo-setup-env

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

统一设置本机各 agent harness 的全局代理规则并做环境体检。新设备初始化、全局约定变更后重同步时使用。仅限用户主动调用。

Use cases: agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Node.js package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/setup-env

What's inside

Skill name
setup-env
Description
统一设置本机各 agent harness 的全局代理规则并做环境体检。新设备初始化、全局约定变更后重同步时使用。仅限用户主动调用。
License
MIT
Instructions
46 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts
  • Instructions read files in your home folder (~/.ssh, ~/.aws…)

Files (4)

  • SKILL.md
  • AGENTS.md · rules/
  • setup-env.mjs · scripts/
  • setup-env.test.mjs · scripts/

SKILL.md (first lines)

# setup-env

把 `rules/AGENTS.md`(本技能目录下,唯一真源)链接到各 harness 的全局规则路径,让所有 CLI 代理在任何项目里都加载同一套约定;通用规则涵盖重命令遵守机器调度和单一最终验证负责人,具体编排流程留在对应技能。同步后仍以项目规则优先。同时报告各 harness CLI 与本机工具(如 cargo-nextest)是否可用——工具只报告不安装。cargo-nextest 不在 PATH 时再探测 CARGO_HOME 和默认 Cargo bin,区分「未安装」与「已安装但 PATH 不可见」;后者在实际代理启动环境补路径,再从新代理执行 `cargo nextest --version` 验证。装了 sccache 时,把它写进 `$CARGO_HOME/config.toml` 的 `[build] rustc-wrapper`,让多个工作树共享 Rust 编译缓存(已有别的 wrapper 或设置了 `RUSTC_WRAPPER` 时不覆盖;改写前先备份原文件);没装只报告。

## 步骤

1. 体检:`node <技能目录>/scripts/setup-env.mjs --check`,逐项看状态:已链接 / 副本一致 / 副本过期 / 有别的内容 / 缺失。
2. 执行:`node <技能目录>/scripts/setup-env.mjs`。Windows 或符号链接权限不足时用 `--copy`。
3. 核对备份:脚本对已有非空内容会先备份成 `<文件>.bak-<时间戳>` 再替换。出现备份就提醒用户检查旧内容是否需要合并。
4. 完成标准:脚本退出码为 0,且输出中每个 harness 显示「已链接」或「副本一致」。

## 覆盖的 harness

| harness | macOS / Linux | Windows |
|---|---|---|
| devin | `~/.config/devin/AGENTS.md` | `%APPDATA%\devin\AGENTS.md` |
| codex | `~/.codex/AGENTS.md` | `~/.codex/AGENTS.md` |
| claude / claudeAgent | `~/.claude/CLAUDE.md` | `~/.claude/CLAUDE.md` |
| cursor | `~/.cursor/rules/global.mdc` | `~\.cursor\rules\global.mdc` |
| factory droid | `~/.factory/AGENTS.md` | `~\.factory\AGENTS.md` |
| pi | `~/.pi/agent/AGENTS.md` | `~\.pi\agent\AGENTS.md` |

新增 harness 时改 `scripts/setup-env.mjs` 里的 `TARGETS`。pi 的目录可被 `PI_CODING_AGENT_DIR` 覆盖,脚本也照这个变量取路径。

pi 备注:在 Windows 上,pi 只去 C 盘的 `Program Files` 找 Git Bash,找不到就用 PATH 上的 `System32\bash.exe`,也就是 WSL。Git 装在其他盘时,体检会报 `pi:shell` 待处理,并给出应写进 `<agent-dir>/settings.json` 的 `"shellPath"`;照提示写入后重跑体检确认。

Factory Droid 备注:

- 官方文档确认 `~/.factory/AGENTS.md` 是跨项目的个人指令层;Droid 还会检查 `~/.agents/`、`~/.agent/` 个人目录,本脚本取 `~/.factory` 为主落点。
- 优先级语义:项目 `AGENTS.md` 优先于个人文件——个人层放与仓库无关的通用约定,不会覆盖项目规则。
- 逐次调用另可用 `droid --append-system-prompt-file <path>` 追加提示词(仅当次进程生效,不是持久配置)。

Cursor 备注:

- cursor-agent 扫描 `~/.cursor/rules/` 的 `.mdc` 文件;脚本写入带 `alwaysApply: true` frontmatter 的派生文件(不能符号链接,内容需要包裹),改了 `rules/AGENTS.md` 后所有机器都要重跑脚本。
- Cursor 设置 UI 里的 User Rules 存在账号上、由服务端下发(`getAllCursorRules`),是另一条官方路径,可跨设备同步但只能手动维护,和本文件制互不妨碍。
- 已知上游怪癖:Agents Window 的 Settings 界面可能不列出 `~/.cursor/rules` 下的文件级规则([论坛确认 bug](https://forum.cursor.com/t/how-do-i-configure-a-global-rules-file-that-gets-picked-up-by-agent-mode/157335)),不影响 agent 运行时加载。

## 边界

- 全局规则是「会被加载」,不是「必定遵守」。跨 harness 委派(`delegate_task`)时的硬性约束仍要原文写进任务 prompt 转述。
- 仓库级规则仍放各仓库的 AGENTS.md;本文件只放与仓库无关的通用约定。
- 改约定只改 `rules/AGENTS.md`。符号链接立即生效;`--copy` 部署过的机器要重跑本脚本。
- 本技能只管全局规则和上述 cargo 全局配置,不装 CLI、不改项目。技能本身的安装走 `docs/setup.md` 的 `npx skills` 流程。

From gitbobobo/skills, MIT.

More from gitbobobo/skills

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Oct 21, 2026 (9 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from gitbobobo

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get setup-env running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying setup-env?

CallGet help
Cite this page

setup-env skill. Agent Mart. https://agentmart.dev/skills/gitbobobo-setup-env (last updated 2026-10-24)