dsh-ecc-skills 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (278) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +99 -0
  3. package/cordis.patch.yml +5 -0
  4. package/lib/index.js +195 -0
  5. package/package.json +46 -0
  6. package/skills/accessibility/SKILL.md +147 -0
  7. package/skills/agent-architecture-audit/SKILL.md +257 -0
  8. package/skills/agent-eval/SKILL.md +147 -0
  9. package/skills/agent-harness-construction/SKILL.md +74 -0
  10. package/skills/agent-introspection-debugging/SKILL.md +154 -0
  11. package/skills/agent-payment-x402/SKILL.md +225 -0
  12. package/skills/agent-self-evaluation/SKILL.md +182 -0
  13. package/skills/agent-sort/SKILL.md +216 -0
  14. package/skills/agentic-engineering/SKILL.md +64 -0
  15. package/skills/agentic-os/SKILL.md +388 -0
  16. package/skills/ai-first-engineering/SKILL.md +52 -0
  17. package/skills/ai-regression-testing/SKILL.md +386 -0
  18. package/skills/android-clean-architecture/SKILL.md +340 -0
  19. package/skills/angular-developer/SKILL.md +155 -0
  20. package/skills/api-connector-builder/SKILL.md +121 -0
  21. package/skills/api-design/SKILL.md +524 -0
  22. package/skills/architecture-decision-records/SKILL.md +180 -0
  23. package/skills/article-writing/SKILL.md +80 -0
  24. package/skills/automation-audit-ops/SKILL.md +143 -0
  25. package/skills/autonomous-agent-harness/SKILL.md +274 -0
  26. package/skills/autonomous-loops/SKILL.md +611 -0
  27. package/skills/backend-patterns/SKILL.md +562 -0
  28. package/skills/benchmark/SKILL.md +95 -0
  29. package/skills/benchmark-methodology/SKILL.md +191 -0
  30. package/skills/benchmark-optimization-loop/SKILL.md +71 -0
  31. package/skills/blender-motion-state-inspection/SKILL.md +165 -0
  32. package/skills/blueprint/SKILL.md +106 -0
  33. package/skills/brand-discovery/SKILL.md +145 -0
  34. package/skills/brand-voice/SKILL.md +98 -0
  35. package/skills/browser-qa/SKILL.md +105 -0
  36. package/skills/bun-runtime/SKILL.md +85 -0
  37. package/skills/canary-watch/SKILL.md +108 -0
  38. package/skills/carrier-relationship-management/SKILL.md +212 -0
  39. package/skills/cisco-ios-patterns/SKILL.md +164 -0
  40. package/skills/ck/SKILL.md +148 -0
  41. package/skills/claude-devfleet/SKILL.md +112 -0
  42. package/skills/click-path-audit/SKILL.md +245 -0
  43. package/skills/clickhouse-io/SKILL.md +445 -0
  44. package/skills/code-tour/SKILL.md +254 -0
  45. package/skills/codebase-onboarding/SKILL.md +234 -0
  46. package/skills/codehealth-mcp/SKILL.md +167 -0
  47. package/skills/coding-standards/SKILL.md +551 -0
  48. package/skills/competitive-platform-analysis/SKILL.md +214 -0
  49. package/skills/competitive-report-structure/SKILL.md +162 -0
  50. package/skills/compose-multiplatform-patterns/SKILL.md +300 -0
  51. package/skills/config-gc/SKILL.md +120 -0
  52. package/skills/configure-ecc/SKILL.md +206 -0
  53. package/skills/connections-optimizer/SKILL.md +190 -0
  54. package/skills/content-engine/SKILL.md +132 -0
  55. package/skills/content-hash-cache-pattern/SKILL.md +162 -0
  56. package/skills/context-budget/SKILL.md +136 -0
  57. package/skills/continuous-agent-loop/SKILL.md +46 -0
  58. package/skills/contract-first/SKILL.md +287 -0
  59. package/skills/cost-aware-llm-pipeline/SKILL.md +184 -0
  60. package/skills/cost-tracking/SKILL.md +97 -0
  61. package/skills/council/SKILL.md +204 -0
  62. package/skills/council-multi-model/SKILL.md +167 -0
  63. package/skills/cpp-coding-standards/SKILL.md +724 -0
  64. package/skills/cpp-testing/SKILL.md +325 -0
  65. package/skills/crosspost/SKILL.md +112 -0
  66. package/skills/csharp-testing/SKILL.md +322 -0
  67. package/skills/customer-billing-ops/SKILL.md +141 -0
  68. package/skills/customs-trade-compliance/SKILL.md +263 -0
  69. package/skills/dart-flutter-patterns/SKILL.md +564 -0
  70. package/skills/dashboard-builder/SKILL.md +109 -0
  71. package/skills/data-scraper-agent/SKILL.md +765 -0
  72. package/skills/data-throughput-accelerator/SKILL.md +74 -0
  73. package/skills/database-migrations/SKILL.md +430 -0
  74. package/skills/deep-research/SKILL.md +160 -0
  75. package/skills/defi-amm-security/SKILL.md +167 -0
  76. package/skills/delivery-gate/SKILL.md +126 -0
  77. package/skills/deployment-patterns/SKILL.md +428 -0
  78. package/skills/design-system/SKILL.md +83 -0
  79. package/skills/dev-team/SKILL.md +203 -0
  80. package/skills/django-celery/SKILL.md +458 -0
  81. package/skills/django-patterns/SKILL.md +735 -0
  82. package/skills/django-security/SKILL.md +644 -0
  83. package/skills/django-tdd/SKILL.md +730 -0
  84. package/skills/django-verification/SKILL.md +470 -0
  85. package/skills/dmux-workflows/SKILL.md +192 -0
  86. package/skills/docker-patterns/SKILL.md +520 -0
  87. package/skills/documentation-lookup/SKILL.md +91 -0
  88. package/skills/dotnet-patterns/SKILL.md +322 -0
  89. package/skills/dynamic-workflow-mode/SKILL.md +124 -0
  90. package/skills/e2e-testing/SKILL.md +327 -0
  91. package/skills/ecc-tools-cost-audit/SKILL.md +161 -0
  92. package/skills/email-ops/SKILL.md +122 -0
  93. package/skills/energy-procurement/SKILL.md +228 -0
  94. package/skills/enterprise-agent-ops/SKILL.md +51 -0
  95. package/skills/error-handling/SKILL.md +377 -0
  96. package/skills/eval-harness/SKILL.md +271 -0
  97. package/skills/evm-token-decimals/SKILL.md +131 -0
  98. package/skills/exa-search/SKILL.md +108 -0
  99. package/skills/fal-ai-media/SKILL.md +289 -0
  100. package/skills/fastapi-patterns/SKILL.md +514 -0
  101. package/skills/finance-billing-ops/SKILL.md +128 -0
  102. package/skills/flox-environments/SKILL.md +497 -0
  103. package/skills/flutter-dart-code-review/SKILL.md +436 -0
  104. package/skills/foundation-models-on-device/SKILL.md +243 -0
  105. package/skills/frontend-a11y/SKILL.md +446 -0
  106. package/skills/frontend-design-direction/SKILL.md +93 -0
  107. package/skills/frontend-patterns/SKILL.md +657 -0
  108. package/skills/fsharp-testing/SKILL.md +281 -0
  109. package/skills/gan-style-harness/SKILL.md +279 -0
  110. package/skills/generating-python-installer/SKILL.md +820 -0
  111. package/skills/git-workflow/SKILL.md +716 -0
  112. package/skills/github-ops/SKILL.md +145 -0
  113. package/skills/golang-patterns/SKILL.md +676 -0
  114. package/skills/golang-testing/SKILL.md +721 -0
  115. package/skills/google-workspace-ops/SKILL.md +96 -0
  116. package/skills/growth-log/SKILL.md +128 -0
  117. package/skills/healthcare-cdss-patterns/SKILL.md +246 -0
  118. package/skills/healthcare-emr-patterns/SKILL.md +160 -0
  119. package/skills/healthcare-eval-harness/SKILL.md +208 -0
  120. package/skills/healthcare-phi-compliance/SKILL.md +146 -0
  121. package/skills/hermes-imports/SKILL.md +89 -0
  122. package/skills/hexagonal-architecture/SKILL.md +277 -0
  123. package/skills/hipaa-compliance/SKILL.md +79 -0
  124. package/skills/homelab-network-readiness/SKILL.md +170 -0
  125. package/skills/homelab-network-setup/SKILL.md +130 -0
  126. package/skills/homelab-pihole-dns/SKILL.md +275 -0
  127. package/skills/homelab-vlan-segmentation/SKILL.md +312 -0
  128. package/skills/homelab-wireguard-vpn/SKILL.md +306 -0
  129. package/skills/hookify-rules/SKILL.md +128 -0
  130. package/skills/inherit-legacy-style/SKILL.md +157 -0
  131. package/skills/intent-driven-development/SKILL.md +360 -0
  132. package/skills/inventory-demand-planning/SKILL.md +247 -0
  133. package/skills/investor-materials/SKILL.md +97 -0
  134. package/skills/investor-outreach/SKILL.md +92 -0
  135. package/skills/ios-icon-gen/SKILL.md +158 -0
  136. package/skills/iterative-retrieval/SKILL.md +212 -0
  137. package/skills/ito-baskets/SKILL.md +263 -0
  138. package/skills/ito-compute/SKILL.md +151 -0
  139. package/skills/ito-inference/SKILL.md +119 -0
  140. package/skills/ito-training/SKILL.md +123 -0
  141. package/skills/java-coding-standards/SKILL.md +384 -0
  142. package/skills/jira-integration/SKILL.md +303 -0
  143. package/skills/jpa-patterns/SKILL.md +152 -0
  144. package/skills/knowledge-ops/SKILL.md +155 -0
  145. package/skills/kotlin-coroutines-flows/SKILL.md +285 -0
  146. package/skills/kotlin-exposed-patterns/SKILL.md +720 -0
  147. package/skills/kotlin-ktor-patterns/SKILL.md +690 -0
  148. package/skills/kotlin-patterns/SKILL.md +712 -0
  149. package/skills/kotlin-testing/SKILL.md +825 -0
  150. package/skills/kubernetes-patterns/SKILL.md +756 -0
  151. package/skills/laravel-patterns/SKILL.md +416 -0
  152. package/skills/laravel-plugin-discovery/SKILL.md +230 -0
  153. package/skills/laravel-security/SKILL.md +948 -0
  154. package/skills/laravel-tdd/SKILL.md +675 -0
  155. package/skills/laravel-verification/SKILL.md +180 -0
  156. package/skills/latency-critical-systems/SKILL.md +75 -0
  157. package/skills/lead-intelligence/SKILL.md +322 -0
  158. package/skills/liquid-glass-design/SKILL.md +279 -0
  159. package/skills/living-docs-governance/SKILL.md +137 -0
  160. package/skills/llm-trading-agent-security/SKILL.md +147 -0
  161. package/skills/logistics-exception-management/SKILL.md +222 -0
  162. package/skills/loop-design-check/SKILL.md +143 -0
  163. package/skills/mailtrap-email-integration/SKILL.md +77 -0
  164. package/skills/make-interfaces-feel-better/SKILL.md +152 -0
  165. package/skills/manim-video/SKILL.md +90 -0
  166. package/skills/market-research/SKILL.md +76 -0
  167. package/skills/marketing-campaign/SKILL.md +114 -0
  168. package/skills/mcp-server-patterns/SKILL.md +70 -0
  169. package/skills/messages-ops/SKILL.md +105 -0
  170. package/skills/ml-adoption-playbook/SKILL.md +57 -0
  171. package/skills/mle-workflow/SKILL.md +348 -0
  172. package/skills/motion-advanced/SKILL.md +597 -0
  173. package/skills/motion-foundations/SKILL.md +300 -0
  174. package/skills/motion-patterns/SKILL.md +435 -0
  175. package/skills/motion-ui/SKILL.md +576 -0
  176. package/skills/mysql-patterns/SKILL.md +413 -0
  177. package/skills/nanoclaw-repl/SKILL.md +34 -0
  178. package/skills/nasiko-control-plane/SKILL.md +49 -0
  179. package/skills/nestjs-patterns/SKILL.md +231 -0
  180. package/skills/netmiko-ssh-automation/SKILL.md +174 -0
  181. package/skills/network-bgp-diagnostics/SKILL.md +168 -0
  182. package/skills/network-config-validation/SKILL.md +211 -0
  183. package/skills/network-interface-health/SKILL.md +153 -0
  184. package/skills/nextjs-turbopack/SKILL.md +58 -0
  185. package/skills/nodejs-keccak256/SKILL.md +103 -0
  186. package/skills/nutrient-document-processing/SKILL.md +168 -0
  187. package/skills/nuxt4-patterns/SKILL.md +101 -0
  188. package/skills/opensource-pipeline/SKILL.md +256 -0
  189. package/skills/orch-add-feature/SKILL.md +45 -0
  190. package/skills/orch-build-mvp/SKILL.md +49 -0
  191. package/skills/orch-change-feature/SKILL.md +43 -0
  192. package/skills/orch-fix-defect/SKILL.md +43 -0
  193. package/skills/orch-pipeline/SKILL.md +121 -0
  194. package/skills/orch-refine-code/SKILL.md +44 -0
  195. package/skills/parallel-execution-optimizer/SKILL.md +74 -0
  196. package/skills/perl-patterns/SKILL.md +505 -0
  197. package/skills/perl-security/SKILL.md +504 -0
  198. package/skills/perl-testing/SKILL.md +476 -0
  199. package/skills/plan-canvas/SKILL.md +196 -0
  200. package/skills/plankton-code-quality/SKILL.md +237 -0
  201. package/skills/postgres-patterns/SKILL.md +148 -0
  202. package/skills/prediction-market-oracle-research/SKILL.md +64 -0
  203. package/skills/prediction-market-risk-review/SKILL.md +61 -0
  204. package/skills/prisma-patterns/SKILL.md +401 -0
  205. package/skills/product-capability/SKILL.md +142 -0
  206. package/skills/product-lens/SKILL.md +93 -0
  207. package/skills/production-audit/SKILL.md +207 -0
  208. package/skills/production-scheduling/SKILL.md +238 -0
  209. package/skills/project-flow-ops/SKILL.md +112 -0
  210. package/skills/prompt-optimizer/SKILL.md +398 -0
  211. package/skills/python-patterns/SKILL.md +751 -0
  212. package/skills/python-testing/SKILL.md +817 -0
  213. package/skills/pytorch-patterns/SKILL.md +397 -0
  214. package/skills/quality-nonconformance/SKILL.md +260 -0
  215. package/skills/quarkus-patterns/SKILL.md +723 -0
  216. package/skills/quarkus-security/SKILL.md +468 -0
  217. package/skills/quarkus-tdd/SKILL.md +812 -0
  218. package/skills/quarkus-verification/SKILL.md +481 -0
  219. package/skills/ralphinho-rfc-pipeline/SKILL.md +68 -0
  220. package/skills/react-native-patterns/SKILL.md +326 -0
  221. package/skills/react-patterns/SKILL.md +342 -0
  222. package/skills/react-performance/SKILL.md +575 -0
  223. package/skills/react-testing/SKILL.md +424 -0
  224. package/skills/recsys-pipeline-architect/SKILL.md +115 -0
  225. package/skills/recursive-decision-ledger/SKILL.md +81 -0
  226. package/skills/redis-patterns/SKILL.md +404 -0
  227. package/skills/regex-vs-llm-structured-text/SKILL.md +221 -0
  228. package/skills/remotion-video-creation/SKILL.md +43 -0
  229. package/skills/repo-scan/SKILL.md +170 -0
  230. package/skills/research-ops/SKILL.md +113 -0
  231. package/skills/returns-reverse-logistics/SKILL.md +240 -0
  232. package/skills/rules-distill/SKILL.md +265 -0
  233. package/skills/rust-patterns/SKILL.md +500 -0
  234. package/skills/rust-testing/SKILL.md +501 -0
  235. package/skills/safety-guard/SKILL.md +76 -0
  236. package/skills/santa-method/SKILL.md +307 -0
  237. package/skills/scientific-db-pubmed-database/SKILL.md +176 -0
  238. package/skills/scientific-db-uspto-database/SKILL.md +178 -0
  239. package/skills/scientific-pkg-gget/SKILL.md +167 -0
  240. package/skills/scientific-thinking-literature-review/SKILL.md +193 -0
  241. package/skills/scientific-thinking-scholar-evaluation/SKILL.md +161 -0
  242. package/skills/search-first/SKILL.md +183 -0
  243. package/skills/security-bounty-hunter/SKILL.md +100 -0
  244. package/skills/security-scan/SKILL.md +166 -0
  245. package/skills/seo/SKILL.md +155 -0
  246. package/skills/skill-scout/SKILL.md +141 -0
  247. package/skills/skill-stocktake/SKILL.md +195 -0
  248. package/skills/social-graph-ranker/SKILL.md +155 -0
  249. package/skills/social-publisher/SKILL.md +130 -0
  250. package/skills/springboot-patterns/SKILL.md +315 -0
  251. package/skills/springboot-security/SKILL.md +273 -0
  252. package/skills/springboot-tdd/SKILL.md +159 -0
  253. package/skills/springboot-verification/SKILL.md +232 -0
  254. package/skills/swift-actor-persistence/SKILL.md +144 -0
  255. package/skills/swift-concurrency-6-2/SKILL.md +216 -0
  256. package/skills/swift-protocol-di-testing/SKILL.md +191 -0
  257. package/skills/swiftui-patterns/SKILL.md +259 -0
  258. package/skills/taste/SKILL.md +264 -0
  259. package/skills/tdd-workflow/SKILL.md +583 -0
  260. package/skills/team-agent-orchestration/SKILL.md +111 -0
  261. package/skills/team-builder/SKILL.md +169 -0
  262. package/skills/terminal-opener/SKILL.md +55 -0
  263. package/skills/terminal-ops/SKILL.md +110 -0
  264. package/skills/tinystruct-patterns/SKILL.md +279 -0
  265. package/skills/token-budget-advisor/SKILL.md +134 -0
  266. package/skills/ui-demo/SKILL.md +466 -0
  267. package/skills/ui-to-vue/SKILL.md +135 -0
  268. package/skills/uncloud/SKILL.md +344 -0
  269. package/skills/unified-memory/SKILL.md +170 -0
  270. package/skills/unified-notifications-ops/SKILL.md +188 -0
  271. package/skills/verification-loop/SKILL.md +129 -0
  272. package/skills/video-editing/SKILL.md +311 -0
  273. package/skills/videodb/SKILL.md +375 -0
  274. package/skills/vite-patterns/SKILL.md +450 -0
  275. package/skills/vue-patterns/SKILL.md +471 -0
  276. package/skills/windows-desktop-e2e/SKILL.md +888 -0
  277. package/skills/workspace-surface-audit/SKILL.md +126 -0
  278. package/skills/x-api/SKILL.md +235 -0
