# Qqbot Contact Send

Resolve a QQBot recipient from the local known-targets registry, distinguish between...

- Repository: https://github.com/BytePioneer-AI/openclaw-china (3952 stars)
- Category: Engineering
- License: see repository
- Last updated: 2026-06-12
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add BytePioneer-AI/openclaw-china --skill qqbot-contact-send -g -a claude-code -y`
Codex: `npx skills add BytePioneer-AI/openclaw-china --skill qqbot-contact-send -g -a codex -y`
Cursor: `npx skills add BytePioneer-AI/openclaw-china --skill qqbot-contact-send -g -a cursor -y`
Gemini CLI: `npx skills add BytePioneer-AI/openclaw-china --skill qqbot-contact-send -g -a gemini-cli -y`

## Description

Resolve a QQBot recipient from the local known-targets registry, distinguish between similarly named contacts, and send text or files to the intended QQ user with the correct target. Use whenever the user says things like “发给这个 QQ 联系人”, “把这个文件发给某个 QQ 用户”, “看看 known-targets.json 里是谁”, “确认发送对象”, or when you need to map a human-readable QQ contact name to a concrete `user:<openid>` target before sending. Prefer this skill over guessing from the current chat when multiple QQ users exist.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# qqbot-contact-send

Use this skill when the user wants to send something to a QQ contact identified by display name or nickname rather than by raw target id.

## What this skill is for

This skill helps avoid sending to the wrong QQ user when:
- the current chat user is not the intended recipient
- multiple QQ contacts exist in `known-targets.json`
- display names are similar or duplicated
- different users may use multiple agents with the same display name
- the user asks to inspect the local QQBot target registry before sending

## Data source

Read this file first when resolving a recipient:

- `~/.openclaw/qqbot/data/known-targets.json`

It contains entries like:
- `accountId`
- `kind`
- `target`
- `displayName`
- `lastSeenAt`

## Default workflow

1. Read `~/.openclaw/qqbot/data/known-targets.json`.
2. Default to the current session's `accountId` as the lookup scope unless the user explicitly asks to send across another agent/account.
3. Prefer the bundled helper script for deterministic lookup:
   - `python3 {baseDir}/scripts/resolve_known_target.py "<name-or-target>" --account-id "<current-accountId>"`
4. Match the requested human name against `displayName` first.
5. If more than one candidate is plausible, show the candidates briefly and ask which one to use.
6. If exactly one match is clear, use that entry's `target` and `accountId`.
7. Optionally run the bundled send-prep helper:
   - `python3 {baseDir}/scripts/prepare_send.py "<recipient>" --account-id "<current-accountId>" --file <path> [--caption <text>]`
   - or `--text <message>`
8. Send via the `message` tool using:
   - `channel: "qqbot"`
   - `target: <resolved target>`
   - `accountId: <resolved accountId>`
9. If sending a file, pass the local path directly.
10. If upload fails, report the real error plainly. Offer retry or text fallback if appropriate.

## Matching rules

The rest: https://github.com/BytePioneer-AI/openclaw-china/blob/HEAD/extensions/qqbot/skills/qqbot-contact-send/SKILL.md
