Agent skill

Flvx API

by Sagit-chu in Sagit-chu/flvx

Operate FLVX traffic forwarding management system via REST API.

GPL-3.0Auto-check: notesBackend & APIs

Install Flvx API

skills CLI
$ npx skills add Sagit-chu/flvx --skill flvx-api -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Sagit-chu/flvx flvx-api --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Sagit-chu/flvx.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/flvx-api .claude/skills/flvx-api && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
flvx-api
GitHub stars
281
Token cost
~2.4k tokens
SKILL.md length
400 words
Files
16 (incl. references)
Skills in repo
1
Repo updated
First seen
Licence
GPL-3.0

At a glance

Operate FLVX traffic forwarding management system via REST API.

  • Works in 6 steps: ⚠️ NO "Bearer" prefix - Authorization: ,… → All endpoints use POST - Including… → code === 0 means success - Any other… → …
  • User wants to manage FLVX panel programmatically
  • SKILL.md covers Supported AI Tools, Prerequisites, Authentication Flow and Authentication Rules, plus 8 more sections
  • Calls curl, jq and npm; needs FLVX_PASSWORD

What it does

Flvx API is an agent skill from Sagit-chu/flvx. Operate FLVX traffic forwarding management system via REST API. Supports user/node/tunnel/forward management, federation clustering, and traffic monitoring. Use when user wants to manage FLVX panel programmatically or via natural language.

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 17 other files, including reference files (for example `package.json`, `references/auth.md` and `references/backup.md`).

It sits in Backend & APIs, covering REST APIs. The licence is GPL-3.0.

When your agent uses it

  • User wants to manage FLVX panel programmatically
  • Via natural language

Example prompts

  • “/flvx-api”

Requirements

  • Python 3
  • Node.js

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. ⚠️ NO "Bearer" prefix - Authorization: , NOT Authorization: Bearer
  2. All endpoints use POST - Including list/get operations
  3. code === 0 means success - Any other value is an error
  4. Traffic units: User.flow is GB, in_flow/out_flow are bytes
  5. Timestamps: All timestamps are milliseconds since epoch
  6. Token is session-scoped: Cache in memory only, not on disk

What it can do on your machine

Read from SKILL.md and the folder at commit d930303. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl
    • jq
    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use curl and npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • FLVX_PASSWORD

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Flvx API loads about 2.4k tokens when it runs, and up to ~20k if it reads all its reference files. Until then it costs about 62 tokens; SKILL.md has 400 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~62
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~20k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:35
    **Security tip:** Add to `~/.flvx/.env` and source on demand:
  • NoteMentions a .env fileSKILL.md:37
    mkdir -p ~/.flvx && cat > ~/.flvx/.env << 'EOF'
  • NoteMentions a .env fileSKILL.md:42
    chmod 600 ~/.flvx/.env
  • NoteMentions a .env fileSKILL.md:43
    source ~/.flvx/.env

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Sagit-chu/flvx at commit d930303, republished under its GPL-3.0 licence (© Sagit-chu). 400 words, ~2,443 tokens.

