Back to Prompt Library
implementation
Qwen 2 for Skill Description and Vibe Coding Generation
Inspect the original prompt language first, then copy or adapt it once you know how it fits your workflow.
Linked challenge: SkillProof Document Agent
Format
Code-aware
Lines
19
Sections
5
Linked challenge
SkillProof Document Agent
Prompt source
Original prompt text with formatting preserved for inspection.
19 lines
5 sections
No variables
1 code block
Implement a Mastra AI tool that uses Qwen 2 to generate a detailed `descriptionGenerated` based on a user's `skill_description` and `experience_years`. Additionally, use Qwen 2 to generate a `vibeCodingAssessment` (e.g., 'Analytical', 'Collaborative') based on the skill. Show how this tool is called by your Mastra AI agent and updates the 'SkillProof' document in memory.
```typescript
import { createTool } from '@mastra-ai/core';
import { Qwen2 } from '@mastra-ai/llm-qwen2'; // Conceptual Qwen2 Mastra integration
const qwen2_llm = new Qwen2({ apiKey: 'YOUR_QWEN_API_KEY' });
const generateSkillContentTool = createTool({
name: 'generateSkillContent',
description: 'Generates a skill description and vibe coding assessment using Qwen 2.',
input: { type: 'object', properties: { skillDescription: { type: 'string' }, experienceYears: { type: 'number' } } },
output: { type: 'object', properties: { description: { type: 'string' }, vibeCoding: { type: 'string' } } },
async handler({ skillDescription, experienceYears }) {
const prompt = `Generate a detailed skill description for someone with ${experienceYears} years of experience in '${skillDescription}'. Also, provide 3-4 keywords for their 'vibe coding' based on this skill (e.g., 'Analytical, Problem-Solver').\nDescription: \nVibe Coding:`;
// const response = await qwen2_llm.generate({ prompt });
// Parse response into description and vibeCoding
return { description: 'Generated description...', vibeCoding: 'Generated vibe codes...' };
},
});
// Agent would call this tool and update its internal SkillProofDocument state.
```Adaptation plan
Keep the source stable, then change the prompt in a predictable order so the next run is easier to evaluate.
Keep stable
Hold the task contract and output shape stable so generated implementations remain comparable.
Tune next
Update libraries, interfaces, and environment assumptions to match the stack you actually run.
Verify after
Test failure handling, edge cases, and any code paths that depend on hidden context or secrets.