[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F9E3RC4TBZM0M32RKHMTMJ":3,"skill-same:01M6F9E3RC4TBZM0M32RKHMTMJ":72},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":40,"linkOnly":41,"markdownContent":42,"markdownBody":43,"frontMatter":44,"refName":49,"commitSha":50,"skillDirectory":51,"forksCount":52,"repositoryHtmlUrl":53,"repositoryHomepageUrl":6,"ownerHtmlUrl":54,"ownerBlogUrl":55,"ownerDescription":56,"updatedAt":57,"install":58,"resources":71},"01M6F9E3RC4TBZM0M32RKHMTMJ","twinmind-ci-integration",null,"Integrate TwinMind into CI\u002FCD pipelines for automated testing and deployment.\nUse when setting up GitHub Actions, GitLab CI, or other CI systems\nwith TwinMind API testing and validation.\nTrigger with phrases like \"twinmind ci\", \"twinmind github actions\",\n\"twinmind pipeline\", \"automate twinmind testing\".","Dicklesworthstone\u002Fpi_agent_rust","Dicklesworthstone","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F35050222?v=4","01M6CG26AR942CSVMN1M5E3DSE","Jeff Emanuel","01M6CG26EPP71PSHW1VDS71121",1992,"MIT","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Fplugins-community\u002Fplugins\u002Fsaas-packs\u002Ftwinmind-pack\u002Fskills\u002Ftwinmind-ci-integration\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39],"twinmind ci integration","integration","ci","automate","when","CI\u002FCD","io","up","integrate","edit","write","read","gitlab ci","testing","Bash","api","pipeline","github actions","actions","deployment","gitlab","2026-11-10 10:12:30",false,"---\nname: twinmind-ci-integration\ndescription: |\n  Integrate TwinMind into CI\u002FCD pipelines for automated testing and deployment.\n  Use when setting up GitHub Actions, GitLab CI, or other CI systems\n  with TwinMind API testing and validation.\n  Trigger with phrases like \"twinmind ci\", \"twinmind github actions\",\n  \"twinmind pipeline\", \"automate twinmind testing\".\nallowed-tools: Read, Write, Edit, Bash(npm:*), Grep\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\n---\n\n# TwinMind CI Integration\n\n## Overview\nIntegrate TwinMind testing and validation into CI\u002FCD pipelines.\n\n## Prerequisites\n- TwinMind Pro\u002FEnterprise API access\n- CI\u002FCD system (GitHub Actions, GitLab CI, etc.)\n- Test audio samples\n- Secrets management\n\n## Instructions\n\n### Step 1: GitHub Actions Workflow\n\n```yaml\n# .github\u002Fworkflows\u002Ftwinmind-tests.yml\nname: TwinMind Integration Tests\n\non:\n  push:\n    branches: [main, develop]\n    paths:\n      - 'src\u002Ftwinmind\u002F**'\n      - 'tests\u002Ftwinmind\u002F**'\n  pull_request:\n    branches: [main]\n  schedule:\n    # Run daily at 6 AM UTC\n    - cron: '0 6 * * *'\n\nenv:\n  NODE_VERSION: '20'\n\njobs:\n  lint-and-typecheck:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Setup Node.js\n        uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: ${{ env.NODE_VERSION }}\n          cache: 'npm'\n\n      - name: Install dependencies\n        run: npm ci\n\n      - name: Run linter\n        run: npm run lint\n\n      - name: Run typecheck\n        run: npm run typecheck\n\n  unit-tests:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Setup Node.js\n        uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: ${{ env.NODE_VERSION }}\n          cache: 'npm'\n\n      - name: Install dependencies\n        run: npm ci\n\n      - name: Run unit tests\n        run: npm run test:unit\n        env:\n          TWINMIND_API_KEY: ${{ secrets.TWINMIND_API_KEY_TEST }}\n\n  integration-tests:\n    runs-on: ubuntu-latest\n    needs: [lint-and-typecheck, unit-tests]\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Setup Node.js\n        uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: ${{ env.NODE_VERSION }}\n          cache: 'npm'\n\n      - name: Install dependencies\n        run: npm ci\n\n      - name: Run integration tests\n        run: npm run test:integration\n        env:\n          TWINMIND_API_KEY: ${{ secrets.TWINMIND_API_KEY_TEST }}\n          TWINMIND_WEBHOOK_SECRET: ${{ secrets.TWINMIND_WEBHOOK_SECRET }}\n        timeout-minutes: 10\n\n      - name: Upload test results\n        if: always()\n        uses: actions\u002Fupload-artifact@v4\n        with:\n          name: test-results\n          path: coverage\u002F\n\n  api-health-check:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Check TwinMind API Health\n        run: |\n          RESPONSE=$(curl -s -w \"\\n%{http_code}\" \\\n            -H \"Authorization: Bearer ${{ secrets.TWINMIND_API_KEY_TEST }}\" \\\n            https:\u002F\u002Fapi.twinmind.com\u002Fv1\u002Fhealth)\n\n          HTTP_CODE=$(echo \"$RESPONSE\" | tail -1)\n          BODY=$(echo \"$RESPONSE\" | head -n -1)\n\n          echo \"HTTP Status: $HTTP_CODE\"\n          echo \"Response: $BODY\"\n\n          if [ \"$HTTP_CODE\" != \"200\" ]; then\n            echo \"API health check failed\"\n            exit 1\n          fi\n\n  transcription-smoke-test:\n    runs-on: ubuntu-latest\n    needs: [integration-tests, api-health-check]\n    if: github.event_name == 'schedule' || github.ref == 'refs\u002Fheads\u002Fmain'\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Setup Node.js\n        uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: ${{ env.NODE_VERSION }}\n          cache: 'npm'\n\n      - name: Install dependencies\n        run: npm ci\n\n      - name: Run transcription smoke test\n        run: npm run test:smoke\n        env:\n          TWINMIND_API_KEY: ${{ secrets.TWINMIND_API_KEY_TEST }}\n          TEST_AUDIO_URL: ${{ secrets.TEST_AUDIO_URL }}\n        timeout-minutes: 5\n```\n\n### Step 2: Unit Test Setup\n\n```typescript\n\u002F\u002F tests\u002Funit\u002Ftwinmind\u002Fclient.test.ts\nimport { describe, it, expect, beforeEach, vi } from 'vitest';\nimport { TwinMindClient } from '..\u002F..\u002F..\u002Fsrc\u002Ftwinmind\u002Fclient';\n\ndescribe('TwinMindClient', () => {\n  let client: TwinMindClient;\n\n  beforeEach(() => {\n    client = new TwinMindClient({\n      apiKey: 'test_api_key',\n      baseUrl: 'https:\u002F\u002Fapi.twinmind.com\u002Fv1',\n    });\n  });\n\n  describe('transcribe', () => {\n    it('should send correct request for transcription', async () => {\n      const mockFetch = vi.fn().mockResolvedValue({\n        ok: true,\n        json: () => Promise.resolve({\n          id: 'tr_123',\n          status: 'processing',\n        }),\n      });\n      global.fetch = mockFetch;\n\n      const result = await client.transcribe('https:\u002F\u002Fexample.com\u002Faudio.mp3');\n\n      expect(mockFetch).toHaveBeenCalledWith(\n        expect.stringContaining('\u002Ftranscribe'),\n        expect.objectContaining({\n          method: 'POST',\n          headers: expect.objectContaining({\n            'Authorization': 'Bearer test_api_key',\n          }),\n        })\n      );\n    });\n\n    it('should handle rate limit errors', async () => {\n      const mockFetch = vi.fn().mockResolvedValue({\n        ok: false,\n        status: 429,\n        headers: new Headers({ 'Retry-After': '60' }),\n      });\n      global.fetch = mockFetch;\n\n      await expect(client.transcribe('https:\u002F\u002Fexample.com\u002Faudio.mp3'))\n        .rejects.toThrow(\u002Frate limit\u002Fi);\n    });\n  });\n\n  describe('summarize', () => {\n    it('should generate summary from transcript', async () => {\n      const mockFetch = vi.fn().mockResolvedValue({\n        ok: true,\n        json: () => Promise.resolve({\n          summary: 'Meeting discussed project timeline.',\n          action_items: [{ text: 'Review budget', assignee: 'John' }],\n        }),\n      });\n      global.fetch = mockFetch;\n\n      const result = await client.summarize('tr_123');\n\n      expect(result.summary).toContain('project timeline');\n      expect(result.action_items).toHaveLength(1);\n    });\n  });\n});\n```\n\n### Step 3: Integration Test Setup\n\n```typescript\n\u002F\u002F tests\u002Fintegration\u002Ftwinmind\u002Ftranscription.test.ts\nimport { describe, it, expect, beforeAll } from 'vitest';\nimport { TwinMindClient } from '..\u002F..\u002F..\u002Fsrc\u002Ftwinmind\u002Fclient';\n\ndescribe('TwinMind Transcription Integration', () => {\n  let client: TwinMindClient;\n\n  beforeAll(() => {\n    const apiKey = process.env.TWINMIND_API_KEY;\n    if (!apiKey) {\n      throw new Error('TWINMIND_API_KEY required for integration tests');\n    }\n    client = new TwinMindClient({ apiKey });\n  });\n\n  describe('API Health', () => {\n    it('should return healthy status', async () => {\n      const health = await client.healthCheck();\n      expect(health).toBe(true);\n    });\n  });\n\n  describe('Account', () => {\n    it('should return account info', async () => {\n      const account = await client.getAccount();\n      expect(account.id).toBeDefined();\n      expect(account.plan).toBeDefined();\n    });\n  });\n\n  describe('Transcription', () => {\n    it('should transcribe test audio', async () => {\n      const audioUrl = process.env.TEST_AUDIO_URL;\n      if (!audioUrl) {\n        console.log('Skipping: TEST_AUDIO_URL not set');\n        return;\n      }\n\n      const transcript = await client.transcribe(audioUrl, {\n        language: 'en',\n        diarization: false,\n      });\n\n      expect(transcript.id).toBeDefined();\n      expect(transcript.text.length).toBeGreaterThan(0);\n    }, 60000); \u002F\u002F 60 second timeout\n  });\n});\n```\n\n### Step 4: Smoke Test Script\n\n```typescript\n\u002F\u002F tests\u002Fsmoke\u002Ftwinmind-smoke.ts\nimport { TwinMindClient } from '..\u002F..\u002Fsrc\u002Ftwinmind\u002Fclient';\n\ninterface SmokeTestResult {\n  name: string;\n  passed: boolean;\n  duration: number;\n  error?: string;\n}\n\nasync function runSmokeTests(): Promise\u003CSmokeTestResult[]> {\n  const results: SmokeTestResult[] = [];\n  const client = new TwinMindClient({\n    apiKey: process.env.TWINMIND_API_KEY!,\n  });\n\n  \u002F\u002F Test 1: Health Check\n  const healthStart = Date.now();\n  try {\n    await client.healthCheck();\n    results.push({\n      name: 'API Health Check',\n      passed: true,\n      duration: Date.now() - healthStart,\n    });\n  } catch (error: any) {\n    results.push({\n      name: 'API Health Check',\n      passed: false,\n      duration: Date.now() - healthStart,\n      error: error.message,\n    });\n  }\n\n  \u002F\u002F Test 2: Account Access\n  const accountStart = Date.now();\n  try {\n    const account = await client.getAccount();\n    results.push({\n      name: 'Account Access',\n      passed: !!account.id,\n      duration: Date.now() - accountStart,\n    });\n  } catch (error: any) {\n    results.push({\n      name: 'Account Access',\n      passed: false,\n      duration: Date.now() - accountStart,\n      error: error.message,\n    });\n  }\n\n  \u002F\u002F Test 3: Transcription (if test audio available)\n  if (process.env.TEST_AUDIO_URL) {\n    const transcribeStart = Date.now();\n    try {\n      const transcript = await client.transcribe(process.env.TEST_AUDIO_URL, {\n        model: 'ear-3',\n      });\n      results.push({\n        name: 'Transcription',\n        passed: !!transcript.id && transcript.text.length > 0,\n        duration: Date.now() - transcribeStart,\n      });\n    } catch (error: any) {\n      results.push({\n        name: 'Transcription',\n        passed: false,\n        duration: Date.now() - transcribeStart,\n        error: error.message,\n      });\n    }\n  }\n\n  return results;\n}\n\n\u002F\u002F Main execution\nasync function main() {\n  console.log('Running TwinMind Smoke Tests...\\n');\n\n  const results = await runSmokeTests();\n\n  console.log('Results:');\n  console.log('========');\n\n  let allPassed = true;\n  for (const result of results) {\n    const status = result.passed ? 'PASS' : 'FAIL';\n    console.log(`[${status}] ${result.name} (${result.duration}ms)`);\n    if (result.error) {\n      console.log(`       Error: ${result.error}`);\n    }\n    if (!result.passed) allPassed = false;\n  }\n\n  console.log('\\n' + (allPassed ? 'All tests passed!' : 'Some tests failed.'));\n  process.exit(allPassed ? 0 : 1);\n}\n\nmain().catch(console.error);\n```\n\n### Step 5: GitLab CI Configuration\n\n```yaml\n# .gitlab-ci.yml\nstages:\n  - lint\n  - test\n  - integration\n  - deploy\n\nvariables:\n  NODE_VERSION: \"20\"\n\n.node-template: &node-template\n  image: node:${NODE_VERSION}\n  cache:\n    key: ${CI_COMMIT_REF_SLUG}\n    paths:\n      - node_modules\u002F\n\nlint:\n  \u003C\u003C: *node-template\n  stage: lint\n  script:\n    - npm ci\n    - npm run lint\n    - npm run typecheck\n\nunit-tests:\n  \u003C\u003C: *node-template\n  stage: test\n  script:\n    - npm ci\n    - npm run test:unit\n  coverage: '\u002FAll files[^|]*\\|[^|]*\\s+([\\d\\.]+)\u002F'\n  artifacts:\n    reports:\n      coverage_report:\n        coverage_format: cobertura\n        path: coverage\u002Fcobertura-coverage.xml\n\nintegration-tests:\n  \u003C\u003C: *node-template\n  stage: integration\n  variables:\n    TWINMIND_API_KEY: $TWINMIND_API_KEY_TEST\n  script:\n    - npm ci\n    - npm run test:integration\n  rules:\n    - if: $CI_COMMIT_BRANCH == \"main\"\n    - if: $CI_PIPELINE_SOURCE == \"schedule\"\n\napi-health:\n  stage: integration\n  image: curlimages\u002Fcurl:latest\n  script:\n    - |\n      curl -f -H \"Authorization: Bearer $TWINMIND_API_KEY_TEST\" \\\n        https:\u002F\u002Fapi.twinmind.com\u002Fv1\u002Fhealth\n  rules:\n    - if: $CI_COMMIT_BRANCH == \"main\"\n```\n\n### Step 6: Test Configuration\n\n```typescript\n\u002F\u002F vitest.config.ts\nimport { defineConfig } from 'vitest\u002Fconfig';\n\nexport default defineConfig({\n  test: {\n    globals: true,\n    environment: 'node',\n    coverage: {\n      provider: 'v8',\n      reporter: ['text', 'json', 'html', 'cobertura'],\n      exclude: [\n        'node_modules\u002F',\n        'tests\u002F',\n        'dist\u002F',\n      ],\n    },\n    testTimeout: 30000,\n    hookTimeout: 30000,\n  },\n});\n```\n\n```json\n\u002F\u002F package.json scripts\n{\n  \"scripts\": {\n    \"test\": \"vitest\",\n    \"test:unit\": \"vitest run tests\u002Funit\",\n    \"test:integration\": \"vitest run tests\u002Fintegration\",\n    \"test:smoke\": \"ts-node tests\u002Fsmoke\u002Ftwinmind-smoke.ts\",\n    \"test:coverage\": \"vitest run --coverage\"\n  }\n}\n```\n\n## Output\n- GitHub Actions workflow\n- Unit test suite\n- Integration test suite\n- Smoke test script\n- GitLab CI configuration\n\n## Error Handling\n\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| Secret not found | Not configured | Add to GitHub Secrets |\n| Test timeout | Large audio file | Use short test samples |\n| Rate limited | Too many CI runs | Use test account limits |\n| API unavailable | TwinMind outage | Add retry logic |\n\n## Best Practices\n\n1. **Use test API keys** - Never use production keys in CI\n2. **Short test audio** - Use 10-30 second samples\n3. **Cache dependencies** - Speed up pipeline runs\n4. **Timeout limits** - Set reasonable timeouts\n5. **Parallel tests** - Run independent tests concurrently\n6. **Artifact storage** - Save test results and coverage\n\n## Resources\n- [GitHub Actions Documentation](https:\u002F\u002Fdocs.github.com\u002Factions)\n- [GitLab CI Documentation](https:\u002F\u002Fdocs.gitlab.com\u002Fee\u002Fci\u002F)\n- [Vitest Documentation](https:\u002F\u002Fvitest.dev\u002F)\n\n## Next Steps\nFor deployment integration, see `twinmind-deploy-integration`.\n","# TwinMind CI Integration\n\n## Overview\nIntegrate TwinMind testing and validation into CI\u002FCD pipelines.\n\n## Prerequisites\n- TwinMind Pro\u002FEnterprise API access\n- CI\u002FCD system (GitHub Actions, GitLab CI, etc.)\n- Test audio samples\n- Secrets management\n\n## Instructions\n\n### Step 1: GitHub Actions Workflow\n\n```yaml\n# .github\u002Fworkflows\u002Ftwinmind-tests.yml\nname: TwinMind Integration Tests\n\non:\n  push:\n    branches: [main, develop]\n    paths:\n      - 'src\u002Ftwinmind\u002F**'\n      - 'tests\u002Ftwinmind\u002F**'\n  pull_request:\n    branches: [main]\n  schedule:\n    # Run daily at 6 AM UTC\n    - cron: '0 6 * * *'\n\nenv:\n  NODE_VERSION: '20'\n\njobs:\n  lint-and-typecheck:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Setup Node.js\n        uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: ${{ env.NODE_VERSION }}\n          cache: 'npm'\n\n      - name: Install dependencies\n        run: npm ci\n\n      - name: Run linter\n        run: npm run lint\n\n      - name: Run typecheck\n        run: npm run typecheck\n\n  unit-tests:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Setup Node.js\n        uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: ${{ env.NODE_VERSION }}\n          cache: 'npm'\n\n      - name: Install dependencies\n        run: npm ci\n\n      - name: Run unit tests\n        run: npm run test:unit\n        env:\n          TWINMIND_API_KEY: ${{ secrets.TWINMIND_API_KEY_TEST }}\n\n  integration-tests:\n    runs-on: ubuntu-latest\n    needs: [lint-and-typecheck, unit-tests]\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Setup Node.js\n        uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: ${{ env.NODE_VERSION }}\n          cache: 'npm'\n\n      - name: Install dependencies\n        run: npm ci\n\n      - name: Run integration tests\n        run: npm run test:integration\n        env:\n          TWINMIND_API_KEY: ${{ secrets.TWINMIND_API_KEY_TEST }}\n          TWINMIND_WEBHOOK_SECRET: ${{ secrets.TWINMIND_WEBHOOK_SECRET }}\n        timeout-minutes: 10\n\n      - name: Upload test results\n        if: always()\n        uses: actions\u002Fupload-artifact@v4\n        with:\n          name: test-results\n          path: coverage\u002F\n\n  api-health-check:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Check TwinMind API Health\n        run: |\n          RESPONSE=$(curl -s -w \"\\n%{http_code}\" \\\n            -H \"Authorization: Bearer ${{ secrets.TWINMIND_API_KEY_TEST }}\" \\\n            https:\u002F\u002Fapi.twinmind.com\u002Fv1\u002Fhealth)\n\n          HTTP_CODE=$(echo \"$RESPONSE\" | tail -1)\n          BODY=$(echo \"$RESPONSE\" | head -n -1)\n\n          echo \"HTTP Status: $HTTP_CODE\"\n          echo \"Response: $BODY\"\n\n          if [ \"$HTTP_CODE\" != \"200\" ]; then\n            echo \"API health check failed\"\n            exit 1\n          fi\n\n  transcription-smoke-test:\n    runs-on: ubuntu-latest\n    needs: [integration-tests, api-health-check]\n    if: github.event_name == 'schedule' || github.ref == 'refs\u002Fheads\u002Fmain'\n    steps:\n      - uses: actions\u002Fcheckout@v4\n\n      - name: Setup Node.js\n        uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: ${{ env.NODE_VERSION }}\n          cache: 'npm'\n\n      - name: Install dependencies\n        run: npm ci\n\n      - name: Run transcription smoke test\n        run: npm run test:smoke\n        env:\n          TWINMIND_API_KEY: ${{ secrets.TWINMIND_API_KEY_TEST }}\n          TEST_AUDIO_URL: ${{ secrets.TEST_AUDIO_URL }}\n        timeout-minutes: 5\n```\n\n### Step 2: Unit Test Setup\n\n```typescript\n\u002F\u002F tests\u002Funit\u002Ftwinmind\u002Fclient.test.ts\nimport { describe, it, expect, beforeEach, vi } from 'vitest';\nimport { TwinMindClient } from '..\u002F..\u002F..\u002Fsrc\u002Ftwinmind\u002Fclient';\n\ndescribe('TwinMindClient', () => {\n  let client: TwinMindClient;\n\n  beforeEach(() => {\n    client = new TwinMindClient({\n      apiKey: 'test_api_key',\n      baseUrl: 'https:\u002F\u002Fapi.twinmind.com\u002Fv1',\n    });\n  });\n\n  describe('transcribe', () => {\n    it('should send correct request for transcription', async () => {\n      const mockFetch = vi.fn().mockResolvedValue({\n        ok: true,\n        json: () => Promise.resolve({\n          id: 'tr_123',\n          status: 'processing',\n        }),\n      });\n      global.fetch = mockFetch;\n\n      const result = await client.transcribe('https:\u002F\u002Fexample.com\u002Faudio.mp3');\n\n      expect(mockFetch).toHaveBeenCalledWith(\n        expect.stringContaining('\u002Ftranscribe'),\n        expect.objectContaining({\n          method: 'POST',\n          headers: expect.objectContaining({\n            'Authorization': 'Bearer test_api_key',\n          }),\n        })\n      );\n    });\n\n    it('should handle rate limit errors', async () => {\n      const mockFetch = vi.fn().mockResolvedValue({\n        ok: false,\n        status: 429,\n        headers: new Headers({ 'Retry-After': '60' }),\n      });\n      global.fetch = mockFetch;\n\n      await expect(client.transcribe('https:\u002F\u002Fexample.com\u002Faudio.mp3'))\n        .rejects.toThrow(\u002Frate limit\u002Fi);\n    });\n  });\n\n  describe('summarize', () => {\n    it('should generate summary from transcript', async () => {\n      const mockFetch = vi.fn().mockResolvedValue({\n        ok: true,\n        json: () => Promise.resolve({\n          summary: 'Meeting discussed project timeline.',\n          action_items: [{ text: 'Review budget', assignee: 'John' }],\n        }),\n      });\n      global.fetch = mockFetch;\n\n      const result = await client.summarize('tr_123');\n\n      expect(result.summary).toContain('project timeline');\n      expect(result.action_items).toHaveLength(1);\n    });\n  });\n});\n```\n\n### Step 3: Integration Test Setup\n\n```typescript\n\u002F\u002F tests\u002Fintegration\u002Ftwinmind\u002Ftranscription.test.ts\nimport { describe, it, expect, beforeAll } from 'vitest';\nimport { TwinMindClient } from '..\u002F..\u002F..\u002Fsrc\u002Ftwinmind\u002Fclient';\n\ndescribe('TwinMind Transcription Integration', () => {\n  let client: TwinMindClient;\n\n  beforeAll(() => {\n    const apiKey = process.env.TWINMIND_API_KEY;\n    if (!apiKey) {\n      throw new Error('TWINMIND_API_KEY required for integration tests');\n    }\n    client = new TwinMindClient({ apiKey });\n  });\n\n  describe('API Health', () => {\n    it('should return healthy status', async () => {\n      const health = await client.healthCheck();\n      expect(health).toBe(true);\n    });\n  });\n\n  describe('Account', () => {\n    it('should return account info', async () => {\n      const account = await client.getAccount();\n      expect(account.id).toBeDefined();\n      expect(account.plan).toBeDefined();\n    });\n  });\n\n  describe('Transcription', () => {\n    it('should transcribe test audio', async () => {\n      const audioUrl = process.env.TEST_AUDIO_URL;\n      if (!audioUrl) {\n        console.log('Skipping: TEST_AUDIO_URL not set');\n        return;\n      }\n\n      const transcript = await client.transcribe(audioUrl, {\n        language: 'en',\n        diarization: false,\n      });\n\n      expect(transcript.id).toBeDefined();\n      expect(transcript.text.length).toBeGreaterThan(0);\n    }, 60000); \u002F\u002F 60 second timeout\n  });\n});\n```\n\n### Step 4: Smoke Test Script\n\n```typescript\n\u002F\u002F tests\u002Fsmoke\u002Ftwinmind-smoke.ts\nimport { TwinMindClient } from '..\u002F..\u002Fsrc\u002Ftwinmind\u002Fclient';\n\ninterface SmokeTestResult {\n  name: string;\n  passed: boolean;\n  duration: number;\n  error?: string;\n}\n\nasync function runSmokeTests(): Promise\u003CSmokeTestResult[]> {\n  const results: SmokeTestResult[] = [];\n  const client = new TwinMindClient({\n    apiKey: process.env.TWINMIND_API_KEY!,\n  });\n\n  \u002F\u002F Test 1: Health Check\n  const healthStart = Date.now();\n  try {\n    await client.healthCheck();\n    results.push({\n      name: 'API Health Check',\n      passed: true,\n      duration: Date.now() - healthStart,\n    });\n  } catch (error: any) {\n    results.push({\n      name: 'API Health Check',\n      passed: false,\n      duration: Date.now() - healthStart,\n      error: error.message,\n    });\n  }\n\n  \u002F\u002F Test 2: Account Access\n  const accountStart = Date.now();\n  try {\n    const account = await client.getAccount();\n    results.push({\n      name: 'Account Access',\n      passed: !!account.id,\n      duration: Date.now() - accountStart,\n    });\n  } catch (error: any) {\n    results.push({\n      name: 'Account Access',\n      passed: false,\n      duration: Date.now() - accountStart,\n      error: error.message,\n    });\n  }\n\n  \u002F\u002F Test 3: Transcription (if test audio available)\n  if (process.env.TEST_AUDIO_URL) {\n    const transcribeStart = Date.now();\n    try {\n      const transcript = await client.transcribe(process.env.TEST_AUDIO_URL, {\n        model: 'ear-3',\n      });\n      results.push({\n        name: 'Transcription',\n        passed: !!transcript.id && transcript.text.length > 0,\n        duration: Date.now() - transcribeStart,\n      });\n    } catch (error: any) {\n      results.push({\n        name: 'Transcription',\n        passed: false,\n        duration: Date.now() - transcribeStart,\n        error: error.message,\n      });\n    }\n  }\n\n  return results;\n}\n\n\u002F\u002F Main execution\nasync function main() {\n  console.log('Running TwinMind Smoke Tests...\\n');\n\n  const results = await runSmokeTests();\n\n  console.log('Results:');\n  console.log('========');\n\n  let allPassed = true;\n  for (const result of results) {\n    const status = result.passed ? 'PASS' : 'FAIL';\n    console.log(`[${status}] ${result.name} (${result.duration}ms)`);\n    if (result.error) {\n      console.log(`       Error: ${result.error}`);\n    }\n    if (!result.passed) allPassed = false;\n  }\n\n  console.log('\\n' + (allPassed ? 'All tests passed!' : 'Some tests failed.'));\n  process.exit(allPassed ? 0 : 1);\n}\n\nmain().catch(console.error);\n```\n\n### Step 5: GitLab CI Configuration\n\n```yaml\n# .gitlab-ci.yml\nstages:\n  - lint\n  - test\n  - integration\n  - deploy\n\nvariables:\n  NODE_VERSION: \"20\"\n\n.node-template: &node-template\n  image: node:${NODE_VERSION}\n  cache:\n    key: ${CI_COMMIT_REF_SLUG}\n    paths:\n      - node_modules\u002F\n\nlint:\n  \u003C\u003C: *node-template\n  stage: lint\n  script:\n    - npm ci\n    - npm run lint\n    - npm run typecheck\n\nunit-tests:\n  \u003C\u003C: *node-template\n  stage: test\n  script:\n    - npm ci\n    - npm run test:unit\n  coverage: '\u002FAll files[^|]*\\|[^|]*\\s+([\\d\\.]+)\u002F'\n  artifacts:\n    reports:\n      coverage_report:\n        coverage_format: cobertura\n        path: coverage\u002Fcobertura-coverage.xml\n\nintegration-tests:\n  \u003C\u003C: *node-template\n  stage: integration\n  variables:\n    TWINMIND_API_KEY: $TWINMIND_API_KEY_TEST\n  script:\n    - npm ci\n    - npm run test:integration\n  rules:\n    - if: $CI_COMMIT_BRANCH == \"main\"\n    - if: $CI_PIPELINE_SOURCE == \"schedule\"\n\napi-health:\n  stage: integration\n  image: curlimages\u002Fcurl:latest\n  script:\n    - |\n      curl -f -H \"Authorization: Bearer $TWINMIND_API_KEY_TEST\" \\\n        https:\u002F\u002Fapi.twinmind.com\u002Fv1\u002Fhealth\n  rules:\n    - if: $CI_COMMIT_BRANCH == \"main\"\n```\n\n### Step 6: Test Configuration\n\n```typescript\n\u002F\u002F vitest.config.ts\nimport { defineConfig } from 'vitest\u002Fconfig';\n\nexport default defineConfig({\n  test: {\n    globals: true,\n    environment: 'node',\n    coverage: {\n      provider: 'v8',\n      reporter: ['text', 'json', 'html', 'cobertura'],\n      exclude: [\n        'node_modules\u002F',\n        'tests\u002F',\n        'dist\u002F',\n      ],\n    },\n    testTimeout: 30000,\n    hookTimeout: 30000,\n  },\n});\n```\n\n```json\n\u002F\u002F package.json scripts\n{\n  \"scripts\": {\n    \"test\": \"vitest\",\n    \"test:unit\": \"vitest run tests\u002Funit\",\n    \"test:integration\": \"vitest run tests\u002Fintegration\",\n    \"test:smoke\": \"ts-node tests\u002Fsmoke\u002Ftwinmind-smoke.ts\",\n    \"test:coverage\": \"vitest run --coverage\"\n  }\n}\n```\n\n## Output\n- GitHub Actions workflow\n- Unit test suite\n- Integration test suite\n- Smoke test script\n- GitLab CI configuration\n\n## Error Handling\n\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| Secret not found | Not configured | Add to GitHub Secrets |\n| Test timeout | Large audio file | Use short test samples |\n| Rate limited | Too many CI runs | Use test account limits |\n| API unavailable | TwinMind outage | Add retry logic |\n\n## Best Practices\n\n1. **Use test API keys** - Never use production keys in CI\n2. **Short test audio** - Use 10-30 second samples\n3. **Cache dependencies** - Speed up pipeline runs\n4. **Timeout limits** - Set reasonable timeouts\n5. **Parallel tests** - Run independent tests concurrently\n6. **Artifact storage** - Save test results and coverage\n\n## Resources\n- [GitHub Actions Documentation](https:\u002F\u002Fdocs.github.com\u002Factions)\n- [GitLab CI Documentation](https:\u002F\u002Fdocs.gitlab.com\u002Fee\u002Fci\u002F)\n- [Vitest Documentation](https:\u002F\u002Fvitest.dev\u002F)\n\n## Next Steps\nFor deployment integration, see `twinmind-deploy-integration`.\n",{"name":5,"author":45,"license":15,"version":46,"description":47,"allowed-tools":48},"Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Integrate TwinMind into CI\u002FCD pipelines for automated testing and deployment.\nUse when setting up GitHub Actions, GitLab CI, or other CI systems\nwith TwinMind API testing and validation.\nTrigger with phrases like \"twinmind ci\", \"twinmind github actions\",\n\"twinmind pipeline\", \"automate twinmind testing\".\n","Read, Write, Edit, Bash(npm:*), Grep","main","90b50ed0778745a80fd5bfb13b1843d45b9e82f7","tests\u002Fext_conformance\u002Fartifacts\u002Fplugins-community\u002Fplugins\u002Fsaas-packs\u002Ftwinmind-pack\u002Fskills\u002Ftwinmind-ci-integration",233,"https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust","https:\u002F\u002Fgithub.com\u002FDicklesworthstone","https:\u002F\u002Fwww.jeffreyemanuel.com\u002F","Building in NY","2026-11-15 01:54:15",{"source":8,"skillName":5,"commands":59,"prompt":69,"zipAvailable":70},[60,63,66],{"tool":61,"command":62},"npx","npx skills add Dicklesworthstone\u002Fpi_agent_rust --skill twinmind-ci-integration",{"tool":64,"command":65},"bunx","bunx skills add Dicklesworthstone\u002Fpi_agent_rust --skill twinmind-ci-integration",{"tool":67,"command":68},"pnpm","pnpm dlx skills add Dicklesworthstone\u002Fpi_agent_rust --skill twinmind-ci-integration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Fplugins-community\u002Fplugins\u002Fsaas-packs\u002Ftwinmind-pack\u002Fskills\u002Ftwinmind-ci-integration\u002FSKILL.md",true,[],[73,102,135,153,179,203],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":77,"licenseFileUrl":78,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":101},"01M6FCR7G5A005P364Z6ZWCJDP","theme-factory","Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors\u002Ffonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fcreative-design\u002Ftheme-factory\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fcreative-design\u002Ftheme-factory\u002FSKILL.md",[],[82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100],"theme factory","factory","theme","docs","toolkit","generate","artifacts","SET","fly","slides","landing","html","styling","artifact","pages","themes","with","you","fonts","2026-11-11 15:11:14",{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":77,"licenseFileUrl":106,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":40},"01M6FEGPPK0ZTKCCM0R3E3KS33","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FSKILL.md",[],[110,111,88,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,93,128,129,130,131,132,133,134],"web artifacts builder","web","artifacts builder","builder","frontend","css","components","react","component","routing","state management","state","shadcn","file","ui","Tools","Tailwind","use","single-file","simple","ui components","multi","for","jsx","suite",{"skillNo":136,"name":137,"nameZh":6,"description":138,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":77,"licenseFileUrl":139,"sourceHtmlUrl":140,"categories":141,"keywords":142,"publishedAt":40},"01M6FEE9VTK1W4GY21AKREJXRG","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FSKILL.md",[],[32,143,144,114,145,146,111,147,86,148,124,149,150,151,152,98,132],"webapp testing","webapp","screenshots","playwright","debugging","browser","logs","applications","behavior","local",{"skillNo":154,"name":155,"nameZh":6,"description":156,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":157,"sourceHtmlUrl":158,"categories":159,"keywords":160,"publishedAt":40},"01M6FE20F7ZTQBFWKF4MPJ2SBX","neuropixels-analysis","Neuropixels neural recording analysis. Load SpikeGLX\u002FOpenEphys data, preprocess, motion correction, Kilosort4 spike sorting, quality metrics, Allen\u002FIBL curation, AI-assisted visual analysis, for Neuropixels 1.0\u002F2.0 extracellular electrophysiology. Use when working with neural recordings, spike sorting, extracellular electrophysiology, or when the user mentions Neuropixels, SpikeGLX, Open Ephys, Kilosort, quality metrics, or unit curation.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002FSKILL.md",[],[161,162,163,164,165,166,167,168,127,169,170,171,172,173,174,175,98,176,177,178,132,23],"analysis","neuropixels analysis","spike","metrics","data","open","quality","user","recordings","Neural","motion","visual","quality metrics","unit","sorting","curation","recording","load",{"skillNo":180,"name":181,"nameZh":6,"description":182,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":77,"licenseFileUrl":183,"sourceHtmlUrl":184,"categories":185,"keywords":186,"publishedAt":40},"01M6FDP0PDK6F1GGX395C7625Z","skill-creator","Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fskill-creator\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fskill-creator\u002FSKILL.md",[],[187,188,189,190,191,192,193,194,195,196,197,198,199,200,98,132,201,23,202],"skill creator","creator","workflows","create","update","capabilities","knowledge","tool","integrations","specialized","guide","new skill","existing skill","users","Existing","new",{"skillNo":204,"name":205,"nameZh":6,"description":206,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":207,"sourceHtmlUrl":208,"categories":209,"keywords":210,"publishedAt":40},"01M6FDM8Y7VK7NYG9SM7QPA3PW","notebooklm","Use this skill to query your Google NotebookLM notebooks directly from Claude Code for source-grounded, citation-backed answers from Gemini. Browser automation, library management, persistent auth. Drastically reduced hallucinations through document-only responses.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fnotebooklm\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fnotebooklm\u002FSKILL.md",[],[205,211,212,213,214,215,216,148,217,218,127,219,220,221,222,132,223],"google","browser automation","gemini","automation","auth","code","library","management","only","document","query","Citation","source"]