Download SKILL.mdSave it as .claude/skills/flvx-api/SKILL.md (or your agent's skills folder). This skill also uses 15 other files; get the full folder from GitHub.
name
flvx-api
description
Operate FLVX traffic forwarding management system via REST API. Supports user/node/tunnel/forward management, federation clustering, and traffic monitoring. Use when user wants to manage FLVX panel programmatically or via natural language.
metadata.author
FLVX Team
metadata.version
2.1.5
metadata.requires_env
FLVX_BASE_URL, FLVX_USERNAME, FLVX_PASSWORD

FLVX API Operations

Operate FLVX panel through REST API. All endpoints use POST method and return JSON with {code, msg, data, ts} envelope.

Supported AI Tools

ToolInstallationNotes
OpenCodenpm i -g @flvx/skill-api or ln -s . ~/.agents/skills/flvx-apiAuto-loads from ~/.agents/skills/
OpenClawSame as OpenCodeCompatible skill format
Claude CodeCopy SKILL.md to CLAUDE.md or ~/.claude/CLAUDE.mdUses context file instead of skills

Prerequisites

Set environment variables before starting:

bash
export FLVX_BASE_URL="https://your-panel.example.com"
export FLVX_USERNAME="admin"
export FLVX_PASSWORD="your-password"

Security tip: Add to ~/.flvx/.env and source on demand:

bash
mkdir -p ~/.flvx && cat > ~/.flvx/.env << 'EOF'
export FLVX_BASE_URL="https://panel.example.com"
export FLVX_USERNAME="admin"
export FLVX_PASSWORD="your-password"
EOF
chmod 600 ~/.flvx/.env
source ~/.flvx/.env

Authentication Flow

Session Token Cache
  • Token is cached only for the current conversation
  • New conversation = fresh login required
  • Token is NOT written to disk (security)
Auto-Login Pattern
Before ANY API call:
1. Check if TOKEN is cached in current session
   ├─ Yes → Use cached token, proceed
   └─ No → 
       1. Read FLVX_USERNAME and FLVX_PASSWORD from environment
       2. POST /api/v1/user/login with credentials
       3. Cache response.data.token in session memory
       4. Proceed with original request
Login Request
bash
curl -X POST "${FLVX_BASE_URL}/api/v1/user/login" \
  -H "Content-Type: application/json" \
  -d "{\"username\":\"${FLVX_USERNAME}\",\"password\":\"${FLVX_PASSWORD}\"}"

Response:

json
{
  "code": 0,
  "msg": "success",
  "data": {
    "token": "eyJhbGciOiJIUzI1NiIs...",
    "name": "Administrator",
    "role_id": 0,
    "requirePasswordChange": false
  },
  "ts": 1706659200000
}

Authentication Rules

HeaderValueCritical
Authorization<jwt_token>⚠️ NO "Bearer" prefix!
Content-Typeapplication/jsonAll requests use JSON

Quick Start Workflow

User request → Check env vars → Auto-login if needed → Call API → Return result

Intent → API Mapping

User IntentAPI EndpointReference
"登录" / "查看我的信息"/api/v1/user/packageauth
"创建用户" / "添加用户"/api/v1/user/createusers
"查看用户列表" / "所有用户"/api/v1/user/listusers
"重置流量"/api/v1/user/resetusers
"添加节点" / "新建节点"/api/v1/node/createnodes
"查看节点" / "节点状态"/api/v1/node/listnodes
"安装命令" / "部署节点"/api/v1/node/installnodes
"升级节点"/api/v1/node/upgradenodes
"创建隧道" / "新建隧道"/api/v1/tunnel/createtunnels
"分配隧道给用户"/api/v1/tunnel/user/assigntunnels
"创建转发" / "新建转发" / "添加转发"/api/v1/forward/createforwards
"暂停转发"/api/v1/forward/pauseforwards
"恢复转发"/api/v1/forward/resumeforwards
"删除转发"/api/v1/forward/deleteforwards
"查看我的转发" / "转发列表"/api/v1/forward/listforwards
"查看流量" / "流量统计"/api/v1/forward/list or /api/v1/user/packageforwards
"诊断转发" / "测试连通性"/api/v1/forward/diagnoseforwards
"创建限速规则"/api/v1/speed-limit/createspeed-limits
"联邦共享" / "节点共享"/api/v1/federation/share/createfederation
"导出备份"/api/v1/backup/exportbackup
"导入备份"/api/v1/backup/importbackup

HTTP Request Template

Bash/curl (with auto-login)
bash
#!/bin/bash
BASE_URL="${FLVX_BASE_URL}"
USERNAME="${FLVX_USERNAME}"
PASSWORD="${FLVX_PASSWORD}"

# Login and get token
TOKEN=$(curl -s -X POST "${BASE_URL}/api/v1/user/login" \
  -H "Content-Type: application/json" \
  -d "{\"username\":\"${USERNAME}\",\"password\":\"${PASSWORD}\"}" | jq -r '.data.token')

if [ "$TOKEN" == "null" ] || [ -z "$TOKEN" ]; then
  echo "Login failed"
  exit 1
fi

# Use token for API calls - NOTE: NO "Bearer" prefix!
curl -s -X POST "${BASE_URL}/api/v1/node/list" \
  -H "Authorization: ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{}' | jq '.'
Python (requests)
python
import os
import requests

BASE_URL = os.environ.get("FLVX_BASE_URL")
USERNAME = os.environ.get("FLVX_USERNAME")
PASSWORD = os.environ.get("FLVX_PASSWORD")

# Login
resp = requests.post(f"{BASE_URL}/api/v1/user/login", 
    headers={"Content-Type": "application/json"},
    json={"username": USERNAME, "password": PASSWORD})
result = resp.json()
if result["code"] != 0:
    raise Exception(f"Login failed: {result['msg']}")

TOKEN = result["data"]["token"]

# Authenticated request - NO "Bearer" prefix!
headers = {
    "Content-Type": "application/json",
    "Authorization": TOKEN
}
resp = requests.post(f"{BASE_URL}/api/v1/node/list", headers=headers, json={})
print(resp.json())
Node.js (fetch)
javascript
const BASE_URL = process.env.FLVX_BASE_URL;
const USERNAME = process.env.FLVX_USERNAME;
const PASSWORD = process.env.FLVX_PASSWORD;

// Login
const loginRes = await fetch(`${BASE_URL}/api/v1/user/login`, {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ username: USERNAME, password: PASSWORD })
});
const loginData = await loginRes.json();
if (loginData.code !== 0) throw new Error(loginData.msg);
const TOKEN = loginData.data.token;

