WJX CLI: Enabling Agents to Complete Questionnaire and Data Operations via Standardized wjx-cli Invocation

Introduction

When conducting satisfaction surveys, exam voting, or exporting responses in environments like Cursor or Claude Code, it is common to repeatedly consult the Wenjuanxing (WJX) OpenAPI documentation and hand-write curl commands or fragmented scripts. Details such as question type fields, fill links, pagination totals, and bulk result submission are prone to pitfalls. Furthermore, Agents often mistakenly assume that “generating a JSONL file” equates to “creating the survey on the platform.”

This document introduces the wjx-cli-use (coordinate @user_f14cdb14/wjx-cli-use, current version 0.4.5) available on SkillHub. It is an wjx-cli usage guide designed for AI: it encapsulates the installation, authentication, JSONL survey creation, response querying, and analysis workflows of the official Wenjuanxing command-line tool into a SKILL.md, accompanied by modular reference documentation. When a user mentions intentions related to questionnaires, surveys, NPS, exams, or voting, the Agent should execute wjx commands in the background according to the Skill’s rules, rather than improvising API calls.

What is This

wjx-cli-use is a community-sourced (community) Agent Skill published by the SkillHub user user_f14cdb14 (display name: wjxcom). The Skill itself does not replace wjx-cli; rather, it teaches the Agent how to correctly use wjx-cli—a command-line wrapper for the Wenjuanxing OpenAPI, following the command structure wjx <module> <action> [options].

The official description states: it covers 15 modules and 67 subcommands, used for creating surveys, querying responses, exporting data, NPS/CSAT analysis, and managing contacts/departments/sub-accounts. SkillHub categorizes it as data-analysis, with subcategories including report generation, data insights, and user analysis. The tag requires_api_key=true indicates a dependency on a Wenjuanxing API Key (capabilities such as contacts also require WJX_CORP_ID).

SkillHub page statistics (as of data capture): approximately 10,622 downloads and 20 installation records; the rating field in the captured data is 100000 (SkillHub display convention; refer to the page for actuals).

Core Functions

The following content is derived from the SKILL.md within the Skill package and the SkillHub description, categorized by capability.

Triggering and Routing

When a user mentions questionnaires, surveys, collection, forms, voting, exams, assessments, satisfaction, NPS, Wenjuanxing, wjx, survey, or questionnaire, or needs to create surveys, view responses, export data, analyze NPS/CSAT, or manage contacts/departments/sub-accounts, the Agent should load this Skill. The description also mentions creation scenarios for AI Homepages, AI Posters, and AI PPTs (via survey create-ai-page / update-ai-page).

CLI Modules (Command Overview)

The command overview table in the Skill lists the main modules, for example:

Module Typical Capabilities
survey List, create, JSONL templates, AI Homepage, status, settings, export text, preview/short link, etc.
response Query, real-time, download, submission templates, submit/modify, reports, counts, 360 reports, etc.
contacts / department / admin / tag / account Contacts, departments, administrators, tags, sub-accounts
sso SSO links for sub-accounts, partners, etc.
analytics Decode, NPS, CSAT, anomalies, comparison, etc. (some analysis can be computed locally without requiring an API Key)
init / doctor / whoami Configuration and connectivity diagnostics

user-system is marked as compatible maintenance and deprecated in the Skill; new projects should not actively use this path.

Agent Behavior Constraints (Differentiating from “Just Installing the CLI”)

The Skill uses extensive “rules” to constrain the Agent and avoid common production incidents, such as:

  1. Sole Entry Point for Survey Creation: New surveys must be created via wjx survey create --file <path>.jsonl; the Agent must first run wjx survey jsonl-template to get the skeleton, and the first line must be the survey basic information.
  2. Fill Links: Assembling public URLs using vid is prohibited; the API-returned fill_url or the validated activity_domain + pc_path/mobile_path must be used.
  3. List and Response Pagination: Machine processing must read total_count, page_index, etc. from the JSON, and must not present a single page of results as “all”; --format table is only suitable for quick human review.
  4. Bulk Submission: Every response submit must check the top-level ok, summarize success/failure counts, and prohibit verbal claims of unverified numbers.
  5. Speaking to the User: Default to providing results in natural language without piling up CLI commands (except when the user explicitly requests it).

The package also includes Markdown files under references/ covering surveys, responses, contacts, analysis, question types, formulas, Node installation, etc., for the Agent to expand on subcommand parameters as needed.

Installation and Enablement

There are two layers: installing the Skill into the Agent, and installing wjx-cli on the local machine. Only when both are completed can the wjx commands be stably used in the conversation.

1. Install the Skill (SkillHub)

The SkillHub installation instructions require operation according to the official documentation, installing the coordinate @user_f14cdb14/wjx-cli-use:

Please install @user_f14cdb14/wjx-cli-use according to https://skillhub.cn/install/skillhub.md.

If the SkillHub CLI is already installed, the Skill can be installed to the current Agent’s skills directory (the directory varies by product; use --dir to point to a recognizable path). Example from the documentation:

