AI Agent Hub
Back to skills
Personal WeChat QR Code Connection icon

Personal WeChat QR Code Connection

AI Agent Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please install @user_15292d5a/yjkj-yq-weixin-connect according to https://skillhub.cn/install/skillhub.md.

About this skill

Problem

When an AI agent needs to complete a personal WeChat QR-code login for a user, the QR code expires quickly, the returned qrcode_img_content is a web URL rather than an image, and polling and credential writing are easy to get wrong. This skill collapses the fragile flow into a fixed sequence.

How It Works

  • Strictly personal WeChat only: it activates for prompts such as “connect personal WeChat”; enterprise WeChat / WeCom should use a different skill.
  • Produce a displayable QR code: after installing the legacy plugin and requesting the QR code, encode the URL string into a PNG with the qrcode library and display it via CDN; if CDN upload fails, fall back to the workspace file.
  • Wait for the user: after showing the QR code, do not poll automatically; wait until the user confirms before entering long polling, then branch on wait, scaned, confirmed, and expired.
  • Write credentials and restart: after confirmation, extract ilink_bot_id, bot_token, baseurl, and ilink_user_id, keep in mind that bot_token already includes the required prefix, then write the credentials and restart the Gateway.

Boundaries

This is for personal WeChat QR-code connection only. It is not suitable for enterprise WeChat, mass messaging, customer-support bots, or proactive messaging flows. Avoid downloading the QR-code URL directly, avoid fragmenting commands too much, and avoid manually rewriting the config file.

Use Cases

  • Complete a personal WeChat QR login in an AI agent and restart the Gateway
  • Bind a personal WeChat account to a local Gateway after the user scans the code
  • Regenerate an expired personal WeChat login QR code and continue authentication
  • Generate a displayable personal WeChat QR code without handling enterprise WeCom

Best For

  • Agent engineers who need stable personal WeChat QR-login integration
  • Automation engineers debugging Gateway credential writes and restarts
  • AI app developers formalizing personal WeChat QR login into fixed steps
  • Integration engineers binding a local personal WeChat account and verifying login