@plaited/development-skills 0.6.2 → 0.6.4

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.
@@ -0,0 +1,249 @@
1
+ ---
2
+ name: typescript-lsp
3
+ description: Search TypeScript SYMBOLS (functions, types, classes) - NOT text. Use Glob to find files, Grep for text search, LSP for symbol search. Provides type-aware results that understand imports, exports, and relationships.
4
+ license: ISC
5
+ compatibility: Requires bun
6
+ allowed-tools: Bash
7
+ metadata:
8
+ file-triggers: "*.ts,*.tsx,*.js,*.jsx"
9
+ ---
10
+
11
+ # TypeScript LSP Skill
12
+
13
+ ## Purpose
14
+
15
+ This skill provides TypeScript Language Server Protocol integration for **exploring and understanding** TypeScript/JavaScript codebases.
16
+
17
+ **IMPORTANT**: Prefer LSP tools over Grep/Glob when working with `*.ts`, `*.tsx`, `*.js`, `*.jsx` files. LSP provides type-aware results that understand imports, exports, and symbol relationships.
18
+
19
+ Use these tools to:
20
+ - **Explore codebases** - Find symbols, understand module structure, discover implementations
21
+ - **Find references** - Type-aware search across the entire codebase (better than grep for symbols)
22
+ - **Understand types** - Get full type signatures, generics, and documentation
23
+ - **Verify before editing** - Check all usages before modifying or deleting exports
24
+ - **Navigate code** - Jump to definitions, find implementations
25
+
26
+ ## When to Use Each Tool
27
+
28
+ | Tool | Purpose |
29
+ |------|---------|
30
+ | **Glob** | Find files by pattern |
31
+ | **Grep** | Search text content |
32
+ | **lsp-find** | Search TypeScript symbols |
33
+ | **lsp-hover** | Get type info + TSDoc documentation |
34
+ | **lsp-refs** | Find all references to a symbol |
35
+ | **lsp-analyze** | Batch analysis of file structure |
36
+
37
+ ### LSP vs Grep/Glob
38
+
39
+ | Task | Use LSP | Use Grep/Glob |
40
+ |------|---------|---------------|
41
+ | Find all usages of a function/type | ✅ `lsp-refs` | ❌ Misses re-exports, aliases |
42
+ | Search for a symbol by name | ✅ `lsp-find` | ❌ Matches strings, comments |
43
+ | Get type signature + TSDoc | ✅ `lsp-hover` | ❌ Not possible |
44
+ | Understand file exports | ✅ `lsp-analyze --exports` | ❌ Doesn't resolve re-exports |
45
+ | Find files by pattern | ❌ | ✅ `Glob` |
46
+ | Search non-TS files (md, json) | ❌ | ✅ `Grep` |
47
+ | Search for text in comments/strings | ❌ | ✅ `Grep` |
48
+
49
+ ## When to Use
50
+
51
+ **Exploring code (prefer LSP):**
52
+ - Run `lsp-find` to search for symbols across the workspace
53
+ - Run `lsp-symbols` to get an overview of file structure
54
+ - Run `lsp-analyze --exports` to see what a module provides
55
+
56
+ **Before editing code:**
57
+ - Run `lsp-references` to find all usages of a symbol you plan to modify
58
+ - Run `lsp-hover` to verify current type signatures
59
+
60
+ **Before writing code:**
61
+ - Run `lsp-find` to search for similar patterns or related symbols
62
+ - Run `lsp-hover` on APIs you plan to use
63
+
64
+ ## Path Resolution
65
+
66
+ All scripts accept three types of file paths:
67
+ - **Absolute paths**: `/Users/name/project/src/file.ts`
68
+ - **Relative paths**: `./src/file.ts` or `../other/file.ts`
69
+ - **Package export paths**: `my-package/src/module.ts` (resolved via `Bun.resolve()`)
70
+
71
+ Package export paths are recommended for portability and consistency with the package's exports field.
72
+
73
+ ## Scripts
74
+
75
+ ### Individual Scripts
76
+
77
+ #### lsp-hover
78
+ Get type information at a specific position.
79
+
80
+ ```bash
81
+ bunx @plaited/development-skills lsp-hover <file> <line> <char>
82
+ ```
83
+
84
+ **Arguments:**
85
+ - `file`: Path to TypeScript/JavaScript file
86
+ - `line`: Line number (0-indexed)
87
+ - `char`: Character position (0-indexed)
88
+
89
+ **Example:**
90
+ ```bash
91
+ bunx @plaited/development-skills lsp-hover src/utils/parser.ts 42 10
92
+ ```
93
+
94
+ #### lsp-symbols
95
+ List all symbols in a file.
96
+
97
+ ```bash
98
+ bunx @plaited/development-skills lsp-symbols <file>
99
+ ```
100
+
101
+ **Example:**
102
+ ```bash
103
+ bunx @plaited/development-skills lsp-symbols src/utils/parser.ts
104
+ ```
105
+
106
+ #### lsp-references
107
+ Find all references to a symbol.
108
+
109
+ ```bash
110
+ bunx @plaited/development-skills lsp-refs <file> <line> <char>
111
+ ```
112
+
113
+ **Example:**
114
+ ```bash
115
+ bunx @plaited/development-skills lsp-refs src/utils/parser.ts 42 10
116
+ ```
117
+
118
+ #### lsp-find
119
+ Search for symbols across the workspace.
120
+
121
+ ```bash
122
+ bunx @plaited/development-skills lsp-find <query> [context-file]
123
+ ```
124
+
125
+ **Arguments:**
126
+ - `query`: Symbol name or partial name
127
+ - `context-file`: Optional file to open for project context
128
+
129
+ **Example:**
130
+ ```bash
131
+ bunx @plaited/development-skills lsp-find parseConfig
132
+ bunx @plaited/development-skills lsp-find validateInput src/lib/validator.ts
133
+ ```
134
+
135
+ ### Batch Script
136
+
137
+ #### lsp-analyze
138
+ Perform multiple analyses in a single session for efficiency.
139
+
140
+ ```bash
141
+ bunx @plaited/development-skills lsp-analyze <file> [options]
142
+ ```
143
+
144
+ **Options:**
145
+ - `--symbols, -s`: List all symbols
146
+ - `--exports, -e`: List only exported symbols
147
+ - `--hover <line:char>`: Get type info (repeatable)
148
+ - `--refs <line:char>`: Find references (repeatable)
149
+ - `--all`: Run symbols + exports analysis
150
+
151
+ **Examples:**
152
+ ```bash
153
+ # Get file overview
154
+ bunx @plaited/development-skills lsp-analyze src/utils/parser.ts --all
155
+
156
+ # Check multiple positions
157
+ bunx @plaited/development-skills lsp-analyze src/utils/parser.ts --hover 50:10 --hover 75:5
158
+
159
+ # Before refactoring: find all references
160
+ bunx @plaited/development-skills lsp-analyze src/utils/parser.ts --refs 42:10
161
+ ```
162
+
163
+ ## Common Workflows
164
+
165
+ ### Understanding a File
166
+
167
+ ```bash
168
+ # 1. Get exports overview
169
+ bunx @plaited/development-skills lsp-analyze path/to/file.ts --exports
170
+
171
+ # 2. For specific type info, hover on interesting symbols
172
+ bunx @plaited/development-skills lsp-hover path/to/file.ts <line> <char>
173
+ ```
174
+
175
+ ### Before Modifying an Export
176
+
177
+ ```bash
178
+ # 1. Find all references first
179
+ bunx @plaited/development-skills lsp-refs path/to/file.ts <line> <char>
180
+
181
+ # 2. Check what depends on it
182
+ # Review the output to understand impact
183
+ ```
184
+
185
+ ### Finding Patterns
186
+
187
+ ```bash
188
+ # Search for similar implementations
189
+ bunx @plaited/development-skills lsp-find handleRequest
190
+ bunx @plaited/development-skills lsp-find parseConfig
191
+ ```
192
+
193
+ ### Pre-Implementation Verification
194
+
195
+ ```bash
196
+ # Before writing code that uses an API, verify its signature
197
+ bunx @plaited/development-skills lsp-hover path/to/api.ts <line> <char>
198
+ ```
199
+
200
+ ## Output Format
201
+
202
+ All scripts output JSON to stdout. Errors go to stderr.
203
+
204
+ **Hover output:**
205
+ ```json
206
+ {
207
+ "contents": {
208
+ "kind": "markdown",
209
+ "value": "```typescript\nconst parseConfig: (options: Options) => Config\n```"
210
+ },
211
+ "range": { "start": {...}, "end": {...} }
212
+ }
213
+ ```
214
+
215
+ **Symbols output:**
216
+ ```json
217
+ [
218
+ {
219
+ "name": "symbolName",
220
+ "kind": 13,
221
+ "range": { "start": {...}, "end": {...} }
222
+ }
223
+ ]
224
+ ```
225
+
226
+ **Analyze output:**
227
+ ```json
228
+ {
229
+ "file": "path/to/file.ts",
230
+ "exports": [
231
+ { "name": "exportName", "kind": "Constant", "line": 139 }
232
+ ]
233
+ }
234
+ ```
235
+
236
+ ## Performance
237
+
238
+ Each script invocation:
239
+ 1. Starts TypeScript Language Server (~300-500ms)
240
+ 2. Initializes LSP connection
241
+ 3. Opens document
242
+ 4. Performs query
243
+ 5. Closes and stops
244
+
245
+ For multiple queries on the same file, use `lsp-analyze` to batch operations in a single session.
246
+
247
+ ## Related Skills
248
+
249
+ - **code-documentation**: TSDoc standards for documentation
@@ -0,0 +1,108 @@
1
+ ---
2
+ name: validate-skill
3
+ description: Validate skill directories against AgentSkills spec
4
+ license: ISC
5
+ compatibility: Requires bun
6
+ allowed-tools: Bash
7
+ ---
8
+
9
+ # Validate Skill
10
+
11
+ ## Purpose
12
+
13
+ This skill validates skill directories against the [AgentSkills specification](https://agentskills.io/specification). Use it to ensure your skills have proper frontmatter, required fields, and follow naming conventions.
14
+
15
+ **Use when:**
16
+ - Creating new skills in any agent's skills directory (`.claude/skills/`, `.cursor/skills/`, etc.)
17
+ - Reviewing PRs that modify skills
18
+ - Validating skill structure before publishing
19
+
20
+ ## Scripts
21
+
22
+ ### validate-skill.ts
23
+
24
+ Validate one or more skill directories.
25
+
26
+ ```bash
27
+ bunx @plaited/development-skills validate-skill [paths...]
28
+ ```
29
+
30
+ **Arguments:**
31
+ - `paths`: Paths to validate (defaults to current agent's skills directory)
32
+
33
+ **Options:**
34
+ - `--json`: Output results as JSON
35
+
36
+ **Examples:**
37
+
38
+ ```bash
39
+ # Validate skills in current directory's .claude/skills/
40
+ bunx @plaited/development-skills validate-skill .claude/skills
41
+
42
+ # Validate Cursor skills
43
+ bunx @plaited/development-skills validate-skill .cursor/skills
44
+
45
+ # Validate a specific skill
46
+ bunx @plaited/development-skills validate-skill .claude/skills/typescript-lsp
47
+
48
+ # Validate multiple paths with JSON output
49
+ bunx @plaited/development-skills validate-skill .claude/skills .cursor/skills --json
50
+ ```
51
+
52
+ ## Validation Rules
53
+
54
+ ### Required Fields
55
+
56
+ - `name`: Skill name (lowercase, alphanumeric with hyphens)
57
+ - `description`: Brief description of the skill
58
+
59
+ ### Naming Conventions
60
+
61
+ - Name must be lowercase
62
+ - Only alphanumeric characters and hyphens allowed
63
+ - Cannot start or end with hyphen
64
+ - Cannot contain consecutive hyphens
65
+ - Maximum 64 characters
66
+ - Directory name must match skill name
67
+
68
+ ### Optional Fields
69
+
70
+ - `license`: License identifier
71
+ - `compatibility`: Runtime requirements
72
+ - `allowed-tools`: Comma-separated list of allowed tools
73
+ - `metadata`: Key-value pairs for additional metadata
74
+
75
+ ## Output Format
76
+
77
+ ### Human-Readable (default)
78
+
79
+ ```
80
+ ✓ .claude/skills/typescript-lsp
81
+ ✓ .cursor/skills/my-skill
82
+ ✗ .claude/skills/invalid-skill
83
+ ERROR: Missing required field in frontmatter: 'description'
84
+
85
+ 2/3 skills valid
86
+ ```
87
+
88
+ ### JSON (--json)
89
+
90
+ ```json
91
+ [
92
+ {
93
+ "valid": true,
94
+ "path": ".cursor/skills/my-skill",
95
+ "errors": [],
96
+ "warnings": [],
97
+ "properties": {
98
+ "name": "my-skill",
99
+ "description": "..."
100
+ }
101
+ }
102
+ ]
103
+ ```
104
+
105
+ ## Related Skills
106
+
107
+ - **typescript-lsp** - Example of a well-structured skill with scripts
108
+ - **code-documentation** - TSDoc standards for TypeScript/JavaScript code
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plaited/development-skills",
3
- "version": "0.6.2",
3
+ "version": "0.6.4",
4
4
  "description": "Development skills for Claude Code - TypeScript LSP, code documentation, and validation tools",
5
5
  "license": "ISC",
6
6
  "engines": {