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.
npx agentmods add skills/pyworkload/3x-ui-mcp/client-lifecyclenpx skills add pyworkload/3x-ui-mcp --skill client-lifecyclegit clone --depth 1 https://github.com/pyworkload/3x-ui-mcpWrote 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.
[](https://agentmods.dev/skills/pyworkload/3x-ui-mcp/client-lifecycle)<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>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.
| Model | Per session | Once 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 |
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.
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.
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.
- today First seen · 156 lines · 79 tokens per session scan A 455de4e2dd01
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.
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.…
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…
qmclaw-workbench
使用 OpenQuantum 的 QMClaw Local Tool 对超导量子比特 S21、能谱、Rabi、Ramsey、T1、SingleShot、DRAG、π 脉冲、功率偏移、Delta 和 RB 等 13 类测控实验做有界、确定性的本地模拟,并组织单比特调校工作流。用于实验规划、接口联调、教学和无硬件预检;不连接 LabRAD/lqms、真实仪器或量子云,不修改校准参数,也不替代 Scientific Validator。.
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.
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.
event-staffing-ordering
Order W-2 event staff for US/CA events through TempGuru.