|
| 1 | +# CxJS Skill for Claude Code |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +CxJS Skill is a specialized Claude Code skill designed for working with the CxJS framework. It focuses on code quality, maintenance, and best practices. |
| 6 | + |
| 7 | +## Features |
| 8 | + |
| 9 | +### 1. Pattern Recognition |
| 10 | +- Recognizes CxJS patterns in code (widgets, controllers, stores) |
| 11 | +- Identifies anti-patterns and suggests improvements |
| 12 | +- Detects opportunities for refactoring to idiomatic CxJS code |
| 13 | + |
| 14 | +### 2. Component Generation |
| 15 | +- Generates CxJS components following conventions |
| 16 | +- Uses proper TypeScript types |
| 17 | +- Implements proper data binding and lifecycle methods |
| 18 | +- **Always wraps components with `createFunctionalComponent`** |
| 19 | + |
| 20 | +### 3. Data Binding & Store Management |
| 21 | +- Designs efficient store structures |
| 22 | +- Implements proper accessor chains |
| 23 | +- Sets up computed values using controllers |
| 24 | + |
| 25 | +### 4. Debugging & Troubleshooting |
| 26 | +- Identifies common CxJS issues |
| 27 | +- Provides step-by-step debugging strategies |
| 28 | +- References CxJS documentation and examples |
| 29 | + |
| 30 | +## How to Use |
| 31 | + |
| 32 | +### Locally |
| 33 | + |
| 34 | +1. The skill is already configured in `.claude/commands/cxjs.md` |
| 35 | +2. Invoke it with: |
| 36 | + ``` |
| 37 | + /cxjs [your request] |
| 38 | + ``` |
| 39 | + |
| 40 | +### Usage Examples |
| 41 | + |
| 42 | +**Analyzing existing code:** |
| 43 | +``` |
| 44 | +/cxjs Analyze components in the gallery/ directory and suggest improvements |
| 45 | +``` |
| 46 | + |
| 47 | +**Generating a new component:** |
| 48 | +``` |
| 49 | +/cxjs Create a Grid component with CRUD operations for user management |
| 50 | +``` |
| 51 | + |
| 52 | +**Debugging:** |
| 53 | +``` |
| 54 | +/cxjs Help me debug why the binding isn't updating in the UserProfile component |
| 55 | +``` |
| 56 | + |
| 57 | +**Refactoring:** |
| 58 | +``` |
| 59 | +/cxjs Refactor this controller to use best practices for computed values |
| 60 | +``` |
| 61 | + |
| 62 | +## Skill Structure |
| 63 | + |
| 64 | +``` |
| 65 | +.claude/ |
| 66 | +└── commands/ |
| 67 | + ├── cxjs.md # Main skill definition |
| 68 | + └── README.md # This documentation |
| 69 | +``` |
| 70 | + |
| 71 | +## Publishing Preparation |
| 72 | + |
| 73 | +To make the CxJS skill publicly available as a plugin, you need to: |
| 74 | + |
| 75 | +### 1. Create Plugin Package |
| 76 | + |
| 77 | +```json |
| 78 | +{ |
| 79 | + "name": "cxjs-skill", |
| 80 | + "version": "1.0.0", |
| 81 | + "description": "CxJS framework expert skill for code quality and maintenance", |
| 82 | + "main": "index.js", |
| 83 | + "keywords": ["cxjs", "claude-code", "skill", "framework"], |
| 84 | + "author": "Codaxy", |
| 85 | + "license": "MIT", |
| 86 | + "repository": { |
| 87 | + "type": "git", |
| 88 | + "url": "https://github.com/codaxy/cxjs-skill" |
| 89 | + } |
| 90 | +} |
| 91 | +``` |
| 92 | + |
| 93 | +### 2. Create Plugin Manifest |
| 94 | + |
| 95 | +```json |
| 96 | +{ |
| 97 | + "name": "cxjs-skill", |
| 98 | + "version": "1.0.0", |
| 99 | + "type": "skill", |
| 100 | + "description": "CxJS framework expert for code quality and maintenance", |
| 101 | + "capabilities": [ |
| 102 | + "pattern-recognition", |
| 103 | + "code-generation", |
| 104 | + "debugging", |
| 105 | + "refactoring" |
| 106 | + ], |
| 107 | + "commands": { |
| 108 | + "cxjs": { |
| 109 | + "description": "Analyze, generate, or improve CxJS code with framework expertise", |
| 110 | + "prompt": "cxjs.md" |
| 111 | + } |
| 112 | + }, |
| 113 | + "dependencies": { |
| 114 | + "claude-code": ">=1.0.0" |
| 115 | + } |
| 116 | +} |
| 117 | +``` |
| 118 | + |
| 119 | +### 3. Organize Files |
| 120 | + |
| 121 | +``` |
| 122 | +cxjs-skill/ |
| 123 | +├── package.json |
| 124 | +├── manifest.json |
| 125 | +├── README.md |
| 126 | +├── LICENSE |
| 127 | +├── prompts/ |
| 128 | +│ └── cxjs.md # Main skill prompt |
| 129 | +├── examples/ |
| 130 | +│ ├── component-generation.md |
| 131 | +│ ├── debugging.md |
| 132 | +│ └── refactoring.md |
| 133 | +└── docs/ |
| 134 | + ├── installation.md |
| 135 | + └── usage.md |
| 136 | +``` |
| 137 | + |
| 138 | +### 4. Testing |
| 139 | + |
| 140 | +Before publishing, test the skill with different scenarios: |
| 141 | +- [ ] Pattern recognition on existing CxJS code |
| 142 | +- [ ] Generating new components (with `createFunctionalComponent`) |
| 143 | +- [ ] Debugging common issues |
| 144 | +- [ ] Refactoring complex structures |
| 145 | +- [ ] Integration with TypeScript projects |
| 146 | + |
| 147 | +### 5. Documentation for Publishing |
| 148 | + |
| 149 | +Prepare: |
| 150 | +- Detailed README.md with examples |
| 151 | +- CHANGELOG.md for versioning |
| 152 | +- CONTRIBUTING.md for the community |
| 153 | +- Usage examples |
| 154 | +- Video demonstration (optional) |
| 155 | + |
| 156 | +### 6. Publishing |
| 157 | + |
| 158 | +Distribution options: |
| 159 | + |
| 160 | +#### A. Claude Plugin Registry (when available) |
| 161 | +```bash |
| 162 | +claude plugin publish |
| 163 | +``` |
| 164 | + |
| 165 | +#### B. GitHub Package |
| 166 | +```bash |
| 167 | +git tag v1.0.0 |
| 168 | +git push origin v1.0.0 |
| 169 | +``` |
| 170 | + |
| 171 | +#### C. npm Package |
| 172 | +```bash |
| 173 | +npm publish |
| 174 | +``` |
| 175 | + |
| 176 | +Users could then install with: |
| 177 | +```bash |
| 178 | +claude plugin install cxjs-skill |
| 179 | +# or |
| 180 | +claude plugin install codaxy/cxjs-skill |
| 181 | +``` |
| 182 | + |
| 183 | +## Maintenance |
| 184 | + |
| 185 | +- Regularly update the skill with new CxJS patterns |
| 186 | +- Add new examples and use cases |
| 187 | +- Implement user feedback |
| 188 | +- Track CxJS releases and update best practices |
| 189 | +- Ensure all component examples use `createFunctionalComponent` |
| 190 | + |
| 191 | +## Contributing |
| 192 | + |
| 193 | +The skill is open source and accepts contributions. Areas for improvement: |
| 194 | +- More component templates (all using `createFunctionalComponent`) |
| 195 | +- Additional debugging scenarios |
| 196 | +- Performance optimization patterns |
| 197 | +- Accessibility guidelines |
| 198 | +- Internationalization examples |
| 199 | + |
| 200 | +## Support |
| 201 | + |
| 202 | +For questions and support: |
| 203 | +- GitHub Issues: https://github.com/codaxy/cxjs |
| 204 | +- Discord: https://discord.gg/cxjs |
| 205 | +- Documentation: https://docs.cxjs.io |
| 206 | + |
| 207 | +## License |
| 208 | + |
| 209 | +MIT License - Feel free to use, modify and distribute. |
0 commit comments