@@ -0,0 +1,327 @@
1
+ ---
2
+ name: e2e-testing
3
+ description: Playwright E2E testing patterns, Page Object Model, configuration, CI/CD integration, artifact management, and flaky test strategies. Use when writing Playwright tests, structuring page objects, or fixing flaky E2E runs in CI.
4
+ metadata:
5
+ origin: ECC
6
+ ---
7
+
8
+ # E2E Testing Patterns
9
+
10
+ Comprehensive Playwright patterns for building stable, fast, and maintainable E2E test suites.
11
+
12
+ ## Test File Organization
13
+
14
+ ```
15
+ tests/
16
+ ├── e2e/
17
+ │ ├── auth/
18
+ │ │ ├── login.spec.ts
19
+ │ │ ├── logout.spec.ts
20
+ │ │ └── register.spec.ts
21
+ │ ├── features/
22
+ │ │ ├── browse.spec.ts
23
+ │ │ ├── search.spec.ts
24
+ │ │ └── create.spec.ts
25
+ │ └── api/
26
+ │ └── endpoints.spec.ts
27
+ ├── fixtures/
28
+ │ ├── auth.ts
29
+ │ └── data.ts
30
+ └── playwright.config.ts
31
+ ```
32
+
33
+ ## Page Object Model (POM)
34
+
35
+ ```typescript
36
+ import { Page, Locator } from '@playwright/test'
37
+
38
+ export class ItemsPage {
39
+ readonly page: Page
40
+ readonly searchInput: Locator
41
+ readonly itemCards: Locator
42
+ readonly createButton: Locator
43
+
44
+ constructor(page: Page) {
45
+ this.page = page
46
+ this.searchInput = page.locator('[data-testid="search-input"]')
47
+ this.itemCards = page.locator('[data-testid="item-card"]')
48
+ this.createButton = page.locator('[data-testid="create-btn"]')
49
+ }
50
+
51
+ async goto() {
52
+ await this.page.goto('/items')
53
+ await this.page.waitForLoadState('networkidle')
54
+ }
55
+
56
+ async search(query: string) {
57
+ await this.searchInput.fill(query)
58
+ await this.page.waitForResponse(resp => resp.url().includes('/api/search'))
59
+ await this.page.waitForLoadState('networkidle')
60
+ }
61
+
62
+ async getItemCount() {
63
+ return await this.itemCards.count()
64
+ }
65
+ }
66
+ ```
67
+
68
+ ## Test Structure
69
+
70
+ ```typescript
71
+ import { test, expect } from '@playwright/test'
72
+ import { ItemsPage } from '../../pages/ItemsPage'
73
+
74
+ test.describe('Item Search', () => {
75
+ let itemsPage: ItemsPage
76
+
77
+ test.beforeEach(async ({ page }) => {
78
+ itemsPage = new ItemsPage(page)
79
+ await itemsPage.goto()
80
+ })
81
+
82
+ test('should search by keyword', async ({ page }) => {
83
+ await itemsPage.search('test')
84
+
85
+ const count = await itemsPage.getItemCount()
86
+ expect(count).toBeGreaterThan(0)
87
+
88
+ await expect(itemsPage.itemCards.first()).toContainText(/test/i)
89
+ await page.screenshot({ path: 'artifacts/search-results.png' })
90
+ })
91
+
92
+ test('should handle no results', async ({ page }) => {
93
+ await itemsPage.search('xyznonexistent123')
94
+
95
+ await expect(page.locator('[data-testid="no-results"]')).toBeVisible()
96
+ expect(await itemsPage.getItemCount()).toBe(0)
97
+ })
98
+ })
99
+ ```
100
+
101
+ ## Playwright Configuration
102
+
103
+ ```typescript
104
+ import { defineConfig, devices } from '@playwright/test'
105
+
106
+ export default defineConfig({
107
+ testDir: './tests/e2e',
108
+ fullyParallel: true,
109
+ forbidOnly: !!process.env.CI,
110
+ retries: process.env.CI ? 2 : 0,
111
+ workers: process.env.CI ? 1 : undefined,
112
+ reporter: [
113
+ ['html', { outputFolder: 'playwright-report' }],
114
+ ['junit', { outputFile: 'playwright-results.xml' }],
115
+ ['json', { outputFile: 'playwright-results.json' }]
116
+ ],
117
+ use: {
118
+ baseURL: process.env.BASE_URL || 'http://localhost:3000',
119
+ trace: 'on-first-retry',
120
+ screenshot: 'only-on-failure',
121
+ video: 'retain-on-failure',
122
+ actionTimeout: 10000,
123
+ navigationTimeout: 30000,
124
+ },
125
+ projects: [
126
+ { name: 'chromium', use: { ...devices['Desktop Chrome'] } },
127
+ { name: 'firefox', use: { ...devices['Desktop Firefox'] } },
128
+ { name: 'webkit', use: { ...devices['Desktop Safari'] } },
129
+ { name: 'mobile-chrome', use: { ...devices['Pixel 5'] } },
130
+ ],
131
+ webServer: {
132
+ command: 'npm run dev',
133
+ url: 'http://localhost:3000',
134
+ reuseExistingServer: !process.env.CI,
135
+ timeout: 120000,
136
+ },
137
+ })
138
+ ```
139
+
140
+ ## Flaky Test Patterns
141
+
142
+ ### Quarantine
143
+
144
+ ```typescript
145
+ test('flaky: complex search', async ({ page }) => {
146
+ test.fixme(true, 'Flaky - Issue #123')
147
+ // test code...
148
+ })
149
+
150
+ test('conditional skip', async ({ page }) => {
151
+ test.skip(process.env.CI, 'Flaky in CI - Issue #123')
152
+ // test code...
153
+ })
154
+ ```
155
+
156
+ ### Identify Flakiness
157
+
158
+ ```bash
159
+ npx playwright test tests/search.spec.ts --repeat-each=10
160
+ npx playwright test tests/search.spec.ts --retries=3
161
+ ```
162
+
163
+ ### Common Causes & Fixes
164
+
165
+ **Race conditions:**
166
+ ```typescript
167
+ // Bad: assumes element is ready
168
+ await page.click('[data-testid="button"]')
169
+
170
+ // Good: auto-wait locator
171
+ await page.locator('[data-testid="button"]').click()
172
+ ```
173
+
174
+ **Network timing:**
175
+ ```typescript
176
+ // Bad: arbitrary timeout
177
+ await page.waitForTimeout(5000)
178
+
179
+ // Good: wait for specific condition
180
+ await page.waitForResponse(resp => resp.url().includes('/api/data'))
181
+ ```
182
+
183
+ **Animation timing:**
184
+ ```typescript
185
+ // Bad: click during animation
186
+ await page.click('[data-testid="menu-item"]')
187
+
188
+ // Good: wait for stability
189
+ await page.locator('[data-testid="menu-item"]').waitFor({ state: 'visible' })
190
+ await page.waitForLoadState('networkidle')
191
+ await page.locator('[data-testid="menu-item"]').click()
192
+ ```
193
+
194
+ ## Artifact Management
195
+
196
+ ### Screenshots
197
+
198
+ ```typescript
199
+ await page.screenshot({ path: 'artifacts/after-login.png' })
200
+ await page.screenshot({ path: 'artifacts/full-page.png', fullPage: true })
201
+ await page.locator('[data-testid="chart"]').screenshot({ path: 'artifacts/chart.png' })
202
+ ```
203
+
204
+ ### Traces
205
+
206
+ ```typescript
207
+ await browser.startTracing(page, {
208
+ path: 'artifacts/trace.json',
209
+ screenshots: true,
210
+ snapshots: true,
211
+ })
212
+ // ... test actions ...
213
+ await browser.stopTracing()
214
+ ```
215
+
216
+ ### Video
217
+
218
+ ```typescript
219
+ // In playwright.config.ts
220
+ use: {
221
+ video: 'retain-on-failure',
222
+ videosPath: 'artifacts/videos/'
223
+ }
224
+ ```
225
+
226
+ ## CI/CD Integration
227
+
228
+ ```yaml
229
+ # .github/workflows/e2e.yml
230
+ name: E2E Tests
231
+ on: [push, pull_request]
232
+
233
+ jobs:
234
+ test:
235
+ runs-on: ubuntu-latest
236
+ steps:
237
+ - uses: actions/checkout@v4
238
+ - uses: actions/setup-node@v4
239
+ with:
240
+ node-version: 20
241
+ - run: npm ci
242
+ - run: npx playwright install --with-deps
243
+ - run: npx playwright test
244
+ env:
245
+ BASE_URL: ${{ vars.STAGING_URL }}
246
+ - uses: actions/upload-artifact@v4
247
+ if: always()
248
+ with:
249
+ name: playwright-report
250
+ path: playwright-report/
251
+ retention-days: 30
252
+ ```
253
+
254
+ ## Test Report Template
255
+
256
+ ```markdown
257
+ # E2E Test Report
258
+
259
+ **Date:** YYYY-MM-DD HH:MM
260
+ **Duration:** Xm Ys
261
+ **Status:** PASSING / FAILING
262
+
263
+ ## Summary
264
+ - Total: X | Passed: Y (Z%) | Failed: A | Flaky: B | Skipped: C
265
+
266
+ ## Failed Tests
267
+
268
+ ### test-name
269
+ **File:** `tests/e2e/feature.spec.ts:45`
270
+ **Error:** Expected element to be visible
271
+ **Screenshot:** artifacts/failed.png
272
+ **Recommended Fix:** [description]
273
+
274
+ ## Artifacts
275
+ - HTML Report: playwright-report/index.html
276
+ - Screenshots: artifacts/*.png
277
+ - Videos: artifacts/videos/*.webm
278
+ - Traces: artifacts/*.zip
279
+ ```
280
+
281
+ ## Wallet / Web3 Testing
282
+
283
+ ```typescript
284
+ test('wallet connection', async ({ page, context }) => {
285
+ // Mock wallet provider
286
+ await context.addInitScript(() => {
287
+ window.ethereum = {
288
+ isMetaMask: true,
289
+ request: async ({ method }) => {
290
+ if (method === 'eth_requestAccounts')
291
+ return ['0x1234567890123456789012345678901234567890']
292
+ if (method === 'eth_chainId') return '0x1'
293
+ }
294
+ }
295
+ })
296
+
297
+ await page.goto('/')
298
+ await page.locator('[data-testid="connect-wallet"]').click()
299
+ await expect(page.locator('[data-testid="wallet-address"]')).toContainText('0x1234')
300
+ })
301
+ ```
302
+
303
+ ## Financial / Critical Flow Testing
304
+
305
+ ```typescript
306
+ test('trade execution', async ({ page }) => {
307
+ // Skip on production — real money
308
+ test.skip(process.env.NODE_ENV === 'production', 'Skip on production')
309
+
310
+ await page.goto('/markets/test-market')
311
+ await page.locator('[data-testid="position-yes"]').click()
312
+ await page.locator('[data-testid="trade-amount"]').fill('1.0')
313
+
314
+ // Verify preview
315
+ const preview = page.locator('[data-testid="trade-preview"]')
316
+ await expect(preview).toContainText('1.0')
317
+
318
+ // Confirm and wait for blockchain
319
+ await page.locator('[data-testid="confirm-trade"]').click()
320
+ await page.waitForResponse(
321
+ resp => resp.url().includes('/api/trade') && resp.status() === 200,
322
+ { timeout: 30000 }
323
+ )
324
+
325
+ await expect(page.locator('[data-testid="trade-success"]')).toBeVisible()
326
+ })
327
+ ```
@@ -0,0 +1,161 @@
1
+ ---
2
+ name: ecc-tools-cost-audit
3
+ description: Evidence-first ECC Tools burn and billing audit workflow. Use when investigating runaway PR creation, quota bypass, premium-model leakage, duplicate jobs, or GitHub App cost spikes in the ECC Tools repo.
4
+ metadata:
5
+ origin: ECC
6
+ ---
7
+
8
+ # ECC Tools Cost Audit
9
+
10
+ Use this skill when the user suspects the ECC Tools GitHub App is burning cost, over-creating PRs, bypassing usage limits, or routing free users into premium analysis paths.
11
+
12
+ This is a focused operator workflow for the sibling [ECC-Tools](../../ECC-Tools) repo. It is not a generic billing skill and it is not a repo-wide code review pass.
13
+
14
+ ## Skill Stack
15
+
16
+ Pull these ECC-native skills into the workflow when relevant:
17
+
18
+ - `autonomous-loops` for bounded multi-step audits that cross webhooks, queues, billing, and retries
19
+ - `agentic-engineering` for tracing the request path into discrete, provable units
20
+ - `customer-billing-ops` when repo behavior and customer-impact math must be separated cleanly
21
+ - `search-first` before inventing helpers or re-implementing repo-local utilities
22
+ - `security-review` when auth, usage gates, entitlements, or secrets are touched
23
+ - `verification-loop` for proving rerun safety and exact post-fix state
24
+ - `tdd-workflow` when the fix needs regression coverage in the worker, router, or billing paths
25
+
26
+ ## When To Use
27
+
28
+ - user says ECC Tools burn rate, PR recursion, over-created PRs, usage-limit bypass, or premium-model leakage
29
+ - the task is in the sibling `ECC-Tools` repo and depends on webhook handlers, queue workers, usage reservation, PR creation logic, or paid-gate enforcement
30
+ - a customer report says the app created too many PRs, billed incorrectly, or analyzed code without producing a usable result
31
+
32
+ ## Scope Guardrails
33
+
34
+ - work in the sibling `ECC-Tools` repo, not in `everything-claude-code`
35
+ - start read-only unless the user clearly asked for a fix
36
+ - do not mutate unrelated billing, checkout, or UI flows while tracing analysis burn
37
+ - treat app-generated branches and app-generated PRs as red-flag recursion paths until proved otherwise
38
+ - separate three things explicitly:
39
+ - repo-side burn root cause
40
+ - customer-facing billing impact
41
+ - product or entitlement gaps that need backlog follow-up
42
+
43
+ ## Workflow
44
+
45
+ ### 1. Freeze repo scope
46
+
47
+ - switch into the sibling `ECC-Tools` repo
48
+ - check branch and local diff first
49
+ - identify the exact surface under audit:
50
+ - webhook router
51
+ - queue producer
52
+ - queue consumer
53
+ - PR creation path
54
+ - usage reservation / billing path
55
+ - model routing path
56
+
57
+ ### 2. Trace ingress before theorizing
58
+
59
+ - inspect `src/index.*` or the main entrypoint first
60
+ - map every enqueue path before suggesting a fix
61
+ - confirm which GitHub events share a queue type
62
+ - confirm whether push, pull_request, synchronize, comment, or manual re-run events can converge on the same expensive path
63
+
64
+ ### 3. Trace the worker and side effects
65
+
66
+ - inspect the queue consumer or scheduled worker that handles analysis
67
+ - confirm whether a queued analysis always ends in:
68
+ - PR creation
69
+ - branch creation
70
+ - file updates
71
+ - premium model calls
72
+ - usage increments
73
+ - if analysis can spend tokens and then fail before output is persisted, classify it as burn-with-broken-output
74
+
75
+ ### 4. Audit the high-signal burn paths
76
+
77
+ #### PR multiplication
78
+
79
+ - inspect PR helpers and branch naming
80
+ - check dedupe, synchronize-event handling, and existing-PR reuse
81
+ - if app-generated branches can re-enter analysis, treat that as a priority-0 recursion risk
82
+
83
+ #### Quota bypass
84
+
85
+ - inspect where quota is checked versus where usage is reserved or incremented
86
+ - if quota is checked before enqueue but usage is charged only inside the worker, treat concurrent front-door passes as a real race
87
+
88
+ #### Premium-model leakage
89
+
90
+ - inspect model selection, tier branching, and provider routing
91
+ - verify whether free or capped users can still hit premium analyzers when premium keys are present
92
+
93
+ #### Retry burn
94
+
95
+ - inspect retry loops, duplicate queue jobs, and deterministic failure reruns
96
+ - if the same non-transient error can spend analysis repeatedly, fix that before quality improvements
97
+
98
+ ### 5. Fix in burn order
99
+
100
+ If the user asked for code changes, prioritize fixes in this order:
101
+
102
+ 1. stop automatic PR multiplication
103
+ 2. stop quota bypass
104
+ 3. stop premium leakage
105
+ 4. stop duplicate-job fanout and pointless retries
106
+ 5. close rerun/update safety gaps
107
+
108
+ Keep the pass bounded to one to three direct fixes unless the same root cause clearly spans multiple files.
109
+
110
+ ### 6. Verify with the smallest proving steps
111
+
112
+ - rerun only the targeted tests or integration slices that cover the changed path
113
+ - verify whether the burn path is now:
114
+ - blocked
115
+ - deduped
116
+ - downgraded to cheaper analysis
117
+ - or rejected early
118
+ - state the final status exactly:
119
+ - changed locally
120
+ - verified locally
121
+ - pushed
122
+ - deployed
123
+ - still blocked
124
+
125
+ ## High-Signal Failure Patterns
126
+
127
+ ### 1. One queue type for all triggers
128
+
129
+ If pushes, PR syncs, and manual audits all enqueue the same job and the worker always creates a PR, analysis equals PR spam.
130
+
131
+ ### 2. Post-enqueue usage reservation
132
+
133
+ If usage is checked at the front door but only incremented in the worker, concurrent requests can all pass the gate and exceed quota.
134
+
135
+ ### 3. Free tier on premium path
136
+
137
+ If free queued jobs can still route into Anthropic or another premium provider when keys exist, that is real spend leakage even if the user never sees the premium result.
138
+
139
+ ### 4. App-generated branches re-enter the webhook
140
+
141
+ If `pull_request.synchronize`, branch pushes, or comment-triggered runs fire on app-owned branches, the app can recursively analyze its own output.
142
+
143
+ ### 5. Expensive work before persistence safety
144
+
145
+ If the system can spend tokens and then fail on PR creation, file update, or branch collision, it is burning cost without shipping value.
146
+
147
+ ## Pitfalls
148
+
149
+ - do not begin with broad repo wandering; settle webhook -> queue -> worker first
150
+ - do not mix customer billing inference with code-backed product truth
151
+ - do not fix lower-value quality issues before the highest-burn path is contained
152
+ - do not claim burn is fixed until the narrow proving step was rerun
153
+ - do not push or deploy unless the user asked
154
+ - do not touch unrelated repo-local changes if they are already in progress
155
+
156
+ ## Verification
157
+
158
+ - root causes cite exact file paths and code areas
159
+ - fixes are ordered by burn impact, not code neatness
160
+ - proving commands are named
161
+ - final status distinguishes local change, verification, push, and deployment
@@ -0,0 +1,122 @@
1
+ ---
2
+ name: email-ops
3
+ description: Evidence-first mailbox triage, drafting, send verification, and sent-mail-safe follow-up workflow for ECC. Use when the user wants to organize email, draft or send through the real mail surface, or prove what landed in Sent.
4
+ metadata:
5
+ origin: ECC
6
+ ---
7
+
8
+ # Email Ops
9
+
10
+ Use this when the real task is mailbox work: triage, drafting, replying, sending, or proving a message landed in Sent.
11
+
12
+ This is not a generic writing skill. It is an operator workflow around the actual mail surface.
13
+
14
+ ## Skill Stack
15
+
16
+ Pull these ECC-native skills into the workflow when relevant:
17
+
18
+ - `brand-voice` before drafting anything user-facing
19
+ - `investor-outreach` for investor, partner, or sponsor-facing mail
20
+ - `customer-billing-ops` when the thread is a billing/support incident rather than generic correspondence
21
+ - `knowledge-ops` when the message or thread should be captured into durable context afterward
22
+ - `research-ops` when a reply depends on fresh external facts
23
+
24
+ ## When to Use
25
+
26
+ - user asks to triage inbox or archive low-signal mail
27
+ - user wants a draft, reply, or new outbound email
28
+ - user wants to know whether a mail was already sent
29
+ - the user wants proof of which account, thread, or Sent entry was used
30
+
31
+ ## Guardrails
32
+
33
+ - draft first unless the user clearly asked for a live send
34
+ - never claim a message was sent without a real Sent-folder or client-side confirmation
35
+ - do not switch sender accounts casually; choose the account that matches the project and recipient
36
+ - do not delete uncertain business mail during cleanup
37
+ - if the task is really DM or iMessage work, hand off to `messages-ops`
38
+
39
+ ## Workflow
40
+
41
+ ### 1. Resolve the exact surface
42
+
43
+ Before acting, settle:
44
+
45
+ - which mailbox account
46
+ - which thread or recipient
47
+ - whether the task is triage, draft, reply, or send
48
+ - whether the user wants draft-only or live send
49
+
50
+ ### 2. Read the thread before composing
51
+
52
+ If replying:
53
+
54
+ - read the existing thread
55
+ - identify the last outbound touch
56
+ - identify any commitments, deadlines, or unanswered questions
57
+
58
+ If creating a new outbound:
59
+
60
+ - identify warmth level
61
+ - select the correct channel and sender account
62
+ - pull `brand-voice` before drafting
63
+
64
+ ### 3. Draft, then verify
65
+
66
+ For draft-only work:
67
+
68
+ - produce the final copy
69
+ - state sender, recipient, subject, and purpose
70
+
71
+ For live-send work:
72
+
73
+ - verify the exact final body first
74
+ - send through the chosen mail surface
75
+ - confirm the message landed in Sent or the equivalent sent-copy store
76
+
77
+ ### 4. Report exact state
78
+
79
+ Use exact status words:
80
+
81
+ - drafted
82
+ - approval-pending
83
+ - sent
84
+ - blocked
85
+ - awaiting verification
86
+
87
+ If the send surface is blocked, preserve the draft and report the exact blocker instead of improvising a second transport without saying so.
88
+
89
+ ## Output Format
90
+
91
+ ```text
92
+ MAIL SURFACE
93
+ - account
94
+ - thread / recipient
95
+ - requested action
96
+
97
+ DRAFT
98
+ - subject
99
+ - body
100
+
101
+ STATUS
102
+ - drafted / sent / blocked
103
+ - proof of Sent when applicable
104
+
105
+ NEXT STEP
106
+ - send
107
+ - follow up
108
+ - archive / move
109
+ ```
110
+
111
+ ## Pitfalls
112
+
113
+ - do not claim send success without a sent-copy check
114
+ - do not ignore the thread history and write a contextless reply
115
+ - do not mix mailbox work with DM or text-message workflows
116
+ - do not expose secrets, auth details, or unnecessary message metadata
117
+
118
+ ## Verification
119
+
120
+ - the response names the account and thread or recipient
121
+ - any send claim includes Sent proof or an explicit client-side confirmation
122
+ - the final state is one of drafted / sent / blocked / awaiting verification