From e282e03cfbcddefaead7501f05e1f1f17220a7ec Mon Sep 17 00:00:00 2001 From: Jason Stirnaman Date: Fri, 5 Dec 2025 10:27:02 -0600 Subject: [PATCH] chore(claude): Add claude skill for Hugo development/testing workflow. Split ui-dev subagent into hugo-, ts-, and testing-specific agents. --- .claude/agents/ui-testing.md | 2 +- .claude/skills/hugo-template-dev/SKILL.md | 49 +---------------------- 2 files changed, 2 insertions(+), 49 deletions(-) diff --git a/.claude/agents/ui-testing.md b/.claude/agents/ui-testing.md index eea687edb..7bb01fcf3 100644 --- a/.claude/agents/ui-testing.md +++ b/.claude/agents/ui-testing.md @@ -50,7 +50,7 @@ node cypress/support/run-e2e-specs.js \ # Run against a URL (for running server) node cypress/support/run-e2e-specs.js \ --spec "cypress/e2e/content/my-test.cy.js" \ - http://localhost:/path/to/page/ + http://localhost:1313/path/to/page/ # Run all E2E tests yarn test:e2e diff --git a/.claude/skills/hugo-template-dev/SKILL.md b/.claude/skills/hugo-template-dev/SKILL.md index 7139074f0..83bb0ac0b 100644 --- a/.claude/skills/hugo-template-dev/SKILL.md +++ b/.claude/skills/hugo-template-dev/SKILL.md @@ -432,7 +432,7 @@ node cypress/support/run-e2e-specs.js \ ```bash node cypress/support/run-e2e-specs.js \ --spec "cypress/e2e/content/api-reference.cy.js" \ - http://localhost:/influxdb3/core/reference/api/ + http://localhost:1313/influxdb3/core/reference/api/ ``` **Example Cypress test structure for API reference:** @@ -467,53 +467,6 @@ describe('API Reference Documentation', () => { }); ``` -**Check for JavaScript console errors (common pattern for feature development):** - -```javascript -// cypress/e2e/content/my-component.cy.js -describe('My Component', () => { - it('should not throw JavaScript console errors', () => { - cy.visit('/path/to/page/'); - - // Wait for component to initialize - cy.get('[data-component="my-component"]', { timeout: 5000 }) - .should('be.visible'); - - cy.window().then((win) => { - const logs = []; - const originalError = win.console.error; - - // Intercept console.error calls - win.console.error = (...args) => { - logs.push(args.join(' ')); - originalError.apply(win.console, args); - }; - - // Allow time for async operations - cy.wait(2000); - - cy.then(() => { - // Filter for relevant errors (customize for your component) - const relevantErrors = logs.filter( - (log) => - log.includes('my-component') || - log.includes('Failed to parse') || - log.includes('is not a function') - ); - expect(relevantErrors).to.have.length(0); - }); - }); - }); -}); -``` - -This pattern is especially useful for catching: - -- TypeScript/JavaScript runtime errors in components -- JSON parsing failures from `data-*` attributes -- Undefined function calls from missing imports -- Template data binding issues that only manifest at runtime - **Integrate Cypress into development workflow:** 1. Create test file in `cypress/e2e/content/` for your feature