oh-my-customcode 0.12.1 → 0.12.3
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 +8 -11
- package/dist/cli/index.js +137 -336
- package/dist/index.js +99 -260
- package/package.json +2 -4
- package/templates/.claude/skills/codex-exec/SKILL.md +123 -0
- package/templates/.claude/skills/codex-exec/scripts/codex-wrapper.cjs +413 -0
- package/templates/CLAUDE.md.en +1 -0
- package/templates/CLAUDE.md.ko +1 -0
- package/templates/.codex/agents/arch-documenter.md +0 -33
- package/templates/.codex/agents/arch-speckit-agent.md +0 -47
- package/templates/.codex/agents/be-express-expert.md +0 -30
- package/templates/.codex/agents/be-fastapi-expert.md +0 -43
- package/templates/.codex/agents/be-go-backend-expert.md +0 -43
- package/templates/.codex/agents/be-nestjs-expert.md +0 -28
- package/templates/.codex/agents/be-springboot-expert.md +0 -40
- package/templates/.codex/agents/db-postgres-expert.md +0 -36
- package/templates/.codex/agents/db-redis-expert.md +0 -36
- package/templates/.codex/agents/db-supabase-expert.md +0 -35
- package/templates/.codex/agents/de-airflow-expert.md +0 -34
- package/templates/.codex/agents/de-dbt-expert.md +0 -34
- package/templates/.codex/agents/de-kafka-expert.md +0 -81
- package/templates/.codex/agents/de-pipeline-expert.md +0 -32
- package/templates/.codex/agents/de-snowflake-expert.md +0 -36
- package/templates/.codex/agents/de-spark-expert.md +0 -36
- package/templates/.codex/agents/fe-svelte-agent.md +0 -29
- package/templates/.codex/agents/fe-vercel-agent.md +0 -37
- package/templates/.codex/agents/fe-vuejs-agent.md +0 -30
- package/templates/.codex/agents/infra-aws-expert.md +0 -47
- package/templates/.codex/agents/infra-docker-expert.md +0 -47
- package/templates/.codex/agents/lang-golang-expert.md +0 -43
- package/templates/.codex/agents/lang-java21-expert.md +0 -39
- package/templates/.codex/agents/lang-kotlin-expert.md +0 -43
- package/templates/.codex/agents/lang-python-expert.md +0 -43
- package/templates/.codex/agents/lang-rust-expert.md +0 -43
- package/templates/.codex/agents/lang-typescript-expert.md +0 -43
- package/templates/.codex/agents/mgr-claude-code-bible.md +0 -58
- package/templates/.codex/agents/mgr-creator.md +0 -39
- package/templates/.codex/agents/mgr-gitnerd.md +0 -45
- package/templates/.codex/agents/mgr-sauron.md +0 -161
- package/templates/.codex/agents/mgr-supplier.md +0 -35
- package/templates/.codex/agents/mgr-sync-checker.md +0 -38
- package/templates/.codex/agents/mgr-updater.md +0 -33
- package/templates/.codex/agents/qa-engineer.md +0 -32
- package/templates/.codex/agents/qa-planner.md +0 -73
- package/templates/.codex/agents/qa-writer.md +0 -27
- package/templates/.codex/agents/sys-memory-keeper.md +0 -43
- package/templates/.codex/agents/sys-naggy.md +0 -37
- package/templates/.codex/agents/tool-bun-expert.md +0 -26
- package/templates/.codex/agents/tool-npm-expert.md +0 -30
- package/templates/.codex/agents/tool-optimizer.md +0 -34
- package/templates/.codex/codex-native-hash.txt +0 -1
- package/templates/.codex/contexts/dev.md +0 -20
- package/templates/.codex/contexts/ecomode.md +0 -63
- package/templates/.codex/contexts/index.yaml +0 -41
- package/templates/.codex/contexts/research.md +0 -28
- package/templates/.codex/contexts/review.md +0 -23
- package/templates/.codex/hooks/hooks.json +0 -150
- package/templates/.codex/install-hooks.sh +0 -100
- package/templates/.codex/rules/MAY-optimization.md +0 -29
- package/templates/.codex/rules/MUST-agent-design.md +0 -57
- package/templates/.codex/rules/MUST-agent-identification.md +0 -29
- package/templates/.codex/rules/MUST-continuous-improvement.md +0 -25
- package/templates/.codex/rules/MUST-intent-transparency.md +0 -42
- package/templates/.codex/rules/MUST-language-policy.md +0 -27
- package/templates/.codex/rules/MUST-orchestrator-coordination.md +0 -128
- package/templates/.codex/rules/MUST-parallel-execution.md +0 -97
- package/templates/.codex/rules/MUST-permissions.md +0 -30
- package/templates/.codex/rules/MUST-safety.md +0 -23
- package/templates/.codex/rules/MUST-sync-verification.md +0 -125
- package/templates/.codex/rules/MUST-tool-identification.md +0 -82
- package/templates/.codex/rules/SHOULD-agent-teams.md +0 -39
- package/templates/.codex/rules/SHOULD-ecomode.md +0 -37
- package/templates/.codex/rules/SHOULD-error-handling.md +0 -33
- package/templates/.codex/rules/SHOULD-hud-statusline.md +0 -32
- package/templates/.codex/rules/SHOULD-interaction.md +0 -34
- package/templates/.codex/rules/SHOULD-memory-integration.md +0 -39
- package/templates/.codex/rules/index.yaml +0 -141
- package/templates/.codex/skills/airflow-best-practices/SKILL.md +0 -56
- package/templates/.codex/skills/audit-agents/SKILL.md +0 -116
- package/templates/.codex/skills/aws-best-practices/SKILL.md +0 -280
- package/templates/.codex/skills/claude-code-bible/SKILL.md +0 -100
- package/templates/.codex/skills/claude-code-bible/scripts/fetch-docs.js +0 -272
- package/templates/.codex/skills/create-agent/SKILL.md +0 -91
- package/templates/.codex/skills/dbt-best-practices/SKILL.md +0 -54
- package/templates/.codex/skills/de-lead-routing/SKILL.md +0 -243
- package/templates/.codex/skills/dev-lead-routing/SKILL.md +0 -94
- package/templates/.codex/skills/dev-refactor/SKILL.md +0 -123
- package/templates/.codex/skills/dev-review/SKILL.md +0 -81
- package/templates/.codex/skills/docker-best-practices/SKILL.md +0 -275
- package/templates/.codex/skills/fastapi-best-practices/SKILL.md +0 -270
- package/templates/.codex/skills/fix-refs/SKILL.md +0 -107
- package/templates/.codex/skills/go-backend-best-practices/SKILL.md +0 -338
- package/templates/.codex/skills/go-best-practices/SKILL.md +0 -203
- package/templates/.codex/skills/help/SKILL.md +0 -125
- package/templates/.codex/skills/intent-detection/SKILL.md +0 -215
- package/templates/.codex/skills/intent-detection/patterns/agent-triggers.yaml +0 -349
- package/templates/.codex/skills/kafka-best-practices/SKILL.md +0 -52
- package/templates/.codex/skills/kotlin-best-practices/SKILL.md +0 -256
- package/templates/.codex/skills/lists/SKILL.md +0 -78
- package/templates/.codex/skills/memory-management/SKILL.md +0 -195
- package/templates/.codex/skills/memory-recall/SKILL.md +0 -152
- package/templates/.codex/skills/memory-save/SKILL.md +0 -126
- package/templates/.codex/skills/monitoring-setup/SKILL.md +0 -115
- package/templates/.codex/skills/npm-audit/SKILL.md +0 -72
- package/templates/.codex/skills/npm-publish/SKILL.md +0 -63
- package/templates/.codex/skills/npm-version/SKILL.md +0 -75
- package/templates/.codex/skills/optimize-analyze/SKILL.md +0 -55
- package/templates/.codex/skills/optimize-bundle/SKILL.md +0 -67
- package/templates/.codex/skills/optimize-report/SKILL.md +0 -74
- package/templates/.codex/skills/pipeline-architecture-patterns/SKILL.md +0 -83
- package/templates/.codex/skills/postgres-best-practices/SKILL.md +0 -66
- package/templates/.codex/skills/python-best-practices/SKILL.md +0 -222
- package/templates/.codex/skills/qa-lead-routing/SKILL.md +0 -290
- package/templates/.codex/skills/react-best-practices/SKILL.md +0 -101
- package/templates/.codex/skills/redis-best-practices/SKILL.md +0 -83
- package/templates/.codex/skills/result-aggregation/SKILL.md +0 -164
- package/templates/.codex/skills/rust-best-practices/SKILL.md +0 -267
- package/templates/.codex/skills/sauron-watch/SKILL.md +0 -144
- package/templates/.codex/skills/secretary-routing/SKILL.md +0 -203
- package/templates/.codex/skills/snowflake-best-practices/SKILL.md +0 -65
- package/templates/.codex/skills/spark-best-practices/SKILL.md +0 -52
- package/templates/.codex/skills/springboot-best-practices/SKILL.md +0 -218
- package/templates/.codex/skills/status/SKILL.md +0 -153
- package/templates/.codex/skills/supabase-postgres-best-practices/SKILL.md +0 -99
- package/templates/.codex/skills/typescript-best-practices/SKILL.md +0 -321
- package/templates/.codex/skills/update-docs/SKILL.md +0 -140
- package/templates/.codex/skills/update-external/SKILL.md +0 -149
- package/templates/.codex/skills/vercel-deploy/SKILL.md +0 -73
- package/templates/.codex/skills/web-design-guidelines/SKILL.md +0 -118
- package/templates/.codex/skills/writing-clearly-and-concisely/SKILL.md +0 -64
- package/templates/.codex/uninstall-hooks.sh +0 -52
- package/templates/AGENTS.md.en +0 -39
- package/templates/AGENTS.md.ko +0 -39
- package/templates/manifest.codex.json +0 -43
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: supabase-postgres-best-practices
|
|
3
|
-
description: PostgreSQL performance optimization guidelines from Supabase. Apply when writing SQL, designing schemas, configuring RLS, or optimizing database performance.
|
|
4
|
-
user-invocable: false
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Supabase PostgreSQL Best Practices
|
|
8
|
-
|
|
9
|
-
> Source: https://github.com/supabase/agent-skills
|
|
10
|
-
|
|
11
|
-
### Rule Categories (Prioritized by Impact)
|
|
12
|
-
|
|
13
|
-
| Priority | Category | Impact | Prefix |
|
|
14
|
-
|----------|----------|--------|--------|
|
|
15
|
-
| 1 | Query Performance | CRITICAL | query- |
|
|
16
|
-
| 2 | Connection Management | CRITICAL | conn- |
|
|
17
|
-
| 3 | Security & RLS | CRITICAL | security- |
|
|
18
|
-
| 4 | Schema Design | HIGH | schema- |
|
|
19
|
-
| 5 | Concurrency & Locking | MEDIUM-HIGH | lock- |
|
|
20
|
-
| 6 | Data Access Patterns | MEDIUM | data- |
|
|
21
|
-
| 7 | Monitoring & Diagnostics | LOW-MEDIUM | monitor- |
|
|
22
|
-
| 8 | Advanced Features | LOW | advanced- |
|
|
23
|
-
|
|
24
|
-
### 1. Query Performance (CRITICAL)
|
|
25
|
-
|
|
26
|
-
- Always add indexes for columns used in WHERE, JOIN, and ORDER BY clauses
|
|
27
|
-
- Use partial indexes for filtered queries: `CREATE INDEX idx_active ON users(email) WHERE active = true`
|
|
28
|
-
- Prefer `EXISTS` over `IN` for subqueries
|
|
29
|
-
- Avoid `SELECT *` - specify only needed columns
|
|
30
|
-
- Use `EXPLAIN ANALYZE` to verify query plans
|
|
31
|
-
- Add composite indexes for multi-column queries (column order matters)
|
|
32
|
-
- Use covering indexes to avoid heap lookups
|
|
33
|
-
|
|
34
|
-
### 2. Connection Management (CRITICAL)
|
|
35
|
-
|
|
36
|
-
- Use Supabase connection pooler (PgBouncer) for serverless/edge functions
|
|
37
|
-
- Use transaction mode for short-lived queries
|
|
38
|
-
- Use session mode only when needed (prepared statements, advisory locks)
|
|
39
|
-
- Set appropriate pool size limits
|
|
40
|
-
- Release connections promptly - avoid holding connections during external calls
|
|
41
|
-
- Use connection timeouts to prevent leaks
|
|
42
|
-
|
|
43
|
-
### 3. Security & RLS (CRITICAL)
|
|
44
|
-
|
|
45
|
-
- Enable RLS on ALL tables exposed via Supabase API
|
|
46
|
-
- Write policies using `auth.uid()` and `auth.jwt()`
|
|
47
|
-
- Avoid functions marked `SECURITY DEFINER` unless necessary
|
|
48
|
-
- Use `SECURITY INVOKER` as default for functions
|
|
49
|
-
- Never trust client-side data - validate in policies
|
|
50
|
-
- Test RLS policies with different roles
|
|
51
|
-
- Use `USING` for read policies, `WITH CHECK` for write policies
|
|
52
|
-
|
|
53
|
-
### 4. Schema Design (HIGH)
|
|
54
|
-
|
|
55
|
-
- Use appropriate data types (e.g., `uuid` for IDs, `timestamptz` for times)
|
|
56
|
-
- Add `NOT NULL` constraints where applicable
|
|
57
|
-
- Use `CHECK` constraints for data validation
|
|
58
|
-
- Prefer `text` over `varchar(n)` unless length limit is meaningful
|
|
59
|
-
- Use partial indexes instead of filtered queries
|
|
60
|
-
- Design schemas for the access patterns, not just the data model
|
|
61
|
-
|
|
62
|
-
### 5. Concurrency & Locking (MEDIUM-HIGH)
|
|
63
|
-
|
|
64
|
-
- Use `SELECT ... FOR UPDATE SKIP LOCKED` for queue patterns
|
|
65
|
-
- Keep transactions short to minimize lock contention
|
|
66
|
-
- Avoid long-running transactions during migrations
|
|
67
|
-
- Use advisory locks for application-level coordination
|
|
68
|
-
- Be aware of lock ordering to prevent deadlocks
|
|
69
|
-
|
|
70
|
-
### 6. Data Access Patterns (MEDIUM)
|
|
71
|
-
|
|
72
|
-
- Use Supabase client libraries for standard CRUD
|
|
73
|
-
- Use RPC functions for complex operations
|
|
74
|
-
- Implement pagination with cursor-based approach (not OFFSET)
|
|
75
|
-
- Use realtime subscriptions judiciously
|
|
76
|
-
- Batch operations where possible
|
|
77
|
-
|
|
78
|
-
### 7. Monitoring & Diagnostics (LOW-MEDIUM)
|
|
79
|
-
|
|
80
|
-
- Monitor `pg_stat_statements` for slow queries
|
|
81
|
-
- Check `pg_stat_user_indexes` for unused indexes
|
|
82
|
-
- Monitor connection count and pool utilization
|
|
83
|
-
- Set up alerts for long-running queries
|
|
84
|
-
- Review lock waits periodically
|
|
85
|
-
|
|
86
|
-
### 8. Advanced Features (LOW)
|
|
87
|
-
|
|
88
|
-
- Use CTEs for readable complex queries (but note CTE materialization)
|
|
89
|
-
- Leverage PostgreSQL extensions (pgvector, pg_trgm, etc.)
|
|
90
|
-
- Use generated columns for computed values
|
|
91
|
-
- Consider table partitioning for very large tables
|
|
92
|
-
- Use LISTEN/NOTIFY for event-driven patterns
|
|
93
|
-
|
|
94
|
-
### References
|
|
95
|
-
- Supabase Documentation: https://supabase.com/docs
|
|
96
|
-
- PostgreSQL Official Docs: https://www.postgresql.org/docs/
|
|
97
|
-
- Supabase Agent Skills: https://github.com/supabase/agent-skills
|
|
98
|
-
|
|
99
|
-
For detailed rule files with specific examples, see guides/supabase-postgres/.
|
|
@@ -1,321 +0,0 @@
|
|
|
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
|
|
@@ -1,140 +0,0 @@
|
|
|
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
|
-
```
|
|
@@ -1,149 +0,0 @@
|
|
|
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
|
-
```
|