[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M783DCKS5H6H0MP594Y1PBY4":3,"skill-same:01M783DCKS5H6H0MP594Y1PBY4":56},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":15,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":13,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":29,"updatedAt":30,"install":31,"resources":44},"01M783DCKS5H6H0MP594Y1PBY4","llm",null,"Implement large language model (LLM) chat completions using the z-ai-web-dev-sdk. Use this skill when the user needs to build conversational AI applications, chatbots, AI assistants, or any text generation features. Supports multi-turn conversations, system prompts, and context management.","nordeim\u002Fyoga-studio","nordeim","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F194583642?v=4","01M75CZEV8C3V4DDQNPQ1EA7QJ","01M782NVR9711WMKQXZBPA5P70",0,"MIT","https:\u002F\u002Fgithub.com\u002Fnordeim\u002Fyoga-studio\u002Fblob\u002Fmain\u002Fskills\u002Fllm\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fnordeim\u002Fyoga-studio\u002Fblob\u002Fmain\u002Fskills\u002Fllm\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: llm\ndescription: Implement large language model (LLM) chat completions using the z-ai-web-dev-sdk. Use this skill when the user needs to build conversational AI applications, chatbots, AI assistants, or any text generation features. Supports multi-turn conversations, system prompts, and context management.\nlicense: MIT\n---\n\n# LLM (Large Language Model) Skill\n\nThis skill guides the implementation of chat completions functionality using the z-ai-web-dev-sdk package, enabling powerful conversational AI and text generation capabilities.\n\n## Skills Path\n\n**Skill Location**: `{project_path}\u002Fskills\u002Fllm`\n\nthis skill is located at above path in your project.\n\n**Reference Scripts**: Example test scripts are available in the `{Skill Location}\u002Fscripts\u002F` directory for quick testing and reference. See `{Skill Location}\u002Fscripts\u002Fchat.ts` for a working example.\n\n## Overview\n\nThe LLM skill allows you to build applications that leverage large language models for natural language understanding and generation, including chatbots, AI assistants, content generation, and more.\n\n**IMPORTANT**: z-ai-web-dev-sdk MUST be used in backend code only. Never use it in client-side code.\n\n## Prerequisites\n\nThe z-ai-web-dev-sdk package is already installed. Import it as shown in the examples below.\n\n## CLI Usage (For Simple Tasks)\n\nFor simple, one-off chat completions, you can use the z-ai CLI instead of writing code. This is ideal for quick tests, simple queries, or automation scripts.\n\n### Basic Chat\n\n```bash\n# Simple question\nz-ai chat --prompt \"What is the capital of France?\"\n\n# Save response to file\nz-ai chat -p \"Explain quantum computing\" -o response.json\n\n# Stream the response\nz-ai chat -p \"Write a short poem\" --stream\n```\n\n### With System Prompt\n\n```bash\n# Custom system prompt for specific behavior\nz-ai chat \\\n  --prompt \"Review this code: function add(a,b) { return a+b; }\" \\\n  --system \"You are an expert code reviewer\" \\\n  -o review.json\n```\n\n### With Thinking (Chain of Thought)\n\n```bash\n# Enable thinking for complex reasoning\nz-ai chat \\\n  --prompt \"Solve this math problem: If a train travels 120km in 2 hours, what's its speed?\" \\\n  --thinking \\\n  -o solution.json\n```\n\n### CLI Parameters\n\n- `--prompt, -p \u003Ctext>`: **Required** - User message content\n- `--system, -s \u003Ctext>`: Optional - System prompt for custom behavior\n- `--thinking, -t`: Optional - Enable chain-of-thought reasoning (default: disabled)\n- `--output, -o \u003Cpath>`: Optional - Output file path (JSON format)\n- `--stream`: Optional - Stream the response in real-time\n\n### When to Use CLI vs SDK\n\n**Use CLI for:**\n- Quick one-off questions\n- Simple automation scripts\n- Testing prompts\n- Single-turn conversations\n\n**Use SDK for:**\n- Multi-turn conversations with context\n- Custom conversation management\n- Integration with web applications\n- Complex chat workflows\n- Production applications\n\n## Basic Chat Completions\n\n### Simple Question and Answer\n\n```javascript\nimport ZAI from 'z-ai-web-dev-sdk';\n\nasync function askQuestion(question) {\n  const zai = await ZAI.create();\n\n  const completion = await zai.chat.completions.create({\n    messages: [\n      {\n        role: 'assistant',\n        content: 'You are a helpful assistant.'\n      },\n      {\n        role: 'user',\n        content: question\n      }\n    ],\n    thinking: { type: 'disabled' }\n  });\n\n  const response = completion.choices[0]?.message?.content;\n  return response;\n}\n\n\u002F\u002F Usage\nconst answer = await askQuestion('What is the capital of France?');\nconsole.log('Answer:', answer);\n```\n\n### Custom System Prompt\n\n```javascript\nimport ZAI from 'z-ai-web-dev-sdk';\n\nasync function customAssistant(systemPrompt, userMessage) {\n  const zai = await ZAI.create();\n\n  const completion = await zai.chat.completions.create({\n    messages: [\n      {\n        role: 'assistant',\n        content: systemPrompt\n      },\n      {\n        role: 'user',\n        content: userMessage\n      }\n    ],\n    thinking: { type: 'disabled' }\n  });\n\n  return completion.choices[0]?.message?.content;\n}\n\n\u002F\u002F Usage - Code reviewer\nconst codeReview = await customAssistant(\n  'You are an expert code reviewer. Analyze code for bugs, performance issues, and best practices.',\n  'Review this function: function add(a, b) { return a + b; }'\n);\n\n\u002F\u002F Usage - Creative writer\nconst story = await customAssistant(\n  'You are a creative fiction writer who writes engaging short stories.',\n  'Write a short story about a robot learning to paint.'\n);\n\nconsole.log(codeReview);\nconsole.log(story);\n```\n\n## Multi-turn Conversations\n\n### Conversation History Management\n\n```javascript\nimport ZAI from 'z-ai-web-dev-sdk';\n\nclass ConversationManager {\n  constructor(systemPrompt = 'You are a helpful assistant.') {\n    this.messages = [\n      {\n        role: 'assistant',\n        content: systemPrompt\n      }\n    ];\n    this.zai = null;\n  }\n\n  async initialize() {\n    this.zai = await ZAI.create();\n  }\n\n  async sendMessage(userMessage) {\n    \u002F\u002F Add user message to history\n    this.messages.push({\n      role: 'user',\n      content: userMessage\n    });\n\n    \u002F\u002F Get completion\n    const completion = await this.zai.chat.completions.create({\n      messages: this.messages,\n      thinking: { type: 'disabled' }\n    });\n\n    const assistantResponse = completion.choices[0]?.message?.content;\n\n    \u002F\u002F Add assistant response to history\n    this.messages.push({\n      role: 'assistant',\n      content: assistantResponse\n    });\n\n    return assistantResponse;\n  }\n\n  getHistory() {\n    return this.messages;\n  }\n\n  clearHistory(systemPrompt = 'You are a helpful assistant.') {\n    this.messages = [\n      {\n        role: 'assistant',\n        content: systemPrompt\n      }\n    ];\n  }\n\n  getMessageCount() {\n    \u002F\u002F Subtract 1 for system message\n    return this.messages.length - 1;\n  }\n}\n\n\u002F\u002F Usage\nconst conversation = new ConversationManager();\nawait conversation.initialize();\n\nconst response1 = await conversation.sendMessage('Hi, my name is John.');\nconsole.log('AI:', response1);\n\nconst response2 = await conversation.sendMessage('What is my name?');\nconsole.log('AI:', response2); \u002F\u002F Should remember the name is John\n\nconsole.log('Total messages:', conversation.getMessageCount());\n```\n\n### Context-Aware Conversations\n\n```javascript\nimport ZAI from 'z-ai-web-dev-sdk';\n\nclass ContextualChat {\n  constructor() {\n    this.messages = [];\n    this.zai = null;\n  }\n\n  async initialize() {\n    this.zai = await ZAI.create();\n  }\n\n  async startConversation(role, context) {\n    \u002F\u002F Set up system prompt with context\n    const systemPrompt = `You are ${role}. Context: ${context}`;\n    \n    this.messages = [\n      {\n        role: 'assistant',\n        content: systemPrompt\n      }\n    ];\n  }\n\n  async chat(userMessage) {\n    this.messages.push({\n      role: 'user',\n      content: userMessage\n    });\n\n    const completion = await this.zai.chat.completions.create({\n      messages: this.messages,\n      thinking: { type: 'disabled' }\n    });\n\n    const response = completion.choices[0]?.message?.content;\n\n    this.messages.push({\n      role: 'assistant',\n      content: response\n    });\n\n    return response;\n  }\n}\n\n\u002F\u002F Usage - Customer support scenario\nconst support = new ContextualChat();\nawait support.initialize();\n\nawait support.startConversation(\n  'a customer support agent for TechCorp',\n  'The user has ordered product #12345 which is delayed due to shipping issues.'\n);\n\nconst reply1 = await support.chat('Where is my order?');\nconsole.log('Support:', reply1);\n\nconst reply2 = await support.chat('Can I get a refund?');\nconsole.log('Support:', reply2);\n```\n\n## Advanced Use Cases\n\n### Content Generation\n\n```javascript\nimport ZAI from 'z-ai-web-dev-sdk';\n\nclass ContentGenerator {\n  constructor() {\n    this.zai = null;\n  }\n\n  async initialize() {\n    this.zai = await ZAI.create();\n  }\n\n  async generateBlogPost(topic, tone = 'professional') {\n    const completion = await this.zai.chat.completions.create({\n      messages: [\n        {\n          role: 'assistant',\n          content: `You are a professional content writer. Write in a ${tone} tone.`\n        },\n        {\n          role: 'user',\n          content: `Write a blog post about: ${topic}. Include an introduction, main points, and conclusion.`\n        }\n      ],\n      thinking: { type: 'disabled' }\n    });\n\n    return completion.choices[0]?.message?.content;\n  }\n\n  async generateProductDescription(productName, features) {\n    const completion = await this.zai.chat.completions.create({\n      messages: [\n        {\n          role: 'assistant',\n          content: 'You are an expert at writing compelling product descriptions for e-commerce.'\n        },\n        {\n          role: 'user',\n          content: `Write a product description for \"${productName}\". Key features: ${features.join(', ')}.`\n        }\n      ],\n      thinking: { type: 'disabled' }\n    });\n\n    return completion.choices[0]?.message?.content;\n  }\n\n  async generateEmailResponse(originalEmail, intent) {\n    const completion = await this.zai.chat.completions.create({\n      messages: [\n        {\n          role: 'assistant',\n          content: 'You are a professional email writer. Write clear, concise, and polite emails.'\n        },\n        {\n          role: 'user',\n          content: `Original email: \"${originalEmail}\"\\n\\nWrite a ${intent} response.`\n        }\n      ],\n      thinking: { type: 'disabled' }\n    });\n\n    return completion.choices[0]?.message?.content;\n  }\n}\n\n\u002F\u002F Usage\nconst generator = new ContentGenerator();\nawait generator.initialize();\n\nconst blogPost = await generator.generateBlogPost(\n  'The Future of Artificial Intelligence',\n  'informative'\n);\nconsole.log('Blog Post:', blogPost);\n\nconst productDesc = await generator.generateProductDescription(\n  'Smart Watch Pro',\n  ['Heart rate monitoring', 'GPS tracking', 'Waterproof', '7-day battery life']\n);\nconsole.log('Product Description:', productDesc);\n```\n\n### Data Analysis and Summarization\n\n```javascript\nimport ZAI from 'z-ai-web-dev-sdk';\n\nasync function analyzeData(data, analysisType) {\n  const zai = await ZAI.create();\n\n  const prompts = {\n    summarize: 'You are a data analyst. Summarize the key insights from the data.',\n    trend: 'You are a data analyst. Identify trends and patterns in the data.',\n    recommendation: 'You are a business analyst. Provide actionable recommendations based on the data.'\n  };\n\n  const completion = await zai.chat.completions.create({\n    messages: [\n      {\n        role: 'assistant',\n        content: prompts[analysisType] || prompts.summarize\n      },\n      {\n        role: 'user',\n        content: `Analyze this data:\\n\\n${JSON.stringify(data, null, 2)}`\n      }\n    ],\n    thinking: { type: 'disabled' }\n  });\n\n  return completion.choices[0]?.message?.content;\n}\n\n\u002F\u002F Usage\nconst salesData = {\n  Q1: { revenue: 100000, customers: 250 },\n  Q2: { revenue: 120000, customers: 280 },\n  Q3: { revenue: 150000, customers: 320 },\n  Q4: { revenue: 180000, customers: 380 }\n};\n\nconst summary = await analyzeData(salesData, 'summarize');\nconst trends = await analyzeData(salesData, 'trend');\nconst recommendations = await analyzeData(salesData, 'recommendation');\n\nconsole.log('Summary:', summary);\nconsole.log('Trends:', trends);\nconsole.log('Recommendations:', recommendations);\n```\n\n### Code Generation and Debugging\n\n```javascript\nimport ZAI from 'z-ai-web-dev-sdk';\n\nclass CodeAssistant {\n  constructor() {\n    this.zai = null;\n  }\n\n  async initialize() {\n    this.zai = await ZAI.create();\n  }\n\n  async generateCode(description, language) {\n    const completion = await this.zai.chat.completions.create({\n      messages: [\n        {\n          role: 'assistant',\n          content: `You are an expert ${language} programmer. Write clean, efficient, and well-commented code.`\n        },\n        {\n          role: 'user',\n          content: `Write ${language} code to: ${description}`\n        }\n      ],\n      thinking: { type: 'disabled' }\n    });\n\n    return completion.choices[0]?.message?.content;\n  }\n\n  async debugCode(code, issue) {\n    const completion = await this.zai.chat.completions.create({\n      messages: [\n        {\n          role: 'assistant',\n          content: 'You are an expert debugger. Identify bugs and suggest fixes.'\n        },\n        {\n          role: 'user',\n          content: `Code:\\n${code}\\n\\nIssue: ${issue}\\n\\nFind the bug and suggest a fix.`\n        }\n      ],\n      thinking: { type: 'disabled' }\n    });\n\n    return completion.choices[0]?.message?.content;\n  }\n\n  async explainCode(code) {\n    const completion = await this.zai.chat.completions.create({\n      messages: [\n        {\n          role: 'assistant',\n          content: 'You are a programming teacher. Explain code clearly and simply.'\n        },\n        {\n          role: 'user',\n          content: `Explain what this code does:\\n\\n${code}`\n        }\n      ],\n      thinking: { type: 'disabled' }\n    });\n\n    return completion.choices[0]?.message?.content;\n  }\n}\n\n\u002F\u002F Usage\nconst codeAssist = new CodeAssistant();\nawait codeAssist.initialize();\n\nconst newCode = await codeAssist.generateCode(\n  'Create a function that sorts an array of objects by a specific property',\n  'JavaScript'\n);\nconsole.log('Generated Code:', newCode);\n\nconst bugFix = await codeAssist.debugCode(\n  'function add(a, b) { return a - b; }',\n  'This function should add numbers but returns wrong results'\n);\nconsole.log('Debug Suggestion:', bugFix);\n```\n\n## Best Practices\n\n### 1. Prompt Engineering\n\n```javascript\n\u002F\u002F Bad: Vague prompt\nconst bad = await askQuestion('Tell me about AI');\n\n\u002F\u002F Good: Specific and structured prompt\nasync function askWithContext(topic, format, audience) {\n  const zai = await ZAI.create();\n  \n  const completion = await zai.chat.completions.create({\n    messages: [\n      {\n        role: 'assistant',\n        content: `You are an expert educator. Explain topics clearly for ${audience}.`\n      },\n      {\n        role: 'user',\n        content: `Explain ${topic} in ${format} format. Include practical examples.`\n      }\n    ],\n    thinking: { type: 'disabled' }\n  });\n\n  return completion.choices[0]?.message?.content;\n}\n\nconst good = await askWithContext('artificial intelligence', 'bullet points', 'beginners');\n```\n\n### 2. Error Handling\n\n```javascript\nimport ZAI from 'z-ai-web-dev-sdk';\n\nasync function safeCompletion(messages, retries = 3) {\n  let lastError;\n\n  for (let attempt = 1; attempt \u003C= retries; attempt++) {\n    try {\n      const zai = await ZAI.create();\n\n      const completion = await zai.chat.completions.create({\n        messages: messages,\n        thinking: { type: 'disabled' }\n      });\n\n      const response = completion.choices[0]?.message?.content;\n\n      if (!response || response.trim().length === 0) {\n        throw new Error('Empty response from AI');\n      }\n\n      return {\n        success: true,\n        content: response,\n        attempts: attempt\n      };\n    } catch (error) {\n      lastError = error;\n      console.error(`Attempt ${attempt} failed:`, error.message);\n\n      if (attempt \u003C retries) {\n        \u002F\u002F Wait before retry (exponential backoff)\n        await new Promise(resolve => setTimeout(resolve, 1000 * attempt));\n      }\n    }\n  }\n\n  return {\n    success: false,\n    error: lastError.message,\n    attempts: retries\n  };\n}\n```\n\n### 3. Context Management\n\n```javascript\nclass ManagedConversation {\n  constructor(maxMessages = 20) {\n    this.maxMessages = maxMessages;\n    this.systemPrompt = '';\n    this.messages = [];\n    this.zai = null;\n  }\n\n  async initialize(systemPrompt) {\n    this.zai = await ZAI.create();\n    this.systemPrompt = systemPrompt;\n    this.messages = [\n      {\n        role: 'assistant',\n        content: systemPrompt\n      }\n    ];\n  }\n\n  async chat(userMessage) {\n    \u002F\u002F Add user message\n    this.messages.push({\n      role: 'user',\n      content: userMessage\n    });\n\n    \u002F\u002F Trim old messages if exceeding limit (keep system prompt)\n    if (this.messages.length > this.maxMessages) {\n      this.messages = [\n        this.messages[0], \u002F\u002F Keep system prompt\n        ...this.messages.slice(-(this.maxMessages - 1))\n      ];\n    }\n\n    const completion = await this.zai.chat.completions.create({\n      messages: this.messages,\n      thinking: { type: 'disabled' }\n    });\n\n    const response = completion.choices[0]?.message?.content;\n\n    this.messages.push({\n      role: 'assistant',\n      content: response\n    });\n\n    return response;\n  }\n\n  getTokenEstimate() {\n    \u002F\u002F Rough estimate: ~4 characters per token\n    const totalChars = this.messages\n      .map(m => m.content.length)\n      .reduce((a, b) => a + b, 0);\n    return Math.ceil(totalChars \u002F 4);\n  }\n}\n```\n\n### 4. Response Processing\n\n```javascript\nasync function getStructuredResponse(query, format = 'json') {\n  const zai = await ZAI.create();\n\n  const formatInstructions = {\n    json: 'Respond with valid JSON only. No additional text.',\n    list: 'Respond with a numbered list.',\n    markdown: 'Respond in Markdown format.'\n  };\n\n  const completion = await zai.chat.completions.create({\n    messages: [\n      {\n        role: 'assistant',\n        content: `You are a helpful assistant. ${formatInstructions[format]}`\n      },\n      {\n        role: 'user',\n        content: query\n      }\n    ],\n    thinking: { type: 'disabled' }\n  });\n\n  const response = completion.choices[0]?.message?.content;\n\n  \u002F\u002F Parse JSON if requested\n  if (format === 'json') {\n    try {\n      return JSON.parse(response);\n    } catch (e) {\n      console.error('Failed to parse JSON response');\n      return { raw: response };\n    }\n  }\n\n  return response;\n}\n\n\u002F\u002F Usage\nconst jsonData = await getStructuredResponse(\n  'List three programming languages with their primary use cases',\n  'json'\n);\nconsole.log(jsonData);\n```\n\n## Common Use Cases\n\n1. **Chatbots & Virtual Assistants**: Build conversational interfaces for customer support\n2. **Content Generation**: Create articles, product descriptions, marketing copy\n3. **Code Assistance**: Generate, explain, and debug code\n4. **Data Analysis**: Analyze and summarize complex data sets\n5. **Language Translation**: Translate text between languages\n6. **Educational Tools**: Create tutoring and learning applications\n7. **Email Automation**: Generate professional email responses\n8. **Creative Writing**: Story generation, poetry, and creative content\n\n## Integration Examples\n\n### Express.js Chatbot API\n\n```javascript\nimport express from 'express';\nimport ZAI from 'z-ai-web-dev-sdk';\n\nconst app = express();\napp.use(express.json());\n\n\u002F\u002F Store conversations in memory (use database in production)\nconst conversations = new Map();\n\nlet zaiInstance;\n\nasync function initZAI() {\n  zaiInstance = await ZAI.create();\n}\n\napp.post('\u002Fapi\u002Fchat', async (req, res) => {\n  try {\n    const { sessionId, message, systemPrompt } = req.body;\n\n    if (!message) {\n      return res.status(400).json({ error: 'Message is required' });\n    }\n\n    \u002F\u002F Get or create conversation history\n    let history = conversations.get(sessionId) || [\n      {\n        role: 'assistant',\n        content: systemPrompt || 'You are a helpful assistant.'\n      }\n    ];\n\n    \u002F\u002F Add user message\n    history.push({\n      role: 'user',\n      content: message\n    });\n\n    \u002F\u002F Get completion\n    const completion = await zaiInstance.chat.completions.create({\n      messages: history,\n      thinking: { type: 'disabled' }\n    });\n\n    const aiResponse = completion.choices[0]?.message?.content;\n\n    \u002F\u002F Add AI response to history\n    history.push({\n      role: 'assistant',\n      content: aiResponse\n    });\n\n    \u002F\u002F Save updated history\n    conversations.set(sessionId, history);\n\n    res.json({\n      success: true,\n      response: aiResponse,\n      messageCount: history.length - 1\n    });\n  } catch (error) {\n    res.status(500).json({\n      success: false,\n      error: error.message\n    });\n  }\n});\n\napp.delete('\u002Fapi\u002Fchat\u002F:sessionId', (req, res) => {\n  const { sessionId } = req.params;\n  conversations.delete(sessionId);\n  res.json({ success: true, message: 'Conversation cleared' });\n});\n\ninitZAI().then(() => {\n  app.listen(3000, () => {\n    console.log('Chatbot API running on port 3000');\n  });\n});\n```\n\n## Troubleshooting\n\n**Issue**: \"SDK must be used in backend\"\n- **Solution**: Ensure z-ai-web-dev-sdk is only imported and used in server-side code\n\n**Issue**: Empty or incomplete responses\n- **Solution**: Check that completion.choices[0]?.message?.content exists and is not empty\n\n**Issue**: Conversation context getting too long\n- **Solution**: Implement message trimming to keep only recent messages\n\n**Issue**: Inconsistent responses\n- **Solution**: Use more specific system prompts and provide clear instructions\n\n**Issue**: Rate limiting errors\n- **Solution**: Implement retry logic with exponential backoff\n\n## Performance Tips\n\n1. **Reuse SDK Instance**: Create ZAI instance once and reuse across requests\n2. **Manage Context Length**: Trim old messages to avoid token limits\n3. **Implement Caching**: Cache responses for common queries\n4. **Use Specific Prompts**: Clear prompts lead to faster, better responses\n5. **Handle Errors Gracefully**: Implement retry logic and fallback responses\n\n## Security Considerations\n\n1. **Input Validation**: Always validate and sanitize user input\n2. **Rate Limiting**: Implement rate limits to prevent abuse\n3. **API Key Protection**: Never expose SDK credentials in client-side code\n4. **Content Filtering**: Filter sensitive or inappropriate content\n5. **Session Management**: Implement proper session handling and cleanup\n\n## Remember\n\n- Always use z-ai-web-dev-sdk in backend code only\n- The SDK is already installed - import as shown in examples\n- Use the 'assistant' role for system prompts\n- Set thinking to { type: 'disabled' } for standard completions\n- Implement proper error handling and retries for production\n- Manage conversation history to avoid token limits\n- Clear and specific prompts lead to better results\n- Check `scripts\u002Fchat.ts` for a quick start example\n","# LLM (Large Language Model) Skill\n\nThis skill guides the implementation of chat completions functionality using the z-ai-web-dev-sdk package, enabling powerful conversational AI and text generation capabilities.\n\n## Skills Path\n\n**Skill Location**: `{project_path}\u002Fskills\u002Fllm`\n\nthis skill is located at above path in your project.\n\n**Reference Scripts**: Example test scripts are available in the `{Skill Location}\u002Fscripts\u002F` directory for quick testing and reference. See `{Skill Location}\u002Fscripts\u002Fchat.ts` for a working example.\n\n## Overview\n\nThe LLM skill allows you to build applications that leverage large language models for natural language understanding and generation, including chatbots, AI assistants, content generation, and more.\n\n**IMPORTANT**: z-ai-web-dev-sdk MUST be used in backend code only. Never use it in client-side code.\n\n## Prerequisites\n\nThe z-ai-web-dev-sdk package is already installed. Import it as shown in the examples below.\n\n## CLI Usage (For Simple Tasks)\n\nFor simple, one-off chat completions, you can use the z-ai CLI instead of writing code. This is ideal for quick tests, simple queries, or automation scripts.\n\n### Basic Chat\n\n```bash\n# Simple question\nz-ai chat --prompt \"What is the capital of France?\"\n\n# Save response to file\nz-ai chat -p \"Explain quantum computing\" -o response.json\n\n# Stream the response\nz-ai chat -p \"Write a short poem\" --stream\n```\n\n### With System Prompt\n\n```bash\n# Custom system prompt for specific behavior\nz-ai chat \\\n  --prompt \"Review this code: function add(a,b) { return a+b; }\" \\\n  --system \"You are an expert code reviewer\" \\\n  -o review.json\n```\n\n### With Thinking (Chain of Thought)\n\n```bash\n# Enable thinking for complex reasoning\nz-ai chat \\\n  --prompt \"Solve this math problem: If a train travels 120km in 2 hours, what's its speed?\" \\\n  --thinking \\\n  -o solution.json\n```\n\n### CLI Parameters\n\n- `--prompt, -p \u003Ctext>`: **Required** - User message content\n- `--system, -s \u003Ctext>`: Optional - System prompt for custom behavior\n- `--thinking, -t`: Optional - Enable chain-of-thought reasoning (default: disabled)\n- `--output, -o \u003Cpath>`: Optional - Output file path (JSON format)\n- `--stream`: Optional - Stream the response in real-time\n\n### When to Use CLI vs SDK\n\n**Use CLI for:**\n- Quick one-off questions\n- Simple automation scripts\n- Testing prompts\n- Single-turn conversations\n\n**Use SDK for:**\n- Multi-turn conversations with context\n- Custom conversation management\n- Integration with web applications\n- Complex chat workflows\n- Production applications\n\n## Basic Chat Completions\n\n### Simple Question and Answer\n\n```javascript\nimport ZAI from 'z-ai-web-dev-sdk';\n\nasync function askQuestion(question) {\n  const zai = await ZAI.create();\n\n  const completion = await zai.chat.completions.create({\n    messages: [\n      {\n        role: 'assistant',\n        content: 'You are a helpful assistant.'\n      },\n      {\n        role: 'user',\n        content: question\n      }\n    ],\n    thinking: { type: 'disabled' }\n  });\n\n  const response = completion.choices[0]?.message?.content;\n  return response;\n}\n\n\u002F\u002F Usage\nconst answer = await askQuestion('What is the capital of France?');\nconsole.log('Answer:', answer);\n```\n\n### Custom System Prompt\n\n```javascript\nimport ZAI from 'z-ai-web-dev-sdk';\n\nasync function customAssistant(systemPrompt, userMessage) {\n  const zai = await ZAI.create();\n\n  const completion = await zai.chat.completions.create({\n    messages: [\n      {\n        role: 'assistant',\n        content: systemPrompt\n      },\n      {\n        role: 'user',\n        content: userMessage\n      }\n    ],\n    thinking: { type: 'disabled' }\n  });\n\n  return completion.choices[0]?.message?.content;\n}\n\n\u002F\u002F Usage - Code reviewer\nconst codeReview = await customAssistant(\n  'You are an expert code reviewer. Analyze code for bugs, performance issues, and best practices.',\n  'Review this function: function add(a, b) { return a + b; }'\n);\n\n\u002F\u002F Usage - Creative writer\nconst story = await customAssistant(\n  'You are a creative fiction writer who writes engaging short stories.',\n  'Write a short story about a robot learning to paint.'\n);\n\nconsole.log(codeReview);\nconsole.log(story);\n```\n\n## Multi-turn Conversations\n\n### Conversation History Management\n\n```javascript\nimport ZAI from 'z-ai-web-dev-sdk';\n\nclass ConversationManager {\n  constructor(systemPrompt = 'You are a helpful assistant.') {\n    this.messages = [\n      {\n        role: 'assistant',\n        content: systemPrompt\n      }\n    ];\n    this.zai = null;\n  }\n\n  async initialize() {\n    this.zai = await ZAI.create();\n  }\n\n  async sendMessage(userMessage) {\n    \u002F\u002F Add user message to history\n    this.messages.push({\n      role: 'user',\n      content: userMessage\n    });\n\n    \u002F\u002F Get completion\n    const completion = await this.zai.chat.completions.create({\n      messages: this.messages,\n      thinking: { type: 'disabled' }\n    });\n\n    const assistantResponse = completion.choices[0]?.message?.content;\n\n    \u002F\u002F Add assistant response to history\n    this.messages.push({\n      role: 'assistant',\n      content: assistantResponse\n    });\n\n    return assistantResponse;\n  }\n\n  getHistory() {\n    return this.messages;\n  }\n\n  clearHistory(systemPrompt = 'You are a helpful assistant.') {\n    this.messages = [\n      {\n        role: 'assistant',\n        content: systemPrompt\n      }\n    ];\n  }\n\n  getMessageCount() {\n    \u002F\u002F Subtract 1 for system message\n    return this.messages.length - 1;\n  }\n}\n\n\u002F\u002F Usage\nconst conversation = new ConversationManager();\nawait conversation.initialize();\n\nconst response1 = await conversation.sendMessage('Hi, my name is John.');\nconsole.log('AI:', response1);\n\nconst response2 = await conversation.sendMessage('What is my name?');\nconsole.log('AI:', response2); \u002F\u002F Should remember the name is John\n\nconsole.log('Total messages:', conversation.getMessageCount());\n```\n\n### Context-Aware Conversations\n\n```javascript\nimport ZAI from 'z-ai-web-dev-sdk';\n\nclass ContextualChat {\n  constructor() {\n    this.messages = [];\n    this.zai = null;\n  }\n\n  async initialize() {\n    this.zai = await ZAI.create();\n  }\n\n  async startConversation(role, context) {\n    \u002F\u002F Set up system prompt with context\n    const systemPrompt = `You are ${role}. Context: ${context}`;\n    \n    this.messages = [\n      {\n        role: 'assistant',\n        content: systemPrompt\n      }\n    ];\n  }\n\n  async chat(userMessage) {\n    this.messages.push({\n      role: 'user',\n      content: userMessage\n    });\n\n    const completion = await this.zai.chat.completions.create({\n      messages: this.messages,\n      thinking: { type: 'disabled' }\n    });\n\n    const response = completion.choices[0]?.message?.content;\n\n    this.messages.push({\n      role: 'assistant',\n      content: response\n    });\n\n    return response;\n  }\n}\n\n\u002F\u002F Usage - Customer support scenario\nconst support = new ContextualChat();\nawait support.initialize();\n\nawait support.startConversation(\n  'a customer support agent for TechCorp',\n  'The user has ordered product #12345 which is delayed due to shipping issues.'\n);\n\nconst reply1 = await support.chat('Where is my order?');\nconsole.log('Support:', reply1);\n\nconst reply2 = await support.chat('Can I get a refund?');\nconsole.log('Support:', reply2);\n```\n\n## Advanced Use Cases\n\n### Content Generation\n\n```javascript\nimport ZAI from 'z-ai-web-dev-sdk';\n\nclass ContentGenerator {\n  constructor() {\n    this.zai = null;\n  }\n\n  async initialize() {\n    this.zai = await ZAI.create();\n  }\n\n  async generateBlogPost(topic, tone = 'professional') {\n    const completion = await this.zai.chat.completions.create({\n      messages: [\n        {\n          role: 'assistant',\n          content: `You are a professional content writer. Write in a ${tone} tone.`\n        },\n        {\n          role: 'user',\n          content: `Write a blog post about: ${topic}. Include an introduction, main points, and conclusion.`\n        }\n      ],\n      thinking: { type: 'disabled' }\n    });\n\n    return completion.choices[0]?.message?.content;\n  }\n\n  async generateProductDescription(productName, features) {\n    const completion = await this.zai.chat.completions.create({\n      messages: [\n        {\n          role: 'assistant',\n          content: 'You are an expert at writing compelling product descriptions for e-commerce.'\n        },\n        {\n          role: 'user',\n          content: `Write a product description for \"${productName}\". Key features: ${features.join(', ')}.`\n        }\n      ],\n      thinking: { type: 'disabled' }\n    });\n\n    return completion.choices[0]?.message?.content;\n  }\n\n  async generateEmailResponse(originalEmail, intent) {\n    const completion = await this.zai.chat.completions.create({\n      messages: [\n        {\n          role: 'assistant',\n          content: 'You are a professional email writer. Write clear, concise, and polite emails.'\n        },\n        {\n          role: 'user',\n          content: `Original email: \"${originalEmail}\"\\n\\nWrite a ${intent} response.`\n        }\n      ],\n      thinking: { type: 'disabled' }\n    });\n\n    return completion.choices[0]?.message?.content;\n  }\n}\n\n\u002F\u002F Usage\nconst generator = new ContentGenerator();\nawait generator.initialize();\n\nconst blogPost = await generator.generateBlogPost(\n  'The Future of Artificial Intelligence',\n  'informative'\n);\nconsole.log('Blog Post:', blogPost);\n\nconst productDesc = await generator.generateProductDescription(\n  'Smart Watch Pro',\n  ['Heart rate monitoring', 'GPS tracking', 'Waterproof', '7-day battery life']\n);\nconsole.log('Product Description:', productDesc);\n```\n\n### Data Analysis and Summarization\n\n```javascript\nimport ZAI from 'z-ai-web-dev-sdk';\n\nasync function analyzeData(data, analysisType) {\n  const zai = await ZAI.create();\n\n  const prompts = {\n    summarize: 'You are a data analyst. Summarize the key insights from the data.',\n    trend: 'You are a data analyst. Identify trends and patterns in the data.',\n    recommendation: 'You are a business analyst. Provide actionable recommendations based on the data.'\n  };\n\n  const completion = await zai.chat.completions.create({\n    messages: [\n      {\n        role: 'assistant',\n        content: prompts[analysisType] || prompts.summarize\n      },\n      {\n        role: 'user',\n        content: `Analyze this data:\\n\\n${JSON.stringify(data, null, 2)}`\n      }\n    ],\n    thinking: { type: 'disabled' }\n  });\n\n  return completion.choices[0]?.message?.content;\n}\n\n\u002F\u002F Usage\nconst salesData = {\n  Q1: { revenue: 100000, customers: 250 },\n  Q2: { revenue: 120000, customers: 280 },\n  Q3: { revenue: 150000, customers: 320 },\n  Q4: { revenue: 180000, customers: 380 }\n};\n\nconst summary = await analyzeData(salesData, 'summarize');\nconst trends = await analyzeData(salesData, 'trend');\nconst recommendations = await analyzeData(salesData, 'recommendation');\n\nconsole.log('Summary:', summary);\nconsole.log('Trends:', trends);\nconsole.log('Recommendations:', recommendations);\n```\n\n### Code Generation and Debugging\n\n```javascript\nimport ZAI from 'z-ai-web-dev-sdk';\n\nclass CodeAssistant {\n  constructor() {\n    this.zai = null;\n  }\n\n  async initialize() {\n    this.zai = await ZAI.create();\n  }\n\n  async generateCode(description, language) {\n    const completion = await this.zai.chat.completions.create({\n      messages: [\n        {\n          role: 'assistant',\n          content: `You are an expert ${language} programmer. Write clean, efficient, and well-commented code.`\n        },\n        {\n          role: 'user',\n          content: `Write ${language} code to: ${description}`\n        }\n      ],\n      thinking: { type: 'disabled' }\n    });\n\n    return completion.choices[0]?.message?.content;\n  }\n\n  async debugCode(code, issue) {\n    const completion = await this.zai.chat.completions.create({\n      messages: [\n        {\n          role: 'assistant',\n          content: 'You are an expert debugger. Identify bugs and suggest fixes.'\n        },\n        {\n          role: 'user',\n          content: `Code:\\n${code}\\n\\nIssue: ${issue}\\n\\nFind the bug and suggest a fix.`\n        }\n      ],\n      thinking: { type: 'disabled' }\n    });\n\n    return completion.choices[0]?.message?.content;\n  }\n\n  async explainCode(code) {\n    const completion = await this.zai.chat.completions.create({\n      messages: [\n        {\n          role: 'assistant',\n          content: 'You are a programming teacher. Explain code clearly and simply.'\n        },\n        {\n          role: 'user',\n          content: `Explain what this code does:\\n\\n${code}`\n        }\n      ],\n      thinking: { type: 'disabled' }\n    });\n\n    return completion.choices[0]?.message?.content;\n  }\n}\n\n\u002F\u002F Usage\nconst codeAssist = new CodeAssistant();\nawait codeAssist.initialize();\n\nconst newCode = await codeAssist.generateCode(\n  'Create a function that sorts an array of objects by a specific property',\n  'JavaScript'\n);\nconsole.log('Generated Code:', newCode);\n\nconst bugFix = await codeAssist.debugCode(\n  'function add(a, b) { return a - b; }',\n  'This function should add numbers but returns wrong results'\n);\nconsole.log('Debug Suggestion:', bugFix);\n```\n\n## Best Practices\n\n### 1. Prompt Engineering\n\n```javascript\n\u002F\u002F Bad: Vague prompt\nconst bad = await askQuestion('Tell me about AI');\n\n\u002F\u002F Good: Specific and structured prompt\nasync function askWithContext(topic, format, audience) {\n  const zai = await ZAI.create();\n  \n  const completion = await zai.chat.completions.create({\n    messages: [\n      {\n        role: 'assistant',\n        content: `You are an expert educator. Explain topics clearly for ${audience}.`\n      },\n      {\n        role: 'user',\n        content: `Explain ${topic} in ${format} format. Include practical examples.`\n      }\n    ],\n    thinking: { type: 'disabled' }\n  });\n\n  return completion.choices[0]?.message?.content;\n}\n\nconst good = await askWithContext('artificial intelligence', 'bullet points', 'beginners');\n```\n\n### 2. Error Handling\n\n```javascript\nimport ZAI from 'z-ai-web-dev-sdk';\n\nasync function safeCompletion(messages, retries = 3) {\n  let lastError;\n\n  for (let attempt = 1; attempt \u003C= retries; attempt++) {\n    try {\n      const zai = await ZAI.create();\n\n      const completion = await zai.chat.completions.create({\n        messages: messages,\n        thinking: { type: 'disabled' }\n      });\n\n      const response = completion.choices[0]?.message?.content;\n\n      if (!response || response.trim().length === 0) {\n        throw new Error('Empty response from AI');\n      }\n\n      return {\n        success: true,\n        content: response,\n        attempts: attempt\n      };\n    } catch (error) {\n      lastError = error;\n      console.error(`Attempt ${attempt} failed:`, error.message);\n\n      if (attempt \u003C retries) {\n        \u002F\u002F Wait before retry (exponential backoff)\n        await new Promise(resolve => setTimeout(resolve, 1000 * attempt));\n      }\n    }\n  }\n\n  return {\n    success: false,\n    error: lastError.message,\n    attempts: retries\n  };\n}\n```\n\n### 3. Context Management\n\n```javascript\nclass ManagedConversation {\n  constructor(maxMessages = 20) {\n    this.maxMessages = maxMessages;\n    this.systemPrompt = '';\n    this.messages = [];\n    this.zai = null;\n  }\n\n  async initialize(systemPrompt) {\n    this.zai = await ZAI.create();\n    this.systemPrompt = systemPrompt;\n    this.messages = [\n      {\n        role: 'assistant',\n        content: systemPrompt\n      }\n    ];\n  }\n\n  async chat(userMessage) {\n    \u002F\u002F Add user message\n    this.messages.push({\n      role: 'user',\n      content: userMessage\n    });\n\n    \u002F\u002F Trim old messages if exceeding limit (keep system prompt)\n    if (this.messages.length > this.maxMessages) {\n      this.messages = [\n        this.messages[0], \u002F\u002F Keep system prompt\n        ...this.messages.slice(-(this.maxMessages - 1))\n      ];\n    }\n\n    const completion = await this.zai.chat.completions.create({\n      messages: this.messages,\n      thinking: { type: 'disabled' }\n    });\n\n    const response = completion.choices[0]?.message?.content;\n\n    this.messages.push({\n      role: 'assistant',\n      content: response\n    });\n\n    return response;\n  }\n\n  getTokenEstimate() {\n    \u002F\u002F Rough estimate: ~4 characters per token\n    const totalChars = this.messages\n      .map(m => m.content.length)\n      .reduce((a, b) => a + b, 0);\n    return Math.ceil(totalChars \u002F 4);\n  }\n}\n```\n\n### 4. Response Processing\n\n```javascript\nasync function getStructuredResponse(query, format = 'json') {\n  const zai = await ZAI.create();\n\n  const formatInstructions = {\n    json: 'Respond with valid JSON only. No additional text.',\n    list: 'Respond with a numbered list.',\n    markdown: 'Respond in Markdown format.'\n  };\n\n  const completion = await zai.chat.completions.create({\n    messages: [\n      {\n        role: 'assistant',\n        content: `You are a helpful assistant. ${formatInstructions[format]}`\n      },\n      {\n        role: 'user',\n        content: query\n      }\n    ],\n    thinking: { type: 'disabled' }\n  });\n\n  const response = completion.choices[0]?.message?.content;\n\n  \u002F\u002F Parse JSON if requested\n  if (format === 'json') {\n    try {\n      return JSON.parse(response);\n    } catch (e) {\n      console.error('Failed to parse JSON response');\n      return { raw: response };\n    }\n  }\n\n  return response;\n}\n\n\u002F\u002F Usage\nconst jsonData = await getStructuredResponse(\n  'List three programming languages with their primary use cases',\n  'json'\n);\nconsole.log(jsonData);\n```\n\n## Common Use Cases\n\n1. **Chatbots & Virtual Assistants**: Build conversational interfaces for customer support\n2. **Content Generation**: Create articles, product descriptions, marketing copy\n3. **Code Assistance**: Generate, explain, and debug code\n4. **Data Analysis**: Analyze and summarize complex data sets\n5. **Language Translation**: Translate text between languages\n6. **Educational Tools**: Create tutoring and learning applications\n7. **Email Automation**: Generate professional email responses\n8. **Creative Writing**: Story generation, poetry, and creative content\n\n## Integration Examples\n\n### Express.js Chatbot API\n\n```javascript\nimport express from 'express';\nimport ZAI from 'z-ai-web-dev-sdk';\n\nconst app = express();\napp.use(express.json());\n\n\u002F\u002F Store conversations in memory (use database in production)\nconst conversations = new Map();\n\nlet zaiInstance;\n\nasync function initZAI() {\n  zaiInstance = await ZAI.create();\n}\n\napp.post('\u002Fapi\u002Fchat', async (req, res) => {\n  try {\n    const { sessionId, message, systemPrompt } = req.body;\n\n    if (!message) {\n      return res.status(400).json({ error: 'Message is required' });\n    }\n\n    \u002F\u002F Get or create conversation history\n    let history = conversations.get(sessionId) || [\n      {\n        role: 'assistant',\n        content: systemPrompt || 'You are a helpful assistant.'\n      }\n    ];\n\n    \u002F\u002F Add user message\n    history.push({\n      role: 'user',\n      content: message\n    });\n\n    \u002F\u002F Get completion\n    const completion = await zaiInstance.chat.completions.create({\n      messages: history,\n      thinking: { type: 'disabled' }\n    });\n\n    const aiResponse = completion.choices[0]?.message?.content;\n\n    \u002F\u002F Add AI response to history\n    history.push({\n      role: 'assistant',\n      content: aiResponse\n    });\n\n    \u002F\u002F Save updated history\n    conversations.set(sessionId, history);\n\n    res.json({\n      success: true,\n      response: aiResponse,\n      messageCount: history.length - 1\n    });\n  } catch (error) {\n    res.status(500).json({\n      success: false,\n      error: error.message\n    });\n  }\n});\n\napp.delete('\u002Fapi\u002Fchat\u002F:sessionId', (req, res) => {\n  const { sessionId } = req.params;\n  conversations.delete(sessionId);\n  res.json({ success: true, message: 'Conversation cleared' });\n});\n\ninitZAI().then(() => {\n  app.listen(3000, () => {\n    console.log('Chatbot API running on port 3000');\n  });\n});\n```\n\n## Troubleshooting\n\n**Issue**: \"SDK must be used in backend\"\n- **Solution**: Ensure z-ai-web-dev-sdk is only imported and used in server-side code\n\n**Issue**: Empty or incomplete responses\n- **Solution**: Check that completion.choices[0]?.message?.content exists and is not empty\n\n**Issue**: Conversation context getting too long\n- **Solution**: Implement message trimming to keep only recent messages\n\n**Issue**: Inconsistent responses\n- **Solution**: Use more specific system prompts and provide clear instructions\n\n**Issue**: Rate limiting errors\n- **Solution**: Implement retry logic with exponential backoff\n\n## Performance Tips\n\n1. **Reuse SDK Instance**: Create ZAI instance once and reuse across requests\n2. **Manage Context Length**: Trim old messages to avoid token limits\n3. **Implement Caching**: Cache responses for common queries\n4. **Use Specific Prompts**: Clear prompts lead to faster, better responses\n5. **Handle Errors Gracefully**: Implement retry logic and fallback responses\n\n## Security Considerations\n\n1. **Input Validation**: Always validate and sanitize user input\n2. **Rate Limiting**: Implement rate limits to prevent abuse\n3. **API Key Protection**: Never expose SDK credentials in client-side code\n4. **Content Filtering**: Filter sensitive or inappropriate content\n5. **Session Management**: Implement proper session handling and cleanup\n\n## Remember\n\n- Always use z-ai-web-dev-sdk in backend code only\n- The SDK is already installed - import as shown in examples\n- Use the 'assistant' role for system prompts\n- Set thinking to { type: 'disabled' } for standard completions\n- Implement proper error handling and retries for production\n- Manage conversation history to avoid token limits\n- Clear and specific prompts lead to better results\n- Check `scripts\u002Fchat.ts` for a quick start example\n",{"name":5,"license":14,"description":7},"main","98424cecddddf49c7a3d5f70f34d8bfff7e74357","skills\u002Fllm","https:\u002F\u002Fgithub.com\u002Fnordeim\u002Fyoga-studio","https:\u002F\u002Fgithub.com\u002Fnordeim","A freelance IT engineer","2026-07-06 19:55:45",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add nordeim\u002Fyoga-studio --skill llm",{"tool":37,"command":38},"bunx","bunx skills add nordeim\u002Fyoga-studio --skill llm",{"tool":40,"command":41},"pnpm","pnpm dlx skills add nordeim\u002Fyoga-studio --skill llm","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fnordeim\u002Fyoga-studio\u002Fblob\u002Fmain\u002Fskills\u002Fllm\u002FSKILL.md",true,[45,50],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":15},"LICENSE.txt","LICENSE","许可证",1080,{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"scripts\u002Fchat.ts","SCRIPT","脚本",758,"https:\u002F\u002Fgithub.com\u002Fnordeim\u002Fyoga-studio\u002Fblob\u002Fmain\u002Fskills\u002Fllm\u002Fscripts\u002Fchat.ts",[57,66,74,82,89,97],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":61,"licenseFileUrl":62,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M783VZ3397F6J78J4FTDJN4S","webapp-testing","Web application testing principles. E2E, Playwright, deep audit strategies.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fnordeim\u002Fyoga-studio\u002Fblob\u002Fmain\u002Fskills\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fnordeim\u002Fyoga-studio\u002Fblob\u002Fmain\u002Fskills\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":70,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M783VE24VSNZVBGZD1S88XCF","web-search","Implement web search capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to search for real-time information from the web, retrieve up-to-date content beyond the knowledge cutoff, or find the latest news and data. Returns structured search results with URLs, snippets, and metadata.","https:\u002F\u002Fgithub.com\u002Fnordeim\u002Fyoga-studio\u002Fblob\u002Fmain\u002Fskills\u002Fweb-search\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fnordeim\u002Fyoga-studio\u002Fblob\u002Fmain\u002Fskills\u002Fweb-search\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":78,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M783V8S6X871D5Z7X8TJDCQS","web-reader","Implement web page content extraction capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to scrape web pages, extract article content, retrieve page metadata, or build applications that process web content. Supports automatic content extraction with title, HTML, and publication time retrieval.","https:\u002F\u002Fgithub.com\u002Fnordeim\u002Fyoga-studio\u002Fblob\u002Fmain\u002Fskills\u002Fweb-reader\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fnordeim\u002Fyoga-studio\u002Fblob\u002Fmain\u002Fskills\u002Fweb-reader\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M783V2QN3TQBPB06WK5C3PED","web-frameworks","Build modern full-stack web applications with Next.js 16 + React 19 (App Router, Server Components, RSC, PPR, cacheComponents, async params, SSR, SSG, ISR, standalone output), Turborepo (monorepo, task pipelines, remote caching, parallel execution), and RemixIcon (3100+ SVG icons). Use when creating React applications, implementing server-side rendering, setting up monorepos, optimizing build performance and caching, or working with TypeScript full-stack projects.","https:\u002F\u002Fgithub.com\u002Fnordeim\u002Fyoga-studio\u002Fblob\u002Fmain\u002Fskills\u002Fweb-frameworks\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":93,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M783TJF06W3R5KVKWH4AGVE5","video-understand","Implement specialized video understanding capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to analyze video content, understand motion and temporal sequences, extract information from video frames, describe video scenes, or perform video-based AI analysis. Optimized for MP4, AVI, MOV, and other common video formats.","https:\u002F\u002Fgithub.com\u002Fnordeim\u002Fyoga-studio\u002Fblob\u002Fmain\u002Fskills\u002Fvideo-understand\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fnordeim\u002Fyoga-studio\u002Fblob\u002Fmain\u002Fskills\u002Fvideo-understand\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":101,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M783TC8J5JMJY4369A7HCJ3G","video-generation","Implement AI-powered video generation capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to generate videos from text prompts or images, create video content programmatically, or build applications that produce video outputs. Supports asynchronous task management with status polling and result retrieval.","https:\u002F\u002Fgithub.com\u002Fnordeim\u002Fyoga-studio\u002Fblob\u002Fmain\u002Fskills\u002Fvideo-generation\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fnordeim\u002Fyoga-studio\u002Fblob\u002Fmain\u002Fskills\u002Fvideo-generation\u002FSKILL.md",[],[]]