// Authenticated request - NO "Bearer" prefix!
const res = await fetch(`${BASE_URL}/api/v1/node/list`, {
  method: 'POST',
  headers: { 
    'Content-Type': 'application/json',
    'Authorization': TOKEN
  },
  body: JSON.stringify({})
});
console.log(await res.json());

Response Handling

Success:

json
{"code": 0, "msg": "success", "data": {...}, "ts": 1706659200000}

Error:

json
{"code": -1, "msg": "用户名或密码错误", "ts": 1706659200000}

Pattern:

1. Parse JSON response
2. If code === 0 → return data
3. If code === 401 → token expired, re-login and retry
4. If code === 403 → permission denied, need admin
5. Else → show msg to user as error message
Show full SKILL.md (173 more words)Show less

Permission Model

role_idTypeAccess
0AdminAll endpoints
1RegularForward CRUD, own profile, assigned tunnels only

Non-admin users can only see/modify their own resources.

Module Reference

ModuleEndpointsReference
Authlogin, captchaauth.md
UsersCRUD, reset, passwordusers.md
NodesCRUD, install, upgrade, statusnodes.md
TunnelsCRUD, user assignmenttunnels.md
ForwardsCRUD, pause/resume, diagnoseforwards.md
GroupsUser/tunnel groups, permissionsgroups.md
Speed LimitsCRUDspeed-limits.md
FederationShare, remote nodesfederation.md
BackupExport/importbackup.md
ConfigSystem settingsconfig.md
TypesTypeScript interfacestypes.md
ErrorsError codeserrors.md
ExamplesCode samplesexamples/

Critical Rules

  1. ⚠️ NO "Bearer" prefix - Authorization: <token>, NOT Authorization: Bearer <token>
  2. All endpoints use POST - Including list/get operations
  3. code === 0 means success - Any other value is an error
  4. Traffic units: User.flow is GB, in_flow/out_flow are bytes
  5. Timestamps: All timestamps are milliseconds since epoch
  6. Token is session-scoped: Cache in memory only, not on disk

Common Workflows

Workflow 1: New User Onboarding (Admin)
1. POST /api/v1/user/create → Create user with traffic quota
2. POST /api/v1/tunnel/user/assign → Assign tunnels to user
3. Tell user their username/password
4. User logs in and creates forwards
Workflow 2: Add New Node (Admin)
1. POST /api/v1/node/create → Register node in panel
2. POST /api/v1/node/install → Get install command
3. Run install command on target server
4. POST /api/v1/node/check-status → Verify node is online
Workflow 3: Create Forward (Any User)
1. POST /api/v1/tunnel/user/tunnel → List available tunnels
2. POST /api/v1/forward/create → Create forward on chosen tunnel
3. POST /api/v1/forward/diagnose → Verify connectivity
Workflow 4: Node Maintenance (Admin)
1. POST /api/v1/node/list → Check node statuses
2. POST /api/v1/node/releases → Check available versions
3. POST /api/v1/node/upgrade or /batch-upgrade → Upgrade nodes
4. POST /api/v1/node/rollback → Rollback if needed

© Sagit-chu, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 15 other files (references) in skills/flvx-api of Sagit-chu/flvx.

  • SKILL.md
  • package.json
  • references/auth.md
  • references/backup.md
  • references/config.md
  • references/errors.md
  • references/examples/curl-examples.md
  • references/examples/http-client.md
  • references/federation.md
  • references/forwards.md
  • references/groups.md
  • references/nodes.md
  • references/speed-limits.md
  • references/tunnels.md
  • references/types.md
  • references/users.md

Open the folder on GitHubat commit d930303

Compare with similar skills

