a6-plugin-ai-prompt-template

Configure the ai-prompt-template plugin to substitute {{variable}} placeholders in messages.

1|2|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/api7/a6 --skill a6-plugin-ai-prompt-template-api7
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: a6-plugin-ai-prompt-template
Source: https://github.com/api7/a6/tree/main/skills/a6-plugin-ai-prompt-template
Command: npx skills add https://github.com/api7/a6 --skill a6-plugin-ai-prompt-template-api7

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The ai-prompt-template plugin standardizes how prompts are created and delivered to AI models by filling {{variable}} placeholders in predefined messages, ensuring consistency and reducing the risk of unsafe or unintended prompts.

Core Features & Use Cases

  • Predefine multiple prompt templates with model, messages, and required variables to drive consistent AI interactions.
  • Automate variable substitution from client requests, preventing arbitrary content and supporting safe, structured prompts.
  • Seamlessly combine with ai-prompt-decorator and ai-proxy to build end-to-end AI workflows on APISIX.

Quick Start

Create a route with the ai-prompt-template plugin and supply template variables to generate a complete prompt.

Frequently Asked Questions about a6-plugin-ai-prompt-template

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce a fixed prompt structure for AI models using APISIX?

To enforce a fixed prompt structure in APISIX, use the ai-prompt-template plugin to substitute template variables into predefined messages, ensuring consistent prompt format across services.

What is template-based prompt engineering in API gateways?

Template-based prompt engineering in API gateways involves predefining prompt messages with variable placeholders, which are automatically substituted with client request data to generate safe, structured prompts.

How do I configure multiple prompt templates with different models in APISIX?

You configure multiple prompt templates in APISIX by using the a6 CLI to define templates, specifying per-template models and messages with required variables for each route.

Can I use the ai-prompt-template plugin with other AI plugins in APISIX?

Yes, the ai-prompt-template plugin combines with ai-prompt-decorator and ai-proxy to build end-to-end AI workflows on APISIX, delivering fully populated prompts to backend models.

Do I need the a6 CLI to define template variables for APISIX AI prompts?

Yes, the a6 CLI is required to define templates and variables for the ai-prompt-template plugin, which relies on {{variable}} placeholders for substitution into predefined messages.

Why use variable substitution for AI prompts instead of raw client input?

Variable substitution prevents arbitrary content from reaching AI models by injecting client request data into predefined templates, reducing the risk of unsafe or unintended prompts.