Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By kenhuangusv0.2.0MITIn 1 marketplace
Short-lived credential gate. Fetches a token from a configured broker only; it never invents a token and never falls back to a long-lived credential.
Code that runs inside Claude Code on every session, as you, unsandboxed.
Claude Code asks for these when you enable the plugin. Sensitive values are stored in your system keychain.
Token broker URLbrokerUrl
https URL (or localhost) that returns JSON like {"token":"...","expiresInMs":900000} for /nhi-refresh. Leave empty until a broker is set up.
stringdefault
1 critical to review before installing
JavaScript or TypeScript that runs inside Claude Code as you, unsandboxed. Read from its source, it sees, changes or blocks tool calls; makes network requests; reads environment variables (NHI_TOKEN); sets environment variables.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Short-lived credential gate. It fetches a token from a configured broker only; it never invents a token and never falls back to a long-lived credential.
/plugin install nhi-scoper --marketplace kenhuangus/claude-code-security-mods
The install asks for Token broker URL. Leave it empty until you have a broker;
/nhi-refresh then explains what to set. Try it in one session without installing:
claude --plugin-dir ./mods/nhi-scoper.
/nhi-refresh asks your broker for a token and sets NHI_TOKEN in this session.aws, gcloud, gsutil, bq, az, kubectl, helm,
terraform, or $NHI_TOKEN / $env:NHI_TOKEN are refused until a fresh token exists./nhi-revoke clears the token from this session early.The broker must answer 200 with JSON: { "token": "...", "expiresInMs": 900000 }
(ttlMs also works). The default lifetime is 15 minutes and is capped at 60.
command.run with matcher { command: "nhi-refresh" }: fetches with
$.http.fetch from the broker URL, sets the token with $.env.set, and stores
only its expiry in $.store.command.run with matcher { command: "nhi-revoke" }: unsets NHI_TOKEN with
$.env.set("NHI_TOKEN", undefined) and clears the expiry.tool.call with matcher { tool: ["Bash", "PowerShell"] }, before next: a
credential command with no fresh token gets { deny } ("run /nhi-refresh"); an
expired token is removed from the environment. A $NHI_TOKEN, ${NHI_TOKEN} or
$env:NHI_TOKEN placeholder is replaced for that one call.$.http.fetch resolves
{ status, ok, headers, text }; 0.1.0 read response.token from it directly, so
against a real broker every refresh failed with "no usable token". 0.2.0 checks
ok and parses the JSON in text./nhi-refresh and /nhi-revoke work. They are registered on $ at
session.start ($.command.register). 0.1.0 shipped markdown command files, which only
create prompt skills; the command.run hooks never fired.$.env.set(name, undefined) unsets a
variable. 0.1.0 documented that no unset existed, so an expired token stayed in the
environment. Expired tokens are now removed, and /nhi-revoke clears one on demand.$.store is shared by every
session on the machine; only the expiry is stored, and the token lives in the
process environment.az, terraform, helm, gsutil and bq are gated too.brokerUrl is declared in the manifest's userConfig, so it can be set.bash -c "..." is only caught
when the tool name appears in it.npm run check
claude plugin validate ./mods/nhi-scoper
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub kenhuangus/claude-code-security-mods --plugin nhi-scoperPlugins from other owners that cover similar ground