Skip to content
Back to skills

Prompting Tool Use Tokenization

ASecurity

"Route Qwen system prompts, ReAct/tool use, OpenAI-style function

  • 247 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 9, 2026
ai-agentsrustreactdebuggingapidocumentation

Works with

  • api

Security analysis

A100/100

Pro scans all 7 files and shows the line behind each finding

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill prompting-tool-use-tokenization --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Prompting Tool Use Tokenization?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Prompting Tool Use Tokenization
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-prompting-tool-use-tokenization/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-prompting-tool-use-tokenization)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: prompting-tool-use-tokenization
description: "Route Qwen system prompts, ReAct/tool use, OpenAI-style function
  calling, ChatML, special tokens, tokenizer safety, and BPE merge workflows."
disable-model-invocation: true
metadata:
  disco-role: operating
license: Apache 2.0
---

# Qwen Prompting, Tool Use, and Tokenization

Use this sub-skill when the user wants Qwen-specific system prompts, ReAct prompting, OpenAI-style function calling, Hugging Face Agent patterns, function-calling fine-tune samples, ChatML behavior, special-token safety, or tokenizer BPE merge extension.

## Safe start

- Use `scripts/validate_function_call_messages.py` before debugging a function-calling request or fine-tune sample.
- Use `scripts/qwen_tokenizer_merge_helper.py` for a safe local BPE-merge helper when extending tokenizer merge files.
- Keep prompt/tool behavior separate from model loading and server launch.

## Routes

| User request | Read |
| --- | --- |
| System prompts, role/language/task/behavior control, or stable assistant behavior across turns | `references/system-prompts.md` |
| ReAct template, function schemas, OpenAI-compatible message conversion, `Observation:` stop words, fine-tune samples for function calling | `references/function-calling-and-react.md` |
| ChatML roles, `<|im_start|>`, `<|im_end|>`, `<|endoftext|>`, pad/eod, special-token injection prevention, BPE merges | `references/tokenization-and-chatml.md` |
| Invalid role order, streaming function calls, tokenizer decode issues, special-token injection, or fine-tune sample mistakes | `references/troubleshooting.md` |

## Boundaries

- For loading a model before calling `chat`, use `../inference-model-loading/SKILL.md`.
- For launching an OpenAI-compatible server, use `../serving-deployment/SKILL.md`.
- For fine-tuning command plans, use `../finetuning-quantization/SKILL.md`.
- For plugin/tool benchmark reproduction, use `../evaluation-reproduction/SKILL.md`.

## Operating rules

- Qwen's OpenAI-style function calling is implemented through ReAct text conversion, not through a separate hidden tool runtime.
- The local API server rejects function calling with streaming; route users to non-streaming requests when `functions` are present.
- Do not allow untrusted text containing special-token surface forms to be treated as control tokens unless the user deliberately wants that behavior.
- Do not add ordinary vocabulary tokens casually; Qwen's tokenizer documentation discourages adding regular tokens and preserves extra special tokens for controlled uses.

Files in this skill

  • SKILL.md2.5 KB
  • references/function-calling-and-react.md2.4 KB
  • references/system-prompts.md1.4 KB
  • references/tokenization-and-chatml.md2 KB
  • references/troubleshooting.md1.5 KB
  • scripts/qwen_tokenizer_merge_helper.py3.4 KB
  • scripts/validate_function_call_messages.py3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.