Agent Environment
Principle expression
Primary: P12
Supporting: P14, P16, P15
Scope
Own one recurring judgment: what minimum user-level workflow source lets this
person reconstruct and evolve the intended coding-agent capabilities and
working agreements across tools and devices, and how can each projection be
reconciled and verified without copying secrets, opaque state, or accidental
machine history?
This Skill owns inventory classification, portable workflow-source formation,
three-way reconciliation, migration receipts, and ordinary-entry verification.
It does not own project instructions, provider accounts, secret storage, tool
implementation, organization policy, or the acceptance of a personal working
agreement. Use an existing dotfiles or configuration manager as the carrier
when one is already trusted; do not replace it with a new framework.
Read concepts when desired source, projection,
secret prerequisite, local state, or override are being conflated. Read
current tool surfaces only for tools in scope,
and re-check their official documentation before writing because vendor
surfaces change.
Principle source
Use a host Sequence and matching interpretations when the host declares them.
Otherwise use this Skill's read-only fallback in references/sequence.md.
Read only P12, P14, P16, and P15.
Dispatch
Before dispatch or inspection, apply this source gate: when setup names a
selected capability but supplies no desired source or source locator, return a
plain final response with status NEEDS_INPUT and one scoped request for that
source. This is not an interactive-question tool call. Stop without listing or
reading skills, inventorying either device, consulting vendor material, or
forming a conditional installation plan. Treat an installed or runtime-listed
copy as target evidence, never as the missing desired source.
- With
audit, read and follow commands/audit.md.
- With
setup, read and follow commands/setup.md.
- With
reconcile, read and follow commands/reconcile.md.
- With
migrate, read and follow commands/migrate.md.
- With
verify, read and follow commands/verify.md.
- With no argument, begin with a read-only audit. Do not infer authority to
change user-level files from a request to inspect or recommend.
Start
Person and device(s) in scope:
Selected harness/tool and ordinary use path, if required:
Required capabilities and working agreements:
Requested setup surface and explicit exclusions:
Existing desired source or carrier, if any:
Prior source revision and receipt, if relevant:
Configuration that must remain machine-local:
Secret/authentication prerequisites, named but not read:
Target OS, shell, and trust constraints:
Human approval and rollback boundary:
Observation that would show successful reconstruction:
If the user has not authorized writes, stop after inventory and a proposed
reconciliation. Never print, copy, commit, or ask a model to summarize secret
values, authentication databases, session transcripts, caches, or machine
identifiers.
Core method
- Recover intended work before files. Name the recurring actions,
capabilities, working agreements, and verification observations. Select only
the setup surfaces needed to enable that work: a skill or capability,
harness guidance/configuration, runtime tooling, authorization, or another
bounded subset. These are composable surfaces, not mandatory levels. Do not
infer a CLI install, provider route, or full environment from the word
setup, and do not treat every file under a vendor home directory as desired
state. Resolve the target harness from the request or active runtime only
when a projection needs one. If the target is missing and would change the
action, ask one scoped question; do not scan installed tools to guess it.
Resolve a selected capability's desired source through the pre-dispatch
source gate. Enter marketplace discovery only after an explicit request.
For every projection, name its material ordinary-use benefit and added
burden; preserve the unchanged environment when the gain is not material.
Keep user scope thin: concise nearly-universal agreements, source locators,
and native discovery of already-selected on-demand capabilities. A named
capability is setup data, not an instruction to invoke it or install its
target harness.
- Inventory through supported surfaces. Inspect only what the selected
capability can depend on. A skill setup may need source, installer, and
discovery evidence; a harness setup may add instructions, plugins, MCP,
hooks, or permissions; a runtime setup may add installation provenance,
versions, and authentication status. Record paths and presence; redact
values. For one skill, inspect only its source, the selected harness's
discovery surface, and a same-name conflict there—not unrelated vendor
directories. In a classify/propose-only task, the declared source locator
and skill identity are sufficient unless compatibility or safety depends on
its content; do not fetch or load the skill body merely to plan an
installer-managed projection. Use official status or diagnostics commands
when available. Treat the declared target device as the object; the active
host running this Skill is not the target unless the human says so. When the
target is another or hypothetical device and no target access is supplied,
plan from declared facts and leave target observations unresolved.
- Classify every item. Assign
desired source, tool projection, secret prerequisite, machine-local state, local override, or unknown. Unknown
and conflicting items block automatic copying; they do not become portable
merely because they are readable.
- Select the smallest carrier. Reuse an accepted dotfiles/configuration
source when present. For one bounded capability, a source locator, explicit
selection, and setup receipt may be sufficient. Prepare a small
user-controlled profile from the profile template
only when recurring setup has multiple independently changing modules or
needs later reconciliation. Store workflow intent, source locators, install
provenance, non-secret modules, projection mappings, exclusions, and
verification—not vendor caches or an export of
$HOME.
- Plan per tool from current documentation. Read only the relevant section
of tool surfaces, then verify the current
official path and precedence. Prefer a supported import, installer, settings
command, or structural merge over editing undocumented application stores.
Choose an installation mechanism only after the desired source and selection
are known. An installer's catalog or marketplace cannot supply missing setup
intent.
If current documentation, runtime help, or diagnostics are unavailable, name
the lookup/manual action; never invent an exact command or configuration key.
Treat discoverable vendor mechanics as
lookup-required, not as missing
human intent; ask the human only for a choice, authority boundary, or source
that investigation cannot determine.
Every exact command or key in a plan or receipt must carry the official page,
inspected --help, or runtime diagnostic that admitted it in this activation.
Words such as example, equivalent, or likely do not bypass this gate.
- Reconcile source evolution, not files alone. For ongoing updates, compare
the last applied source/projection, the target's current state, and the new
approved source. Map changed workflow intent to affected tools before
editing. A tool-local change is a target observation or candidate source
change; it does not flow upstream without human adoption.
- Apply without taking ownership. Back up or checkpoint each managed
target; merge structured configuration by key; use clearly delimited blocks
only for text projections; preserve unmanaged content byte-for-byte when the
carrier promises that boundary. Do not replace a whole user configuration to
make one setting match.
- Rehydrate secrets separately. Retain only the credential's purpose,
provider, required scope, preferred secure store, and status check. On the
target device, use the tool's supported login or secret-manager path and let
the human complete interactive authorization.
- Verify through ordinary use paths. Check parse/discovery, then run one
harmless behavior probe per selected capability. A copied file is not proof
that the intended agent or runtime loaded it. Confirm an adjacent unselected
surface was not changed and preserve one relevant unmanaged item as boundary
evidence. When the capability owns mutable user-level state, verify an actual
no-residue create, rename, and remove through the target runtime; an existing
readable directory is not evidence of write capability. Also confirm that
the selected projection improved its named action
without adding an unnecessary always-on instruction, runtime, updater, or
duplicate source. When marketplace discovery is a live competing trigger,
repeat the raw setup request through the ordinary classifier with the actual
installed skill set; do not name this Skill or disclose the expected route.
- Return a reconciliation receipt. Report applied, preserved, deferred,
unsupported, and failed items; source revision; target/tool versions;
rollback locations; manual authorization still required; and observations
that should reopen the profile. The receipt is evidence, not a new source.
Classify every mechanical action as
verified or lookup-required; omit the
command/key entirely for lookup-required actions.
Ownership and routing
| Need |
Owner |
| Personal user-level agent workflow setup, evolution, and migration |
this Skill |
| Agent behavior inside one repository |
project AGENTS.md, CLAUDE.md, rules, or improve-agent-workflow |
| General shell/editor/package dotfiles |
existing dotfiles or configuration-management method |
| Install or update agent skills |
current skills installer or the tool's supported package path |
| Secret value, login, account, or provider authorization |
human plus supported credential store/login flow |
| Organization-wide enforced policy |
organization administrator and managed configuration |
| Tool-specific current configuration semantics |
vendor documentation and runtime diagnostics |
Boundaries
- Do not make one vendor's hidden directory the cross-tool source of truth.
- Do not migrate chats, sessions, memories, caches, telemetry, indexes, UI
layout, or device identifiers by default. Promote a specific item only after
the user names the future decision it must support and its privacy boundary.
- Do not translate every setting across tools. Preserve common intent where a
faithful projection exists; otherwise retain an explicit tool-specific
commitment or
unsupported result.
- Do not make full runtime installation the implicit meaning of setup. A
skill-only or harness-only setup is complete when its declared capability and
boundary probes pass; unselected surfaces are out of scope, not failures.
- Do not add a projection merely for cross-tool symmetry. Prefer each harness's
smallest native, on-demand surface; leave an already sufficient environment
unchanged rather than manufacturing setup parity.
- Do not turn user scope into an always-on control plane. A user-level setup is
thin by default; move project truth and specialized behavior to the narrower
project or on-demand surface that owns it.
- Do not turn setup into third-party capability discovery. Marketplace search
is eligible only when the human explicitly asks to discover or compare
candidates; it never fills a missing source in an otherwise selected setup.
- Do not make a generated tool configuration bidirectionally authoritative.
Adopt a tool-local improvement into the workflow source explicitly, then
project it outward in a later reconciliation.
- Do not bake current vendor paths or keys into universal doctrine. Re-check
the linked official source during execution and record the observed version.
- Do not claim setup complete while authentication, an ordinary-entry probe,
or an unresolved conflict remains hidden.
- Do not require Codex, Cursor, Claude Code, a particular OS, a dotfiles
manager, or this repository after the Skill is installed.
Completion standard
An environment setup, update, or migration is ready only when its declared
scope, desired source or source locator, and human owner are explicit; every
in-scope item has a state classification; secrets and local state remain outside
the desired source; existing target content has a rollback path; each selected
capability passes an ordinary-use verification or is visibly deferred; every
applied projection has a named material benefit and bounded burden; and the
receipt states residual manual work and deliberate no-ops. When a portable
profile is actually used,
source and target drift must be distinguished, and the profile must remain
updatable without copying opaque vendor state or overwriting target differences.
1---2name: agent-environment3description: Use this Skill, not a named task Skill, when that Skill or capability is the object of user-level setup, installation, migration, or configuration. An installed or runtime-discovered copy is target evidence, not a desired source. If the human has not supplied the selected capability's source, return `NEEDS_INPUT` before reading it, inventory, lookup, planning, or action; never inspect secret values. Use for "set up my agents on this machine", "migrate my AI coding setup", "新设备配置 Codex/Cursor/Claude Code", "update my global agent workflow", or reconstructing selected skills, harness guidance, plugins, MCP, hooks, permissions, runtimes, and authentication prerequisites. Setup does not imply marketplace discovery, CLI/provider installation, or full-toolbox adoption. Do not use for project-local agent workflow design, fleet policy, sessions/caches, or unrelated dotfiles.4---56# Agent Environment78## Principle expression910**Primary:** P1211**Supporting:** P14, P16, P151213## Scope1415Own one recurring judgment: **what minimum user-level workflow source lets this16person reconstruct and evolve the intended coding-agent capabilities and17working agreements across tools and devices, and how can each projection be18reconciled and verified without copying secrets, opaque state, or accidental19machine history?**2021This Skill owns inventory classification, portable workflow-source formation,22three-way reconciliation, migration receipts, and ordinary-entry verification.23It does not own project instructions, provider accounts, secret storage, tool24implementation, organization policy, or the acceptance of a personal working25agreement. Use an existing dotfiles or configuration manager as the carrier26when one is already trusted; do not replace it with a new framework.2728Read [concepts](references/concepts.md) when `desired source`, `projection`,29`secret prerequisite`, `local state`, or `override` are being conflated. Read30[current tool surfaces](references/tool-surfaces.md) only for tools in scope,31and re-check their official documentation before writing because vendor32surfaces change.3334## Principle source3536Use a host Sequence and matching interpretations when the host declares them.37Otherwise use this Skill's read-only fallback in `references/sequence.md`.38Read only P12, P14, P16, and P15.3940## Dispatch4142Before dispatch or inspection, apply this source gate: when setup names a43selected capability but supplies no desired source or source locator, return a44plain final response with status `NEEDS_INPUT` and one scoped request for that45source. This is not an interactive-question tool call. Stop without listing or46reading skills, inventorying either device, consulting vendor material, or47forming a conditional installation plan. Treat an installed or runtime-listed48copy as target evidence, never as the missing desired source.4950- With `audit`, read and follow `commands/audit.md`.51- With `setup`, read and follow `commands/setup.md`.52- With `reconcile`, read and follow `commands/reconcile.md`.53- With `migrate`, read and follow `commands/migrate.md`.54- With `verify`, read and follow `commands/verify.md`.55- With no argument, begin with a read-only audit. Do not infer authority to56 change user-level files from a request to inspect or recommend.5758## Start5960```text61Person and device(s) in scope:62Selected harness/tool and ordinary use path, if required:63Required capabilities and working agreements:64Requested setup surface and explicit exclusions:65Existing desired source or carrier, if any:66Prior source revision and receipt, if relevant:67Configuration that must remain machine-local:68Secret/authentication prerequisites, named but not read:69Target OS, shell, and trust constraints:70Human approval and rollback boundary:71Observation that would show successful reconstruction:72```7374If the user has not authorized writes, stop after inventory and a proposed75reconciliation. Never print, copy, commit, or ask a model to summarize secret76values, authentication databases, session transcripts, caches, or machine77identifiers.7879## Core method80811. **Recover intended work before files.** Name the recurring actions,82 capabilities, working agreements, and verification observations. Select only83 the setup surfaces needed to enable that work: a skill or capability,84 harness guidance/configuration, runtime tooling, authorization, or another85 bounded subset. These are composable surfaces, not mandatory levels. Do not86 infer a CLI install, provider route, or full environment from the word87 `setup`, and do not treat every file under a vendor home directory as desired88 state. Resolve the target harness from the request or active runtime only89 when a projection needs one. If the target is missing and would change the90 action, ask one scoped question; do not scan installed tools to guess it.91 Resolve a selected capability's desired source through the pre-dispatch92 source gate. Enter marketplace discovery only after an explicit request.93 For every projection, name its material ordinary-use benefit and added94 burden; preserve the unchanged environment when the gain is not material.95 Keep user scope thin: concise nearly-universal agreements, source locators,96 and native discovery of already-selected on-demand capabilities. A named97 capability is setup data, not an instruction to invoke it or install its98 target harness.992. **Inventory through supported surfaces.** Inspect only what the selected100 capability can depend on. A skill setup may need source, installer, and101 discovery evidence; a harness setup may add instructions, plugins, MCP,102 hooks, or permissions; a runtime setup may add installation provenance,103 versions, and authentication *status*. Record paths and presence; redact104 values. For one skill, inspect only its source, the selected harness's105 discovery surface, and a same-name conflict there—not unrelated vendor106 directories. In a classify/propose-only task, the declared source locator107 and skill identity are sufficient unless compatibility or safety depends on108 its content; do not fetch or load the skill body merely to plan an109 installer-managed projection. Use official status or diagnostics commands110 when available. Treat the declared target device as the object; the active111 host running this Skill is not the target unless the human says so. When the112 target is another or hypothetical device and no target access is supplied,113 plan from declared facts and leave target observations unresolved.1143. **Classify every item.** Assign `desired source`, `tool projection`, `secret115 prerequisite`, `machine-local state`, `local override`, or `unknown`. Unknown116 and conflicting items block automatic copying; they do not become portable117 merely because they are readable.1184. **Select the smallest carrier.** Reuse an accepted dotfiles/configuration119 source when present. For one bounded capability, a source locator, explicit120 selection, and setup receipt may be sufficient. Prepare a small121 user-controlled profile from [the profile template](assets/environment-profile.md)122 only when recurring setup has multiple independently changing modules or123 needs later reconciliation. Store workflow intent, source locators, install124 provenance, non-secret modules, projection mappings, exclusions, and125 verification—not vendor caches or an export of `$HOME`.1265. **Plan per tool from current documentation.** Read only the relevant section127 of [tool surfaces](references/tool-surfaces.md), then verify the current128 official path and precedence. Prefer a supported import, installer, settings129 command, or structural merge over editing undocumented application stores.130 Choose an installation mechanism only after the desired source and selection131 are known. An installer's catalog or marketplace cannot supply missing setup132 intent.133 If current documentation, runtime help, or diagnostics are unavailable, name134 the lookup/manual action; never invent an exact command or configuration key.135 Treat discoverable vendor mechanics as `lookup-required`, not as missing136 human intent; ask the human only for a choice, authority boundary, or source137 that investigation cannot determine.138 Every exact command or key in a plan or receipt must carry the official page,139 inspected `--help`, or runtime diagnostic that admitted it in this activation.140 Words such as `example`, `equivalent`, or `likely` do not bypass this gate.1416. **Reconcile source evolution, not files alone.** For ongoing updates, compare142 the last applied source/projection, the target's current state, and the new143 approved source. Map changed workflow intent to affected tools before144 editing. A tool-local change is a target observation or candidate source145 change; it does not flow upstream without human adoption.1467. **Apply without taking ownership.** Back up or checkpoint each managed147 target; merge structured configuration by key; use clearly delimited blocks148 only for text projections; preserve unmanaged content byte-for-byte when the149 carrier promises that boundary. Do not replace a whole user configuration to150 make one setting match.1518. **Rehydrate secrets separately.** Retain only the credential's purpose,152 provider, required scope, preferred secure store, and status check. On the153 target device, use the tool's supported login or secret-manager path and let154 the human complete interactive authorization.1559. **Verify through ordinary use paths.** Check parse/discovery, then run one156 harmless behavior probe per selected capability. A copied file is not proof157 that the intended agent or runtime loaded it. Confirm an adjacent unselected158 surface was not changed and preserve one relevant unmanaged item as boundary159 evidence. When the capability owns mutable user-level state, verify an actual160 no-residue create, rename, and remove through the target runtime; an existing161 readable directory is not evidence of write capability. Also confirm that162 the selected projection improved its named action163 without adding an unnecessary always-on instruction, runtime, updater, or164 duplicate source. When marketplace discovery is a live competing trigger,165 repeat the raw setup request through the ordinary classifier with the actual166 installed skill set; do not name this Skill or disclose the expected route.16710. **Return a reconciliation receipt.** Report applied, preserved, deferred,168 unsupported, and failed items; source revision; target/tool versions;169 rollback locations; manual authorization still required; and observations170 that should reopen the profile. The receipt is evidence, not a new source.171 Classify every mechanical action as `verified` or `lookup-required`; omit the172 command/key entirely for `lookup-required` actions.173174## Ownership and routing175176| Need | Owner |177|---|---|178| Personal user-level agent workflow setup, evolution, and migration | this Skill |179| Agent behavior inside one repository | project `AGENTS.md`, `CLAUDE.md`, rules, or `improve-agent-workflow` |180| General shell/editor/package dotfiles | existing dotfiles or configuration-management method |181| Install or update agent skills | current skills installer or the tool's supported package path |182| Secret value, login, account, or provider authorization | human plus supported credential store/login flow |183| Organization-wide enforced policy | organization administrator and managed configuration |184| Tool-specific current configuration semantics | vendor documentation and runtime diagnostics |185186## Boundaries187188- Do not make one vendor's hidden directory the cross-tool source of truth.189- Do not migrate chats, sessions, memories, caches, telemetry, indexes, UI190 layout, or device identifiers by default. Promote a specific item only after191 the user names the future decision it must support and its privacy boundary.192- Do not translate every setting across tools. Preserve common intent where a193 faithful projection exists; otherwise retain an explicit tool-specific194 commitment or `unsupported` result.195- Do not make full runtime installation the implicit meaning of setup. A196 skill-only or harness-only setup is complete when its declared capability and197 boundary probes pass; unselected surfaces are out of scope, not failures.198- Do not add a projection merely for cross-tool symmetry. Prefer each harness's199 smallest native, on-demand surface; leave an already sufficient environment200 unchanged rather than manufacturing setup parity.201- Do not turn user scope into an always-on control plane. A user-level setup is202 thin by default; move project truth and specialized behavior to the narrower203 project or on-demand surface that owns it.204- Do not turn setup into third-party capability discovery. Marketplace search205 is eligible only when the human explicitly asks to discover or compare206 candidates; it never fills a missing source in an otherwise selected setup.207- Do not make a generated tool configuration bidirectionally authoritative.208 Adopt a tool-local improvement into the workflow source explicitly, then209 project it outward in a later reconciliation.210- Do not bake current vendor paths or keys into universal doctrine. Re-check211 the linked official source during execution and record the observed version.212- Do not claim setup complete while authentication, an ordinary-entry probe,213 or an unresolved conflict remains hidden.214- Do not require Codex, Cursor, Claude Code, a particular OS, a dotfiles215 manager, or this repository after the Skill is installed.216217## Completion standard218219An environment setup, update, or migration is ready only when its declared220scope, desired source or source locator, and human owner are explicit; every221in-scope item has a state classification; secrets and local state remain outside222the desired source; existing target content has a rollback path; each selected223capability passes an ordinary-use verification or is visibly deferred; every224applied projection has a named material benefit and bounded burden; and the225receipt states residual manual work and deliberate no-ops. When a portable226profile is actually used,227source and target drift must be distinguished, and the profile must remain228updatable without copying opaque vendor state or overwriting target differences.