@lenne.tech/cli 0.0.125 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/lt +145 -14
- package/build/commands/claude/install-commands.js +332 -0
- package/build/commands/claude/install-skills.js +626 -0
- package/build/commands/config/config.js +25 -0
- package/build/commands/config/help.js +167 -0
- package/build/commands/config/init.js +143 -0
- package/build/commands/config/show.js +68 -0
- package/build/commands/server/add-property.js +163 -46
- package/build/commands/server/create.js +66 -4
- package/build/commands/server/module.js +133 -20
- package/build/commands/server/object.js +23 -15
- package/build/extensions/config.js +157 -0
- package/build/extensions/server.js +194 -63
- package/build/interfaces/lt-config.interface.js +3 -0
- package/build/templates/claude-commands/code-cleanup.md +82 -0
- package/build/templates/claude-commands/mr-description-clipboard.md +48 -0
- package/build/templates/claude-commands/mr-description.md +33 -0
- package/build/templates/claude-commands/sec-review.md +62 -0
- package/build/templates/claude-commands/skill-optimize.md +140 -0
- package/build/templates/claude-commands/test-generate.md +45 -0
- package/build/templates/claude-skills/lt-cli/SKILL.md +190 -259
- package/build/templates/claude-skills/lt-cli/examples.md +433 -203
- package/build/templates/claude-skills/lt-cli/reference.md +400 -226
- package/build/templates/claude-skills/nest-server-generator/SKILL.md +1891 -0
- package/build/templates/claude-skills/nest-server-generator/configuration.md +279 -0
- package/build/templates/claude-skills/nest-server-generator/declare-keyword-warning.md +124 -0
- package/build/templates/claude-skills/nest-server-generator/description-management.md +217 -0
- package/build/templates/claude-skills/nest-server-generator/examples.md +886 -0
- package/build/templates/claude-skills/nest-server-generator/quality-review.md +855 -0
- package/build/templates/claude-skills/nest-server-generator/reference.md +471 -0
- package/build/templates/claude-skills/nest-server-generator/security-rules.md +358 -0
- package/build/templates/claude-skills/story-tdd/SKILL.md +1173 -0
- package/build/templates/claude-skills/story-tdd/code-quality.md +266 -0
- package/build/templates/claude-skills/story-tdd/database-indexes.md +173 -0
- package/build/templates/claude-skills/story-tdd/examples.md +1332 -0
- package/build/templates/claude-skills/story-tdd/reference.md +1180 -0
- package/build/templates/claude-skills/story-tdd/security-review.md +299 -0
- package/build/templates/nest-server-module/inputs/template-create.input.ts.ejs +1 -3
- package/build/templates/nest-server-module/inputs/template.input.ts.ejs +1 -1
- package/build/templates/nest-server-module/template.controller.ts.ejs +24 -13
- package/build/templates/nest-server-module/template.model.ts.ejs +2 -2
- package/build/templates/nest-server-module/template.module.ts.ejs +4 -0
- package/build/templates/nest-server-module/template.service.ts.ejs +6 -6
- package/build/templates/nest-server-object/template.object.ts.ejs +2 -2
- package/package.json +13 -11
- package/build/commands/claude/install-skill.js +0 -93
|
@@ -1,341 +1,272 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: lt-cli
|
|
3
|
-
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
description: Expert assistance with lenne.tech CLI for Git operations and Fullstack initialization. IMPORTANT - For ALL NestJS server development (modules, objects, properties), use the nest-server-generator skill instead, even for simple tasks. This skill handles only lt git commands and lt fullstack init.
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
# LT CLI Expert
|
|
7
|
+
# LT CLI Expert - Git & Fullstack
|
|
7
8
|
|
|
8
|
-
You are an expert in the lenne.tech CLI tool
|
|
9
|
+
You are an expert in the lenne.tech CLI tool. This skill handles **Git operations and Fullstack initialization ONLY**.
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
**⚠️ CRITICAL:** For NestJS server development (modules, objects, properties), ALWAYS use the `nest-server-generator` skill instead.
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
**Command**: `lt server module` (alias: `lt server m`)
|
|
13
|
+
## ⚠️ When to Use Which Skill
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
### Use the `nest-server-generator` skill for:
|
|
16
|
+
- ✅ Creating server modules (`lt server module`)
|
|
17
|
+
- ✅ Creating server objects (`lt server object`)
|
|
18
|
+
- ✅ Adding properties (`lt server addProp`)
|
|
19
|
+
- ✅ Creating a new server (`lt server create`)
|
|
20
|
+
- ✅ ANY NestJS/nest-server development task
|
|
21
|
+
- ✅ Even simple tasks like adding a single property
|
|
22
|
+
- ✅ Even simple tasks like creating a single module
|
|
16
23
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
24
|
+
### Use this `lt-cli` skill ONLY for:
|
|
25
|
+
- ✅ Git commands (`lt git get`, `lt git reset`, etc.)
|
|
26
|
+
- ✅ Fullstack commands (`lt fullstack init`)
|
|
27
|
+
- ✅ General CLI questions (not about server development)
|
|
21
28
|
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
- `--prop-enum-X <EnumName>` - Enum reference
|
|
28
|
-
- `--prop-schema-X <SchemaName>` - Object/schema reference
|
|
29
|
-
- `--prop-reference-X <RefName>` - Reference name for ObjectId
|
|
30
|
-
- `--skipLint` - Skip lint prompt
|
|
31
|
-
|
|
32
|
-
**Example**:
|
|
33
|
-
```bash
|
|
34
|
-
lt server module --name Post --controller GraphQL \
|
|
35
|
-
--prop-name-0 title --prop-type-0 string \
|
|
36
|
-
--prop-name-1 content --prop-type-1 string --prop-nullable-1 true \
|
|
37
|
-
--prop-name-2 author --prop-type-2 ObjectId --prop-reference-2 User \
|
|
38
|
-
--prop-name-3 tags --prop-type-3 string --prop-array-3 true
|
|
39
|
-
```
|
|
29
|
+
### Example scenarios:
|
|
30
|
+
- "Create a User module with email and username" → Use **nest-server-generator** skill ✅
|
|
31
|
+
- "Add a new property to the User module" → Use **nest-server-generator** skill ✅
|
|
32
|
+
- "Checkout branch DEV-123" → Use this skill (lt-cli) ✅
|
|
33
|
+
- "Initialize a fullstack project" → Use this skill (lt-cli) ✅
|
|
40
34
|
|
|
41
|
-
|
|
42
|
-
**
|
|
35
|
+
**If the user mentions ANYTHING about NestJS server, modules, objects, properties, or models:**
|
|
36
|
+
→ **IMMEDIATELY recommend or use the nest-server-generator skill instead**
|
|
43
37
|
|
|
44
|
-
|
|
38
|
+
---
|
|
45
39
|
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
lt server addProp --type <Module|Object> --element <name> [property-flags]
|
|
49
|
-
```
|
|
40
|
+
## Available Commands
|
|
50
41
|
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
lt server addProp --type Module --element User \
|
|
54
|
-
--prop-name-0 email --prop-type-0 string \
|
|
55
|
-
--prop-name-1 age --prop-type-1 number --prop-nullable-1 true
|
|
56
|
-
```
|
|
42
|
+
### 1. Git Operations
|
|
57
43
|
|
|
58
|
-
|
|
59
|
-
**Command**: `lt
|
|
44
|
+
#### Get Branch
|
|
45
|
+
**Command**: `lt git get <branch-name>` (alias: `lt git g`)
|
|
60
46
|
|
|
61
|
-
|
|
47
|
+
Checks out a branch, creating it if it doesn't exist.
|
|
62
48
|
|
|
63
49
|
**Non-interactive syntax**:
|
|
64
50
|
```bash
|
|
65
|
-
lt
|
|
51
|
+
lt git get <branch-name>
|
|
66
52
|
```
|
|
67
53
|
|
|
68
|
-
**
|
|
54
|
+
**Examples**:
|
|
69
55
|
```bash
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
56
|
+
# Checkout existing or create new branch
|
|
57
|
+
lt git get DEV-123
|
|
58
|
+
|
|
59
|
+
# Using alias
|
|
60
|
+
lt git g feature/new-feature
|
|
74
61
|
```
|
|
75
62
|
|
|
76
|
-
|
|
77
|
-
|
|
63
|
+
**What it does**:
|
|
64
|
+
1. Checks if branch exists locally
|
|
65
|
+
2. If not, checks if it exists on remote
|
|
66
|
+
3. If remote exists, checks out and tracks remote branch
|
|
67
|
+
4. If neither exists, creates new branch from current branch
|
|
68
|
+
5. Switches to the branch
|
|
78
69
|
|
|
79
|
-
|
|
70
|
+
#### Reset to Remote
|
|
71
|
+
**Command**: `lt git reset`
|
|
80
72
|
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
lt fullstack init --name <WorkspaceName> --frontend <angular|nuxt> --git <true|false> --git-link <GitURL>
|
|
84
|
-
```
|
|
73
|
+
Resets current branch to match remote (discards local changes).
|
|
85
74
|
|
|
86
|
-
**
|
|
87
|
-
```bash
|
|
88
|
-
lt fullstack init --name MyApp --frontend angular --git true --git-link https://github.com/user/repo.git
|
|
89
|
-
```
|
|
75
|
+
**Interactive**: Prompts for confirmation before resetting.
|
|
90
76
|
|
|
91
|
-
|
|
77
|
+
**What it does**:
|
|
78
|
+
1. Fetches latest from remote
|
|
79
|
+
2. Resets current branch to origin/<branch>
|
|
80
|
+
3. Discards all local changes and commits
|
|
92
81
|
|
|
93
|
-
|
|
94
|
-
Always use numbered indices for property flags:
|
|
95
|
-
```bash
|
|
96
|
-
# CORRECT
|
|
97
|
-
--prop-name-0 title --prop-type-0 string \
|
|
98
|
-
--prop-name-1 content --prop-type-1 string
|
|
82
|
+
**⚠️ WARNING**: This is destructive! All local changes will be lost.
|
|
99
83
|
|
|
100
|
-
|
|
101
|
-
--prop-name title --prop-type string
|
|
102
|
-
```
|
|
84
|
+
### 2. Fullstack Initialization
|
|
103
85
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
```bash
|
|
107
|
-
# CORRECT
|
|
108
|
-
--prop-name-1 company --prop-type-1 string --prop-nullable-1 false
|
|
86
|
+
#### Initialize Fullstack Workspace
|
|
87
|
+
**Command**: `lt fullstack init` (alias: `lt full init`)
|
|
109
88
|
|
|
110
|
-
|
|
111
|
-
--prop-name-1 company --prop-type-0 string --prop-nullable-2 false
|
|
112
|
-
```
|
|
89
|
+
Creates complete fullstack workspace with frontend and backend.
|
|
113
90
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
91
|
+
**Interactive mode**:
|
|
92
|
+
- Prompts for workspace name
|
|
93
|
+
- Prompts for frontend framework (Angular or Nuxt)
|
|
94
|
+
- Prompts for git initialization
|
|
95
|
+
- Prompts for git repository URL (if git enabled)
|
|
119
96
|
|
|
120
|
-
|
|
121
|
-
Use `--prop-schema-X` for embedding objects:
|
|
97
|
+
**Non-interactive syntax**:
|
|
122
98
|
```bash
|
|
123
|
-
--
|
|
99
|
+
lt fullstack init --name <WorkspaceName> --frontend <angular|nuxt> --git <true|false> [--git-link <GitURL>]
|
|
124
100
|
```
|
|
125
101
|
|
|
126
|
-
|
|
127
|
-
|
|
102
|
+
**Parameters**:
|
|
103
|
+
- `--name` - Workspace/project name (PascalCase recommended)
|
|
104
|
+
- `--frontend` - Frontend framework: `angular` or `nuxt`
|
|
105
|
+
- `--git` - Initialize git repository: `true` or `false`
|
|
106
|
+
- `--git-link` - Git repository URL (optional, only if `--git true`)
|
|
107
|
+
|
|
108
|
+
**Examples**:
|
|
128
109
|
```bash
|
|
129
|
-
|
|
130
|
-
--
|
|
131
|
-
|
|
110
|
+
# With git and repository
|
|
111
|
+
lt fullstack init --name MyApp --frontend angular --git true --git-link https://github.com/user/myapp.git
|
|
112
|
+
|
|
113
|
+
# Without git
|
|
114
|
+
lt fullstack init --name MyApp --frontend nuxt --git false
|
|
115
|
+
|
|
116
|
+
# Using alias
|
|
117
|
+
lt full init --name MyProject --frontend angular --git true
|
|
132
118
|
```
|
|
133
119
|
|
|
134
|
-
|
|
120
|
+
**What gets created**:
|
|
121
|
+
```
|
|
122
|
+
<workspace-name>/
|
|
123
|
+
frontend/ # Angular or Nuxt application
|
|
124
|
+
projects/
|
|
125
|
+
api/ # NestJS backend (@lenne.tech/nest-server)
|
|
126
|
+
package.json # Root workspace configuration
|
|
127
|
+
.gitignore # (if git enabled)
|
|
128
|
+
.git/ # (if git enabled)
|
|
129
|
+
```
|
|
135
130
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
- `Date` - Date/time values
|
|
131
|
+
**Post-creation steps**:
|
|
132
|
+
1. `cd <workspace-name>`
|
|
133
|
+
2. Install dependencies: `npm install`
|
|
134
|
+
3. Start backend: `cd projects/api && npm start`
|
|
135
|
+
4. Start frontend: `cd frontend && npm start`
|
|
142
136
|
|
|
143
|
-
|
|
144
|
-
- `ObjectId` - MongoDB reference (requires `--prop-reference-X`)
|
|
145
|
-
- `Json` - JSON data for flexible metadata
|
|
146
|
-
- Custom objects (requires `--prop-schema-X`)
|
|
147
|
-
- Custom enums (requires `--prop-enum-X`) - **Note: CLI generates the reference, but you must create the enum file manually afterwards**
|
|
137
|
+
---
|
|
148
138
|
|
|
149
|
-
|
|
150
|
-
- `--prop-nullable-X true` - Makes property optional
|
|
151
|
-
- `--prop-array-X true` - Makes property an array type
|
|
139
|
+
## ⚠️ How to Redirect to nest-server-generator
|
|
152
140
|
|
|
153
|
-
|
|
141
|
+
When you detect ANY NestJS server task, immediately inform the user:
|
|
154
142
|
|
|
155
|
-
|
|
156
|
-
```bash
|
|
157
|
-
lt server module --name User --controller Both \
|
|
158
|
-
--prop-name-0 email --prop-type-0 string \
|
|
159
|
-
--prop-name-1 username --prop-type-1 string \
|
|
160
|
-
--prop-name-2 roles --prop-type-2 string --prop-array-2 true \
|
|
161
|
-
--prop-name-3 verified --prop-type-3 boolean
|
|
143
|
+
**Template response**:
|
|
162
144
|
```
|
|
145
|
+
For NestJS server development tasks, please use the **nest-server-generator skill** instead.
|
|
163
146
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
--prop-name-1 content --prop-type-1 string \
|
|
169
|
-
--prop-name-2 author --prop-type-2 ObjectId --prop-reference-2 User \
|
|
170
|
-
--prop-name-3 tags --prop-type-3 string --prop-array-3 true \
|
|
171
|
-
--prop-name-4 published --prop-type-4 boolean
|
|
172
|
-
```
|
|
147
|
+
This skill is specifically designed for all NestJS/nest-server work, including:
|
|
148
|
+
- Creating modules, objects, or properties
|
|
149
|
+
- Modifying existing server code
|
|
150
|
+
- Generating complete server structures
|
|
173
151
|
|
|
174
|
-
|
|
152
|
+
You can install it with:
|
|
175
153
|
```bash
|
|
176
|
-
lt
|
|
177
|
-
--prop-name-0 name --prop-type-0 string \
|
|
178
|
-
--prop-name-1 description --prop-type-1 string --prop-nullable-1 true \
|
|
179
|
-
--prop-name-2 price --prop-type-2 number \
|
|
180
|
-
--prop-name-3 stock --prop-type-3 number \
|
|
181
|
-
--prop-name-4 category --prop-enum-4 ProductCategoryEnum \
|
|
182
|
-
--prop-name-5 metadata --prop-type-5 Json --prop-nullable-5 true
|
|
154
|
+
lt claude install-skills nest-server-generator
|
|
183
155
|
```
|
|
184
156
|
|
|
185
|
-
|
|
157
|
+
Or install all skills:
|
|
186
158
|
```bash
|
|
187
|
-
|
|
188
|
-
lt server object --name Address \
|
|
189
|
-
--prop-name-0 street --prop-type-0 string \
|
|
190
|
-
--prop-name-1 city --prop-type-1 string \
|
|
191
|
-
--prop-name-2 country --prop-type-2 string
|
|
192
|
-
|
|
193
|
-
# Then use it in a module
|
|
194
|
-
lt server addProp --type Module --element User \
|
|
195
|
-
--prop-name-0 address --prop-schema-0 Address
|
|
159
|
+
lt claude install-skills
|
|
196
160
|
```
|
|
197
161
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
The CLI expects this structure:
|
|
201
|
-
```
|
|
202
|
-
src/
|
|
203
|
-
server/
|
|
204
|
-
modules/
|
|
205
|
-
<module-name>/
|
|
206
|
-
<module-name>.model.ts # MongoDB schema
|
|
207
|
-
<module-name>.service.ts # Business logic
|
|
208
|
-
<module-name>.controller.ts # REST controller
|
|
209
|
-
<module-name>.resolver.ts # GraphQL resolver
|
|
210
|
-
<module-name>.module.ts # NestJS module
|
|
211
|
-
inputs/
|
|
212
|
-
<module-name>.input.ts # Update DTO
|
|
213
|
-
<module-name>-create.input.ts # Create DTO
|
|
214
|
-
outputs/
|
|
215
|
-
find-and-count-<module-name>s-result.output.ts
|
|
216
|
-
common/
|
|
217
|
-
objects/
|
|
218
|
-
<object-name>/
|
|
219
|
-
<object-name>.object.ts
|
|
220
|
-
<object-name>.input.ts
|
|
221
|
-
<object-name>-create.input.ts
|
|
162
|
+
Then I can help you with your NestJS server task using the nest-server-generator skill.
|
|
222
163
|
```
|
|
223
164
|
|
|
224
|
-
|
|
165
|
+
---
|
|
225
166
|
|
|
226
|
-
|
|
227
|
-
- MongoDB schema with `@Prop()` decorator
|
|
228
|
-
- `@UnifiedField()` decorator for GraphQL/REST
|
|
229
|
-
- Mongoose schema definition
|
|
230
|
-
- TypeScript typing with proper suffixes
|
|
167
|
+
## Best Practices
|
|
231
168
|
|
|
232
|
-
###
|
|
233
|
-
|
|
234
|
-
-
|
|
235
|
-
-
|
|
236
|
-
- Generic support for references
|
|
169
|
+
### Git Operations
|
|
170
|
+
1. **Always commit changes before `lt git reset`** - It's destructive!
|
|
171
|
+
2. **Use meaningful branch names** - Follow your team's conventions (e.g., `DEV-123`, `feature/xyz`)
|
|
172
|
+
3. **Check status first** - Run `git status` before reset operations
|
|
237
173
|
|
|
238
|
-
###
|
|
239
|
-
-
|
|
240
|
-
-
|
|
241
|
-
-
|
|
242
|
-
-
|
|
174
|
+
### Fullstack Init
|
|
175
|
+
1. **Plan your architecture** - Know which frontend framework you need
|
|
176
|
+
2. **Set up git early** - Use `--git true` from the start
|
|
177
|
+
3. **Follow naming conventions** - Use PascalCase for workspace names
|
|
178
|
+
4. **Read the generated README** - Each project has specific setup instructions
|
|
243
179
|
|
|
244
|
-
|
|
245
|
-
- REST endpoints (controller)
|
|
246
|
-
- GraphQL queries/mutations (resolver)
|
|
247
|
-
- Proper authentication guards
|
|
248
|
-
- DTO validation
|
|
180
|
+
---
|
|
249
181
|
|
|
250
182
|
## Troubleshooting
|
|
251
183
|
|
|
252
|
-
###
|
|
253
|
-
**Symptom**:
|
|
254
|
-
**Cause**:
|
|
255
|
-
**Solution**:
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
184
|
+
### Git Reset Not Working
|
|
185
|
+
**Symptom**: Reset command fails or doesn't reset properly
|
|
186
|
+
**Cause**: Remote branch doesn't exist or network issues
|
|
187
|
+
**Solution**:
|
|
188
|
+
- Check if remote branch exists: `git branch -r`
|
|
189
|
+
- Ensure you're connected to remote: `git remote -v`
|
|
190
|
+
- Fetch first: `git fetch origin`
|
|
191
|
+
|
|
192
|
+
### Fullstack Init Fails
|
|
193
|
+
**Symptom**: Installation errors during `lt fullstack init`
|
|
194
|
+
**Cause**: Network issues, missing dependencies, or permissions
|
|
195
|
+
**Solution**:
|
|
196
|
+
- Check internet connection
|
|
197
|
+
- Ensure Node.js is installed: `node --version`
|
|
198
|
+
- Check npm permissions
|
|
199
|
+
- Try with sudo if permission errors persist
|
|
200
|
+
|
|
201
|
+
### Branch Already Exists
|
|
202
|
+
**Symptom**: `lt git get` says branch exists but can't switch
|
|
203
|
+
**Cause**: Uncommitted changes in working directory
|
|
204
|
+
**Solution**: Commit, stash, or discard changes first:
|
|
261
205
|
```bash
|
|
262
|
-
|
|
206
|
+
git stash # Save changes temporarily
|
|
207
|
+
lt git get <branch>
|
|
208
|
+
git stash pop # Restore changes
|
|
263
209
|
```
|
|
264
210
|
|
|
265
|
-
|
|
266
|
-
**Symptom**: Error that module directory exists
|
|
267
|
-
**Solution**: Use `lt server addProp` instead to add to existing modules
|
|
268
|
-
|
|
269
|
-
### Empty Property Lists
|
|
270
|
-
**Symptom**: "Cannot read properties of undefined"
|
|
271
|
-
**Status**: Fixed in latest version
|
|
272
|
-
**Solution**: Update to latest CLI version
|
|
273
|
-
|
|
274
|
-
## Best Practices
|
|
275
|
-
|
|
276
|
-
1. **Plan relationships first**: Sketch entity relationships before generating
|
|
277
|
-
2. **Create objects for reusable structures**: Don't duplicate data structures
|
|
278
|
-
3. **Use meaningful names**: PascalCase for modules/objects, camelCase for properties
|
|
279
|
-
4. **Start with one API type**: Use Rest or GraphQL, add Both later if needed
|
|
280
|
-
5. **Create enum files after generation**: CLI generates enum references, you create the actual enum files manually afterwards in `src/server/common/enums/`
|
|
281
|
-
6. **Mark truly optional fields**: Only use nullable for genuinely optional data
|
|
282
|
-
7. **Use JSON for extensibility**: Metadata and flexible fields work well as JSON
|
|
283
|
-
8. **Run lint after generation**: Always run lint fix for code quality
|
|
284
|
-
9. **Test incrementally**: Generate one module, test, then continue
|
|
285
|
-
10. **Version control**: Commit after successful generation
|
|
211
|
+
---
|
|
286
212
|
|
|
287
213
|
## Working with This Skill
|
|
288
214
|
|
|
289
215
|
When helping users:
|
|
290
216
|
|
|
291
|
-
1. **Clarify
|
|
292
|
-
2. **
|
|
293
|
-
3. **
|
|
294
|
-
4. **
|
|
295
|
-
5. **
|
|
217
|
+
1. **Clarify intent**: Is this a git operation or fullstack setup?
|
|
218
|
+
2. **Redirect server tasks**: Immediately suggest nest-server-generator for any NestJS work
|
|
219
|
+
3. **Provide complete commands**: Include all necessary flags
|
|
220
|
+
4. **Warn about destructive operations**: Always warn before `lt git reset`
|
|
221
|
+
5. **Explain side effects**: Describe what will happen
|
|
296
222
|
|
|
297
223
|
### Example Response Pattern
|
|
298
224
|
|
|
299
|
-
User
|
|
225
|
+
**User**: "Switch to branch DEV-456"
|
|
226
|
+
|
|
227
|
+
**Your response**:
|
|
228
|
+
```bash
|
|
229
|
+
# Switch to branch DEV-456 (creates if it doesn't exist)
|
|
230
|
+
lt git get DEV-456
|
|
231
|
+
|
|
232
|
+
# This will:
|
|
233
|
+
# ✓ Check if DEV-456 exists locally
|
|
234
|
+
# ✓ If not, check remote
|
|
235
|
+
# ✓ If remote exists, checkout and track
|
|
236
|
+
# ✓ If neither exists, create new branch
|
|
237
|
+
# ✓ Switch to the branch
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
**User**: "Create a User module"
|
|
241
|
+
|
|
242
|
+
**Your response**:
|
|
243
|
+
```
|
|
244
|
+
For creating NestJS modules, please use the **nest-server-generator skill** instead.
|
|
245
|
+
|
|
246
|
+
That skill is specifically designed for all NestJS/nest-server development tasks.
|
|
300
247
|
|
|
301
|
-
|
|
248
|
+
Install it with:
|
|
302
249
|
```bash
|
|
303
|
-
|
|
304
|
-
lt server module --name Task --controller Both \
|
|
305
|
-
--prop-name-0 title --prop-type-0 string \
|
|
306
|
-
--prop-name-1 description --prop-type-1 string --prop-nullable-1 true \
|
|
307
|
-
--prop-name-2 dueDate --prop-type-2 Date --prop-nullable-2 true \
|
|
308
|
-
--prop-name-3 assignee --prop-type-3 ObjectId --prop-reference-3 User \
|
|
309
|
-
--prop-name-4 status --prop-enum-4 TaskStatusEnum
|
|
310
|
-
|
|
311
|
-
# This creates:
|
|
312
|
-
# ✓ Task model with MongoDB schema
|
|
313
|
-
# ✓ Task service with CRUD operations
|
|
314
|
-
# ✓ REST controller and GraphQL resolver
|
|
315
|
-
# ✓ Input DTOs for create/update
|
|
316
|
-
|
|
317
|
-
# Next steps:
|
|
318
|
-
# 1. Manually create TaskStatusEnum file in src/server/common/enums/task-status.enum.ts
|
|
319
|
-
# 2. Verify User module exists
|
|
320
|
-
# 3. Run lint fix
|
|
321
|
-
# 4. Add custom business logic to TaskService
|
|
250
|
+
lt claude install-skills nest-server-generator
|
|
322
251
|
```
|
|
323
252
|
|
|
324
|
-
|
|
253
|
+
Then I can help you create the User module with all necessary files and configurations.
|
|
254
|
+
```
|
|
325
255
|
|
|
326
|
-
|
|
327
|
-
- Integrates with `@lenne.tech/nest-server` package
|
|
328
|
-
- Generates `@UnifiedField()` decorators for dual REST/GraphQL support
|
|
329
|
-
- Handles `useDefineForClassFields` TypeScript config
|
|
330
|
-
- Automatically adds properties to `.model.ts`, `.input.ts`, and `-create.input.ts`
|
|
331
|
-
- Manages imports and decorators automatically
|
|
256
|
+
---
|
|
332
257
|
|
|
333
258
|
## Important Notes
|
|
334
259
|
|
|
335
|
-
- CLI works from anywhere in project directory
|
|
336
|
-
- Automatically finds nearest
|
|
337
|
-
-
|
|
338
|
-
-
|
|
339
|
-
-
|
|
340
|
-
|
|
341
|
-
|
|
260
|
+
- **CLI works from anywhere** in your project directory
|
|
261
|
+
- **Automatically finds** the nearest git repository for git commands
|
|
262
|
+
- **Creates missing directories** for fullstack init
|
|
263
|
+
- **Validates inputs** before executing destructive operations
|
|
264
|
+
- **Always use nest-server-generator** for NestJS server development
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
## Command Reference
|
|
269
|
+
|
|
270
|
+
For detailed command syntax and all available options, see [reference.md](reference.md).
|
|
271
|
+
|
|
272
|
+
For NestJS server commands (`lt server module`, `lt server object`, etc.), use the **nest-server-generator skill**.
|