oh-my-customcode 0.12.1 → 0.12.2
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 +4 -8
- package/dist/cli/index.js +137 -336
- package/dist/index.js +99 -260
- package/package.json +2 -4
- 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,272 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* fetch-docs.js
|
|
5
|
-
*
|
|
6
|
-
* Fetches Codex documentation from official OpenAI sources and saves
|
|
7
|
-
* local snapshots for verification workflows.
|
|
8
|
-
*
|
|
9
|
-
* Usage:
|
|
10
|
-
* node fetch-docs.js [--force] [--output <dir>]
|
|
11
|
-
*
|
|
12
|
-
* Options:
|
|
13
|
-
* --force Skip 24-hour cache check
|
|
14
|
-
* --output <dir> Output directory (default: ~/.codex/references/codex-docs/)
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
import fs from 'node:fs';
|
|
18
|
-
import https from 'node:https';
|
|
19
|
-
import path from 'node:path';
|
|
20
|
-
import { homedir } from 'node:os';
|
|
21
|
-
|
|
22
|
-
const DEFAULT_OUTPUT_DIR = path.join(homedir(), '.codex', 'references', 'codex-docs');
|
|
23
|
-
const LAST_UPDATED_FILE = 'last-updated.txt';
|
|
24
|
-
const SOURCE_POLICY_FILE = 'source-policy.json';
|
|
25
|
-
const FETCH_REPORT_FILE = 'fetch-report.json';
|
|
26
|
-
const CACHE_HOURS = 24;
|
|
27
|
-
const FETCH_DELAY_MS = 200;
|
|
28
|
-
const MAX_REDIRECTS = 5;
|
|
29
|
-
const REQUEST_TIMEOUT_MS = 15000;
|
|
30
|
-
|
|
31
|
-
// Primary + fallback URLs are explicit to keep behavior predictable in CI.
|
|
32
|
-
const SOURCE_POLICY = [
|
|
33
|
-
{
|
|
34
|
-
id: 'codex-overview',
|
|
35
|
-
description: 'Codex landing and product overview',
|
|
36
|
-
urls: ['https://developers.openai.com/codex/', 'https://developers.openai.com/codex'],
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
id: 'codex-cli',
|
|
40
|
-
description: 'Codex CLI guide',
|
|
41
|
-
urls: ['https://developers.openai.com/codex/cli'],
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
id: 'codex-ide',
|
|
45
|
-
description: 'Codex IDE guide',
|
|
46
|
-
urls: ['https://developers.openai.com/codex/ide'],
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
id: 'codex-cloud',
|
|
50
|
-
description: 'Codex cloud guide',
|
|
51
|
-
urls: ['https://developers.openai.com/codex/cloud'],
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
id: 'codex-cloud-internet',
|
|
55
|
-
description: 'Codex cloud internet access policy',
|
|
56
|
-
urls: [
|
|
57
|
-
'https://developers.openai.com/codex/cloud/internet-access',
|
|
58
|
-
'https://developers.openai.com/codex/cloud/agent-internet',
|
|
59
|
-
],
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
id: 'codex-changelog',
|
|
63
|
-
description: 'Codex changelog',
|
|
64
|
-
urls: ['https://developers.openai.com/codex/changelog'],
|
|
65
|
-
},
|
|
66
|
-
];
|
|
67
|
-
|
|
68
|
-
function parseArgs() {
|
|
69
|
-
const args = {
|
|
70
|
-
force: false,
|
|
71
|
-
outputDir: DEFAULT_OUTPUT_DIR,
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
for (let i = 2; i < process.argv.length; i++) {
|
|
75
|
-
const arg = process.argv[i];
|
|
76
|
-
if (arg === '--force') {
|
|
77
|
-
args.force = true;
|
|
78
|
-
continue;
|
|
79
|
-
}
|
|
80
|
-
if (arg === '--output' && i + 1 < process.argv.length) {
|
|
81
|
-
args.outputDir = process.argv[++i];
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return args;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
function ensureDir(dirPath) {
|
|
89
|
-
if (!fs.existsSync(dirPath)) {
|
|
90
|
-
fs.mkdirSync(dirPath, { recursive: true });
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function sleep(ms) {
|
|
95
|
-
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
function isCacheFresh(outputDir) {
|
|
99
|
-
const lastUpdatedPath = path.join(outputDir, LAST_UPDATED_FILE);
|
|
100
|
-
if (!fs.existsSync(lastUpdatedPath)) {
|
|
101
|
-
return false;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
try {
|
|
105
|
-
const content = fs.readFileSync(lastUpdatedPath, 'utf-8').trim();
|
|
106
|
-
const lastUpdated = new Date(content);
|
|
107
|
-
if (Number.isNaN(lastUpdated.getTime())) {
|
|
108
|
-
return false;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
const hoursSince = (Date.now() - lastUpdated.getTime()) / (1000 * 60 * 60);
|
|
112
|
-
return hoursSince < CACHE_HOURS;
|
|
113
|
-
} catch {
|
|
114
|
-
return false;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
function fetchUrl(url, redirectCount = 0) {
|
|
119
|
-
return new Promise((resolve, reject) => {
|
|
120
|
-
const request = https.get(url, (res) => {
|
|
121
|
-
const statusCode = res.statusCode || 0;
|
|
122
|
-
|
|
123
|
-
if (statusCode >= 300 && statusCode < 400 && res.headers.location) {
|
|
124
|
-
if (redirectCount >= MAX_REDIRECTS) {
|
|
125
|
-
reject(new Error(`Too many redirects: ${url}`));
|
|
126
|
-
return;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
const redirectUrl = new URL(res.headers.location, url).toString();
|
|
130
|
-
fetchUrl(redirectUrl, redirectCount + 1).then(resolve).catch(reject);
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
if (statusCode !== 200) {
|
|
135
|
-
reject(new Error(`HTTP ${statusCode}: ${url}`));
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
let data = '';
|
|
140
|
-
res.setEncoding('utf8');
|
|
141
|
-
res.on('data', (chunk) => {
|
|
142
|
-
data += chunk;
|
|
143
|
-
});
|
|
144
|
-
res.on('end', () => {
|
|
145
|
-
resolve(data);
|
|
146
|
-
});
|
|
147
|
-
});
|
|
148
|
-
|
|
149
|
-
request.setTimeout(REQUEST_TIMEOUT_MS, () => {
|
|
150
|
-
request.destroy(new Error(`Request timeout after ${REQUEST_TIMEOUT_MS}ms: ${url}`));
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
request.on('error', reject);
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
async function fetchWithFallback(source) {
|
|
158
|
-
const errors = [];
|
|
159
|
-
|
|
160
|
-
for (const candidateUrl of source.urls) {
|
|
161
|
-
try {
|
|
162
|
-
const content = await fetchUrl(candidateUrl);
|
|
163
|
-
return { success: true, content, url: candidateUrl, errors };
|
|
164
|
-
} catch (error) {
|
|
165
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
166
|
-
errors.push({ url: candidateUrl, error: message });
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
return { success: false, content: null, url: null, errors };
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
function writeJsonFile(filePath, data) {
|
|
174
|
-
fs.writeFileSync(filePath, `${JSON.stringify(data, null, 2)}\n`, 'utf-8');
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
async function main() {
|
|
178
|
-
const { force, outputDir } = parseArgs();
|
|
179
|
-
|
|
180
|
-
console.log('Codex Documentation Fetcher');
|
|
181
|
-
console.log('==================================\n');
|
|
182
|
-
|
|
183
|
-
if (!force && isCacheFresh(outputDir)) {
|
|
184
|
-
console.log('✓ Cache is fresh (less than 24 hours old)');
|
|
185
|
-
console.log(' Use --force to bypass cache check\n');
|
|
186
|
-
console.log(`Output directory: ${outputDir}`);
|
|
187
|
-
return;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
ensureDir(outputDir);
|
|
191
|
-
|
|
192
|
-
const fetchedAt = new Date().toISOString();
|
|
193
|
-
const report = {
|
|
194
|
-
fetchedAt,
|
|
195
|
-
sourcePolicyVersion: 1,
|
|
196
|
-
totalSources: SOURCE_POLICY.length,
|
|
197
|
-
successCount: 0,
|
|
198
|
-
failureCount: 0,
|
|
199
|
-
sources: [],
|
|
200
|
-
};
|
|
201
|
-
|
|
202
|
-
console.log(`Source policy: ${SOURCE_POLICY.length} canonical source(s)\n`);
|
|
203
|
-
|
|
204
|
-
for (let i = 0; i < SOURCE_POLICY.length; i++) {
|
|
205
|
-
const source = SOURCE_POLICY[i];
|
|
206
|
-
console.log(`[${i + 1}/${SOURCE_POLICY.length}] ${source.id}`);
|
|
207
|
-
|
|
208
|
-
const result = await fetchWithFallback(source);
|
|
209
|
-
|
|
210
|
-
if (result.success) {
|
|
211
|
-
const fileName = `${source.id}.html`;
|
|
212
|
-
fs.writeFileSync(path.join(outputDir, fileName), result.content, 'utf-8');
|
|
213
|
-
report.successCount += 1;
|
|
214
|
-
report.sources.push({
|
|
215
|
-
id: source.id,
|
|
216
|
-
description: source.description,
|
|
217
|
-
status: 'ok',
|
|
218
|
-
selectedUrl: result.url,
|
|
219
|
-
outputFile: fileName,
|
|
220
|
-
attemptedUrls: source.urls,
|
|
221
|
-
});
|
|
222
|
-
console.log(` ✓ fetched ${result.url}`);
|
|
223
|
-
console.log(` ✓ saved ${fileName}`);
|
|
224
|
-
} else {
|
|
225
|
-
report.failureCount += 1;
|
|
226
|
-
report.sources.push({
|
|
227
|
-
id: source.id,
|
|
228
|
-
description: source.description,
|
|
229
|
-
status: 'failed',
|
|
230
|
-
selectedUrl: null,
|
|
231
|
-
outputFile: null,
|
|
232
|
-
attemptedUrls: source.urls,
|
|
233
|
-
errors: result.errors,
|
|
234
|
-
});
|
|
235
|
-
console.log(' ✗ failed all candidate URLs');
|
|
236
|
-
for (const item of result.errors) {
|
|
237
|
-
console.log(` - ${item.url}: ${item.error}`);
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
if (i < SOURCE_POLICY.length - 1) {
|
|
242
|
-
await sleep(FETCH_DELAY_MS);
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
writeJsonFile(path.join(outputDir, SOURCE_POLICY_FILE), {
|
|
247
|
-
generatedAt: fetchedAt,
|
|
248
|
-
policy: SOURCE_POLICY,
|
|
249
|
-
});
|
|
250
|
-
writeJsonFile(path.join(outputDir, FETCH_REPORT_FILE), report);
|
|
251
|
-
|
|
252
|
-
if (report.successCount === 0) {
|
|
253
|
-
console.error('\n✗ Fatal error: unable to fetch any Codex documentation sources.');
|
|
254
|
-
process.exit(1);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
fs.writeFileSync(path.join(outputDir, LAST_UPDATED_FILE), `${fetchedAt}\n`, 'utf-8');
|
|
258
|
-
|
|
259
|
-
console.log('\n==================================');
|
|
260
|
-
console.log('Summary:');
|
|
261
|
-
console.log(` Total sources: ${report.totalSources}`);
|
|
262
|
-
console.log(` Downloaded: ${report.successCount}`);
|
|
263
|
-
console.log(` Failed: ${report.failureCount}`);
|
|
264
|
-
console.log(` Save location: ${outputDir}`);
|
|
265
|
-
console.log(` Last updated: ${fetchedAt}`);
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
main().catch((error) => {
|
|
269
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
270
|
-
console.error('\n✗ Unexpected error:', message);
|
|
271
|
-
process.exit(1);
|
|
272
|
-
});
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: create-agent
|
|
3
|
-
description: Create a new agent with complete structure
|
|
4
|
-
argument-hint: "<name> --type <type>"
|
|
5
|
-
disable-model-invocation: true
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Create Agent Skill
|
|
9
|
-
|
|
10
|
-
Create a new agent with complete directory structure, files, and registration.
|
|
11
|
-
|
|
12
|
-
## Parameters
|
|
13
|
-
|
|
14
|
-
| Name | Type | Required | Description |
|
|
15
|
-
|------|------|----------|-------------|
|
|
16
|
-
| name | string | yes | Agent name (kebab-case) |
|
|
17
|
-
|
|
18
|
-
## Options
|
|
19
|
-
|
|
20
|
-
```
|
|
21
|
-
--type, -t Agent type (required)
|
|
22
|
-
Values: sw-engineer, sw-engineer/backend, infra-engineer, manager
|
|
23
|
-
--source, -s External source URL (for external agents)
|
|
24
|
-
--desc, -d Description
|
|
25
|
-
--skills Comma-separated skills to include
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## Workflow
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
1. Validate input
|
|
32
|
-
├── Name is unique
|
|
33
|
-
├── Name is kebab-case
|
|
34
|
-
└── Type is valid
|
|
35
|
-
|
|
36
|
-
2. Create agent file
|
|
37
|
-
└── .codex/agents/{name}.md
|
|
38
|
-
|
|
39
|
-
4. Validate
|
|
40
|
-
└── Run mgr-supplier:audit
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Templates
|
|
44
|
-
|
|
45
|
-
### Agent File Template
|
|
46
|
-
|
|
47
|
-
```markdown
|
|
48
|
-
# {Name} Agent
|
|
49
|
-
|
|
50
|
-
> **Type**: {Type}
|
|
51
|
-
> **Source**: Internal
|
|
52
|
-
|
|
53
|
-
## Purpose
|
|
54
|
-
|
|
55
|
-
{Description}
|
|
56
|
-
|
|
57
|
-
## Capabilities
|
|
58
|
-
|
|
59
|
-
1.
|
|
60
|
-
2.
|
|
61
|
-
|
|
62
|
-
## Skills
|
|
63
|
-
|
|
64
|
-
| Skill | Purpose |
|
|
65
|
-
|-------|---------|
|
|
66
|
-
|
|
67
|
-
## Guides
|
|
68
|
-
|
|
69
|
-
| Guide | Purpose |
|
|
70
|
-
|-------|---------|
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
## Output Format
|
|
74
|
-
|
|
75
|
-
```
|
|
76
|
-
[mgr-creator:agent lang-golang-expert --type sw-engineer]
|
|
77
|
-
|
|
78
|
-
Creating agent: lang-golang-expert
|
|
79
|
-
|
|
80
|
-
[1/4] Validating...
|
|
81
|
-
✓ Name available
|
|
82
|
-
✓ Type valid: sw-engineer
|
|
83
|
-
|
|
84
|
-
[2/4] Creating agent file...
|
|
85
|
-
✓ .codex/agents/lang-golang-expert.md
|
|
86
|
-
|
|
87
|
-
[3/4] Validating...
|
|
88
|
-
✓ mgr-supplier:audit passed
|
|
89
|
-
|
|
90
|
-
Agent created successfully: .codex/agents/lang-golang-expert.md
|
|
91
|
-
```
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: dbt-best-practices
|
|
3
|
-
description: dbt best practices for SQL modeling, testing, and analytics engineering workflows
|
|
4
|
-
user-invocable: false
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# dbt Best Practices
|
|
8
|
-
|
|
9
|
-
## Project Structure
|
|
10
|
-
|
|
11
|
-
### Layer Organization (CRITICAL)
|
|
12
|
-
- **Staging**: 1:1 with source tables (`stg_{source}__{entity}`)
|
|
13
|
-
- **Intermediate**: Business logic composition (`int_{entity}_{verb}`)
|
|
14
|
-
- **Marts**: Final consumption models (`fct_{entity}`, `dim_{entity}`)
|
|
15
|
-
|
|
16
|
-
### Materialization Strategy
|
|
17
|
-
- Staging: `view` (lightweight, always fresh)
|
|
18
|
-
- Intermediate: `ephemeral` or `view`
|
|
19
|
-
- Marts: `table` or `incremental`
|
|
20
|
-
|
|
21
|
-
## Modeling Patterns
|
|
22
|
-
|
|
23
|
-
### Naming Conventions
|
|
24
|
-
- Staging: `stg_source__table`
|
|
25
|
-
- Intermediate: `int_entity_verb`
|
|
26
|
-
- Facts: `fct_entity`
|
|
27
|
-
- Dimensions: `dim_entity`
|
|
28
|
-
|
|
29
|
-
### Incremental Models
|
|
30
|
-
- Use `is_incremental()` macro
|
|
31
|
-
- Define `unique_key` for merge strategy
|
|
32
|
-
- Choose strategy: append, merge, delete+insert
|
|
33
|
-
|
|
34
|
-
## Testing
|
|
35
|
-
|
|
36
|
-
### Schema Tests
|
|
37
|
-
- `unique`, `not_null` for primary keys
|
|
38
|
-
- `relationships` for foreign keys
|
|
39
|
-
- `accepted_values` for enums
|
|
40
|
-
- Custom data tests
|
|
41
|
-
|
|
42
|
-
### Source Freshness
|
|
43
|
-
- Configure `loaded_at_field`
|
|
44
|
-
- Set freshness thresholds
|
|
45
|
-
|
|
46
|
-
## Documentation
|
|
47
|
-
|
|
48
|
-
- Add descriptions to models
|
|
49
|
-
- Document column definitions
|
|
50
|
-
- Use `doc` blocks for reusable text
|
|
51
|
-
- Generate and host dbt docs
|
|
52
|
-
|
|
53
|
-
## References
|
|
54
|
-
- [dbt Best Practices](https://docs.getdbt.com/guides/best-practices)
|
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: de-lead-routing
|
|
3
|
-
description: Routes data engineering tasks to the correct DE expert agent. Use when user requests data pipeline design, DAG authoring, SQL modeling, stream processing, or warehouse optimization.
|
|
4
|
-
user-invocable: false
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# DE Lead Routing Skill
|
|
8
|
-
|
|
9
|
-
## Purpose
|
|
10
|
-
|
|
11
|
-
Routes data engineering tasks to appropriate DE expert agents. This skill contains the coordination logic for orchestrating data engineering agents across orchestration, modeling, processing, streaming, and warehouse specializations.
|
|
12
|
-
|
|
13
|
-
## Engineers Under Management
|
|
14
|
-
|
|
15
|
-
| Type | Agents | Purpose |
|
|
16
|
-
|------|--------|---------|
|
|
17
|
-
| de/orchestration | de-airflow-expert | DAG authoring, scheduling, testing |
|
|
18
|
-
| de/modeling | de-dbt-expert | SQL modeling, testing, documentation |
|
|
19
|
-
| de/processing | de-spark-expert | Distributed data processing |
|
|
20
|
-
| de/streaming | de-kafka-expert | Event streaming, topic design |
|
|
21
|
-
| de/warehouse | de-snowflake-expert | Cloud DWH, query optimization |
|
|
22
|
-
| de/architecture | de-pipeline-expert | Pipeline design, cross-tool patterns |
|
|
23
|
-
|
|
24
|
-
## Tool/Framework Detection
|
|
25
|
-
|
|
26
|
-
### Keyword Mapping
|
|
27
|
-
|
|
28
|
-
| Keyword | Agent |
|
|
29
|
-
|---------|-------|
|
|
30
|
-
| "airflow", "dag", "scheduling", "orchestration" | de-airflow-expert |
|
|
31
|
-
| "dbt", "modeling", "sql model", "analytics engineering" | de-dbt-expert |
|
|
32
|
-
| "spark", "pyspark", "distributed processing", "distributed" | de-spark-expert |
|
|
33
|
-
| "kafka", "streaming", "event", "consumer", "producer" | de-kafka-expert |
|
|
34
|
-
| "snowflake", "warehouse", "clustering key" | de-snowflake-expert |
|
|
35
|
-
| "pipeline", "ETL", "ELT", "data quality", "lineage" | de-pipeline-expert |
|
|
36
|
-
| "iceberg", "table format" | de-snowflake-expert or de-pipeline-expert |
|
|
37
|
-
|
|
38
|
-
### File Pattern Mapping
|
|
39
|
-
|
|
40
|
-
| Pattern | Agent |
|
|
41
|
-
|---------|-------|
|
|
42
|
-
| `dags/*.py`, `airflow.cfg`, `airflow_settings.yaml` | de-airflow-expert |
|
|
43
|
-
| `models/**/*.sql`, `dbt_project.yml`, `schema.yml` | de-dbt-expert |
|
|
44
|
-
| Spark job files, `spark-submit` configs | de-spark-expert |
|
|
45
|
-
| Kafka configs, `*.properties` (Kafka), `streams/*.java` | de-kafka-expert |
|
|
46
|
-
| Snowflake SQL, warehouse DDL | de-snowflake-expert |
|
|
47
|
-
|
|
48
|
-
## Command Routing
|
|
49
|
-
|
|
50
|
-
```
|
|
51
|
-
DE Request → Detection → Expert Agent
|
|
52
|
-
|
|
53
|
-
Airflow DAG → de-airflow-expert
|
|
54
|
-
dbt model → de-dbt-expert
|
|
55
|
-
Spark job → de-spark-expert
|
|
56
|
-
Kafka topic → de-kafka-expert
|
|
57
|
-
Snowflake → de-snowflake-expert
|
|
58
|
-
Pipeline → de-pipeline-expert
|
|
59
|
-
Multi-tool → Multiple experts (parallel)
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
## Routing Rules
|
|
63
|
-
|
|
64
|
-
### 1. Pipeline Development Workflow
|
|
65
|
-
|
|
66
|
-
```
|
|
67
|
-
1. Receive pipeline task request
|
|
68
|
-
2. Identify tools and components:
|
|
69
|
-
- DAG orchestration → de-airflow-expert
|
|
70
|
-
- SQL transformations → de-dbt-expert
|
|
71
|
-
- Distributed processing → de-spark-expert
|
|
72
|
-
- Event streaming → de-kafka-expert
|
|
73
|
-
- Warehouse operations → de-snowflake-expert
|
|
74
|
-
- Architecture decisions → de-pipeline-expert
|
|
75
|
-
3. Select appropriate experts
|
|
76
|
-
4. Distribute tasks (parallel if 2+ tools)
|
|
77
|
-
5. Aggregate results
|
|
78
|
-
6. Present unified report
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
Example:
|
|
82
|
-
```
|
|
83
|
-
User: "Design a pipeline that runs dbt models from Airflow and loads into Snowflake"
|
|
84
|
-
|
|
85
|
-
Detection:
|
|
86
|
-
- Airflow DAG → de-airflow-expert
|
|
87
|
-
- dbt model → de-dbt-expert
|
|
88
|
-
- Snowflake loading → de-snowflake-expert
|
|
89
|
-
- Pipeline architecture → de-pipeline-expert
|
|
90
|
-
|
|
91
|
-
Route (parallel where independent):
|
|
92
|
-
Task(de-pipeline-expert → overall architecture design)
|
|
93
|
-
Task(de-airflow-expert → DAG structure)
|
|
94
|
-
Task(de-dbt-expert → model design)
|
|
95
|
-
Task(de-snowflake-expert → warehouse setup)
|
|
96
|
-
|
|
97
|
-
Aggregate:
|
|
98
|
-
Pipeline architecture defined
|
|
99
|
-
Airflow DAG: 5 tasks designed
|
|
100
|
-
dbt: 12 models structured
|
|
101
|
-
Snowflake: warehouse + schema configured
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
### 2. Data Quality Workflow
|
|
105
|
-
|
|
106
|
-
```
|
|
107
|
-
1. Analyze data quality requirements
|
|
108
|
-
2. Route to appropriate experts:
|
|
109
|
-
- dbt tests → de-dbt-expert
|
|
110
|
-
- Pipeline validation → de-pipeline-expert
|
|
111
|
-
- Source freshness → de-airflow-expert
|
|
112
|
-
3. Coordinate cross-tool quality strategy
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
### 3. Multi-Tool Projects
|
|
116
|
-
|
|
117
|
-
For projects spanning multiple DE tools:
|
|
118
|
-
|
|
119
|
-
```
|
|
120
|
-
1. Detect all DE tools in project
|
|
121
|
-
2. Identify primary tool (most files/configs)
|
|
122
|
-
3. Route to appropriate experts:
|
|
123
|
-
- If task spans multiple tools → parallel experts
|
|
124
|
-
- If task is tool-specific → single expert
|
|
125
|
-
4. Coordinate cross-tool consistency
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
## Sub-agent Model Selection
|
|
129
|
-
|
|
130
|
-
### Model Mapping by Task Type
|
|
131
|
-
|
|
132
|
-
| Task Type | Recommended Model | Reason |
|
|
133
|
-
|-----------|-------------------|--------|
|
|
134
|
-
| Pipeline architecture | `reasoning` | Deep reasoning required |
|
|
135
|
-
| DAG/model review | `balanced` | Balanced quality judgment |
|
|
136
|
-
| Implementation | `balanced` | Standard code generation |
|
|
137
|
-
| Quick validation | `fast` | Fast response |
|
|
138
|
-
|
|
139
|
-
### Model Mapping by Agent
|
|
140
|
-
|
|
141
|
-
| Agent | Default Model | Alternative |
|
|
142
|
-
|-------|---------------|-------------|
|
|
143
|
-
| de-pipeline-expert | `balanced` | `reasoning` for architecture |
|
|
144
|
-
| de-airflow-expert | `balanced` | `fast` for DAG validation |
|
|
145
|
-
| de-dbt-expert | `balanced` | `fast` for test checks |
|
|
146
|
-
| de-spark-expert | `balanced` | `reasoning` for optimization |
|
|
147
|
-
| de-kafka-expert | `balanced` | `reasoning` for topology design |
|
|
148
|
-
| de-snowflake-expert | `balanced` | `reasoning` for warehouse design |
|
|
149
|
-
|
|
150
|
-
### Task Call Examples
|
|
151
|
-
|
|
152
|
-
```
|
|
153
|
-
# Complex pipeline architecture
|
|
154
|
-
Task(
|
|
155
|
-
subagent_type: "general-purpose",
|
|
156
|
-
prompt: "Design end-to-end pipeline architecture following de-pipeline-expert guidelines",
|
|
157
|
-
model: "reasoning"
|
|
158
|
-
)
|
|
159
|
-
|
|
160
|
-
# Standard DAG review
|
|
161
|
-
Task(
|
|
162
|
-
subagent_type: "general-purpose",
|
|
163
|
-
prompt: "Review Airflow DAGs in dags/ following de-airflow-expert guidelines",
|
|
164
|
-
model: "balanced"
|
|
165
|
-
)
|
|
166
|
-
|
|
167
|
-
# Quick dbt test validation
|
|
168
|
-
Task(
|
|
169
|
-
subagent_type: "Explore",
|
|
170
|
-
prompt: "Find all dbt models missing schema tests",
|
|
171
|
-
model: "fast"
|
|
172
|
-
)
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
## Parallel Execution
|
|
176
|
-
|
|
177
|
-
Following R009:
|
|
178
|
-
- Maximum 4 parallel instances
|
|
179
|
-
- Independent tool/module operations
|
|
180
|
-
- Coordinate cross-tool consistency
|
|
181
|
-
|
|
182
|
-
Example:
|
|
183
|
-
```
|
|
184
|
-
User: "Review all DE configs"
|
|
185
|
-
|
|
186
|
-
Detection:
|
|
187
|
-
- dags/ → de-airflow-expert
|
|
188
|
-
- models/ → de-dbt-expert
|
|
189
|
-
- kafka/ → de-kafka-expert
|
|
190
|
-
|
|
191
|
-
Route (parallel):
|
|
192
|
-
Task(de-airflow-expert role → review dags/, model: "balanced")
|
|
193
|
-
Task(de-dbt-expert role → review models/, model: "balanced")
|
|
194
|
-
Task(de-kafka-expert role → review kafka/, model: "balanced")
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
## Display Format
|
|
198
|
-
|
|
199
|
-
```
|
|
200
|
-
[Analyzing] Detected: Airflow, dbt, Snowflake
|
|
201
|
-
|
|
202
|
-
[Delegating] de-airflow-expert:balanced → DAG design
|
|
203
|
-
[Delegating] de-dbt-expert:balanced → Model structure
|
|
204
|
-
[Delegating] de-snowflake-expert:balanced → Warehouse config
|
|
205
|
-
|
|
206
|
-
[Progress] ███████████░ 2/3 experts completed
|
|
207
|
-
|
|
208
|
-
[Summary]
|
|
209
|
-
Airflow: DAG with 5 tasks designed
|
|
210
|
-
dbt: 12 models across 3 layers
|
|
211
|
-
Snowflake: Warehouse + schema configured
|
|
212
|
-
|
|
213
|
-
Pipeline design completed.
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
## Integration with Other Routing Skills
|
|
217
|
-
|
|
218
|
-
- **dev-lead-routing**: Hands off to DE lead when data engineering keywords detected
|
|
219
|
-
- **secretary-routing**: DE agents accessible through secretary for management tasks
|
|
220
|
-
- **qa-lead-routing**: Coordinates with QA for data quality testing
|
|
221
|
-
|
|
222
|
-
## Agent Teams Awareness
|
|
223
|
-
|
|
224
|
-
Before routing via Task tool, check if Agent Teams is available (`CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` or TeamCreate/SendMessage tools present).
|
|
225
|
-
|
|
226
|
-
**Self-check:** Does this task need 3+ agents, shared state, or inter-agent communication? If yes, prefer Agent Teams over Task tool. See R018 for the full decision matrix.
|
|
227
|
-
|
|
228
|
-
| Scenario | Preferred |
|
|
229
|
-
|----------|-----------|
|
|
230
|
-
| Single-tool DE task | Task Tool |
|
|
231
|
-
| Multi-tool pipeline design (3+ tools) | Agent Teams |
|
|
232
|
-
| Cross-tool data quality analysis | Agent Teams |
|
|
233
|
-
| Quick DAG/model validation | Task Tool |
|
|
234
|
-
|
|
235
|
-
## Usage
|
|
236
|
-
|
|
237
|
-
This skill is NOT user-invocable. It should be automatically triggered when the main conversation detects data engineering intent.
|
|
238
|
-
|
|
239
|
-
Detection criteria:
|
|
240
|
-
- User requests pipeline design or data engineering
|
|
241
|
-
- User mentions DE tool names (Airflow, dbt, Spark, Kafka, Snowflake)
|
|
242
|
-
- User provides DE-related file paths (dags/, models/, etc.)
|
|
243
|
-
- User requests data quality or lineage work
|