oh-my-customcode 0.7.0 → 0.9.0
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/README.md +38 -12
- package/dist/cli/index.js +518 -274
- package/dist/index.js +304 -101
- package/package.json +1 -1
- package/templates/.claude/agents/db-postgres-expert.md +106 -0
- package/templates/.claude/agents/db-redis-expert.md +101 -0
- package/templates/.claude/agents/de-airflow-expert.md +71 -0
- package/templates/.claude/agents/de-dbt-expert.md +72 -0
- package/templates/.claude/agents/de-kafka-expert.md +81 -0
- package/templates/.claude/agents/de-pipeline-expert.md +92 -0
- package/templates/.claude/agents/de-snowflake-expert.md +89 -0
- package/templates/.claude/agents/de-spark-expert.md +80 -0
- package/templates/.claude/rules/SHOULD-agent-teams.md +47 -1
- package/templates/.claude/skills/airflow-best-practices/SKILL.md +56 -0
- package/templates/.claude/skills/dbt-best-practices/SKILL.md +54 -0
- package/templates/.claude/skills/de-lead-routing/SKILL.md +230 -0
- package/templates/.claude/skills/dev-lead-routing/SKILL.md +15 -0
- package/templates/.claude/skills/kafka-best-practices/SKILL.md +52 -0
- package/templates/.claude/skills/pipeline-architecture-patterns/SKILL.md +83 -0
- package/templates/.claude/skills/postgres-best-practices/SKILL.md +66 -0
- package/templates/.claude/skills/redis-best-practices/SKILL.md +83 -0
- package/templates/.claude/skills/secretary-routing/SKILL.md +12 -0
- package/templates/.claude/skills/snowflake-best-practices/SKILL.md +65 -0
- package/templates/.claude/skills/spark-best-practices/SKILL.md +52 -0
- package/templates/.codex/agents/arch-documenter.md +97 -0
- package/templates/.codex/agents/arch-speckit-agent.md +134 -0
- package/templates/.codex/agents/be-express-expert.md +80 -0
- package/templates/.codex/agents/be-fastapi-expert.md +43 -0
- package/templates/.codex/agents/be-go-backend-expert.md +43 -0
- package/templates/.codex/agents/be-nestjs-expert.md +60 -0
- package/templates/.codex/agents/be-springboot-expert.md +85 -0
- package/templates/.codex/agents/db-postgres-expert.md +106 -0
- package/templates/.codex/agents/db-redis-expert.md +101 -0
- package/templates/.codex/agents/db-supabase-expert.md +71 -0
- package/templates/.codex/agents/de-airflow-expert.md +71 -0
- package/templates/.codex/agents/de-dbt-expert.md +72 -0
- package/templates/.codex/agents/de-kafka-expert.md +81 -0
- package/templates/.codex/agents/de-pipeline-expert.md +92 -0
- package/templates/.codex/agents/de-snowflake-expert.md +89 -0
- package/templates/.codex/agents/de-spark-expert.md +80 -0
- package/templates/.codex/agents/fe-svelte-agent.md +65 -0
- package/templates/.codex/agents/fe-vercel-agent.md +69 -0
- package/templates/.codex/agents/fe-vuejs-agent.md +65 -0
- package/templates/.codex/agents/infra-aws-expert.md +47 -0
- package/templates/.codex/agents/infra-docker-expert.md +47 -0
- package/templates/.codex/agents/lang-golang-expert.md +43 -0
- package/templates/.codex/agents/lang-java21-expert.md +65 -0
- package/templates/.codex/agents/lang-kotlin-expert.md +43 -0
- package/templates/.codex/agents/lang-python-expert.md +43 -0
- package/templates/.codex/agents/lang-rust-expert.md +43 -0
- package/templates/.codex/agents/lang-typescript-expert.md +43 -0
- package/templates/.codex/agents/mgr-claude-code-bible.md +246 -0
- package/templates/.codex/agents/mgr-creator.md +120 -0
- package/templates/.codex/agents/mgr-gitnerd.md +113 -0
- package/templates/.codex/agents/mgr-sauron.md +154 -0
- package/templates/.codex/agents/mgr-supplier.md +120 -0
- package/templates/.codex/agents/mgr-sync-checker.md +99 -0
- package/templates/.codex/agents/mgr-updater.md +103 -0
- package/templates/.codex/agents/qa-engineer.md +96 -0
- package/templates/.codex/agents/qa-planner.md +74 -0
- package/templates/.codex/agents/qa-writer.md +97 -0
- package/templates/.codex/agents/sys-memory-keeper.md +117 -0
- package/templates/.codex/agents/sys-naggy.md +90 -0
- package/templates/.codex/agents/tool-bun-expert.md +71 -0
- package/templates/.codex/agents/tool-npm-expert.md +88 -0
- package/templates/.codex/agents/tool-optimizer.md +87 -0
- package/templates/.codex/codex-native-hash.txt +1 -0
- package/templates/.codex/contexts/dev.md +20 -0
- package/templates/.codex/contexts/ecomode.md +63 -0
- package/templates/.codex/contexts/index.yaml +41 -0
- package/templates/.codex/contexts/research.md +28 -0
- package/templates/.codex/contexts/review.md +23 -0
- package/templates/.codex/hooks/hooks.json +151 -0
- package/templates/.codex/install-hooks.sh +100 -0
- package/templates/.codex/rules/MAY-optimization.md +93 -0
- package/templates/.codex/rules/MUST-agent-design.md +162 -0
- package/templates/.codex/rules/MUST-agent-identification.md +108 -0
- package/templates/.codex/rules/MUST-continuous-improvement.md +132 -0
- package/templates/.codex/rules/MUST-intent-transparency.md +199 -0
- package/templates/.codex/rules/MUST-language-policy.md +62 -0
- package/templates/.codex/rules/MUST-orchestrator-coordination.md +471 -0
- package/templates/.codex/rules/MUST-parallel-execution.md +469 -0
- package/templates/.codex/rules/MUST-permissions.md +84 -0
- package/templates/.codex/rules/MUST-safety.md +69 -0
- package/templates/.codex/rules/MUST-sync-verification.md +281 -0
- package/templates/.codex/rules/MUST-tool-identification.md +195 -0
- package/templates/.codex/rules/SHOULD-agent-teams.md +183 -0
- package/templates/.codex/rules/SHOULD-ecomode.md +145 -0
- package/templates/.codex/rules/SHOULD-error-handling.md +102 -0
- package/templates/.codex/rules/SHOULD-hud-statusline.md +112 -0
- package/templates/.codex/rules/SHOULD-interaction.md +103 -0
- package/templates/.codex/rules/SHOULD-memory-integration.md +132 -0
- package/templates/.codex/rules/index.yaml +141 -0
- package/templates/.codex/skills/airflow-best-practices/SKILL.md +56 -0
- package/templates/.codex/skills/audit-agents/SKILL.md +116 -0
- package/templates/.codex/skills/aws-best-practices/SKILL.md +280 -0
- package/templates/.codex/skills/claude-code-bible/SKILL.md +180 -0
- package/templates/.codex/skills/claude-code-bible/scripts/fetch-docs.js +244 -0
- package/templates/.codex/skills/create-agent/SKILL.md +91 -0
- package/templates/.codex/skills/dbt-best-practices/SKILL.md +54 -0
- package/templates/.codex/skills/de-lead-routing/SKILL.md +230 -0
- package/templates/.codex/skills/dev-lead-routing/SKILL.md +253 -0
- package/templates/.codex/skills/dev-refactor/SKILL.md +123 -0
- package/templates/.codex/skills/dev-review/SKILL.md +81 -0
- package/templates/.codex/skills/docker-best-practices/SKILL.md +275 -0
- package/templates/.codex/skills/fastapi-best-practices/SKILL.md +270 -0
- package/templates/.codex/skills/fix-refs/SKILL.md +107 -0
- package/templates/.codex/skills/go-backend-best-practices/SKILL.md +338 -0
- package/templates/.codex/skills/go-best-practices/CLAUDE.md +9 -0
- package/templates/.codex/skills/go-best-practices/SKILL.md +203 -0
- package/templates/.codex/skills/help/SKILL.md +125 -0
- package/templates/.codex/skills/intent-detection/SKILL.md +215 -0
- package/templates/.codex/skills/intent-detection/patterns/agent-triggers.yaml +349 -0
- package/templates/.codex/skills/kafka-best-practices/SKILL.md +52 -0
- package/templates/.codex/skills/kotlin-best-practices/SKILL.md +256 -0
- package/templates/.codex/skills/lists/SKILL.md +78 -0
- package/templates/.codex/skills/memory-management/SKILL.md +195 -0
- package/templates/.codex/skills/memory-recall/SKILL.md +152 -0
- package/templates/.codex/skills/memory-save/SKILL.md +126 -0
- package/templates/.codex/skills/monitoring-setup/SKILL.md +115 -0
- package/templates/.codex/skills/npm-audit/SKILL.md +72 -0
- package/templates/.codex/skills/npm-publish/SKILL.md +63 -0
- package/templates/.codex/skills/npm-version/SKILL.md +75 -0
- package/templates/.codex/skills/optimize-analyze/SKILL.md +55 -0
- package/templates/.codex/skills/optimize-bundle/SKILL.md +67 -0
- package/templates/.codex/skills/optimize-report/SKILL.md +74 -0
- package/templates/.codex/skills/pipeline-architecture-patterns/SKILL.md +83 -0
- package/templates/.codex/skills/postgres-best-practices/SKILL.md +66 -0
- package/templates/.codex/skills/python-best-practices/SKILL.md +222 -0
- package/templates/.codex/skills/qa-lead-routing/SKILL.md +277 -0
- package/templates/.codex/skills/react-best-practices/SKILL.md +101 -0
- package/templates/.codex/skills/redis-best-practices/SKILL.md +83 -0
- package/templates/.codex/skills/result-aggregation/SKILL.md +164 -0
- package/templates/.codex/skills/rust-best-practices/SKILL.md +267 -0
- package/templates/.codex/skills/sauron-watch/SKILL.md +144 -0
- package/templates/.codex/skills/secretary-routing/SKILL.md +190 -0
- package/templates/.codex/skills/snowflake-best-practices/SKILL.md +65 -0
- package/templates/.codex/skills/spark-best-practices/SKILL.md +52 -0
- package/templates/.codex/skills/springboot-best-practices/SKILL.md +357 -0
- package/templates/.codex/skills/status/SKILL.md +153 -0
- package/templates/.codex/skills/supabase-postgres-best-practices/SKILL.md +99 -0
- package/templates/.codex/skills/typescript-best-practices/SKILL.md +321 -0
- package/templates/.codex/skills/update-docs/SKILL.md +140 -0
- package/templates/.codex/skills/update-external/SKILL.md +149 -0
- package/templates/.codex/skills/vercel-deploy/SKILL.md +73 -0
- package/templates/.codex/skills/web-design-guidelines/SKILL.md +118 -0
- package/templates/.codex/skills/writing-clearly-and-concisely/SKILL.md +64 -0
- package/templates/.codex/uninstall-hooks.sh +52 -0
- package/templates/AGENTS.md.en +39 -0
- package/templates/AGENTS.md.ko +39 -0
- package/templates/CLAUDE.md.en +7 -5
- package/templates/CLAUDE.md.ko +7 -5
- package/templates/guides/airflow/README.md +32 -0
- package/templates/guides/dbt/README.md +32 -0
- package/templates/guides/iceberg/README.md +49 -0
- package/templates/guides/kafka/README.md +32 -0
- package/templates/guides/postgres/README.md +58 -0
- package/templates/guides/redis/README.md +50 -0
- package/templates/guides/snowflake/README.md +32 -0
- package/templates/guides/spark/README.md +32 -0
- package/templates/manifest.codex.json +43 -0
- package/templates/manifest.json +5 -5
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: typescript-best-practices
|
|
3
|
+
description: Type-safe TypeScript patterns from industry standards
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
Apply type-safe TypeScript patterns and best practices from industry standards.
|
|
10
|
+
|
|
11
|
+
## Core Principles
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
Type safety over convenience
|
|
15
|
+
Explicit over implicit
|
|
16
|
+
Prefer strict mode
|
|
17
|
+
Use inference wisely
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Rules
|
|
21
|
+
|
|
22
|
+
### 1. Type System
|
|
23
|
+
|
|
24
|
+
```yaml
|
|
25
|
+
type_inference:
|
|
26
|
+
rely_on: trivially inferred types (primitives, literals)
|
|
27
|
+
annotate: complex expressions, return types, public APIs
|
|
28
|
+
|
|
29
|
+
any_vs_unknown:
|
|
30
|
+
prefer: unknown (requires type narrowing)
|
|
31
|
+
avoid: any (disables type checking)
|
|
32
|
+
if_any_needed: add suppressing comment
|
|
33
|
+
|
|
34
|
+
nullable:
|
|
35
|
+
prefer: "field?: Type"
|
|
36
|
+
avoid: "field: Type | undefined"
|
|
37
|
+
compare_enums: explicitly, not boolean coercion
|
|
38
|
+
|
|
39
|
+
patterns: |
|
|
40
|
+
// Good: unknown with narrowing
|
|
41
|
+
function process(data: unknown): void {
|
|
42
|
+
if (typeof data === 'string') {
|
|
43
|
+
console.log(data.toUpperCase());
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Avoid: any
|
|
48
|
+
function process(data: any): void {
|
|
49
|
+
console.log(data.toUpperCase()); // No type checking!
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### 2. Interfaces vs Types
|
|
54
|
+
|
|
55
|
+
```yaml
|
|
56
|
+
prefer_interfaces:
|
|
57
|
+
- Object type definitions
|
|
58
|
+
- Public API contracts
|
|
59
|
+
- Extendable types
|
|
60
|
+
|
|
61
|
+
use_types_for:
|
|
62
|
+
- Union types
|
|
63
|
+
- Intersection types
|
|
64
|
+
- Mapped types
|
|
65
|
+
- Utility types
|
|
66
|
+
|
|
67
|
+
patterns: |
|
|
68
|
+
// Interface for objects
|
|
69
|
+
interface User {
|
|
70
|
+
id: string;
|
|
71
|
+
name: string;
|
|
72
|
+
email: string;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Type for unions/utilities
|
|
76
|
+
type Status = 'pending' | 'active' | 'completed';
|
|
77
|
+
type ReadonlyUser = Readonly<User>;
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### 3. Arrays and Generics
|
|
81
|
+
|
|
82
|
+
```yaml
|
|
83
|
+
array_syntax:
|
|
84
|
+
simple_types: "T[]"
|
|
85
|
+
complex_types: "Array<T>"
|
|
86
|
+
|
|
87
|
+
generics:
|
|
88
|
+
naming: single uppercase (T, K, V) or descriptive (TItem, TResult)
|
|
89
|
+
constraints: use extends for type bounds
|
|
90
|
+
defaults: provide when appropriate
|
|
91
|
+
|
|
92
|
+
patterns: |
|
|
93
|
+
// Array syntax
|
|
94
|
+
const numbers: number[] = [1, 2, 3];
|
|
95
|
+
const items: Array<{ id: string; value: number }> = [];
|
|
96
|
+
|
|
97
|
+
// Generic constraints
|
|
98
|
+
function getProperty<T, K extends keyof T>(obj: T, key: K): T[K] {
|
|
99
|
+
return obj[key];
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### 4. Variables and Constants
|
|
104
|
+
|
|
105
|
+
```yaml
|
|
106
|
+
declarations:
|
|
107
|
+
prefer: const
|
|
108
|
+
when_needed: let
|
|
109
|
+
never: var
|
|
110
|
+
|
|
111
|
+
one_per_statement: true
|
|
112
|
+
|
|
113
|
+
patterns: |
|
|
114
|
+
// Good
|
|
115
|
+
const name = 'TypeScript';
|
|
116
|
+
const version = 5.0;
|
|
117
|
+
|
|
118
|
+
// Avoid
|
|
119
|
+
var name = 'TypeScript', version = 5.0;
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### 5. Functions
|
|
123
|
+
|
|
124
|
+
```yaml
|
|
125
|
+
function_declarations:
|
|
126
|
+
named_functions: function declaration
|
|
127
|
+
callbacks: arrow functions
|
|
128
|
+
methods: shorthand syntax
|
|
129
|
+
|
|
130
|
+
parameters:
|
|
131
|
+
prefer_rest: "...args: T[]"
|
|
132
|
+
avoid: arguments object
|
|
133
|
+
|
|
134
|
+
this_handling:
|
|
135
|
+
prefer: arrow functions or explicit parameter
|
|
136
|
+
avoid: rebinding with bind/call/apply
|
|
137
|
+
|
|
138
|
+
patterns: |
|
|
139
|
+
// Function declaration
|
|
140
|
+
function processData(data: Data): Result {
|
|
141
|
+
return transform(data);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// Arrow function for callbacks
|
|
145
|
+
items.map((item) => item.value);
|
|
146
|
+
|
|
147
|
+
// Rest parameters
|
|
148
|
+
function concat(...strings: string[]): string {
|
|
149
|
+
return strings.join('');
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### 6. Classes
|
|
154
|
+
|
|
155
|
+
```yaml
|
|
156
|
+
visibility:
|
|
157
|
+
prefer: explicit modifiers (public, private, protected)
|
|
158
|
+
avoid: private fields (#)
|
|
159
|
+
|
|
160
|
+
initialization:
|
|
161
|
+
prefer: at declaration site
|
|
162
|
+
use: parameter properties in constructors
|
|
163
|
+
|
|
164
|
+
readonly:
|
|
165
|
+
apply_to: non-reassigned properties
|
|
166
|
+
|
|
167
|
+
patterns: |
|
|
168
|
+
class User {
|
|
169
|
+
readonly id: string;
|
|
170
|
+
private email: string;
|
|
171
|
+
|
|
172
|
+
constructor(
|
|
173
|
+
public name: string,
|
|
174
|
+
email: string,
|
|
175
|
+
) {
|
|
176
|
+
this.id = generateId();
|
|
177
|
+
this.email = email;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### 7. Naming Conventions
|
|
183
|
+
|
|
184
|
+
```yaml
|
|
185
|
+
UpperCamelCase:
|
|
186
|
+
- Classes
|
|
187
|
+
- Interfaces
|
|
188
|
+
- Type aliases
|
|
189
|
+
- Enums
|
|
190
|
+
- Type parameters
|
|
191
|
+
|
|
192
|
+
lowerCamelCase:
|
|
193
|
+
- Variables
|
|
194
|
+
- Parameters
|
|
195
|
+
- Functions
|
|
196
|
+
- Methods
|
|
197
|
+
- Properties
|
|
198
|
+
|
|
199
|
+
CONSTANT_CASE:
|
|
200
|
+
- Global constants
|
|
201
|
+
- Enum values
|
|
202
|
+
- Static readonly fields
|
|
203
|
+
|
|
204
|
+
rules:
|
|
205
|
+
- No leading/trailing underscores
|
|
206
|
+
- No abbreviations (except universal: URL, ID, DNS)
|
|
207
|
+
- Acronyms as whole words: loadHttpUrl, not loadHTTPURL
|
|
208
|
+
- Single-letter names only in 10-line scopes
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### 8. Control Flow
|
|
212
|
+
|
|
213
|
+
```yaml
|
|
214
|
+
braces:
|
|
215
|
+
always: use braces for all control statements
|
|
216
|
+
|
|
217
|
+
equality:
|
|
218
|
+
always: "=== and !=="
|
|
219
|
+
never: "== and !="
|
|
220
|
+
|
|
221
|
+
loops:
|
|
222
|
+
arrays: for...of
|
|
223
|
+
objects: for...in with hasOwnProperty check
|
|
224
|
+
|
|
225
|
+
patterns: |
|
|
226
|
+
// Always braced
|
|
227
|
+
if (condition) {
|
|
228
|
+
doSomething();
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
// for...of for arrays
|
|
232
|
+
for (const item of items) {
|
|
233
|
+
process(item);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
// for...in with check
|
|
237
|
+
for (const key in obj) {
|
|
238
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
239
|
+
process(obj[key]);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### 9. Error Handling
|
|
245
|
+
|
|
246
|
+
```yaml
|
|
247
|
+
throwing:
|
|
248
|
+
only: Error instances
|
|
249
|
+
with_message: descriptive error messages
|
|
250
|
+
|
|
251
|
+
catching:
|
|
252
|
+
type: unknown
|
|
253
|
+
validate: before use
|
|
254
|
+
|
|
255
|
+
empty_catch:
|
|
256
|
+
require: rationale comment
|
|
257
|
+
|
|
258
|
+
patterns: |
|
|
259
|
+
// Throw Error instances
|
|
260
|
+
throw new Error('Invalid input');
|
|
261
|
+
|
|
262
|
+
// Catch with unknown
|
|
263
|
+
try {
|
|
264
|
+
riskyOperation();
|
|
265
|
+
} catch (error: unknown) {
|
|
266
|
+
if (error instanceof Error) {
|
|
267
|
+
console.error(error.message);
|
|
268
|
+
}
|
|
269
|
+
throw error;
|
|
270
|
+
}
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### 10. Imports and Exports
|
|
274
|
+
|
|
275
|
+
```yaml
|
|
276
|
+
imports:
|
|
277
|
+
prefer: named imports
|
|
278
|
+
use_namespace: for large APIs
|
|
279
|
+
prefer_relative: within project
|
|
280
|
+
|
|
281
|
+
exports:
|
|
282
|
+
prefer: named exports
|
|
283
|
+
avoid: default exports
|
|
284
|
+
|
|
285
|
+
patterns: |
|
|
286
|
+
// Named imports
|
|
287
|
+
import { User, UserService } from './user';
|
|
288
|
+
|
|
289
|
+
// Namespace import for large APIs
|
|
290
|
+
import * as fs from 'fs';
|
|
291
|
+
|
|
292
|
+
// Named exports
|
|
293
|
+
export interface User { }
|
|
294
|
+
export function createUser() { }
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
### 11. Disallowed Features
|
|
298
|
+
|
|
299
|
+
```yaml
|
|
300
|
+
never_use:
|
|
301
|
+
- eval() or dynamic code evaluation
|
|
302
|
+
- with statements
|
|
303
|
+
- const enum (use plain enum)
|
|
304
|
+
- debugger statements in production
|
|
305
|
+
- Modifying built-in prototypes
|
|
306
|
+
- Wrapper objects (new String(), new Boolean())
|
|
307
|
+
- Automatic semicolon insertion reliance
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
## Application
|
|
311
|
+
|
|
312
|
+
When writing or reviewing TypeScript code:
|
|
313
|
+
|
|
314
|
+
1. **Always** enable strict mode
|
|
315
|
+
2. **Always** use explicit return types for public APIs
|
|
316
|
+
3. **Prefer** unknown over any
|
|
317
|
+
4. **Prefer** interfaces for object types
|
|
318
|
+
5. **Use** const by default
|
|
319
|
+
6. **Use** triple equals exclusively
|
|
320
|
+
7. **Handle** errors with typed catch blocks
|
|
321
|
+
8. **Avoid** default exports
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: update-docs
|
|
3
|
+
description: Sync documentation with project structure
|
|
4
|
+
argument-hint: "[--check] [--target <path>]"
|
|
5
|
+
disable-model-invocation: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Update Documentation Skill
|
|
9
|
+
|
|
10
|
+
Ensures all documentation (AGENT.md, SKILL.md, index.yaml, AGENTS.md) accurately reflects the current project state and that agents work together organically.
|
|
11
|
+
|
|
12
|
+
## Options
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
--check, -c Check only, don't modify
|
|
16
|
+
--verbose, -v Show detailed changes
|
|
17
|
+
--target, -t Specific target to update
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Workflow
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
1. Scan project structure
|
|
24
|
+
├── .codex/agents/
|
|
25
|
+
├── .codex/skills/
|
|
26
|
+
├── guides/
|
|
27
|
+
└── commands/
|
|
28
|
+
|
|
29
|
+
2. Validate consistency
|
|
30
|
+
├── Check agent files exist
|
|
31
|
+
├── Check skill references exist
|
|
32
|
+
├── Check guide references exist
|
|
33
|
+
└── Check command definitions match files
|
|
34
|
+
|
|
35
|
+
3. Update documentation
|
|
36
|
+
├── Verify all .codex/agents/*.md files
|
|
37
|
+
├── Verify all .codex/skills/*/SKILL.md files
|
|
38
|
+
├── Update AGENTS.md summary
|
|
39
|
+
└── Update inter-agent references
|
|
40
|
+
|
|
41
|
+
4. Ensure organic integration
|
|
42
|
+
├── Verify agent → skill mappings
|
|
43
|
+
├── Verify agent → guide mappings
|
|
44
|
+
├── Verify command → agent mappings
|
|
45
|
+
└── Check for orphaned resources
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## What Gets Updated
|
|
49
|
+
|
|
50
|
+
### Agent Files
|
|
51
|
+
- All .codex/agents/*.md files exist and are valid
|
|
52
|
+
- No orphaned or missing agents
|
|
53
|
+
- Metadata is consistent
|
|
54
|
+
|
|
55
|
+
### Skill Files
|
|
56
|
+
- All .codex/skills/*/SKILL.md files exist
|
|
57
|
+
- Skill categories reflect actual structure
|
|
58
|
+
- References are valid
|
|
59
|
+
|
|
60
|
+
### AGENTS.md
|
|
61
|
+
- Project structure diagram
|
|
62
|
+
- Agent/skill/guide counts
|
|
63
|
+
- Command list
|
|
64
|
+
- Summary tables
|
|
65
|
+
|
|
66
|
+
### Individual Agent/Skill Files
|
|
67
|
+
- Skill references in agent files
|
|
68
|
+
- Guide references in agent files
|
|
69
|
+
- Cross-agent references
|
|
70
|
+
|
|
71
|
+
## Organic Integration Checks
|
|
72
|
+
|
|
73
|
+
```yaml
|
|
74
|
+
agent_skill_mapping:
|
|
75
|
+
- Each agent declares valid skills
|
|
76
|
+
- Skills are in correct category
|
|
77
|
+
- No duplicate skill declarations
|
|
78
|
+
|
|
79
|
+
agent_guide_mapping:
|
|
80
|
+
- Each agent declares valid guides
|
|
81
|
+
- Guides exist in guides/
|
|
82
|
+
- Paths are relative and correct
|
|
83
|
+
|
|
84
|
+
command_agent_mapping:
|
|
85
|
+
- Commands reference valid agents
|
|
86
|
+
- Agent capabilities match commands
|
|
87
|
+
- Workflow is documented
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Output Format
|
|
91
|
+
|
|
92
|
+
### Check Mode
|
|
93
|
+
```
|
|
94
|
+
[/update-docs --check]
|
|
95
|
+
|
|
96
|
+
Scanning project structure...
|
|
97
|
+
|
|
98
|
+
Agents:
|
|
99
|
+
✓ 15 agents found in .codex/agents/
|
|
100
|
+
✗ Missing: lang-java21-expert.md (referenced but not found)
|
|
101
|
+
|
|
102
|
+
Skills:
|
|
103
|
+
✓ 13 skills found in .codex/skills/
|
|
104
|
+
✓ All SKILL.md files valid
|
|
105
|
+
|
|
106
|
+
Guides:
|
|
107
|
+
✓ 12 guides declared
|
|
108
|
+
✗ Orphan: guides/old-guide/ (exists but not referenced)
|
|
109
|
+
|
|
110
|
+
AGENTS.md:
|
|
111
|
+
✗ Agent count outdated (shows 14, actual 15)
|
|
112
|
+
|
|
113
|
+
Issues Found: 3
|
|
114
|
+
Run "/update-docs" to fix.
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Update Mode
|
|
118
|
+
```
|
|
119
|
+
[/update-docs]
|
|
120
|
+
|
|
121
|
+
Syncing documentation with project structure...
|
|
122
|
+
|
|
123
|
+
[1/3] Verifying agents
|
|
124
|
+
- Removed reference: lang-java21-expert (not found)
|
|
125
|
+
✓ 15 → 14 agents
|
|
126
|
+
|
|
127
|
+
[2/3] Verifying skills
|
|
128
|
+
✓ No changes needed
|
|
129
|
+
|
|
130
|
+
[3/3] Updating AGENTS.md
|
|
131
|
+
- Updated agent count: 14 → 15
|
|
132
|
+
- Updated summary table
|
|
133
|
+
✓ Synced
|
|
134
|
+
|
|
135
|
+
Summary:
|
|
136
|
+
Modified: 1 file
|
|
137
|
+
Removed: 1 reference
|
|
138
|
+
|
|
139
|
+
All documentation synced successfully.
|
|
140
|
+
```
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: update-external
|
|
3
|
+
description: Update agents from external sources (GitHub, docs, etc.)
|
|
4
|
+
argument-hint: "[agent-name] [--check] [--force]"
|
|
5
|
+
disable-model-invocation: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Update External Sources Skill
|
|
9
|
+
|
|
10
|
+
Updates agents, skills, and guides that have external sources (GitHub, official docs, etc.) to their latest versions.
|
|
11
|
+
|
|
12
|
+
## Options
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
--check, -c Check for updates without applying
|
|
16
|
+
--force, -f Force update even if current
|
|
17
|
+
--verbose, -v Show detailed changes
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## External Sources
|
|
21
|
+
|
|
22
|
+
### Agents
|
|
23
|
+
```yaml
|
|
24
|
+
fe-vercel-agent:
|
|
25
|
+
source: https://github.com/vercel-labs/agent-skills
|
|
26
|
+
type: github
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Skills (from external agents)
|
|
30
|
+
```yaml
|
|
31
|
+
react-best-practices:
|
|
32
|
+
source: https://github.com/vercel-labs/agent-skills
|
|
33
|
+
type: github
|
|
34
|
+
|
|
35
|
+
web-design-guidelines:
|
|
36
|
+
source: https://github.com/vercel-labs/agent-skills
|
|
37
|
+
type: github
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Guides (reference documentation)
|
|
41
|
+
```yaml
|
|
42
|
+
golang:
|
|
43
|
+
source: https://go.dev/doc/effective_go
|
|
44
|
+
type: documentation
|
|
45
|
+
|
|
46
|
+
python:
|
|
47
|
+
source: https://peps.python.org/pep-0008/
|
|
48
|
+
type: documentation
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Workflow
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
1. Identify external resources
|
|
55
|
+
├── Scan index.yaml files
|
|
56
|
+
├── Find source.type = "external"
|
|
57
|
+
└── Collect URLs and versions
|
|
58
|
+
|
|
59
|
+
2. Check for updates
|
|
60
|
+
├── GitHub: Check releases/commits
|
|
61
|
+
├── Documentation: Check last-modified
|
|
62
|
+
└── Compare with current version
|
|
63
|
+
|
|
64
|
+
3. Fetch updates
|
|
65
|
+
├── Download new content
|
|
66
|
+
├── Parse and extract relevant parts
|
|
67
|
+
└── Validate content
|
|
68
|
+
|
|
69
|
+
4. Apply updates
|
|
70
|
+
├── Update content files
|
|
71
|
+
├── Update version in index.yaml
|
|
72
|
+
├── Update last_updated timestamp
|
|
73
|
+
└── Run mgr-supplier:audit to validate
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Version Tracking
|
|
77
|
+
|
|
78
|
+
Updates are tracked in each resource's index.yaml:
|
|
79
|
+
|
|
80
|
+
```yaml
|
|
81
|
+
source:
|
|
82
|
+
type: external
|
|
83
|
+
origin: github
|
|
84
|
+
url: https://github.com/vercel-labs/agent-skills
|
|
85
|
+
version: "1.2.0"
|
|
86
|
+
last_updated: "2026-01-22"
|
|
87
|
+
update_history:
|
|
88
|
+
- version: "1.0.0"
|
|
89
|
+
date: "2026-01-20"
|
|
90
|
+
- version: "1.2.0"
|
|
91
|
+
date: "2026-01-22"
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Output Format
|
|
95
|
+
|
|
96
|
+
### Check Mode
|
|
97
|
+
```
|
|
98
|
+
[mgr-updater:external --check]
|
|
99
|
+
|
|
100
|
+
Checking for external updates...
|
|
101
|
+
|
|
102
|
+
Agents:
|
|
103
|
+
fe-vercel-agent
|
|
104
|
+
Current: v1.0.0
|
|
105
|
+
Latest: v1.2.0
|
|
106
|
+
Status: UPDATE AVAILABLE
|
|
107
|
+
|
|
108
|
+
Skills:
|
|
109
|
+
react-best-practices
|
|
110
|
+
Source: github.com/vercel-labs/agent-skills
|
|
111
|
+
Status: UPDATE AVAILABLE (linked to agent)
|
|
112
|
+
|
|
113
|
+
Guides:
|
|
114
|
+
golang
|
|
115
|
+
Source: go.dev/doc/effective_go
|
|
116
|
+
Last fetched: 2026-01-22
|
|
117
|
+
Status: UP TO DATE
|
|
118
|
+
|
|
119
|
+
Summary:
|
|
120
|
+
Updates available: 1 agent, 1 skill
|
|
121
|
+
Up to date: 11 guides
|
|
122
|
+
|
|
123
|
+
Run "mgr-updater:external" to apply updates.
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Update Mode
|
|
127
|
+
```
|
|
128
|
+
[mgr-updater:external]
|
|
129
|
+
|
|
130
|
+
Updating external resources...
|
|
131
|
+
|
|
132
|
+
[1/2] Updating fe-vercel-agent
|
|
133
|
+
Fetching from github.com/vercel-labs/agent-skills...
|
|
134
|
+
✓ Downloaded v1.2.0
|
|
135
|
+
✓ Updated AGENT.md
|
|
136
|
+
✓ Updated index.yaml (version: 1.0.0 → 1.2.0)
|
|
137
|
+
✓ Updated related skills
|
|
138
|
+
|
|
139
|
+
[2/2] Validating updates
|
|
140
|
+
Running mgr-supplier:audit...
|
|
141
|
+
✓ All dependencies valid
|
|
142
|
+
|
|
143
|
+
Summary:
|
|
144
|
+
Updated: 1 agent
|
|
145
|
+
Synced: 3 skills
|
|
146
|
+
Validated: ✓
|
|
147
|
+
|
|
148
|
+
All external resources updated successfully.
|
|
149
|
+
```
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: vercel-deploy
|
|
3
|
+
description: Deploy applications to Vercel with auto-detection and preview URLs
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## When to Use
|
|
7
|
+
|
|
8
|
+
- Deploy application to Vercel
|
|
9
|
+
- Create preview deployments
|
|
10
|
+
- Generate shareable URLs
|
|
11
|
+
|
|
12
|
+
## Features
|
|
13
|
+
|
|
14
|
+
### Framework Detection
|
|
15
|
+
```
|
|
16
|
+
Auto-detects 40+ frameworks from package.json:
|
|
17
|
+
- Next.js
|
|
18
|
+
- React
|
|
19
|
+
- Vue
|
|
20
|
+
- Nuxt
|
|
21
|
+
- Svelte
|
|
22
|
+
- Astro
|
|
23
|
+
- and more...
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Auto Exclusions
|
|
27
|
+
```
|
|
28
|
+
Automatically excludes:
|
|
29
|
+
- node_modules/
|
|
30
|
+
- .git/
|
|
31
|
+
- .env files
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Output
|
|
35
|
+
```
|
|
36
|
+
On successful deployment:
|
|
37
|
+
1. Preview URL (view deployment)
|
|
38
|
+
2. Claim URL (transfer ownership)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Execution Flow
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
1. Detect project framework
|
|
45
|
+
2. Prepare deployment bundle
|
|
46
|
+
3. Upload to Vercel
|
|
47
|
+
4. Return URLs
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Output Format
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
[Deploy Success]
|
|
54
|
+
Preview: https://project-xxx.vercel.app
|
|
55
|
+
Claim: https://vercel.com/claim/xxx
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Scripts
|
|
59
|
+
|
|
60
|
+
See `scripts/deploy.sh` for deployment automation.
|
|
61
|
+
|
|
62
|
+
## Requirements
|
|
63
|
+
|
|
64
|
+
- Valid project structure
|
|
65
|
+
- package.json present
|
|
66
|
+
- Vercel CLI or API token (for authenticated deploys)
|
|
67
|
+
|
|
68
|
+
## Limitations
|
|
69
|
+
|
|
70
|
+
- Claimable deploys are anonymous
|
|
71
|
+
- Preview URLs are temporary
|
|
72
|
+
- Full features require Vercel account
|
|
73
|
+
```
|