---
name: 'import-validator'
description: 'Enforces strict import protocols for Wangsvue components and types. Invoke when writing imports or fixing import errors.'
---

# Import Protocol Validator

This skill ensures that all imports follow the strict Wangsvue Import Protocol.

## The Golden Rules

1.  **NEVER Guess:** Always use `mcp_wangsvue_mcp_analyze_component` and `mcp_wangsvue_mcp_resolve_type_definition` to get the correct paths.
2.  **Exact Paths:** Do not modify the import paths returned by MCP tools.
3.  **Type Keyword:** Always add `type` keyword for type imports.

## Common Mistakes & Corrections

### 1. Component Imports

**❌ WRONG:** `import { Button } from '@fewangsit/wangsvue/button';`
**✅ RIGHT:** `import { Button } from '@fewangsit/wangsvue';`
_Rule: Components usually come from the main package._

### 2. Type Imports

**❌ WRONG:** `import { MenuItem } from '@fewangsit/wangsvue/menuitem';`
**✅ RIGHT:** `import type { MenuItem } from '@fewangsit/wangsvue/menuitem';`
_Rule: Types usually come from specific modules and MUST use `import type`._

### 3. Mixing Imports

**❌ WRONG:** `import { Button, ButtonProps } from '@fewangsit/wangsvue';`
**✅ RIGHT:** Separate them.

```typescript
import { Button } from '@fewangsit/wangsvue';
import type { ButtonProps } from '@fewangsit/wangsvue/button'; // Verify path with MCP!
```

## Verification Process

Before writing any import:

1.  **Call MCP Tools:** `analyze_component` for components, `resolve_type_definition` for types.
2.  **Copy Exact Paths:** Use the path provided in the MCP result.
3.  **Add 'type':** If it is a type definition, ensure `type` keyword is used.
4.  **Group Properly:** Keep components and types separate.

## Checklist

- [ ] Did I get this path from MCP tools?
- [ ] Is this a component? (Use main package path)
- [ ] Is this a type? (Use specific module path + `type`)
- [ ] Did I copy the exact path?
