opencode-skills-collection 2.0.0 → 2.0.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.
Files changed (90) hide show
  1. package/bundled-skills/.antigravity-install-manifest.json +6 -1
  2. package/bundled-skills/docs/integrations/jetski-cortex.md +3 -3
  3. package/bundled-skills/docs/integrations/jetski-gemini-loader/README.md +1 -1
  4. package/bundled-skills/docs/maintainers/repo-growth-seo.md +3 -3
  5. package/bundled-skills/docs/maintainers/skills-update-guide.md +1 -1
  6. package/bundled-skills/docs/users/bundles.md +1 -1
  7. package/bundled-skills/docs/users/claude-code-skills.md +1 -1
  8. package/bundled-skills/docs/users/gemini-cli-skills.md +1 -1
  9. package/bundled-skills/docs/users/getting-started.md +1 -1
  10. package/bundled-skills/docs/users/kiro-integration.md +1 -1
  11. package/bundled-skills/docs/users/usage.md +4 -4
  12. package/bundled-skills/docs/users/visual-guide.md +4 -4
  13. package/bundled-skills/manage-skills/SKILL.md +187 -0
  14. package/bundled-skills/monte-carlo-monitor-creation/SKILL.md +222 -0
  15. package/bundled-skills/monte-carlo-monitor-creation/references/comparison-monitor.md +426 -0
  16. package/bundled-skills/monte-carlo-monitor-creation/references/custom-sql-monitor.md +207 -0
  17. package/bundled-skills/monte-carlo-monitor-creation/references/metric-monitor.md +292 -0
  18. package/bundled-skills/monte-carlo-monitor-creation/references/table-monitor.md +231 -0
  19. package/bundled-skills/monte-carlo-monitor-creation/references/validation-monitor.md +404 -0
  20. package/bundled-skills/monte-carlo-prevent/SKILL.md +252 -0
  21. package/bundled-skills/monte-carlo-prevent/references/TROUBLESHOOTING.md +23 -0
  22. package/bundled-skills/monte-carlo-prevent/references/parameters.md +32 -0
  23. package/bundled-skills/monte-carlo-prevent/references/workflows.md +478 -0
  24. package/bundled-skills/monte-carlo-push-ingestion/SKILL.md +363 -0
  25. package/bundled-skills/monte-carlo-push-ingestion/references/anomaly-detection.md +87 -0
  26. package/bundled-skills/monte-carlo-push-ingestion/references/custom-lineage.md +203 -0
  27. package/bundled-skills/monte-carlo-push-ingestion/references/direct-http-api.md +207 -0
  28. package/bundled-skills/monte-carlo-push-ingestion/references/prerequisites.md +150 -0
  29. package/bundled-skills/monte-carlo-push-ingestion/references/push-lineage.md +160 -0
  30. package/bundled-skills/monte-carlo-push-ingestion/references/push-metadata.md +158 -0
  31. package/bundled-skills/monte-carlo-push-ingestion/references/push-query-logs.md +219 -0
  32. package/bundled-skills/monte-carlo-push-ingestion/references/validation.md +257 -0
  33. package/bundled-skills/monte-carlo-push-ingestion/scripts/sample_verify.py +357 -0
  34. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery/collect_and_push_lineage.py +70 -0
  35. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery/collect_and_push_metadata.py +65 -0
  36. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery/collect_and_push_query_logs.py +70 -0
  37. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery/collect_lineage.py +214 -0
  38. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery/collect_metadata.py +160 -0
  39. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery/collect_query_logs.py +164 -0
  40. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery/push_lineage.py +198 -0
  41. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery/push_metadata.py +193 -0
  42. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery/push_query_logs.py +207 -0
  43. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery-iceberg/collect_and_push_metadata.py +71 -0
  44. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery-iceberg/collect_and_push_query_logs.py +64 -0
  45. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery-iceberg/collect_metadata.py +253 -0
  46. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery-iceberg/collect_query_logs.py +149 -0
  47. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery-iceberg/push_metadata.py +190 -0
  48. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery-iceberg/push_query_logs.py +208 -0
  49. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/databricks/collect_and_push_lineage.py +83 -0
  50. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/databricks/collect_and_push_metadata.py +77 -0
  51. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/databricks/collect_and_push_query_logs.py +83 -0
  52. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/databricks/collect_lineage.py +240 -0
  53. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/databricks/collect_metadata.py +212 -0
  54. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/databricks/collect_query_logs.py +204 -0
  55. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/databricks/push_lineage.py +192 -0
  56. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/databricks/push_metadata.py +178 -0
  57. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/databricks/push_query_logs.py +200 -0
  58. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/hive/collect_and_push_lineage.py +119 -0
  59. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/hive/collect_and_push_metadata.py +119 -0
  60. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/hive/collect_and_push_query_logs.py +117 -0
  61. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/hive/collect_lineage.py +265 -0
  62. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/hive/collect_metadata.py +313 -0
  63. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/hive/collect_query_logs.py +284 -0
  64. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/hive/push_lineage.py +309 -0
  65. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/hive/push_metadata.py +245 -0
  66. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/hive/push_query_logs.py +255 -0
  67. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/redshift/collect_and_push_lineage.py +78 -0
  68. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/redshift/collect_and_push_metadata.py +80 -0
  69. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/redshift/collect_and_push_query_logs.py +88 -0
  70. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/redshift/collect_lineage.py +235 -0
  71. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/redshift/collect_metadata.py +219 -0
  72. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/redshift/collect_query_logs.py +239 -0
  73. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/redshift/push_lineage.py +178 -0
  74. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/redshift/push_metadata.py +178 -0
  75. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/redshift/push_query_logs.py +196 -0
  76. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/snowflake/collect_and_push_lineage.py +154 -0
  77. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/snowflake/collect_and_push_metadata.py +137 -0
  78. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/snowflake/collect_and_push_query_logs.py +137 -0
  79. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/snowflake/collect_lineage.py +349 -0
  80. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/snowflake/collect_metadata.py +329 -0
  81. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/snowflake/collect_query_logs.py +254 -0
  82. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/snowflake/push_lineage.py +307 -0
  83. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/snowflake/push_metadata.py +228 -0
  84. package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/snowflake/push_query_logs.py +248 -0
  85. package/bundled-skills/monte-carlo-push-ingestion/scripts/test_template_sdk_usage.py +340 -0
  86. package/bundled-skills/monte-carlo-validation-notebook/SKILL.md +685 -0
  87. package/bundled-skills/monte-carlo-validation-notebook/scripts/generate_notebook_url.py +141 -0
  88. package/bundled-skills/monte-carlo-validation-notebook/scripts/resolve_dbt_schema.py +161 -0
  89. package/package.json +1 -1
  90. package/skills_index.json +503 -61
