@zimezone/z-command 1.1.1 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (288) hide show
  1. package/README.md +13 -1
  2. package/dist/cli.js +1 -1
  3. package/dist/commands/init.d.ts.map +1 -1
  4. package/dist/commands/init.js +42 -10
  5. package/dist/commands/init.js.map +1 -1
  6. package/dist/platforms.d.ts.map +1 -1
  7. package/dist/platforms.js +11 -1
  8. package/dist/platforms.js.map +1 -1
  9. package/dist/types.d.ts +2 -0
  10. package/dist/types.d.ts.map +1 -1
  11. package/package.json +8 -3
  12. package/templates.zip +0 -0
  13. package/templates/agents/accessibility-expert.agent.md +0 -56
  14. package/templates/agents/ai-engineer.agent.md +0 -61
  15. package/templates/agents/angular-architect.agent.md +0 -49
  16. package/templates/agents/api-designer.agent.md +0 -40
  17. package/templates/agents/api-documenter.agent.md +0 -161
  18. package/templates/agents/architect-review.agent.md +0 -146
  19. package/templates/agents/arm-cortex-expert.agent.md +0 -288
  20. package/templates/agents/azure-infra-engineer.agent.md +0 -57
  21. package/templates/agents/backend-architect.agent.md +0 -309
  22. package/templates/agents/backend-developer.agent.md +0 -61
  23. package/templates/agents/backend-security-coder.agent.md +0 -152
  24. package/templates/agents/bash-pro.agent.md +0 -285
  25. package/templates/agents/blockchain-developer.agent.md +0 -57
  26. package/templates/agents/build-engineer.agent.md +0 -56
  27. package/templates/agents/business-analyst.agent.md +0 -47
  28. package/templates/agents/c-pro.agent.md +0 -35
  29. package/templates/agents/c4-code.agent.md +0 -320
  30. package/templates/agents/c4-component.agent.md +0 -227
  31. package/templates/agents/c4-container.agent.md +0 -248
  32. package/templates/agents/c4-context.agent.md +0 -235
  33. package/templates/agents/cli-developer.agent.md +0 -57
  34. package/templates/agents/cloud-architect.agent.md +0 -56
  35. package/templates/agents/code-architect.agent.md +0 -63
  36. package/templates/agents/code-reviewer.agent.md +0 -49
  37. package/templates/agents/competitive-analyst.agent.md +0 -48
  38. package/templates/agents/conductor-validator.agent.md +0 -245
  39. package/templates/agents/context-manager.agent.md +0 -55
  40. package/templates/agents/cpp-pro.agent.md +0 -59
  41. package/templates/agents/csharp-developer.agent.md +0 -57
  42. package/templates/agents/csharp-pro.agent.md +0 -38
  43. package/templates/agents/customer-support.agent.md +0 -148
  44. package/templates/agents/data-engineer.agent.md +0 -55
  45. package/templates/agents/data-researcher.agent.md +0 -55
  46. package/templates/agents/data-scientist.agent.md +0 -56
  47. package/templates/agents/database-admin.agent.md +0 -142
  48. package/templates/agents/database-administrator.agent.md +0 -50
  49. package/templates/agents/database-architect.agent.md +0 -238
  50. package/templates/agents/database-optimizer.agent.md +0 -144
  51. package/templates/agents/debugger.agent.md +0 -30
  52. package/templates/agents/deployment-engineer.agent.md +0 -0
  53. package/templates/agents/devops-engineer.agent.md +0 -59
  54. package/templates/agents/devops-troubleshooter.agent.md +0 -138
  55. package/templates/agents/django-developer.agent.md +0 -50
  56. package/templates/agents/django-pro.agent.md +0 -159
  57. package/templates/agents/docs-architect.agent.md +0 -77
  58. package/templates/agents/documentation-engineer.agent.md +0 -57
  59. package/templates/agents/dotnet-architect.agent.md +0 -175
  60. package/templates/agents/dx-optimizer.agent.md +0 -63
  61. package/templates/agents/electron-pro.agent.md +0 -56
  62. package/templates/agents/elixir-pro.agent.md +0 -38
  63. package/templates/agents/embedded-systems.agent.md +0 -55
  64. package/templates/agents/error-detective.agent.md +0 -32
  65. package/templates/agents/event-sourcing-architect.agent.md +0 -42
  66. package/templates/agents/fastapi-pro.agent.md +0 -171
  67. package/templates/agents/fintech-engineer.agent.md +0 -57
  68. package/templates/agents/firmware-analyst.agent.md +0 -330
  69. package/templates/agents/flutter-expert.agent.md +0 -50
  70. package/templates/agents/frontend-developer.agent.md +0 -59
  71. package/templates/agents/frontend-security-coder.agent.md +0 -149
  72. package/templates/agents/fullstack-developer.agent.md +0 -46
  73. package/templates/agents/git-workflow-manager.agent.md +0 -57
  74. package/templates/agents/golang-pro.agent.md +0 -50
  75. package/templates/agents/graphql-architect.agent.md +0 -48
  76. package/templates/agents/haskell-pro.agent.md +0 -37
  77. package/templates/agents/hr-pro.agent.md +0 -105
  78. package/templates/agents/incident-responder.agent.md +0 -190
  79. package/templates/agents/ios-developer.agent.md +0 -198
  80. package/templates/agents/iot-engineer.agent.md +0 -56
  81. package/templates/agents/java-architect.agent.md +0 -48
  82. package/templates/agents/java-pro.agent.md +0 -156
  83. package/templates/agents/javascript-pro.agent.md +0 -35
  84. package/templates/agents/julia-pro.agent.md +0 -187
  85. package/templates/agents/kotlin-specialist.agent.md +0 -50
  86. package/templates/agents/laravel-specialist.agent.md +0 -50
  87. package/templates/agents/legacy-modernizer.agent.md +0 -56
  88. package/templates/agents/legal-advisor.agent.md +0 -49
  89. package/templates/agents/llm-architect.agent.md +0 -58
  90. package/templates/agents/malware-analyst.agent.md +0 -272
  91. package/templates/agents/mcp-developer.agent.md +0 -54
  92. package/templates/agents/mermaid-expert.agent.md +0 -39
  93. package/templates/agents/microservices-architect.agent.md +0 -47
  94. package/templates/agents/minecraft-bukkit-pro.agent.md +0 -104
  95. package/templates/agents/ml-engineer.agent.md +0 -56
  96. package/templates/agents/mlops-engineer.agent.md +0 -56
  97. package/templates/agents/mobile-developer.agent.md +0 -45
  98. package/templates/agents/mobile-security-coder.agent.md +0 -163
  99. package/templates/agents/monorepo-architect.agent.md +0 -44
  100. package/templates/agents/multi-agent-coordinator.agent.md +0 -55
  101. package/templates/agents/network-engineer.agent.md +0 -57
  102. package/templates/agents/nextjs-developer.agent.md +0 -48
  103. package/templates/agents/nlp-engineer.agent.md +0 -58
  104. package/templates/agents/observability-engineer.agent.md +0 -228
  105. package/templates/agents/payment-integration.agent.md +0 -56
  106. package/templates/agents/performance-engineer.agent.md +0 -167
  107. package/templates/agents/performance-optimizer.agent.md +0 -57
  108. package/templates/agents/php-pro.agent.md +0 -43
  109. package/templates/agents/platform-engineer.agent.md +0 -57
  110. package/templates/agents/posix-shell-pro.agent.md +0 -284
  111. package/templates/agents/postgres-pro.agent.md +0 -58
  112. package/templates/agents/product-manager.agent.md +0 -55
  113. package/templates/agents/project-manager.agent.md +0 -57
  114. package/templates/agents/prompt-engineer.agent.md +0 -58
  115. package/templates/agents/python-pro.agent.md +0 -48
  116. package/templates/agents/quant-analyst.agent.md +0 -32
  117. package/templates/agents/rails-expert.agent.md +0 -50
  118. package/templates/agents/react-specialist.agent.md +0 -49
  119. package/templates/agents/refactoring-specialist.agent.md +0 -56
  120. package/templates/agents/reference-builder.agent.md +0 -167
  121. package/templates/agents/research-analyst.agent.md +0 -63
  122. package/templates/agents/reverse-engineer.agent.md +0 -202
  123. package/templates/agents/risk-manager.agent.md +0 -41
  124. package/templates/agents/ruby-pro.agent.md +0 -35
  125. package/templates/agents/rust-pro.agent.md +0 -156
  126. package/templates/agents/sales-automator.agent.md +0 -35
  127. package/templates/agents/scala-pro.agent.md +0 -60
  128. package/templates/agents/scrum-master.agent.md +0 -54
  129. package/templates/agents/search-specialist.agent.md +0 -59
  130. package/templates/agents/security-analyst.agent.md +0 -57
  131. package/templates/agents/security-auditor.agent.md +0 -138
  132. package/templates/agents/security-engineer.agent.md +0 -57
  133. package/templates/agents/seo-authority-builder.agent.md +0 -116
  134. package/templates/agents/seo-cannibalization-detector.agent.md +0 -103
  135. package/templates/agents/seo-content-auditor.agent.md +0 -63
  136. package/templates/agents/seo-content-planner.agent.md +0 -88
  137. package/templates/agents/seo-content-refresher.agent.md +0 -98
  138. package/templates/agents/seo-content-writer.agent.md +0 -76
  139. package/templates/agents/seo-keyword-strategist.agent.md +0 -75
  140. package/templates/agents/seo-meta-optimizer.agent.md +0 -72
  141. package/templates/agents/seo-snippet-hunter.agent.md +0 -94
  142. package/templates/agents/seo-specialist.agent.md +0 -57
  143. package/templates/agents/seo-structure-architect.agent.md +0 -88
  144. package/templates/agents/service-mesh-expert.agent.md +0 -41
  145. package/templates/agents/sql-pro.agent.md +0 -146
  146. package/templates/agents/sre-engineer.agent.md +0 -58
  147. package/templates/agents/swift-expert.agent.md +0 -49
  148. package/templates/agents/task-distributor.agent.md +0 -47
  149. package/templates/agents/tdd-orchestrator.agent.md +0 -183
  150. package/templates/agents/technical-writer.agent.md +0 -48
  151. package/templates/agents/temporal-python-pro.agent.md +0 -349
  152. package/templates/agents/terraform-engineer.agent.md +0 -57
  153. package/templates/agents/terraform-specialist.agent.md +0 -137
  154. package/templates/agents/test-automator.agent.md +0 -203
  155. package/templates/agents/test-engineer.agent.md +0 -55
  156. package/templates/agents/threat-modeling-expert.agent.md +0 -44
  157. package/templates/agents/trend-analyst.agent.md +0 -47
  158. package/templates/agents/tutorial-engineer.agent.md +0 -118
  159. package/templates/agents/typescript-pro.agent.md +0 -48
  160. package/templates/agents/ui-designer.agent.md +0 -48
  161. package/templates/agents/ui-ux-designer.agent.md +0 -188
  162. package/templates/agents/ui-visual-validator.agent.md +0 -192
  163. package/templates/agents/ux-researcher.agent.md +0 -48
  164. package/templates/agents/vector-database-engineer.agent.md +0 -43
  165. package/templates/agents/vue-expert.agent.md +0 -48
  166. package/templates/agents/websocket-engineer.agent.md +0 -49
  167. package/templates/agents/workflow-orchestrator.agent.md +0 -48
  168. package/templates/skills/angular-migration/SKILL.md +0 -410
  169. package/templates/skills/api-design-principles/SKILL.md +0 -528
  170. package/templates/skills/api-design-principles/assets/api-design-checklist.md +0 -155
  171. package/templates/skills/api-design-principles/assets/rest-api-template.py +0 -182
  172. package/templates/skills/api-design-principles/references/graphql-schema-design.md +0 -583
  173. package/templates/skills/api-design-principles/references/rest-best-practices.md +0 -408
  174. package/templates/skills/architecture-decision-records/SKILL.md +0 -428
  175. package/templates/skills/architecture-patterns/SKILL.md +0 -494
  176. package/templates/skills/async-python-patterns/SKILL.md +0 -694
  177. package/templates/skills/auth-implementation-patterns/SKILL.md +0 -634
  178. package/templates/skills/changelog-automation/SKILL.md +0 -552
  179. package/templates/skills/code-review/SKILL.md +0 -62
  180. package/templates/skills/code-review-excellence/SKILL.md +0 -520
  181. package/templates/skills/competitive-landscape/SKILL.md +0 -479
  182. package/templates/skills/context-driven-development/SKILL.md +0 -385
  183. package/templates/skills/cost-optimization/SKILL.md +0 -274
  184. package/templates/skills/cqrs-implementation/SKILL.md +0 -554
  185. package/templates/skills/data-quality-frameworks/SKILL.md +0 -587
  186. package/templates/skills/data-storytelling/SKILL.md +0 -453
  187. package/templates/skills/database-migration/SKILL.md +0 -424
  188. package/templates/skills/dbt-transformation-patterns/SKILL.md +0 -561
  189. package/templates/skills/debugging-strategies/SKILL.md +0 -527
  190. package/templates/skills/defi-protocol-templates/SKILL.md +0 -454
  191. package/templates/skills/dependency-upgrade/SKILL.md +0 -409
  192. package/templates/skills/deployment-pipeline-design/SKILL.md +0 -359
  193. package/templates/skills/distributed-tracing/SKILL.md +0 -438
  194. package/templates/skills/dotnet-backend-patterns/SKILL.md +0 -815
  195. package/templates/skills/dotnet-backend-patterns/assets/repository-template.cs +0 -523
  196. package/templates/skills/dotnet-backend-patterns/assets/service-template.cs +0 -336
  197. package/templates/skills/dotnet-backend-patterns/references/dapper-patterns.md +0 -544
  198. package/templates/skills/dotnet-backend-patterns/references/ef-core-best-practices.md +0 -355
  199. package/templates/skills/e2e-testing-patterns/SKILL.md +0 -547
  200. package/templates/skills/employment-contract-templates/SKILL.md +0 -507
  201. package/templates/skills/error-handling-patterns/SKILL.md +0 -636
  202. package/templates/skills/event-store-design/SKILL.md +0 -437
  203. package/templates/skills/fastapi-templates/SKILL.md +0 -567
  204. package/templates/skills/git-advanced-workflows/SKILL.md +0 -400
  205. package/templates/skills/github-actions-templates/SKILL.md +0 -333
  206. package/templates/skills/go-concurrency-patterns/SKILL.md +0 -655
  207. package/templates/skills/grafana-dashboards/SKILL.md +0 -369
  208. package/templates/skills/helm-chart-scaffolding/SKILL.md +0 -544
  209. package/templates/skills/helm-chart-scaffolding/assets/Chart.yaml.template +0 -42
  210. package/templates/skills/helm-chart-scaffolding/assets/values.yaml.template +0 -185
  211. package/templates/skills/helm-chart-scaffolding/references/chart-structure.md +0 -500
  212. package/templates/skills/helm-chart-scaffolding/scripts/validate-chart.sh +0 -244
  213. package/templates/skills/javascript-testing-patterns/SKILL.md +0 -1025
  214. package/templates/skills/langchain-architecture/SKILL.md +0 -338
  215. package/templates/skills/llm-evaluation/SKILL.md +0 -471
  216. package/templates/skills/microservices-patterns/SKILL.md +0 -595
  217. package/templates/skills/modern-javascript-patterns/SKILL.md +0 -911
  218. package/templates/skills/monorepo-management/SKILL.md +0 -622
  219. package/templates/skills/nextjs-app-router-patterns/SKILL.md +0 -544
  220. package/templates/skills/nodejs-backend-patterns/SKILL.md +0 -1020
  221. package/templates/skills/nx-workspace-patterns/SKILL.md +0 -452
  222. package/templates/skills/openapi-spec-generation/SKILL.md +0 -1028
  223. package/templates/skills/paypal-integration/SKILL.md +0 -467
  224. package/templates/skills/pci-compliance/SKILL.md +0 -466
  225. package/templates/skills/postgresql/SKILL.md +0 -204
  226. package/templates/skills/projection-patterns/SKILL.md +0 -490
  227. package/templates/skills/prometheus-configuration/SKILL.md +0 -392
  228. package/templates/skills/prompt-engineering-patterns/SKILL.md +0 -201
  229. package/templates/skills/prompt-engineering-patterns/assets/few-shot-examples.json +0 -106
  230. package/templates/skills/prompt-engineering-patterns/assets/prompt-template-library.md +0 -246
  231. package/templates/skills/prompt-engineering-patterns/references/chain-of-thought.md +0 -399
  232. package/templates/skills/prompt-engineering-patterns/references/few-shot-learning.md +0 -369
  233. package/templates/skills/prompt-engineering-patterns/references/prompt-optimization.md +0 -414
  234. package/templates/skills/prompt-engineering-patterns/references/prompt-templates.md +0 -470
  235. package/templates/skills/prompt-engineering-patterns/references/system-prompts.md +0 -189
  236. package/templates/skills/prompt-engineering-patterns/scripts/optimize-prompt.py +0 -279
  237. package/templates/skills/python-packaging/SKILL.md +0 -870
  238. package/templates/skills/python-performance-optimization/SKILL.md +0 -869
  239. package/templates/skills/python-testing-patterns/SKILL.md +0 -907
  240. package/templates/skills/rag-implementation/SKILL.md +0 -403
  241. package/templates/skills/react-modernization/SKILL.md +0 -513
  242. package/templates/skills/react-native-architecture/SKILL.md +0 -671
  243. package/templates/skills/react-state-management/SKILL.md +0 -429
  244. package/templates/skills/risk-metrics-calculation/SKILL.md +0 -555
  245. package/templates/skills/rust-async-patterns/SKILL.md +0 -517
  246. package/templates/skills/secrets-management/SKILL.md +0 -346
  247. package/templates/skills/security-requirement-extraction/SKILL.md +0 -677
  248. package/templates/skills/security-review/SKILL.md +0 -78
  249. package/templates/skills/shellcheck-configuration/SKILL.md +0 -454
  250. package/templates/skills/similarity-search-patterns/SKILL.md +0 -558
  251. package/templates/skills/slo-implementation/SKILL.md +0 -329
  252. package/templates/skills/sql-optimization-patterns/SKILL.md +0 -493
  253. package/templates/skills/stripe-integration/SKILL.md +0 -442
  254. package/templates/skills/systematic-debugging/SKILL.md +0 -57
  255. package/templates/skills/tailwind-design-system/SKILL.md +0 -666
  256. package/templates/skills/temporal-python-testing/SKILL.md +0 -158
  257. package/templates/skills/temporal-python-testing/resources/integration-testing.md +0 -455
  258. package/templates/skills/temporal-python-testing/resources/local-setup.md +0 -553
  259. package/templates/skills/temporal-python-testing/resources/replay-testing.md +0 -462
  260. package/templates/skills/temporal-python-testing/resources/unit-testing.md +0 -328
  261. package/templates/skills/terraform-module-library/SKILL.md +0 -249
  262. package/templates/skills/terraform-module-library/references/aws-modules.md +0 -63
  263. package/templates/skills/test-driven-development/SKILL.md +0 -46
  264. package/templates/skills/threat-mitigation-mapping/SKILL.md +0 -745
  265. package/templates/skills/track-management/SKILL.md +0 -593
  266. package/templates/skills/typescript-advanced-types/SKILL.md +0 -717
  267. package/templates/skills/ui-ux-pro-max/SKILL.md +0 -352
  268. package/templates/skills/ui-ux-pro-max/data/charts.csv +0 -26
  269. package/templates/skills/ui-ux-pro-max/data/colors.csv +0 -97
  270. package/templates/skills/ui-ux-pro-max/data/icons.csv +0 -101
  271. package/templates/skills/ui-ux-pro-max/data/landing.csv +0 -31
  272. package/templates/skills/ui-ux-pro-max/data/products.csv +0 -97
  273. package/templates/skills/ui-ux-pro-max/data/prompts.csv +0 -24
  274. package/templates/skills/ui-ux-pro-max/data/react-performance.csv +0 -45
  275. package/templates/skills/ui-ux-pro-max/data/styles.csv +0 -59
  276. package/templates/skills/ui-ux-pro-max/data/typography.csv +0 -58
  277. package/templates/skills/ui-ux-pro-max/data/ui-reasoning.csv +0 -101
  278. package/templates/skills/ui-ux-pro-max/data/ux-guidelines.csv +0 -100
  279. package/templates/skills/ui-ux-pro-max/data/web-interface.csv +0 -31
  280. package/templates/skills/ui-ux-pro-max/scripts/core.py +0 -258
  281. package/templates/skills/ui-ux-pro-max/scripts/design_system.py +0 -547
  282. package/templates/skills/ui-ux-pro-max/scripts/search.py +0 -76
  283. package/templates/skills/uv-package-manager/SKILL.md +0 -831
  284. package/templates/skills/vector-index-tuning/SKILL.md +0 -521
  285. package/templates/skills/wcag-audit-patterns/SKILL.md +0 -555
  286. package/templates/skills/workflow-orchestration-patterns/SKILL.md +0 -316
  287. package/templates/skills/workflow-patterns/SKILL.md +0 -623
  288. package/templates/skills/writing-plans/SKILL.md +0 -64
