/hardening:agent-tooling-reviewfrom hardening
Use when connecting, auditing, or widening the permissions of tooling an AI agent can call: MCP servers, plugins, skills, database or GitHub connections, API tokens issued to an agent, or an agent that will run unattended (scheduled, looped, event-triggered, background, CI). Triggers: a new MCP or plugin is about to be added, an agent needs write access it did not have, a connection points at production, an unattended job is being set up, or a tool's description changed after approval.
Ships in hardening. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Every MCP server, plugin, and credential handed to an agent is a dependency that can run commands and read files, and the agent cannot tell a legitimate tool description from a poisoned one. The rule is least privilege from the first connection: read-only until a task needs write, scoped to the repositories and tables the task touches, production last. Unattended agents get a tighter version of the same review because nobody is watching the next step.
Anything that cannot be checked in the current environment (no network, no registry access, server not safe to start) is marked UNVERIFIED in the output. UNVERIFIED never counts as a pass, and a connection whose provenance is UNVERIFIED stays disconnected.
Before starting, check for a repo-local policy: AGENTS.md, CLAUDE.md, SECURITY.md, an approved-tools list, or a repo-local agent-tooling-review skill. It is authoritative when present; this skill is the fallback.
llm-app-security and note the handoff.State the task that justifies the connections. If none was given, write "Assumed task: ..." and mark task-matching checks as assumed.
REDACT='s#(://[^:/@]+:)[^@]+@#\1<redacted>@#; s/((token|key|secret|password)[A-Za-z_"]*[=:][[:space:]]*"?)[^",[:space:]${]+/\1<redacted>/I'
# repo-level agent config, per host; absent files are listed so a missing host is explicit
for f in .mcp.json .claude/settings.json .claude/settings.local.json .cursor/mcp.json .vscode/mcp.json .codex/config.toml; do
if [ -f "$f" ]; then echo "== $f"; sed -E "$REDACT" "$f"; else echo "-- absent: $f"; fi
done
# CI jobs that run an agent: read each matching workflow in full, redacted
for f in $(grep -rlE 'claude|codex|gemini|aider|anthropic|openai|--dangerously|allowedTools|skip-permissions' .github/workflows 2>/dev/null); do
echo "== $f"; sed -E "$REDACT" "$f"
done
A ${{ secrets.NAME }} reference is a credential: record the secret's name, and mark its scope UNVERIFIED unless the repo documents it or the owner confirms it. Token scope cannot be read from a token value; get it from the provider's token settings page or API, or ask the owner.
Build a table: connection, host, maintainer or source, transport (stdio local / remote URL), credential held (name and exact scope), environment reached, access level, verdict.Provenance. Maintainer, source repository, last release, user count. These need registry or network access; offline, write UNVERIFIED. A remote server with no visible maintainer, or a package published recently by a single maintainer, stays disconnected until someone has read its code or a trusted party vouches for it. Unpinned launchers (npx -y pkg, latest) are a finding: pin an exact version.
Requested permissions. Compare what the tools can do against the task. Get the tool list from the server's source, its registry page, or its documentation. Never start an unvetted server just to list its tools; that runs its code before the review has happened. If the list cannot be read safely, write UNVERIFIED.
Credential scope. For each credential, record the exact scope string:
contents:read before contents:write). A classic token with repo, workflow, or admin:* is a finding.SELECT only, on the schemas the task needs, with a statement timeout. The application's own role is a write role. Credentials inline in a URL in a tracked file are a finding and are also a leak (see secrets-leak-audit).Environment. Classify from hostnames, project IDs, and variable names (prod, live, primary). If the environment cannot be determined, treat the connection as production. Dev first, staging second, production last and only after the same task has run clean elsewhere. One credential reaching two environments is a production credential.
Tool-description integrity. Tool descriptions are prompt text the agent obeys. Keep a checked-in snapshot of each approved description and diff it on upgrade:
mkdir -p .agent-tooling
# one line per tool: server, tool name, sha256 of its description (paste descriptions from the approved source)
printf '%s\n' "<server> <tool> $(printf '%s' "$DESCRIPTION" | shasum -a 256 | cut -d' ' -f1)" >> .agent-tooling/descriptions.sha256
A hash that changes without a version bump, or a description that gained instructions ("always also call", "ignore previous", encoded text), is tool poisoning: disconnect. For servers whose files are on disk (vendored plugins, local scripts, skill and rules files), also run a deterministic scan; remote servers cannot be scanned this way and stay UNVERIFIED:
npx @stylusnexus/agentarmor@<exact-version> scan <local-dir-or-file> --fail-on medium
The scanner is itself a downloaded package: look up its current version (npm view @stylusnexus/agentarmor version), write that exact version into the command and the report, and skip the scan when offline or when there are no local files to scan. A skipped scan is UNVERIFIED.
When the agent runs without a person watching each step (/schedule, /loop, cron, webhook, CI), all seven controls are required. A control passes only when fully met; a partial control (a log nobody reads, an approval that can be skipped) is a fail.
| Control | Pass looks like |
|---|---|
| Narrow job | One task, stated in one sentence, with explicit out-of-scope areas |
| Scoped repository access | Token limited to the repositories the job touches |
| Least-privilege credentials | Separate from any attended session; read-only where the job only reads |
| Safe stopping points | On an unexpected state the job stops and reports instead of improvising |
| Full action log | Every tool call and its arguments recorded where a person will read it |
| Human approval gate | No merge, deploy, send, post, publish, delete, or payment without a person confirming that specific action; permission-skipping flags are a fail |
| Blast radius | The worst case with these credentials is written down and acceptable |
For CI also check: workflow permissions: block present and minimal, actions pinned to a commit SHA, agent CLI version pinned, job timeout and concurrency limit set, and untrusted text (issue titles, PR bodies, comments) passed to the agent as quoted data, never as instructions.
The inventory table with a verdict column and exact credential scopes, the seven-control table for each unattended job, and a list of everything marked UNVERIFIED with what would verify it. "Least privilege" without the scope string is unverified.
Stop means: do not connect, widen, or run anything further, record the finding, and finish the report.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub stylusnexus/agent-plugins --plugin hardening12 skills in this plugin
/auth-hardeningNextAuth v5 security audit and hardening checklist — session/cookie config, CSRF, OAuth scopes, per-route role checks, password-reset/OTP rate limits, secret rotation, session invalidation on privilege change. Use when adding auth to a new product, auditing an existing NextAuth v5 app, or reviewing any PR that touches session/role/permission code./exposure-scanScan installed packages against bumblebee threat-intelligence exposure catalogs to detect known-compromised dependency releases from supply-chain campaigns. Use when checking for compromised packages, running a supply-chain or dependency security scan, auditing the machine after a reported npm/PyPI/Go/gem/extension compromise, or refreshing threat-intel catalogs./legal-docsDraft or review the customer-facing legal documents of a small SaaS - Terms of Service, Privacy Policy, refund policy, and acceptable use policy - in plain English, with placeholders instead of invented facts, a check that every claim matches what the product actually does, and a not-legal-advice notice on every draft. Use when asked to "write terms", "draft a privacy policy", "update our ToS", "write a refund policy", or before launching a product or feature that changes what data is collected or how billing works./llm-app-securityUse when a product feature sends untrusted content to a language model or lets a model call tools, write data, send messages, or render output to other users. Triggers: a new chat, RAG, summarization, agent, or tool-calling feature; a model that reads web pages, documents, emails, tickets, or other users' text; a 'can prompt injection reach this' question; a pre-launch review of anything with an LLM in the request path; or an incident where a model did something nobody asked for./privacy-auditData inventory and privacy audit for a product — enumerate exactly what user data is collected and where it lands (Neon/Supabase tables, logs, PostHog, Stripe, email provider, Better Stack/Sentry), check alignment with the privacy policy, verify GDPR export/delete paths exist, and grep for PII leaking into logs or API responses. Use when asked to "audit privacy," "check what data we collect," before a launch, or after adding a new data-collecting feature (signup field, analytics event, webhook)./rate-limit-auditPre-launch gate that inventories every endpoint calling a paid API (LLM, email, SMS) and every auth endpoint, verifies a rate limiter exists, and actually tests it with scripted burst requests to confirm 429s fire. Use before launching a new product/feature, after adding an LLM-calling or auth route, or when asked to check rate limiting.Other plugins' skills for the same job