Ask4Me · Let a human confirm / select / fill out a form
Ask4Me is a deployed Human-in-the-Loop service: you send a request, the service pushes an interaction link to a real person's phone (ServerChan), and after they tap a button or submit a form, your command receives the final result.
This is a pure client-side skill and does not require deploying a service. By default, it uses the public trial server; the only thing the user needs to prepare is the ServerChan SendKey.
Start here (users installing directly from GitHub)
After installing from GitHub /
,
this file is all you need to read; there is no need to wait for anyone to provide further instructions.
- Verify Node 18+:
- First, prepare the ServerChan SendKey (required):
- If you have one: save it to
ASK4ME_SERVERCHAN_SENDKEY
;
- If you do not: guide the user to open https://sct.ftqq.com/ → scan the QR code with WeChat (registration is automatic) → copy the SendKey ( or ) → save it to
ASK4ME_SERVERCHAN_SENDKEY
.
- Do not create a request without a SendKey.
- Send a request:
node scripts/ask4me.mjs ask --title "确认发布" --body "请确认"
- The first run automatically generates and saves an API key; no manual keygen is required.
- The user taps OK on their phone, and the connection is established once the result is received.
- Then send button/input/JSON Forms requests as described under “Regular use.”
Default: start with the public trial service
- Service URL:
- Invitation code:
- This is a public trial service: it may be unstable, subject to rate limiting, downtime, or data cleanup. Do not store long-lived or sensitive data there, and do not rely on it for mission-critical business operations.
- First let the user get the service working through the trial service. If they need long-term use, cannot afford data loss, or encounter instability, guide them toward self-hosting:
Do not ask the user to self-host a server right away—start with the trial service because it has the lowest barrier to entry; self-hosting is an upgrade path, not a prerequisite.
Automatic update checks
The script checks GitHub for a new skill version whenever
/
/
starts (
at most once every 24 hours; network failures are ignored automatically and do not block requests). If a new version is available, it is reported on stderr:
text
[Ask4Me] 发现 skill 新版本 x.y.z(当前 a.b.c)。
[Ask4Me] 更新:npx skills add easychen/skills --skill ask4me
- Check the version manually:
node scripts/ask4me.mjs version
- Disable the check: or
- Do not automatically run updates for the user; notify them and let them decide.
Perform environment checks first
Node.js 18+ is required. The script is located at
in the skill directory and has zero dependencies.
If the version is below 18, first have the user upgrade Node and do not continue.
First-time setup (only the SendKey step)
1. Service URL and invitation code
The defaults are already built in, so
there is no need to ask the user. Only change
and
if the user explicitly wants to self-host or customize them.
2. API key
No manual generation is required. The first
run automatically generates
and saves it to
~/.config/ask4me/config.json
(permissions 600).
Do not echo the full key; if the user already has their own key, override it with
.
3. ServerChan SendKey (required)
Without a SendKey, no notification can be sent and the request is meaningless. First ask the user for the SendKey:
- Open https://sct.ftqq.com/;
- Scan the QR code and log in with WeChat (an account is created automatically if necessary);
- Copy the SendKey (in the form or );
- Save it to the current project's
ASK4ME_SERVERCHAN_SENDKEY
environment variable.
If the user does not have a SendKey, stop and guide them through this step. Do not create a request, and do not attempt to bypass it using the so-called “link mode.” Do not echo or log the SendKey.
4. Optional E2EE
Ask the user: “Do you want end-to-end encryption for this request / in the future?”
- Disabled: do not set , or add .
- Enabled: have the user set a passphrase and save it to . The passphrase is used only for encryption and will not be sent to the server.
- Remind the user that the passphrase must be communicated to the respondent separately and must not be placed in the notification. If it is lost, the data cannot be recovered.
5. Send a test request
After the user confirms that push notifications can be sent:
bash
node scripts/ask4me.mjs ask \
--title "Ask4Me 配置测试" \
--body "收到请点 OK,确认链路正常。" \
--expires 3600
Wait for the user to tap
OK on their phone. A
/
response means setup is successful. The script prints a public trial service reminder; relay the message that it may be unstable and should be self-hosted for regular use.
Regular use
Buttons / Approval
bash
node scripts/ask4me.mjs ask \
--title "确认发布 v1.2.3" \
--body "请确认是否发布到生产环境。" \
--mcd $':::buttons\n- [OK](ok)\n- [取消](cancel)\n:::' \
--expires 3600
Text input
bash
node scripts/ask4me.mjs ask \
--title "补充说明" \
--body "请填写发布备注。" \
--mcd $':::input name="note" label="备注" submit="提交"\n:::' \
--expires 3600
JSON Forms
First, create a JSON file, for example
:
json
{
"schema": {
"type": "object",
"properties": {
"name": { "type": "string", "minLength": 1 },
"age": { "type": "integer", "minimum": 0 }
},
"required": ["name"]
},
"uischema": {
"type": "VerticalLayout",
"elements": [
{ "type": "Control", "scope": "#/properties/name" },
{ "type": "Control", "scope": "#/properties/age" }
]
},
"data": { "age": 18 },
"submit_label": "提交"
}
bash
node scripts/ask4me.mjs ask \
--title "填写信息" \
--body "请填写后提交。" \
--jsonforms /tmp/form.json \
--expires 3600
The script prints the result JSON to stdout:
json
{
"request_id": "req_xxx",
"last_event_type": "user.submitted",
"data": {
"action": "ok",
"text": "",
"payload": { "name": "Alice", "age": 18 }
}
}
When E2EE is enabled,
/
have already been decrypted locally and can be used directly.
Trial vs. self-hosted
| Public trial service | Self-hosted server |
|---|
| URL | | Your own domain |
| Invitation code | | Configure your own |
| Data | May be cleaned up; retention is not guaranteed | Under your control |
| Stability | Not guaranteed; may be rate-limited or unavailable | Your responsibility |
| Suitable for | Trials, evaluation, lightweight tasks | Long-term use, sensitive or critical tasks |
Get the service working through the trial service first, then decide whether to self-host. Do not require the user to set up a server before they have tried the service.
How to communicate with the user
After sending a request, tell the user briefly:
The confirmation request has been pushed to your phone. Tap OK, or open the link to submit. I will wait for your result here.
Do not send the SendKey, API key, E2EE passphrase, or full interaction URL to a public channel. The interaction URL is an access credential.
Troubleshooting
| Symptom | Action |
|---|
ASK4ME_SERVERCHAN_SENDKEY
is missing | Stop and guide the user to https://sct.ftqq.com/ to log in by scanning the QR code with WeChat and copy the SendKey; do not create a request |
| The automatically saved key has expired or the invitation code has changed; delete ~/.config/ask4me/config.json
and retry, or specify a new invitation code with |
| The SendKey is invalid or rate-limited; have the user check ServerChan or replace the SendKey |
| after tapping OK | The request has expired (default: 1 hour); have the user tap it as soon as possible, or resend it with a larger value |
| The quota is exhausted (per key / per IP / global); try again later and do not resend in a loop |
| The user did not submit within the validity period; ask whether they want to resend it, and do not send it automatically |
| The command times out in the Agent | Reduce (for example, to 120/300), or have the user confirm that they are online before sending |
| The E2EE page reports an incorrect passphrase | The passphrases do not match; have the user check capitalization and spacing. The server cannot recover the passphrase |
Security red lines
- Do not write ,
ASK4ME_SERVERCHAN_SENDKEY
, or into repositories, commits, logs, or public responses.
- Do not place the E2EE passphrase in the notification body; it must be communicated separately.
- Send only one request at a time; do not repeatedly spam the user.
- The interaction URL contains an access token, so do not post it to public groups or issues.
- If the user declines or does not respond for a long time, stop waiting and explain the situation accurately; do not fabricate a result.
Server-side facts
- The default is a public trial service: it may be unstable, subject to rate limiting, downtime, or data cleanup. Do not store long-lived or sensitive data there. Self-host it for regular use.
- Multi-user mode: key = tenant, with no account; the server does not store user profiles.
- must be included with every request; global ServerChan/Apprise settings do not take effect.
- E2EE is opt-in per request: only means that the server permits it and does not enforce it.
- The server stores only ciphertext and salt and never handles the E2EE passphrase.
- See the protocol and test vectors at https://github.com/easychen/ask4me/blob/main/E2EE.md.
For operators: a message for guided users
contains only one paragraph for us to proactively send to users to copy. Users who install directly from GitHub do not need it; they can follow this file instead.