Setup Check
Before using this skill, verify the documentation is synced:
- •Check if
docs/VERSIONfile exists - •If not found: Display error message and stop
code
❌ Kongponents documentation not synced. Run the following command to download documentation: /kongponents sync
- •If found: Proceed to help user with Kongponents
Commands
/kongponents sync
Downloads and indexes Kongponents component documentation.
What it does:
- •Clones Kong/kongponents repository (docs/components only)
- •Generates component index
- •Creates searchable reference in
docs/components/
Usage:
code
/kongponents sync
Implementation:
- •Use Bash tool to execute:
bash scripts/sync.sh - •Display progress output to user
- •Report success or failure
First time setup: Run this command once after installing the skill.
Component Reference
After syncing, component documentation is available in docs/components/.
To help users:
- •Check if synced - Verify
docs/VERSIONexists first - •Read component index - Use
docs/component-index.mdto see all components - •Read component docs - Use
docs/components/<component-name>.mdfor details - •Provide examples - Generate Vue code using Kongponents patterns
Common components:
- •KButton - Button with various appearances and sizes
- •KInput - Text input with validation states
- •KModal - Modal dialog with overlay
- •KSelect - Dropdown select with search
- •KTable - Data table component (deprecated, use KTableData)
- •KAlert - Alert/notification messages
- •KBadge - Status badges
- •KCard - Card container
- •KIcon - Icon component
- •... and 30+ more
Example workflow:
User asks: "Show me KButton props"
- •Check
docs/VERSIONexists ✓ - •Read
docs/components/button.md - •Extract props section
- •Provide formatted answer with examples
User asks: "Create a danger button"
- •Check
docs/VERSIONexists ✓ - •Read
docs/components/button.md - •Find danger appearance prop
- •Generate code:
vue
<KButton appearance="danger"> Delete </KButton>
Update Check (Optional)
To check if documentation is outdated:
- •Read
docs/last-check.txttimestamp - •If more than 86400 seconds (24 hours) old:
- •Show message: "Kongponents docs may be outdated (last synced X days ago). Run
/kongponents syncto update." - •User can choose to continue or sync
- •Show message: "Kongponents docs may be outdated (last synced X days ago). Run
Error Handling
Missing sync:
code
❌ Kongponents documentation not synced. Run: /kongponents sync
Sync failures:
- •Git not installed: "Error: git not found. Please install git first."
- •Network issues: "Error: Failed to clone repository. Check your internet connection."
- •Permission issues: "Error: Cannot write to docs/ directory."
Component not found:
- •Check
docs/component-index.mdfor available components - •Suggest similar component names if typo detected