UNPKG

opencode-agent-kit

Version:

Multi-stack OpenCode agent toolkit โ€” 33+ specialized AI agents, 200+ skills, 46 commands, 8 MCP servers (Nuxt, React, Node.js, Laravel, CI3, Android, Flutter, DevOps, SEO, SonarQube, and more)

510 lines (357 loc) โ€ข 11.1 kB
# ๐Ÿš€ Frontend Developer Agent - Quick Start Panduan cepat untuk mulai menggunakan Frontend Developer Agent. --- ## โœ… Instalasi Selesai! Agent Frontend Developer telah diinstall dengan lengkap: ``` .opencode/ โ”œโ”€โ”€ agents/ โ”‚ โ”œโ”€โ”€ frontend-developer.md # Agent definition (773 lines) โ”‚ โ”œโ”€โ”€ README.md # User guide lengkap (505 lines) โ”‚ โ”œโ”€โ”€ WORKFLOWS.md # 8 workflow examples (758 lines) โ”‚ โ”œโ”€โ”€ CHEATSHEET.md # Quick reference (621 lines) โ”‚ โ””โ”€โ”€ QUICK_START.md # File ini โ””โ”€โ”€ config.json # OpenCode configuration ``` **Total: 2,687 lines** dokumentasi dan konfigurasi profesional! --- ## ๐ŸŽฏ Cara Menggunakan (3 Langkah) ### 1๏ธโƒฃ Aktivasi Agent Di terminal OpenCode, ketik: ```bash @frontend-developer Hello! Tolong analyze project structure ini. ``` ### 2๏ธโƒฃ Agent Akan Load Skills Agent otomatis akan load skills yang dibutuhkan: ``` โœ“ coding-standards โœ“ frontend-patterns โœ“ impeccable โœ“ web-design-guidelines ``` ### 3๏ธโƒฃ Mulai Development! ```bash @frontend-developer Buat component Button dengan: - 5 variants (primary, secondary, success, error, ghost) - 3 sizes (sm, md, lg) - Loading state - Icon support - Accessible (ARIA + keyboard) - File: app/components/ui/Button.vue ``` **That's it!** Agent akan: - Membuat component dengan TypeScript strict mode - Implement accessibility standards - Add proper error handling - Follow Nuxt 4 best practices - Include usage examples --- ## ๐Ÿ“š Dokumentasi Tersedia ### 1. **README.md** - Panduan Lengkap - Penjelasan semua skills - 5 contoh penggunaan konkret - Tips & best practices - Troubleshooting guide - Advanced usage - Memory management **Baca ini:** Untuk memahami capabilities lengkap agent. ### 2. **WORKFLOWS.md** - 8 Workflow Examples - โœ… Membuat Component Library - โœ… Performance Optimization - โœ… Implementasi Design Figma - โœ… Form dengan Validation - โœ… Testing Integration - โœ… Dark Mode Implementation - โœ… Progressive Enhancement - โœ… Analytics Integration **Baca ini:** Untuk workflow step-by-step pada skenario umum. ### 3. **CHEATSHEET.md** - Quick Reference - Quick commands - Common patterns - Code snippets - Keyboard shortcuts - Emergency commands - Pro tips **Baca ini:** Keep this open saat coding! ### 4. **frontend-developer.md** - Agent Definition - Core identity & responsibilities - Technical skills integration - Memory management system - Working methodology - Quality standards - Framework expertise **Baca ini:** Untuk memahami bagaimana agent bekerja internally. --- ## ๐Ÿ’ก Contoh Use Cases ### Use Case 1: Buat Komponen Baru ```bash @frontend-developer Buat MarketCard component untuk display: - Market name + description - Current odds - Volume traded - End date countdown - "Place Bet" button Gunakan Nuxt UI Card sebagai base. ``` ### Use Case 2: Fix Performance Issue ```bash @frontend-developer Dashboard page lemot saat render 500+ markets. Load skill `frontend-patterns` dan optimize. ``` ### Use Case 3: Implement Design ```bash @frontend-developer Implement hero section dengan aesthetic bold & futuristic: - Large gradient text - Animated background (particles atau geometric) - Glassmorphism card - Smooth scroll indicators [Attach Figma screenshot] ``` ### Use Case 4: Add Accessibility ```bash @frontend-developer Load skill `web-design-guidelines` dan audit app/components/Modal.vue untuk accessibility issues. Fix all issues. ``` ### Use Case 5: Review Code ```bash @frontend-developer Review app/pages/markets/create.vue untuk: - Performance issues - Accessibility compliance - Security concerns - Best practices violations Provide actionable fixes. ``` --- ## ๐ŸŽจ Skills Reference Agent punya akses ke 10+ skills dari repository Anda: ### Core Skills (Auto-loaded) - **coding-standards** - Universal best practices - **frontend-patterns** - Vue/Nuxt patterns - **impeccable** - Design intelligence (typography, color, layout, motion, critique) - **web-design-guidelines** - UI/UX compliance ### Contextual Skills (On-demand) - **nuxt-ui** - Nuxt UI components - **vercel-composition-patterns** - Advanced composition patterns - **building-components** - Component library creation - **security-review** - Security best practices - **tdd-workflow** - Test-driven development ### How to Load Skills Manually ```bash @frontend-developer Load skill `nuxt-ui` untuk help me build complex form ``` --- ## ๐Ÿ”ง Konfigurasi Agent sudah dikonfigurasi di `.opencode/config.json`: ```json { "agent": { "frontend": { "description": "Expert frontend developer", "mode": "subagent", "model": "anthropic/claude-sonnet-4-20250514", "temperature": 0.4, "permission": { "edit": "allow", "bash": { "npm *": "allow", "git status": "allow" }, "skill": { "*": "allow" } } } } } ``` **Customize** jika perlu: - Change `mode` to `"primary"` untuk make it default agent - Adjust `temperature` (0.0-1.0) untuk control creativity - Modify `permission` untuk restrict/allow actions --- ## ๐ŸŽฏ Best Practices ### 1. Berikan Konteks yang Jelas ```bash # โŒ Kurang jelas @frontend-developer Buat form # โœ… Jelas dan spesifik @frontend-developer Buat LoginForm dengan: - Email + password fields - Remember me checkbox - Validation dengan Zod - Loading state - Error handling - Social login buttons ``` ### 2. Iterasi Bertahap ```bash # Step 1: Basic @frontend-developer Buat basic Button component # Step 2: Enhance @frontend-developer Add ripple effect dan loading state # Step 3: Polish @frontend-developer Add accessibility dan improve animations ``` ### 3. Leverage Memory ```bash # Agent akan remember dalam session @frontend-developer Analyze project structure # Later in session (agent sudah tau struktur) @frontend-developer Buat component serupa dengan MarketCard tapi untuk UserProfile ``` ### 4. Request Reviews ```bash @frontend-developer Review implementation yang baru dibuat, ada yang bisa diimprove? ``` ### 5. Specify Framework/Library ```bash @frontend-developer Dengan Vue 3 Composition API, buat composable useAuth ``` --- ## ๐Ÿšจ Common Issues & Solutions ### Issue 1: Agent Tidak Load Skill **Solusi:** ```bash @frontend-developer Load skill `nuxt-ui` explicitly dan help me ``` ### Issue 2: Agent Pakai Pattern yang Salah **Solusi:** ```bash @frontend-developer Kita pakai Pinia untuk state, bukan Vuex. Please update approach. ``` ### Issue 3: Agent Skip Accessibility **Solusi:** ```bash @frontend-developer CRITICAL: Ensure WCAG 2.1 AA compliance ``` ### Issue 4: Output Terlalu Verbose **Solusi:** ```bash @frontend-developer Same task tapi less explanation, more code ``` --- ## ๐Ÿ“Š Quality Checklist Agent akan ensure: - โœ… TypeScript strict mode (no `any` types) - โœ… Immutability (spread operators, no mutations) - โœ… Accessibility (ARIA, keyboard, semantic HTML) - โœ… Error handling (loading, error, empty states) - โœ… Performance (memoization, lazy loading) - โœ… Responsive design (mobile-first) - โœ… SSR compatible (Nuxt 4) - โœ… Clean code (readable, maintainable) --- ## ๐ŸŽ“ Learning Resources ### Recommended Reading Order 1. **Start here:** QUICK_START.md (this file) 2. **Next:** README.md (comprehensive guide) 3. **Then:** CHEATSHEET.md (bookmark this!) 4. **When needed:** WORKFLOWS.md (specific scenarios) 5. **Advanced:** frontend-developer.md (agent internals) ### External Resources - OpenCode Docs: https://opencode.ai/docs/agents - Skills Guide: https://opencode.ai/docs/skills - Nuxt 4 Docs: https://nuxt.com/docs - Vue 3 Docs: https://vuejs.org/ --- ## ๐ŸŽ‰ You're Ready! Mulai dengan command sederhana: ```bash @frontend-developer Analyze project structure dan suggest 3 komponen yang bisa kita improve untuk better performance. ``` Agent akan: 1. Scan project files 2. Load relevant skills (`frontend-patterns`) 3. Analyze components 4. Provide specific recommendations 5. Offer to implement improvements --- ## ๐Ÿ’ฌ Get Help Jika stuck, tanya agent: ```bash @frontend-developer How do I [question]? # Contoh: @frontend-developer How do I implement dark mode dengan smooth transitions? @frontend-developer How do I optimize large list rendering? @frontend-developer How do I add TypeScript to existing component? ``` Agent akan explain dan provide code examples. --- ## ๐Ÿ”„ Update Agent Untuk update agent configuration: 1. Edit `.opencode/agents/frontend-developer.md` 2. Modify sections as needed 3. Save file 4. Reload OpenCode atau start new session Changes akan langsung aktif di session berikutnya. --- ## ๐ŸŒŸ Pro Tips 1. **Use @mentions** untuk invoke agent di middle of conversation 2. **Load skills explicitly** untuk specialized tasks 3. **Ask for alternatives** jika approach tidak sesuai 4. **Request reviews** sebelum commit changes 5. **Leverage memory** - agent remembers context dalam session 6. **Be specific** - more context = better results 7. **Iterate** - start simple, enhance progressively --- ## ๐Ÿ“ž Support - **Documentation Issues?** Check README.md - **Workflow Questions?** Check WORKFLOWS.md - **Quick Reference?** Check CHEATSHEET.md - **Agent Behavior?** Check frontend-developer.md Atau tanya langsung: ```bash @frontend-developer I need help with [specific issue] ``` --- ## ๐ŸŽ What's Included ### Files Created - โœ… **frontend-developer.md** - Full agent definition (773 lines) - โœ… **README.md** - Complete user guide (505 lines) - โœ… **WORKFLOWS.md** - 8 detailed workflows (758 lines) - โœ… **CHEATSHEET.md** - Quick reference (621 lines) - โœ… **QUICK_START.md** - This guide - โœ… **config.json** - OpenCode configuration ### Skills Integrated - โœ… 5 core skills (auto-loaded) - โœ… 5+ contextual skills (on-demand) - โœ… Comprehensive skill loading strategy - โœ… Memory management system ### Features - โœ… Framework expertise (Nuxt, Vue) - โœ… Design thinking & aesthetics - โœ… Performance optimization - โœ… Accessibility compliance - โœ… Security best practices - โœ… Testing integration - โœ… Code quality standards --- ## ๐Ÿš€ Next Steps ### Immediate (Now) ```bash # Test agent @frontend-developer Hello! Analyze this Nuxt 4 project structure. ``` ### Short-term (Today) - Read README.md untuk understand full capabilities - Try 2-3 examples dari WORKFLOWS.md - Bookmark CHEATSHEET.md ### Long-term (This Week) - Integrate agent ke daily workflow - Customize agent definition untuk team needs - Create custom workflows untuk project-specific tasks - Share dengan team members --- ## ๐Ÿ’ช Ready to Build! Your Frontend Developer Agent is fully configured and ready to help you: โœจ Build beautiful, accessible components โšก Optimize performance ๐ŸŽจ Implement stunning designs ๐Ÿงช Write comprehensive tests ๐Ÿ”’ Ensure security โ™ฟ Guarantee accessibility **Start coding with confidence!** ```bash @frontend-developer Let's build something amazing! ๐Ÿš€ ``` --- **Created with โค๏ธ for exceptional frontend development** _Version 1.0.0 - April 2026_