Learn prompt engineering techniques to get better, more accurate code from ViAgen6.
ViAgen6 is trained to understand context and generate production-ready code. The quality of your output depends heavily on the quality of your input. Follow these principles for best results.
"Create a user form"
"Create a React user registration form with email, password (min 8 chars), and confirm password fields. Use React Hook Form with Zod validation. Show inline errors."
Create a REST API endpoint for user authentication. Tech Stack: - Node.js with Express - TypeScript - Prisma ORM with PostgreSQL - JWT for tokens - bcrypt for password hashing Include proper error handling and TypeScript types.
Tell ViAgen6 about your existing code structure:
I have an existing Next.js 14 app with: - /app directory structure - Tailwind CSS - shadcn/ui components - Zustand for state management Add a dark mode toggle that persists to localStorage and respects system preferences on first load.
Tell ViAgen6 exactly what "good code" means for your use case:
Write this function with: - Full TypeScript types (no 'any') - JSDoc comments - Error handling with custom error classes - Unit tests using Vitest - Edge case handling for null/undefined
Build on previous responses to refine the code:
Tell ViAgen6 what NOT to do:
Create a date picker component. DO NOT: - Use any external date libraries (no moment, date-fns) - Use inline styles - Use class components - Hardcode any text (must support i18n)
Show ViAgen6 patterns you want to follow:
Create a new API route following this pattern:
// Existing pattern:
export async function GET(request: Request) {
try {
const data = await fetchData();
return Response.json({ success: true, data });
} catch (error) {
return Response.json({ success: false, error: error.message }, { status: 500 });
}
}
Now create a POST route for creating orders with the same pattern.
Use these keyboard shortcuts in Vigthoria Coder:
Select code before opening chat to automatically include it as context. ViAgen6 will understand you're asking about that specific code.
Save these templates for common tasks:
Code Review Template: Review this code for: 1. Security vulnerabilities 2. Performance issues 3. Best practice violations 4. Potential bugs Suggest specific improvements with code examples.
Refactoring Template: Refactor this code to: - Improve readability - Follow [React/Vue/Angular] best practices - Extract reusable functions - Add proper TypeScript types Keep the same functionality but make it cleaner.
Bug Fix Template: This code has a bug: [describe the issue] Expected behavior: [what should happen] Actual behavior: [what's happening] Find the bug and fix it. Explain what was wrong.