用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/xybrid-ai/xybrid --skill test-model命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | test-model |
| description | Test a model end-to-end using the xybrid execution system. |
Test a model end-to-end using the xybrid execution system.
The user should specify which model to test (e.g., "test kokoro-82m" or "test the TTS model").
Input: $ARGUMENTS (optional — model name or path to model directory)
If $ARGUMENTS is provided, use it to find the model. Otherwise ask which model to test.
Search for the model in these locations (in order):
$ARGUMENTS is a directory pathintegration-tests/fixtures/models/{name}/~/.xybrid/cache/{name}/Verify that model_metadata.json exists in the model directory.
Read model_metadata.json and check:
files array exist in the model directorymodel_file in execution_template points to an actual filemodel_id, version, execution_template, files)If any check fails, report the specific issue and suggest how to fix it.
Based on the execution_template.type and metadata.task:
| Task | Input | Expected Output | Feature Flags |
|---|---|---|---|
text-to-speech | Envelope::Text("Hello world") | Audio bytes (length > 0) | default |
speech-recognition (Onnx) | Envelope::Audio(wav_bytes) | Text transcription | default |
speech-recognition (GgmlWhisper) | Envelope::Audio(wav_bytes) | Text transcription | asr-whispercpp (in every platform-* preset) |
speech-recognition (SafeTensors) | Envelope::Audio(wav_bytes) | Text transcription | candle,candle-metal — opt-in only; no preset enables Candle |
text-generation (Gguf) | Envelope::Text("Hello") | Text response | llm-llamacpp |
text-embedding | Envelope::Text("test sentence") | Embedding vector (f32) | default |
image_classification | Raw image bytes | Class probabilities | default |
Check for an existing example in crates/xybrid-core/examples/ that matches the model.
If no example exists, create a minimal one at crates/xybrid-core/examples/{model_id}_test.rs:
//! Test example for {model_id}
use std::collections::HashMap;
use std::path::PathBuf;
use xybrid_core::execution::{ModelMetadata, TemplateExecutor};
use xybrid_core::ir::{Envelope, EnvelopeKind};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let model_dir = PathBuf::from("integration-tests/fixtures/models/{model_id}");
let metadata_path = model_dir.join("model_metadata.json");
let metadata: ModelMetadata = serde_json::from_str(&std::fs::read_to_string(&metadata_path)?)?;
let mut executor = TemplateExecutor::with_base_path(model_dir.to_str().unwrap());
// Create appropriate input based on model task
let input = Envelope {
kind: EnvelopeKind::Text("Hello world".into()), // adjust per task
metadata: HashMap::new(),
};
// Third arg is an optional `&GenerationConfig` override.
let output = executor.execute(&metadata, &input, None)?;
println!(, output.kind);
();
(())
}
Adjust the input type based on the model task (Text for TTS/LLM/embedding, Audio for ASR).
Run from the repos/xybrid/ directory (or the repo root if that's where Cargo.toml is):
cargo run --example {example_name} -p xybrid-core --features {features}
Add feature flags based on the model type (see table in Step 3).
Check the output based on model type:
EnvelopeKind::Audio(bytes) with bytes.len() > 0. Optionally save to output.wav for manual listening.EnvelopeKind::Text(transcription) with non-empty text.EnvelopeKind::Text(response) with non-empty text.EnvelopeKind::Embedding(vec) with expected dimensionality.Print a summary:
Model: {model_id}
Task: {task}
Input: {input_type}
Output: {output_summary}
Status: PASS / FAIL
{If FAIL: specific error message and suggestion}
files array doesn't exist — download it or fix the pathplatform-* preset enables Candle any more. Either add --features candle explicitly, or switch to the GGML bundle (ExecutionTemplate::GgmlWhisper) that runs on asr-whispercpp — e.g. whisper-tiny-ggml instead of whisper-tiny.--features asr-whispercpp for GGML Whisper, --features candle for SafeTensors)--features llm-llamacpp for GGUF models基于 SOC 职业分类