session-env

session-env is a skill for Claude Code from neurawork-git/n8n-autopilot. It costs 108 tokens per session (1,846 once invoked), scanned A, original, MIT.

A way to keep one Claude session connected to one chosen n8n environment without changing the machine-wide environment used by other sessions. An n8n environment is a configured n8n instance and project.

In plain words
What is it for?
Use it to identify, configure, or troubleshoot session-specific n8n environment pinning while multiple sessions work independently.
Why use it?
A global environment setting can be overwritten by another session, causing commands to run against the wrong n8n instance.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions subagents.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is bash scripts/test-env-isolation.sh.

Part of the n8n-autopilot plugin — 24 skills, 12 agents, 4 hooks shipped together

Good fit Use it to identify, configure, or troubleshoot session-specific n8n environment pinning while multiple sessions work independently.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/neurawork-git/n8n-autopilot
agentmods
npx agentmods add skills/neurawork-git/n8n-autopilot/session-env

Made for: Claude Code.

Or install n8n-autopilot, the plugin that ships this one along with the rest of its 24 skills, 12 agents, 4 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for session-env

README.md
[![agentmods](https://agentmods.dev/badge/skills/neurawork-git/n8n-autopilot/session-env/github.svg)](https://agentmods.dev/skills/neurawork-git/n8n-autopilot/session-env)
Your own site
<a href="https://agentmods.dev/skills/neurawork-git/n8n-autopilot/session-env"><img src="https://agentmods.dev/badge/skills/neurawork-git/n8n-autopilot/session-env/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for session-env

Your own site · 80×15
<a href="https://agentmods.dev/skills/neurawork-git/n8n-autopilot/session-env"><img src="https://agentmods.dev/badge/skills/neurawork-git/n8n-autopilot/session-env.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,846 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00108 $0.01846
Opus 5 $0.00054 $0.00923
Sonnet 5 $0.00022 $0.00369
Haiku 4.5 $0.00011 $0.00185

Measured 9d ago against content hash 7d19968038b6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

session-env scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/session-env/SKILL.md · 118 lines

How it starts

The opening of the file, as written. The whole thing — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Session Env Pinning — one session, one env, no cross-session clobber

The model (why this exists)

n8nac stores a machine-GLOBAL active environment (activeEnvironmentId in ~/n8nac-config.json), set by n8nac env use <name> / env pin. It is shared by every shell and every Claude session on the machine. If two sessions each run env use, the last one wins and silently re-points the other session's commands at the wrong instance/project. That is the failure mode we prevent.

The rule: a session pins itself with the N8NAC_ENVIRONMENT env var — never with env use. Instance-touching n8nac commands honour N8NAC_ENVIRONMENT (and the per-call --env flag) and route to that env's instance without writing the global active. So N sessions can target N different envs concurrently, and none disturbs the others.

Three ways to resolve an env for a command (all session-scoped, none mutate global)

Scope How When
Whole session (default) .claude/settings.json"env": { "N8NAC_ENVIRONMENT": "<name>" } the normal per-repo pin — set once
Whole shell export N8NAC_ENVIRONMENT=<name> ad-hoc terminal work
One command npx n8nac --env <name> <cmd> or N8NAC_ENVIRONMENT=<name> npx n8nac <cmd> override for a single call

.claude/settings.json in this repo pins the session via the env block — that value is exported into every Bash tool call, so every n8nac command inherits it.

Enforcement (two hooks)

  • scripts/enforce-env.sh (PreToolUse / Bash) — fail-closed:
    1. Any instance-touching npx n8nac command that resolves to no env (no --env, no inline N8NAC_ENVIRONMENT=, no session $N8NAC_ENVIRONMENT) is BLOCKED (exit 2) — otherwise it would silently hit the shared global active.
    2. env use / env pin are BLOCKED unconditionally (clobber-guard) — they mutate the shared global. Bypass only for a deliberate machine-default change: N8N_AUTOPILOT_ALLOW_ENV_USE=1 npx n8nac env use <name>.
    3. Local-only subcommands (skills, convert, workspace, env list/status/..., setup, telemetry, update-ai, help) never touch an instance → never gated.
  • scripts/report-session-env.sh (SessionStart) — prints the session's resolved env (name + host + project) up front, or warns if it is falling back to the shared global active (no session var set).

Read the full file on GitHub · 118 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 118 lines · 108 tokens per session scan A 7d19968038b6

Subscribe to this mod's changes

session-env is a skill published in the GitHub repository neurawork-git/n8n-autopilot (18 stars, last pushed 1mo ago), licensed MIT. It adds 108 tokens to every session and 1,846 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

n8n-self-hosting

Deploy a production self-hosted n8n end-to-end to a fresh Linux VM over SSH, using Docker Compose behind a Caddy reverse proxy with automatic HTTPS. Use whenever the user wants to self-host, install, set up, provision, or deploy n8n on their own server/VPS/box (Hetzner, DigitalOcean, AWS EC2, bare metal, etc.) — in…

czlonkowski/n8n-skills · 265 tokens

activate-site

Activates and provisions a Power Pages website in a Power Platform environment via the Power Platform REST API. Use when the user wants to activate, provision, turn on, or enable a Power Pages website or portal.

microsoft/power-platform-skills · 45 tokens

deploy

Builds and deploys a Power Apps code app to Power Platform. Use when deploying changes, redeploying an existing app, or pushing updates.

microsoft/power-platform-skills · 32 tokens

deploy-to-connect

Deploy or publish Python and R content to a Posit Connect server using rsconnect-python or the R rsconnect package. Handles interactive apps and dashboards, web APIs, rendered documents, and prepared bundles/manifests. Use whenever the user asks to deploy, publish, or redeploy content to Posit Connect, or mentions…

posit-dev/skills · 81 tokens

telephony-and-conferencing

Runs voice and meeting infrastructure — phone systems and numbers, emergency calling obligations, conference rooms and their AV, call recording and its retention consequences, and the porting that makes provider changes go badly. Use this to replace a phone system, fix rooms nobody can start a meeting in, meet…

cbrock84/headcount · 85 tokens

cloud-infrastructure

Designs and runs cloud infrastructure — environments, infrastructure as code, networking and isolation, scaling, and cost. Use this to design a cloud environment, control infrastructure spend, set up environment separation, plan for scale or region failure, or review infrastructure someone configured by hand.

cbrock84/headcount · 58 tokens