client-lifecycle

client-lifecycle is a skill for Claude Code, Codex from pyworkload/3x-ui-mcp. It costs 79 tokens per session (1,664 once invoked), scanned A, original, MIT.

A client-management skill for a 3x-ui control panel, a web panel used to manage network-service accounts. It handles account setup, quotas, expiry dates, renewals, usage reports, and cleanup.

In plain words
What is it for?
Use it to create or provision clients, extend subscriptions, report traffic or active users, and remove depleted or abandoned accounts.
Why use it?
It helps avoid mistakes with time units, traffic limits, shared connections, and expired accounts. It also treats a client as a reusable account that can be attached to more than one inbound connection.

Skill for Claude CodeCodex

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

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.

agentmods
npx agentmods add skills/pyworkload/3x-ui-mcp/client-lifecycle
Any agent
npx skills add pyworkload/3x-ui-mcp --skill client-lifecycle
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 client-lifecycle

README.md
[![agentmods](https://agentmods.dev/badge/skills/pyworkload/3x-ui-mcp/client-lifecycle.svg)](https://agentmods.dev/skills/pyworkload/3x-ui-mcp/client-lifecycle)
Your own site
<a href="https://agentmods.dev/skills/pyworkload/3x-ui-mcp/client-lifecycle"><img src="https://agentmods.dev/badge/skills/pyworkload/3x-ui-mcp/client-lifecycle.svg" alt="Measured on agentmods" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,664 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00079 $0.01664
Opus 5 $0.00039 $0.00832
Sonnet 5 $0.00016 $0.00333
Haiku 4.5 $0.00008 $0.00166

Measured today against content hash 455de4e2dd01, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

client-lifecycle 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 today.

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/client-lifecycle/SKILL.md · 156 lines

How it starts

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

Client lifecycle

Clients in 3x-ui are email-keyed entities, not properties of an inbound: one client can be attached to several inbounds and moved between them without being recreated. email is just a unique label — it need not be an address.

Units, which cause most of the mistakes

Field Unit
expiry_time (tool parameter) Unix milliseconds. 0 = never
expiryTime (stored) Same. A negative value is a duration, not a date — "start after first use"
total_gb (tool parameter) GB, converted for you
totalGB (stored) Bytes, despite the name
limit_ip Simultaneous source IPs. 0 = unlimited
reset Traffic reset cycle in days. 0 = no cycle

A seconds-precision timestamp passed as expiry_time lands in 1970 and the client is born expired. When someone asks for "30 days", compute from now in milliseconds.

Negative expiry is the right tool for prepaid trials. Store the duration as a negative number of milliseconds and the panel converts it to an absolute deadline of now + duration on the client's first traffic tick — so a 7-day trial handed out in March still gives seven days to someone who first connects in June. The conversion is computed once per email, so a client attached to several inbounds lands on one consistent deadline.

Onboarding

add_client inbound_ids=[7] email="alice" total_gb=100 expiry_time=<now+30d in ms> limit_ip=3

The UUID is generated by the panel when omitted — do not invent one. For Trojan/Shadowsocks the panel generates the key server-side the same way.

sub_id groups clients under one subscription URL: clients sharing a sub_id share a subscription. Give each user their own unless you deliberately want a shared link. group is a free label the client-group tools operate on later, and is worth setting at creation — retrofitting groups across hundreds of clients is the tedious version of the same job.

For many at once, bulk_create_clients creates across the same inbounds, and bulk_attach_clients attaches existing clients to more inbounds afterwards.

Read the full file on GitHub · 156 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. today First seen · 156 lines · 79 tokens per session scan A 455de4e2dd01

Subscribe to this mod's changes

client-lifecycle is a skill published in the GitHub repository pyworkload/3x-ui-mcp (5 stars, last pushed 3d ago), licensed MIT. It adds 79 tokens to every session and 1,664 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

qmclaw-workbench

使用 OpenQuantum 的 QMClaw Local Tool 对超导量子比特 S21、能谱、Rabi、Ramsey、T1、SingleShot、DRAG、π 脉冲、功率偏移、Delta 和 RB 等 13 类测控实验做有界、确定性的本地模拟,并组织单比特调校工作流。用于实验规划、接口联调、教学和无硬件预检;不连接 LabRAD/lqms、真实仪器或量子云,不修改校准参数,也不替代 Scientific Validator。.

xi-zhao/OpenQuantum · 126 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

xmemo-vscode

Use XMemo from VS Code (and forks like Cursor/Windsurf) to recall project context, capture engineering decisions, preserve handoff state, and connect to the hosted XMemo MCP endpoint safely.

yonro/memory-os-cli · 45 tokens

event-staffing-ordering

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

Tempguru-co/tempguru-mcp · 22 tokens