@@ -1,392 +0,0 @@
1
- ---
2
- name: prometheus-configuration
3
- description: Set up Prometheus for comprehensive metric collection, storage, and monitoring of infrastructure and applications. Use when implementing metrics collection, setting up monitoring infrastructure, or configuring alerting systems.
4
- ---
5
-
6
- # Prometheus Configuration
7
-
8
- Complete guide to Prometheus setup, metric collection, scrape configuration, and recording rules.
9
-
10
- ## Purpose
11
-
12
- Configure Prometheus for comprehensive metric collection, alerting, and monitoring of infrastructure and applications.
13
-
14
- ## When to Use
15
-
16
- - Set up Prometheus monitoring
17
- - Configure metric scraping
18
- - Create recording rules
19
- - Design alert rules
20
- - Implement service discovery
21
-
22
- ## Prometheus Architecture
23
-
24
- ```
25
- ┌──────────────┐
26
- │ Applications │ ← Instrumented with client libraries
27
- └──────┬───────┘
28
- │ /metrics endpoint
29
-
30
- ┌──────────────┐
31
- │ Prometheus │ ← Scrapes metrics periodically
32
- │ Server │
33
- └──────┬───────┘
34
-
35
- ├─→ AlertManager (alerts)
36
- ├─→ Grafana (visualization)
37
- └─→ Long-term storage (Thanos/Cortex)
38
- ```
39
-
40
- ## Installation
41
-
42
- ### Kubernetes with Helm
43
-
44
- ```bash
45
- helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
46
- helm repo update
47
-
48
- helm install prometheus prometheus-community/kube-prometheus-stack \
49
- --namespace monitoring \
50
- --create-namespace \
51
- --set prometheus.prometheusSpec.retention=30d \
52
- --set prometheus.prometheusSpec.storageVolumeSize=50Gi
53
- ```
54
-
55
- ### Docker Compose
56
-
57
- ```yaml
58
- version: '3.8'
59
- services:
60
- prometheus:
61
- image: prom/prometheus:latest
62
- ports:
63
- - "9090:9090"
64
- volumes:
65
- - ./prometheus.yml:/etc/prometheus/prometheus.yml
66
- - prometheus-data:/prometheus
67
- command:
68
- - '--config.file=/etc/prometheus/prometheus.yml'
69
- - '--storage.tsdb.path=/prometheus'
70
- - '--storage.tsdb.retention.time=30d'
71
-
72
- volumes:
73
- prometheus-data:
74
- ```
75
-
76
- ## Configuration File
77
-
78
- **prometheus.yml:**
79
- ```yaml
80
- global:
81
- scrape_interval: 15s
82
- evaluation_interval: 15s
83
- external_labels:
84
- cluster: 'production'
85
- region: 'us-west-2'
86
-
87
- # Alertmanager configuration
88
- alerting:
89
- alertmanagers:
90
- - static_configs:
91
- - targets:
92
- - alertmanager:9093
93
-
94
- # Load rules files
95
- rule_files:
96
- - /etc/prometheus/rules/*.yml
97
-
98
- # Scrape configurations
99
- scrape_configs:
100
- # Prometheus itself
101
- - job_name: 'prometheus'
102
- static_configs:
103
- - targets: ['localhost:9090']
104
-
105
- # Node exporters
106
- - job_name: 'node-exporter'
107
- static_configs:
108
- - targets:
109
- - 'node1:9100'
110
- - 'node2:9100'
111
- - 'node3:9100'
112
- relabel_configs:
113
- - source_labels: [__address__]
114
- target_label: instance
115
- regex: '([^:]+)(:[0-9]+)?'
116
- replacement: '${1}'
117
-
118
- # Kubernetes pods with annotations
119
- - job_name: 'kubernetes-pods'
120
- kubernetes_sd_configs:
121
- - role: pod
122
- relabel_configs:
123
- - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
124
- action: keep
125
- regex: true
126
- - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path]
127
- action: replace
128
- target_label: __metrics_path__
129
- regex: (.+)
130
- - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
131
- action: replace
132
- regex: ([^:]+)(?::\d+)?;(\d+)
133
- replacement: $1:$2
134
- target_label: __address__
135
- - source_labels: [__meta_kubernetes_namespace]
136
- action: replace
137
- target_label: namespace
138
- - source_labels: [__meta_kubernetes_pod_name]
139
- action: replace
140
- target_label: pod
141
-
142
- # Application metrics
143
- - job_name: 'my-app'
144
- static_configs:
145
- - targets:
146
- - 'app1.example.com:9090'
147
- - 'app2.example.com:9090'
148
- metrics_path: '/metrics'
149
- scheme: 'https'
150
- tls_config:
151
- ca_file: /etc/prometheus/ca.crt
152
- cert_file: /etc/prometheus/client.crt
153
- key_file: /etc/prometheus/client.key
154
- ```
155
-
156
- **Reference:** See `assets/prometheus.yml.template`
157
-
158
- ## Scrape Configurations
159
-
160
- ### Static Targets
161
-
162
- ```yaml
163
- scrape_configs:
164
- - job_name: 'static-targets'
165
- static_configs:
166
- - targets: ['host1:9100', 'host2:9100']
167
- labels:
168
- env: 'production'
169
- region: 'us-west-2'
170
- ```
171
-
172
- ### File-based Service Discovery
173
-
174
- ```yaml
175
- scrape_configs:
176
- - job_name: 'file-sd'
177
- file_sd_configs:
178
- - files:
179
- - /etc/prometheus/targets/*.json
180
- - /etc/prometheus/targets/*.yml
181
- refresh_interval: 5m
182
- ```
183
-
184
- **targets/production.json:**
185
- ```json
186
- [
187
- {
188
- "targets": ["app1:9090", "app2:9090"],
189
- "labels": {
190
- "env": "production",
191
- "service": "api"
192
- }
193
- }
194
- ]
195
- ```
196
-
197
- ### Kubernetes Service Discovery
198
-
199
- ```yaml
200
- scrape_configs:
201
- - job_name: 'kubernetes-services'
202
- kubernetes_sd_configs:
203
- - role: service
204
- relabel_configs:
205
- - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape]
206
- action: keep
207
- regex: true
208
- - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme]
209
- action: replace
210
- target_label: __scheme__
211
- regex: (https?)
212
- - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path]
213
- action: replace
214
- target_label: __metrics_path__
215
- regex: (.+)
216
- ```
217
-
218
- **Reference:** See `references/scrape-configs.md`
219
-
220
- ## Recording Rules
221
-
222
- Create pre-computed metrics for frequently queried expressions:
223
-
224
- ```yaml
225
- # /etc/prometheus/rules/recording_rules.yml
226
- groups:
227
- - name: api_metrics
228
- interval: 15s
229
- rules:
230
- # HTTP request rate per service
231
- - record: job:http_requests:rate5m
232
- expr: sum by (job) (rate(http_requests_total[5m]))
233
-
234
- # Error rate percentage
235
- - record: job:http_requests_errors:rate5m
236
- expr: sum by (job) (rate(http_requests_total{status=~"5.."}[5m]))
237
-
238
- - record: job:http_requests_error_rate:percentage
239
- expr: |
240
- (job:http_requests_errors:rate5m / job:http_requests:rate5m) * 100
241
-
242
- # P95 latency
243
- - record: job:http_request_duration:p95
244
- expr: |
245
- histogram_quantile(0.95,
246
- sum by (job, le) (rate(http_request_duration_seconds_bucket[5m]))
247
- )
248
-
249
- - name: resource_metrics
250
- interval: 30s
251
- rules:
252
- # CPU utilization percentage
253
- - record: instance:node_cpu:utilization
254
- expr: |
255
- 100 - (avg by (instance) (rate(node_cpu_seconds_total{mode="idle"}[5m])) * 100)
256
-
257
- # Memory utilization percentage
258
- - record: instance:node_memory:utilization
259
- expr: |
260
- 100 - ((node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes) * 100)
261
-
262
- # Disk usage percentage
263
- - record: instance:node_disk:utilization
264
- expr: |
265
- 100 - ((node_filesystem_avail_bytes / node_filesystem_size_bytes) * 100)
266
- ```
267
-
268
- **Reference:** See `references/recording-rules.md`
269
-
270
- ## Alert Rules
271
-
272
- ```yaml
273
- # /etc/prometheus/rules/alert_rules.yml
274
- groups:
275
- - name: availability
276
- interval: 30s
277
- rules:
278
- - alert: ServiceDown
279
- expr: up{job="my-app"} == 0
280
- for: 1m
281
- labels:
282
- severity: critical
283
- annotations:
284
- summary: "Service {{ $labels.instance }} is down"
285
- description: "{{ $labels.job }} has been down for more than 1 minute"
286
-
287
- - alert: HighErrorRate
288
- expr: job:http_requests_error_rate:percentage > 5
289
- for: 5m
290
- labels:
291
- severity: warning
292
- annotations:
293
- summary: "High error rate for {{ $labels.job }}"
294
- description: "Error rate is {{ $value }}% (threshold: 5%)"
295
-
296
- - alert: HighLatency
297
- expr: job:http_request_duration:p95 > 1
298
- for: 5m
299
- labels:
300
- severity: warning
301
- annotations:
302
- summary: "High latency for {{ $labels.job }}"
303
- description: "P95 latency is {{ $value }}s (threshold: 1s)"
304
-
305
- - name: resources
306
- interval: 1m
307
- rules:
308
- - alert: HighCPUUsage
309
- expr: instance:node_cpu:utilization > 80
310
- for: 5m
311
- labels:
312
- severity: warning
313
- annotations:
314
- summary: "High CPU usage on {{ $labels.instance }}"
315
- description: "CPU usage is {{ $value }}%"
316
-
317
- - alert: HighMemoryUsage
318
- expr: instance:node_memory:utilization > 85
319
- for: 5m
320
- labels:
321
- severity: warning
322
- annotations:
323
- summary: "High memory usage on {{ $labels.instance }}"
324
- description: "Memory usage is {{ $value }}%"
325
-
326
- - alert: DiskSpaceLow
327
- expr: instance:node_disk:utilization > 90
328
- for: 5m
329
- labels:
330
- severity: critical
331
- annotations:
332
- summary: "Low disk space on {{ $labels.instance }}"
333
- description: "Disk usage is {{ $value }}%"
334
- ```
335
-
336
- ## Validation
337
-
338
- ```bash
339
- # Validate configuration
340
- promtool check config prometheus.yml
341
-
342
- # Validate rules
343
- promtool check rules /etc/prometheus/rules/*.yml
344
-
345
- # Test query
346
- promtool query instant http://localhost:9090 'up'
347
- ```
348
-
349
- **Reference:** See `scripts/validate-prometheus.sh`
350
-
351
- ## Best Practices
352
-
353
- 1. **Use consistent naming** for metrics (prefix_name_unit)
354
- 2. **Set appropriate scrape intervals** (15-60s typical)
355
- 3. **Use recording rules** for expensive queries
356
- 4. **Implement high availability** (multiple Prometheus instances)
357
- 5. **Configure retention** based on storage capacity
358
- 6. **Use relabeling** for metric cleanup
359
- 7. **Monitor Prometheus itself**
360
- 8. **Implement federation** for large deployments
361
- 9. **Use Thanos/Cortex** for long-term storage
362
- 10. **Document custom metrics**
363
-
364
- ## Troubleshooting
365
-
366
- **Check scrape targets:**
367
- ```bash
368
- curl http://localhost:9090/api/v1/targets
369
- ```
370
-
371
- **Check configuration:**
372
- ```bash
373
- curl http://localhost:9090/api/v1/status/config
374
- ```
375
-
376
- **Test query:**
377
- ```bash
378
- curl 'http://localhost:9090/api/v1/query?query=up'
379
- ```
380
-
381
- ## Reference Files
382
-
383
- - `assets/prometheus.yml.template` - Complete configuration template
384
- - `references/scrape-configs.md` - Scrape configuration patterns
385
- - `references/recording-rules.md` - Recording rule examples
386
- - `scripts/validate-prometheus.sh` - Validation script
387
-
388
- ## Related Skills
389
-
390
- - `grafana-dashboards` - For visualization
391
- - `slo-implementation` - For SLO monitoring
392
- - `distributed-tracing` - For request tracing
@@ -1,201 +0,0 @@
1
- ---
2
- name: prompt-engineering-patterns
3
- description: Master advanced prompt engineering techniques to maximize LLM performance, reliability, and controllability in production. Use when optimizing prompts, improving LLM outputs, or designing production prompt templates.
4
- ---
5
-
6
- # Prompt Engineering Patterns
7
-
8
- Master advanced prompt engineering techniques to maximize LLM performance, reliability, and controllability.
9
-
10
- ## When to Use This Skill
11
-
12
- - Designing complex prompts for production LLM applications
13
- - Optimizing prompt performance and consistency
14
- - Implementing structured reasoning patterns (chain-of-thought, tree-of-thought)
15
- - Building few-shot learning systems with dynamic example selection
16
- - Creating reusable prompt templates with variable interpolation
17
- - Debugging and refining prompts that produce inconsistent outputs
18
- - Implementing system prompts for specialized AI assistants
19
-
20
- ## Core Capabilities
21
-
22
- ### 1. Few-Shot Learning
23
- - Example selection strategies (semantic similarity, diversity sampling)
24
- - Balancing example count with context window constraints
25
- - Constructing effective demonstrations with input-output pairs
26
- - Dynamic example retrieval from knowledge bases
27
- - Handling edge cases through strategic example selection
28
-
29
- ### 2. Chain-of-Thought Prompting
30
- - Step-by-step reasoning elicitation
31
- - Zero-shot CoT with "Let's think step by step"
32
- - Few-shot CoT with reasoning traces
33
- - Self-consistency techniques (sampling multiple reasoning paths)
34
- - Verification and validation steps
35
-
36
- ### 3. Prompt Optimization
37
- - Iterative refinement workflows
38
- - A/B testing prompt variations
39
- - Measuring prompt performance metrics (accuracy, consistency, latency)
40
- - Reducing token usage while maintaining quality
41
- - Handling edge cases and failure modes
42
-
43
- ### 4. Template Systems
44
- - Variable interpolation and formatting
45
- - Conditional prompt sections
46
- - Multi-turn conversation templates
47
- - Role-based prompt composition
48
- - Modular prompt components
49
-
50
- ### 5. System Prompt Design
51
- - Setting model behavior and constraints
52
- - Defining output formats and structure
53
- - Establishing role and expertise
54
- - Safety guidelines and content policies
55
- - Context setting and background information
56
-
57
- ## Quick Start
58
-
59
- ```python
60
- from prompt_optimizer import PromptTemplate, FewShotSelector
61
-
62
- # Define a structured prompt template
63
- template = PromptTemplate(
64
- system="You are an expert SQL developer. Generate efficient, secure SQL queries.",
65
- instruction="Convert the following natural language query to SQL:\n{query}",
66
- few_shot_examples=True,
67
- output_format="SQL code block with explanatory comments"
68
- )
69
-
70
- # Configure few-shot learning
71
- selector = FewShotSelector(
72
- examples_db="sql_examples.jsonl",
73
- selection_strategy="semantic_similarity",
74
- max_examples=3
75
- )
76
-
77
- # Generate optimized prompt
78
- prompt = template.render(
79
- query="Find all users who registered in the last 30 days",
80
- examples=selector.select(query="user registration date filter")
81
- )
82
- ```
83
-
84
- ## Key Patterns
85
-
86
- ### Progressive Disclosure
87
- Start with simple prompts, add complexity only when needed:
88
-
89
- 1. **Level 1**: Direct instruction
90
- - "Summarize this article"
91
-
92
- 2. **Level 2**: Add constraints
93
- - "Summarize this article in 3 bullet points, focusing on key findings"
94
-
95
- 3. **Level 3**: Add reasoning
96
- - "Read this article, identify the main findings, then summarize in 3 bullet points"
97
-
98
- 4. **Level 4**: Add examples
99
- - Include 2-3 example summaries with input-output pairs
100
-
101
- ### Instruction Hierarchy
102
- ```
103
- [System Context] → [Task Instruction] → [Examples] → [Input Data] → [Output Format]
104
- ```
105
-
106
- ### Error Recovery
107
- Build prompts that gracefully handle failures:
108
- - Include fallback instructions
109
- - Request confidence scores
110
- - Ask for alternative interpretations when uncertain
111
- - Specify how to indicate missing information
112
-
113
- ## Best Practices
114
-
115
- 1. **Be Specific**: Vague prompts produce inconsistent results
116
- 2. **Show, Don't Tell**: Examples are more effective than descriptions
117
- 3. **Test Extensively**: Evaluate on diverse, representative inputs
118
- 4. **Iterate Rapidly**: Small changes can have large impacts
119
- 5. **Monitor Performance**: Track metrics in production
120
- 6. **Version Control**: Treat prompts as code with proper versioning
121
- 7. **Document Intent**: Explain why prompts are structured as they are
122
-
123
- ## Common Pitfalls
124
-
125
- - **Over-engineering**: Starting with complex prompts before trying simple ones
126
- - **Example pollution**: Using examples that don't match the target task
127
- - **Context overflow**: Exceeding token limits with excessive examples
128
- - **Ambiguous instructions**: Leaving room for multiple interpretations
129
- - **Ignoring edge cases**: Not testing on unusual or boundary inputs
130
-
131
- ## Integration Patterns
132
-
133
- ### With RAG Systems
134
- ```python
135
- # Combine retrieved context with prompt engineering
136
- prompt = f"""Given the following context:
137
- {retrieved_context}
138
-
139
- {few_shot_examples}
140
-
141
- Question: {user_question}
142
-
143
- Provide a detailed answer based solely on the context above. If the context doesn't contain enough information, explicitly state what's missing."""
144
- ```
145
-
146
- ### With Validation
147
- ```python
148
- # Add self-verification step
149
- prompt = f"""{main_task_prompt}
150
-
151
- After generating your response, verify it meets these criteria:
152
- 1. Answers the question directly
153
- 2. Uses only information from provided context
154
- 3. Cites specific sources
155
- 4. Acknowledges any uncertainty
156
-
157
- If verification fails, revise your response."""
158
- ```
159
-
160
- ## Performance Optimization
161
-
162
- ### Token Efficiency
163
- - Remove redundant words and phrases
164
- - Use abbreviations consistently after first definition
165
- - Consolidate similar instructions
166
- - Move stable content to system prompts
167
-
168
- ### Latency Reduction
169
- - Minimize prompt length without sacrificing quality
170
- - Use streaming for long-form outputs
171
- - Cache common prompt prefixes
172
- - Batch similar requests when possible
173
-
174
- ## Resources
175
-
176
- - **references/few-shot-learning.md**: Deep dive on example selection and construction
177
- - **references/chain-of-thought.md**: Advanced reasoning elicitation techniques
178
- - **references/prompt-optimization.md**: Systematic refinement workflows
179
- - **references/prompt-templates.md**: Reusable template patterns
180
- - **references/system-prompts.md**: System-level prompt design
181
- - **assets/prompt-template-library.md**: Battle-tested prompt templates
182
- - **assets/few-shot-examples.json**: Curated example datasets
183
- - **scripts/optimize-prompt.py**: Automated prompt optimization tool
184
-
185
- ## Success Metrics
186
-
187
- Track these KPIs for your prompts:
188
- - **Accuracy**: Correctness of outputs
189
- - **Consistency**: Reproducibility across similar inputs
190
- - **Latency**: Response time (P50, P95, P99)
191
- - **Token Usage**: Average tokens per request
192
- - **Success Rate**: Percentage of valid outputs
193
- - **User Satisfaction**: Ratings and feedback
194
-
195
- ## Next Steps
196
-
197
- 1. Review the prompt template library for common patterns
198
- 2. Experiment with few-shot learning for your specific use case
199
- 3. Implement prompt versioning and A/B testing
200
- 4. Set up automated evaluation pipelines
201
- 5. Document your prompt engineering decisions and learnings
@@ -1,106 +0,0 @@
1
- {
2
- "sentiment_analysis": [
3
- {
4
- "input": "This product exceeded my expectations! The quality is outstanding.",
5
- "output": "Positive"
6
- },
7
- {
8
- "input": "Terrible experience. The item arrived damaged and customer service was unhelpful.",
9
- "output": "Negative"
10
- },
11
- {
12
- "input": "The product works as described. Nothing special, but does the job.",
13
- "output": "Neutral"
14
- }
15
- ],
16
- "entity_extraction": [
17
- {
18
- "input": "Apple CEO Tim Cook announced the new iPhone at an event in Cupertino on September 12th.",
19
- "output": {
20
- "persons": ["Tim Cook"],
21
- "organizations": ["Apple"],
22
- "products": ["iPhone"],
23
- "locations": ["Cupertino"],
24
- "dates": ["September 12th"]
25
- }
26
- },
27
- {
28
- "input": "Microsoft acquired GitHub for $7.5 billion in 2018.",
29
- "output": {
30
- "persons": [],
31
- "organizations": ["Microsoft", "GitHub"],
32
- "products": [],
33
- "locations": [],
34
- "dates": ["2018"],
35
- "monetary_values": ["$7.5 billion"]
36
- }
37
- }
38
- ],
39
- "code_generation": [
40
- {
41
- "input": "Write a Python function to check if a string is a palindrome",
42
- "output": "def is_palindrome(s: str) -> bool:\n \"\"\"Check if string is palindrome, ignoring case and spaces.\"\"\"\n # Remove spaces and convert to lowercase\n cleaned = s.replace(' ', '').lower()\n # Compare with reversed string\n return cleaned == cleaned[::-1]"
43
- }
44
- ],
45
- "text_classification": [
46
- {
47
- "input": "How do I reset my password?",
48
- "output": "account_management"
49
- },
50
- {
51
- "input": "My order hasn't arrived yet. Where is it?",
52
- "output": "shipping_inquiry"
53
- },
54
- {
55
- "input": "I'd like to cancel my subscription.",
56
- "output": "subscription_cancellation"
57
- },
58
- {
59
- "input": "The app keeps crashing when I try to log in.",
60
- "output": "technical_support"
61
- }
62
- ],
63
- "data_transformation": [
64
- {
65
- "input": "John Smith, john@email.com, (555) 123-4567",
66
- "output": {
67
- "name": "John Smith",
68
- "email": "john@email.com",
69
- "phone": "(555) 123-4567"
70
- }
71
- },
72
- {
73
- "input": "Jane Doe | jane.doe@company.com | +1-555-987-6543",
74
- "output": {
75
- "name": "Jane Doe",
76
- "email": "jane.doe@company.com",
77
- "phone": "+1-555-987-6543"
78
- }
79
- }
80
- ],
81
- "question_answering": [
82
- {
83
- "context": "The Eiffel Tower is a wrought-iron lattice tower in Paris, France. It was constructed from 1887 to 1889 and stands 324 meters (1,063 ft) tall.",
84
- "question": "When was the Eiffel Tower built?",
85
- "answer": "The Eiffel Tower was constructed from 1887 to 1889."
86
- },
87
- {
88
- "context": "Python 3.11 was released on October 24, 2022. It includes performance improvements and new features like exception groups and improved error messages.",
89
- "question": "What are the new features in Python 3.11?",
90
- "answer": "Python 3.11 includes exception groups, improved error messages, and performance improvements."
91
- }
92
- ],
93
- "summarization": [
94
- {
95
- "input": "Climate change refers to long-term shifts in global temperatures and weather patterns. While climate change is natural, human activities have been the main driver since the 1800s, primarily due to the burning of fossil fuels like coal, oil and gas which produces heat-trapping greenhouse gases. The consequences include rising sea levels, more extreme weather events, and threats to biodiversity.",
96
- "output": "Climate change involves long-term alterations in global temperatures and weather patterns, primarily driven by human fossil fuel consumption since the 1800s, resulting in rising sea levels, extreme weather, and biodiversity threats."
97
- }
98
- ],
99
- "sql_generation": [
100
- {
101
- "schema": "users (id, name, email, created_at)\norders (id, user_id, total, order_date)",
102
- "request": "Find all users who have placed orders totaling more than $1000",
103
- "output": "SELECT u.id, u.name, u.email, SUM(o.total) as total_spent\nFROM users u\nJOIN orders o ON u.id = o.user_id\nGROUP BY u.id, u.name, u.email\nHAVING SUM(o.total) > 1000;"
104
- }
105
- ]
106
- }