panel-hardening

panel-hardening is a skill for Claude Code, Codex from pyworkload/3x-ui-mcp. It costs 73 tokens per session (1,393 once invoked), scanned A, original, MIT.

A security audit and hardening guide for a 3x-ui panel, which manages proxy services. It covers access tokens, credential rotation, login protection, certificates, updates, and backups.

In plain words
What is it for?
Use it to audit panel settings, replace administrator-password access with scoped tokens, configure fail2ban and IP limits, review certificates and updates, and prepare backups.
Why use it?
It reduces the risks of exposed panel access, reusable administrator passwords, weak client limits, and making a risky change without a backup. It also helps check which panel settings are currently in use.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to audit panel settings, replace administrator-password access with scoped tokens, configure fail2ban and IP limits, review certificates and updates, and prepare backups.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pyworkload/3x-ui-mcp/panel-hardening
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add pyworkload/3x-ui-mcp --skill panel-hardening
Clone the repo
git clone --depth 1 https://github.com/pyworkload/3x-ui-mcp

Made for: Claude Code, Codex.

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 panel-hardening

README.md
[![agentmods](https://agentmods.dev/badge/skills/pyworkload/3x-ui-mcp/panel-hardening.svg)](https://agentmods.dev/skills/pyworkload/3x-ui-mcp/panel-hardening)
Your own site
<a href="https://agentmods.dev/skills/pyworkload/3x-ui-mcp/panel-hardening"><img src="https://agentmods.dev/badge/skills/pyworkload/3x-ui-mcp/panel-hardening.svg" alt="Measured on agentmods" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,393 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.00073 $0.01393
Opus 5 $0.00036 $0.00696
Sonnet 5 $0.00015 $0.00279
Haiku 4.5 $0.00007 $0.00139

Measured 2d ago against content hash 398bc7772bc9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

panel-hardening 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 2d 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/panel-hardening/SKILL.md · 143 lines

How it starts

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

Hardening a 3x-ui panel

Read the current state first, change one thing at a time, and know which steps cut your own connection to the panel. Several of these need panel v3.5.0+ (tokens, certificate helpers) or v3.7.0+ (token scopes, get_factory_defaults).

1. Audit what exists

get_settings
list_api_tokens
get_fail2ban_status
get_panel_update_info

get_settings shows the listening port, base path, TLS certificate paths and the subscription settings. A panel on the default port with an empty base path is found by internet-wide scanners within hours; both are worth changing, and both are set in the panel UI rather than through the API.

If you change the base path, this MCP server's XUI_BASE_PATH must change with it or every subsequent call 404s.

2. Move this server off the admin password

A username and password grant everything and cannot be revoked without changing the admin's own credentials. A scoped token can be disabled in one call.

create_api_token name="mcp-server" scope="admin" expires_at=0

The plaintext appears in that response and nowhere else — the panel stores a SHA-256 hash. Capture it, put it in XUI_API_TOKEN, drop XUI_USERNAME and XUI_PASSWORD, restart the server.

Scope admin is what this server needs: monitor reaches only status and metrics routes (of the tools here, just server_status and get_xray_versions), and node-sync is a fixed panel-to-node allowlist. Set expires_at (Unix ms) when the token is for a contractor or a one-off task; leave 0 for the server's own token, since an expiry it cannot renew is an outage waiting to happen.

Note for the CLI: x-ui setting -getApiToken now rotates a single shared cli-fallback token rather than minting a new one, so running it again silently invalidates a token someone is already using. Mint tokens through the API instead.

3. Prune the tokens that exist

list_api_tokens gives id, scope, expiry and enabled state — never values. For anything unrecognised, disable before deleting; disabling is reversible and tells you immediately what breaks:

Read the full file on GitHub · 143 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. 2d ago First seen · 143 lines · 73 tokens per session scan A 398bc7772bc9

Subscribe to this mod's changes

panel-hardening is a skill published in the GitHub repository pyworkload/3x-ui-mcp (5 stars, last pushed 6d ago), licensed MIT. It adds 73 tokens to every session and 1,393 once invoked, about $0.0004 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-09-05.

Related

Other skills, from other repositories

opik-diagnose

Surface the Opik traces worth a developer's attention, ranked by signal — errors, failed tool calls, latency, regressions, and low online-eval scores — plus Diagnostics issues. Reads live/production traces via the SDK (searchtraces and agentinsights) and works with no MCP; uses the MCP issue entity when connected.…

comet-ml/opik-mcp · 147 tokens

cortex-explore-memory

Explore the memory system's state, find gaps in knowledge, assess coverage, and get diagnostic information. Use when the user asks 'what does my memory look like', 'show me memory stats', 'what am I missing', 'how good is my knowledge', 'memory health', 'show coverage', 'find gaps', 'what topics are weak', or when you…

cdeust/Cortex · 91 tokens

quick-capture

Use this skill to drop a new task into GSD Task Manager from any AI assistant that has the gsd-mcp-server connected.

vscarpenter/gsd-task-manager · 0 tokens

event-staffing-ordering

Order W-2 event staff for US/CA events through TempGuru.

Tempguru-co/tempguru-mcp · 22 tokens

chainstack

Work with the Chainstack MCP server to manage blockchain nodes and projects. Use when deploying nodes, migrating to Chainstack from another RPC provider such as QuickNode or Alchemy, checking platform status, searching Chainstack docs, contacting the Chainstack team, or interacting with the Chainstack platform API via…

chainstacklabs/mcp-server · 66 tokens

delegacion-local

Regla y catálogo para delegar pasos mecánicos (resumir, clasificar, extraer, boilerplate, mensaje de commit desde un diff, traducir texto o archivo, resumir salida de lint/tests/CI, explicar código, describir una imagen, verificar si el backend local está disponible) a modelos locales vía las tools local del MCP…

ZahiriNatZuke/local-delegate · 137 tokens