Flvx API next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Flvx API compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Flvx API this skillSagit-chu/flvx281—~2.4kAutomated safety check: NotesGPL-3.0
API DesignerJeffallan/claude-skills12k2 repos~2kAutomated safety check: PassMIT
Paperclippaperclipai/paperclip98k—~9.6kAutomated safety check: PassMIT
Nodejs Backend Patternsever-works/ever-works15817 repos~4kAutomated safety check: PassAGPL-3.0
OpenAPI to MCP Servermcp-use/mcp-use11k—~5.2kAutomated safety check: PassApache-2.0
Use Yaakmountain-loop/yaak19k—~1.9kAutomated safety check: PassMIT

Similar skills

  • API Designer

    Jeffallan/claude-skills

    Designs REST and GraphQL APIs from resource modeling to an OpenAPI 3.1 contract, with versioning, pagination and RFC 7807 error handling.

    12k GitHub starsUsed in 2 repos~2k tokens
    Backend & APIsAuto-check passed
  • Paperclip

    paperclipai/paperclip

    Interact with the Paperclip control plane API for task coordination and governance.

    98k GitHub stars~9.6k tokensUpdated today
    Backend & APIsAuto-check passed
  • Nodejs Backend Patterns

    ever-works/ever-works

    Build production-ready Node.js backend services with Express/Fastify, implementing middleware patterns, error handling, authentication, database integration, and API design best practices.

    158 GitHub starsUsed in 17 repos~4k tokens
    Backend & APIsAuto-check passed
  • OpenAPI to MCP Server

    mcp-use/mcp-use

    Turns an OpenAPI or Swagger spec into an MCP server with the mcp-use TypeScript SDK, mapping each operation to a tool, wiring auth, testing and deploying.

    11k GitHub stars~5.2k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Use Yaak

    mountain-loop/yaak

    A skill your agent uses when the user mentions Yaak, a Yaak workspace, or the yaak command, or asks to call, hit, or smoke test HTTP/REST endpoints, save or organize API requests for reuse or manual…

    19k GitHub stars~1.9k tokensUpdated today
    Backend & APIsAuto-check passed
  • Covers the RuView `wifi-densepose` command line binary, its Axum REST API and the WebAssembly builds for browsers and ESP32, for embedding or scripting RuView.

    97k GitHub stars~1.2k tokensUpdated yesterday
    Backend & APIsAuto-check: notes

Categories

Questions about Flvx API

What does Flvx API do?

Operate FLVX traffic forwarding management system via REST API. Flvx API is an agent skill from Sagit-chu/flvx. Operate FLVX traffic forwarding management system via REST API.

When should I use Flvx API?

Flvx API fits situations like: user wants to manage FLVX panel programmatically; via natural language.

How do I install Flvx API in Claude Code?

Run `npx skills add Sagit-chu/flvx --skill flvx-api -a claude-code`. Or copy the skill folder (skills/flvx-api in Sagit-chu/flvx) into .claude/skills/flvx-api in your project. Claude Code loads it when a task matches its description.

How do I install Flvx API in Codex?

Run `npx skills add Sagit-chu/flvx --skill flvx-api -a codex`. Or copy the skill folder (skills/flvx-api in Sagit-chu/flvx) into .agents/skills/flvx-api in your project. Codex loads it when a task matches its description.

Can I use Flvx API in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Sagit-chu/flvx --skill flvx-api -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/flvx-api, .gemini/skills/flvx-api, .github/skills/flvx-api and .opencode/skills/flvx-api in your project.

What does Flvx API need to run?

Going by SKILL.md and its folder, Flvx API needs the command-line tools its instructions call (curl, jq and npm) and credentials named FLVX_PASSWORD. Our summary lists: Python 3; Node.js.

Does Flvx API access the network?

SKILL.md contains no URLs. Its commands use curl and npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Flvx API safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Flvx API use?

Flvx API is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Flvx API use?

About 2.4k tokens (SKILL.md is roughly 9.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 18k tokens, read only when the agent opens those files.

What are the alternatives to Flvx API?

Skills that share tags, products or a category with Flvx API: API Designer (Jeffallan/claude-skills, 12k stars), Paperclip (paperclipai/paperclip, 98k stars), Nodejs Backend Patterns (ever-works/ever-works, 158 stars) and OpenAPI to MCP Server (mcp-use/mcp-use, 11k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Flvx API?

Sagit-chu (a GitHub user) maintains it in Sagit-chu/flvx, which has 281 GitHub stars. The repository was last updated on September 30, 2026.

Source: Sagit-chu/flvx on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.