Install
openclaw skills install environment-securityVerify real local environment facts before an agent uses machine-specific commands, runtimes, compilers, services, or startup scripts, then create or refresh environment baseline JSON and related environment policy, AGENTS, or skill documents from those verified facts.
openclaw skills install environment-securityUse this skill to turn the current machine state into reusable environment guardrails. Probe the machine first, keep a machine-readable baseline JSON, and render human-readable policy fragments from verified facts only.
Use it not only when you need to generate or refresh environment documents, but also when an agent task depends on local commands, local runtimes, local package managers, local services, startup scripts, or machine-specific install roots.
This skill supports two standalone implementations:
scripts/detect_environment.jsscripts/render_environment_docs.jsscripts/detect_environment.pyscripts/render_environment_docs.pyjava, mvn, node, npm, python, go, cargo, docker, kubectl, dotnet, bundle, composer, or similar tools.environment-baseline.json, ENVIRONMENT_POLICY.md, AGENTS.environment.md, AGENTS.md environment sections, or reusable environment skill snippets.AGENTS.md, default to writing a separate environment snippet such as AGENTS.environment.md instead of overwriting the existing file..cmd/.bat script, and the real install directory.AGENTS.md unless the user explicitly asks for that file to be updated.environment-baseline.jsonENVIRONMENT_POLICY.mdAGENTS.md or a dedicated environment snippetAGENTS.md already exists, write a separate environment snippet by default and keep merge work explicit and local to the relevant section.JavaScript:
node scripts/detect_environment.js --output ./environment-baseline.json
node scripts/render_environment_docs.js ./environment-baseline.json \
--policy-out ./ENVIRONMENT_POLICY.md \
--agents-out ./AGENTS.environment.md \
--skill-snippet-out ./SKILL.environment.md
Python:
python3 scripts/detect_environment.py --output ./environment-baseline.json
python3 scripts/render_environment_docs.py ./environment-baseline.json \
--policy-out ./ENVIRONMENT_POLICY.md \
--agents-out ./AGENTS.environment.md \
--skill-snippet-out ./SKILL.environment.md
Windows note for Python:
python command is new enough.JavaScript:
node scripts/detect_environment.js \
--baseline ./environment-baseline.json \
--tools java,maven \
--output ./environment-baseline.json
node scripts/render_environment_docs.js ./environment-baseline.json \
--policy-out ./ENVIRONMENT_POLICY.md \
--agents-out ./AGENTS.environment.md
Python:
python3 scripts/detect_environment.py \
--baseline ./environment-baseline.json \
--tools java,maven \
--output ./environment-baseline.json
python3 scripts/render_environment_docs.py ./environment-baseline.json \
--policy-out ./ENVIRONMENT_POLICY.md \
--agents-out ./AGENTS.environment.md
javacrustc, Cargo, Rustup)JAVA_HOMEMAVEN_HOMEGRADLE_HOME, GOROOT, GOPATH, CARGO_HOME, RUSTUP_HOME, DOTNET_ROOT, CC, CXXNVM_DIR, PYENV_ROOT, RBENV_ROOT, SDKMAN_DIR, HOMEBREW_PREFIX, VIRTUAL_ENVPATH entriesenvironment-baseline.json plus fresh verification over memory or generic platform assumptions.environment-baseline.json: machine-readable source of truth for detected factsENVIRONMENT_POLICY.md: human-readable policy and approved environment inventoryAGENTS.environment.md or AGENTS.md snippet: hard rules for agentsSKILL.environment.md snippet: environment section that can be reused in other skillsscripts/detect_environment.jsStandalone Node.js detector. Probes the current machine, merges with an existing baseline when requested, and emits normalized JSON.
scripts/render_environment_docs.jsStandalone Node.js renderer. Generates localized ENVIRONMENT_POLICY.md, AGENTS snippets, and skill snippets from the baseline JSON.
scripts/detect_environment.pyPython detector. Probes the current machine, merges with an existing baseline when requested, and emits normalized JSON.
scripts/render_environment_docs.pyPython renderer. Generates localized ENVIRONMENT_POLICY.md, AGENTS snippets, and skill snippets from the baseline JSON.
references/document-contracts.mdUse when you need the exact structure and maintenance rules for the generated docs.
references/probe-file.mdUse when you need to extend the default detector for services, databases, compilers, startup scripts, or project-specific tools.