Test whether a hypothetical user input would activate this skill, and preview the rendered body
curl --request POST \
--url https://api.decimal.ai/api/v1/skills/{skill_name}/playground-run \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.decimal.ai/api/v1/skills/{skill_name}/playground-run"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.decimal.ai/api/v1/skills/{skill_name}/playground-run', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.decimal.ai/api/v1/skills/{skill_name}/playground-run",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.decimal.ai/api/v1/skills/{skill_name}/playground-run"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.decimal.ai/api/v1/skills/{skill_name}/playground-run")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.decimal.ai/api/v1/skills/{skill_name}/playground-run")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}skills
Test whether a hypothetical user input would activate this skill, and preview the rendered body
Standalone test surface for a skill.
Body:
user_input: str (required) — the hypothetical user message
variables: dict[str, str] (optional) — values for {{var}} placeholders
version_id: str (optional) — pin to a specific skill_version; default = latest
Response:
{
would_activate: bool,
matched_triggers: [str, ...], # the trigger_phrases that matched (substring)
rendered_body: str, # body with variables substituted
missing_variables: [str, ...], # {{var}} placeholders the caller didn't fill
skill: {id, name, version_number, content_hash}
}
Matching rule (V1): if any `trigger_phrases` entry appears as a
case-insensitive substring of `user_input`, `would_activate` is True.
Skills with no trigger_phrases match unconditionally.
THIS IS A TRIGGER-PHRASE LINT, NOT A ROUTING PREDICTION. The docstring
used to claim the rule "mirrors the SDK's default SkillRouter substring
path"; that was false in both halves and it pointed authors at an inert
knob — tune trigger_phrases until this says "would activate", ship,
change nothing in prod. `SkillRouter.smart_route`/`get_menu` do no local
matching at all (they POST to /api/v1/skills/route), and server-side
routing is RRF over the dense vector + the `search_doc` tsvector, which
migration 076 generates from name/description/category only — no routing
path reads `trigger_phrases` by substring. Trigger phrases reach routing
only indirectly, as part of `skill_embed_text.build_embed_text`.
Keep the wording honest if you touch this: the production-parity dry-run
is `POST /registry/trigger-dryrun` (trigger_eval_service Stage R, which
imports `skill_service._hybrid_retrieve`), and re-describing this endpoint
as an activation predictor re-creates the misdirection.
See docs/cujs/-playground-skills/README.md "Activation rule".
POST
/
api
/
v1
/
skills
/
{skill_name}
/
playground-run
Test whether a hypothetical user input would activate this skill, and preview the rendered body
curl --request POST \
--url https://api.decimal.ai/api/v1/skills/{skill_name}/playground-run \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.decimal.ai/api/v1/skills/{skill_name}/playground-run"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.decimal.ai/api/v1/skills/{skill_name}/playground-run', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.decimal.ai/api/v1/skills/{skill_name}/playground-run",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.decimal.ai/api/v1/skills/{skill_name}/playground-run"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.decimal.ai/api/v1/skills/{skill_name}/playground-run")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.decimal.ai/api/v1/skills/{skill_name}/playground-run")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}