@@ -0,0 +1,340 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Smoke test that every pycarlo model construction used by the templates
4
+ actually works with the real SDK. A wrong parameter name raises TypeError.
5
+
6
+ Run:
7
+ pip install pycarlo
8
+ python test_template_sdk_usage.py
9
+ """
10
+
11
+ from datetime import datetime, timezone
12
+
13
+ from pycarlo.features.ingestion.models import (
14
+ AssetField,
15
+ AssetFreshness,
16
+ AssetMetadata,
17
+ AssetVolume,
18
+ ColumnLineageField,
19
+ ColumnLineageSourceField,
20
+ LineageAssetRef,
21
+ LineageEvent,
22
+ QueryLogEntry,
23
+ RelationalAsset,
24
+ Tag,
25
+ build_lineage_payload,
26
+ build_metadata_payload,
27
+ build_query_log_payload,
28
+ )
29
+
30
+ PASSED = 0
31
+ FAILED = 0
32
+
33
+
34
+ def check(label: str, fn):
35
+ global PASSED, FAILED
36
+ try:
37
+ obj = fn()
38
+ # Also verify serialization works
39
+ if hasattr(obj, "to_dict"):
40
+ obj.to_dict()
41
+ PASSED += 1
42
+ print(f" PASS {label}")
43
+ except Exception as exc:
44
+ FAILED += 1
45
+ print(f" FAIL {label}: {exc}")
46
+
47
+
48
+ def test_metadata_models():
49
+ print("\n== Metadata models ==")
50
+
51
+ check("AssetField(name, type)", lambda: AssetField(name="id", type="INTEGER"))
52
+
53
+ check(
54
+ "AssetField(name, type, description)",
55
+ lambda: AssetField(name="id", type="INTEGER", description="Primary key"),
56
+ )
57
+
58
+ check(
59
+ "AssetMetadata(name, database, schema)",
60
+ lambda: AssetMetadata(name="orders", database="analytics", schema="public"),
61
+ )
62
+
63
+ check(
64
+ "AssetMetadata(name, database, schema, description, view_query, created_on)",
65
+ lambda: AssetMetadata(
66
+ name="orders_view",
67
+ database="analytics",
68
+ schema="public",
69
+ description="A view",
70
+ view_query="SELECT * FROM orders",
71
+ created_on="2026-01-01T00:00:00Z",
72
+ ),
73
+ )
74
+
75
+ check("AssetVolume(row_count)", lambda: AssetVolume(row_count=1000))
76
+ check(
77
+ "AssetVolume(row_count, byte_count)",
78
+ lambda: AssetVolume(row_count=1000, byte_count=50000),
79
+ )
80
+
81
+ check(
82
+ "AssetFreshness(last_update_time)",
83
+ lambda: AssetFreshness(last_update_time="2026-03-12T14:30:00Z"),
84
+ )
85
+
86
+ check("Tag(key, value)", lambda: Tag(key="env", value="prod"))
87
+ check("Tag(key only)", lambda: Tag(key="pii"))
88
+
89
+ check(
90
+ "RelationalAsset — full nested structure",
91
+ lambda: RelationalAsset(
92
+ type="TABLE",
93
+ metadata=AssetMetadata(
94
+ name="orders",
95
+ database="analytics",
96
+ schema="public",
97
+ description="Orders table",
98
+ ),
99
+ fields=[
100
+ AssetField(name="id", type="INTEGER"),
101
+ AssetField(name="amount", type="DECIMAL(10,2)", description="Order total"),
102
+ ],
103
+ volume=AssetVolume(row_count=1000000, byte_count=111111111),
104
+ freshness=AssetFreshness(last_update_time="2026-03-12T14:30:00Z"),
105
+ tags=[Tag(key="env", value="prod")],
106
+ ),
107
+ )
108
+
109
+ check(
110
+ "RelationalAsset — minimal (no volume, freshness, tags)",
111
+ lambda: RelationalAsset(
112
+ type="VIEW",
113
+ metadata=AssetMetadata(name="v_orders", database="db", schema="sch"),
114
+ ),
115
+ )
116
+
117
+
118
+ def test_lineage_models():
119
+ print("\n== Lineage models ==")
120
+
121
+ check(
122
+ "LineageAssetRef(type, name, database, schema)",
123
+ lambda: LineageAssetRef(
124
+ type="TABLE", name="orders", database="analytics", schema="public"
125
+ ),
126
+ )
127
+
128
+ check(
129
+ "LineageAssetRef(type, name, database, schema, asset_id)",
130
+ lambda: LineageAssetRef(
131
+ type="TABLE",
132
+ name="orders",
133
+ database="analytics",
134
+ schema="public",
135
+ asset_id="analytics:public.orders",
136
+ ),
137
+ )
138
+
139
+ check(
140
+ "LineageEvent — table lineage",
141
+ lambda: LineageEvent(
142
+ destination=LineageAssetRef(
143
+ type="TABLE", name="curated", database="db", schema="sch"
144
+ ),
145
+ sources=[
146
+ LineageAssetRef(type="TABLE", name="raw", database="db", schema="sch"),
147
+ ],
148
+ ),
149
+ )
150
+
151
+ check(
152
+ "ColumnLineageSourceField(asset_id, field_name)",
153
+ lambda: ColumnLineageSourceField(
154
+ asset_id="db:sch.raw", field_name="amount"
155
+ ),
156
+ )
157
+
158
+ check(
159
+ "ColumnLineageField(name, source_fields)",
160
+ lambda: ColumnLineageField(
161
+ name="total_amount",
162
+ source_fields=[
163
+ ColumnLineageSourceField(asset_id="db:sch.raw", field_name="amount"),
164
+ ],
165
+ ),
166
+ )
167
+
168
+ check(
169
+ "LineageEvent — column lineage",
170
+ lambda: LineageEvent(
171
+ destination=LineageAssetRef(
172
+ type="TABLE",
173
+ name="curated",
174
+ database="db",
175
+ schema="sch",
176
+ asset_id="db:sch.curated",
177
+ ),
178
+ sources=[
179
+ LineageAssetRef(
180
+ type="TABLE",
181
+ name="raw",
182
+ database="db",
183
+ schema="sch",
184
+ asset_id="db:sch.raw",
185
+ ),
186
+ ],
187
+ fields=[
188
+ ColumnLineageField(
189
+ name="total_amount",
190
+ source_fields=[
191
+ ColumnLineageSourceField(
192
+ asset_id="db:sch.raw", field_name="amount"
193
+ ),
194
+ ],
195
+ ),
196
+ ],
197
+ ),
198
+ )
199
+
200
+
201
+ def test_query_log_models():
202
+ print("\n== Query log models ==")
203
+
204
+ now = datetime.now(tz=timezone.utc)
205
+
206
+ check(
207
+ "QueryLogEntry — minimal",
208
+ lambda: QueryLogEntry(
209
+ start_time=now,
210
+ end_time=now,
211
+ query_text="SELECT 1",
212
+ ),
213
+ )
214
+
215
+ check(
216
+ "QueryLogEntry — full with extra",
217
+ lambda: QueryLogEntry(
218
+ start_time=now,
219
+ end_time=now,
220
+ query_text="SELECT * FROM orders",
221
+ query_id="query-123",
222
+ user="analyst@company.com",
223
+ returned_rows=100,
224
+ error_code=None,
225
+ error_text=None,
226
+ extra={
227
+ "warehouse_name": "COMPUTE_WH",
228
+ "bytes_scanned": 12345,
229
+ },
230
+ ),
231
+ )
232
+
233
+ check(
234
+ "QueryLogEntry — Snowflake extra fields",
235
+ lambda: QueryLogEntry(
236
+ start_time=now,
237
+ end_time=now,
238
+ query_text="SELECT 1",
239
+ extra={"warehouse_name": "WH", "bytes_scanned": 100},
240
+ ),
241
+ )
242
+
243
+ check(
244
+ "QueryLogEntry — BigQuery extra fields",
245
+ lambda: QueryLogEntry(
246
+ start_time=now,
247
+ end_time=now,
248
+ query_text="SELECT 1",
249
+ extra={"total_bytes_billed": 999, "statement_type": "SELECT"},
250
+ ),
251
+ )
252
+
253
+ check(
254
+ "QueryLogEntry — Databricks extra fields",
255
+ lambda: QueryLogEntry(
256
+ start_time=now,
257
+ end_time=now,
258
+ query_text="SELECT 1",
259
+ extra={"total_task_duration_ms": 500, "read_rows": 10, "read_bytes": 200},
260
+ ),
261
+ )
262
+
263
+ check(
264
+ "QueryLogEntry — Redshift extra fields",
265
+ lambda: QueryLogEntry(
266
+ start_time=now,
267
+ end_time=now,
268
+ query_text="SELECT 1",
269
+ extra={"database_name": "dev", "elapsed_time_us": 123456},
270
+ ),
271
+ )
272
+
273
+
274
+ def test_payload_builders():
275
+ print("\n== Payload builders ==")
276
+
277
+ now = datetime.now(tz=timezone.utc)
278
+
279
+ check(
280
+ "build_metadata_payload",
281
+ lambda: build_metadata_payload(
282
+ resource_uuid="uuid-123",
283
+ resource_type="snowflake",
284
+ events=[
285
+ RelationalAsset(
286
+ type="TABLE",
287
+ metadata=AssetMetadata(name="t", database="d", schema="s"),
288
+ )
289
+ ],
290
+ ),
291
+ )
292
+
293
+ check(
294
+ "build_lineage_payload — table",
295
+ lambda: build_lineage_payload(
296
+ resource_uuid="uuid-123",
297
+ resource_type="snowflake",
298
+ events=[
299
+ LineageEvent(
300
+ destination=LineageAssetRef(
301
+ type="TABLE", name="dst", database="d", schema="s"
302
+ ),
303
+ sources=[
304
+ LineageAssetRef(
305
+ type="TABLE", name="src", database="d", schema="s"
306
+ )
307
+ ],
308
+ )
309
+ ],
310
+ ),
311
+ )
312
+
313
+ check(
314
+ "build_query_log_payload",
315
+ lambda: build_query_log_payload(
316
+ resource_uuid="uuid-123",
317
+ log_type="snowflake",
318
+ events=[
319
+ QueryLogEntry(
320
+ start_time=now,
321
+ end_time=now,
322
+ query_text="SELECT 1",
323
+ )
324
+ ],
325
+ ),
326
+ )
327
+
328
+
329
+ if __name__ == "__main__":
330
+ test_metadata_models()
331
+ test_lineage_models()
332
+ test_query_log_models()
333
+ test_payload_builders()
334
+ print(f"\n{'='*40}")
335
+ print(f"Results: {PASSED} passed, {FAILED} failed")
336
+ if FAILED:
337
+ print("SOME TESTS FAILED — templates use wrong parameter names!")
338
+ raise SystemExit(1)
339
+ else:
340
+ print("All tests passed — all model constructions are valid.")