command -v skillhub && skillhub --version
skillhub install @user_f14cdb14/wjx-cli-use --dir <Current Agent's skills directory>

Common paths include: ~/.cursor/skills/ for Cursor; ~/.claude/skills/ for Claude Code; ~/.codex/skills/ or .agents/skills/ under the project for Codex. You can also download wjx-cli-use-0.4.5.zip from the SkillHub page and extract it to the corresponding directory.

Official Skill Address: https://api.skillhub.cn/user_f14cdb14/wjx-cli-use
SkillHub Display Page: https://www.skillhub.cn/skills/user_f14cdb14/wjx-cli-use

2. Install wjx-cli (Node.js Environment)

The Skill requires Node.js >= 20. Once ready, install the global CLI and sync the Skill files to the Agent (wjx skill install):

node --version
npm install -g wjx-cli@latest
wjx skill install --force
wjx --version

Note: The npm package name is wjx-cli, but the executable command after installation is wjx. Do not use wjx-cli --version for acceptance testing. The Skill specifies the minimum compatible client version is 0.4.1; if lower than this version, upgrade first.

3. Configure API Key

The API Key must be obtained by the user in a browser. The Agent should execute initialization after receiving the Key (do not echo the full Key in replies):

wjx init --api-key <User provided key>

For private deployments, the domain used to obtain the Key and --base-url must match, for example:

wjx init --api-key <key> --base-url https://<domain>

The default public domain is www.wjx.cn; the acquisition link format is:

https://<domain>/weixinlogin.aspx?redirecturl=%2Fnewwjx%2Fmanage%2Fuserinfo.aspx%3FshowApiKey%3D1

Credential priority: --api-key > environment variable WJX_API_KEY > ~/.wjxrc. Contact-related operations additionally require configuring WJX_CORP_ID.

4. Verification

wjx doctor

After passing, use the list command for a human-readable acceptance check (the Skill emphasizes: table output is not for inferring totals or pagination):

wjx survey list --format table

Typical Usage

The following examples are derived from the quick routing and core workflows in the Skill and can be reproduced after configuring the Key.

Creating a Survey with JSONL

Generate a template first, edit it, then create:

wjx survey jsonl-template --type 1 --raw > survey.jsonl
# Edit survey.jsonl
wjx survey create --file survey.jsonl

Minimal example (one JSON object per line):

{"qtype":"Survey Basic Info","title":"Customer Satisfaction Survey","introduction":"Thank you for your participation","atype":1}
{"qtype":"Single Choice","title":"Are you satisfied with this service?","select":["Satisfied","Average","Dissatisfied"]}
{"qtype":"Short Answer","title":"Do you have any other suggestions?"}

For voting, exams, forms, etc., specify --type simultaneously (e.g., voting --type 3, exam --type 6) and use the corresponding qtype names.

Viewing Results and Exporting

wjx survey list
wjx response report --vid <vid>
wjx response download --vid <vid>

Download formats can be selected via --suffix: CSV (0), SAV (1), Word (2), etc. (see the response reference documentation in the Skill for details).

Local NPS Calculation (Example)

wjx analytics nps --scores "[9,10,7,3]"

Intent to Command Mapping (Excerpt)

User Intent Skill Suggested Command
Create Survey/Questionnaire wjx survey create --file survey.jsonl
Create Exam wjx survey create --file exam.jsonl --type 6
Create Vote wjx survey create --file vote.jsonl --type 3
Import Contacts wjx contacts add --users '[...]' (Requires WJX_CORP_ID)

Scenarios and Notes

Who is it for

  • Users already using or planning to use Wenjuanxing OpenAPI / wjx-cli who want the Agent to create surveys, query data, and export following a unified standard, rather than reading long documentation every time.
  • Users requiring enterprise-side capabilities like NPS/CSAT, sub-accounts, and contacts, who can accept managing their own API Key and Corp ID.
  • Users frequently discussing surveys, exams, voting, and satisfaction in conversations who want automatic Skill routing hits.

Limitations and Notes

  • API Key Required: The Skill requires stopping business operations and guiding the user to reconfigure upon encountering authentication errors; forging Keys is prohibited.
  • Node >= 20 and global wjx executable are required; if only the Skill is installed without the CLI, the Agent cannot actually call the API.
  • Survey creation must follow JSONL + survey create; simply generating a file without executing the command will not create a survey on the platform.
  • Fill links, pagination totals, and bulk submission results have mandatory validation logic; if violated, the Skill requires the Agent to report truthfully rather than guess.
  • The Skill is community-published and may lag slightly behind Wenjuanxing official documentation and CLI versions (SkillHub page shows 0.4.5, package front matter previously wrote 0.4.4). If UPGRADE_REQUIRED is encountered, upgrade the client as prompted by the server.

Conclusion

wjx-cli-use consolidates wjx-cli installation, authentication, JSONL survey creation, response and analysis, organization-side commands, and Agent-side error prevention rules into a loadable Skill. It is suitable for upgrading “Wenjuanxing-related” conversations from temporary scripts to repeatable operational procedures.

Official Entry: https://api.skillhub.cn/user_f14cdb14/wjx-cli-use

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye