[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F84RX2PDMHEVGKZ4QQX621":3,"skill-same:01M6F84RX2PDMHEVGKZ4QQX621":76},{"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":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":53,"commitSha":54,"skillDirectory":55,"forksCount":56,"repositoryHtmlUrl":57,"repositoryHomepageUrl":58,"ownerHtmlUrl":59,"ownerBlogUrl":6,"ownerDescription":60,"updatedAt":61,"install":62,"resources":75},"01M6F84RX2PDMHEVGKZ4QQX621","clade-ci-integration",null,"Test and validate Claude integrations in CI\u002FCD pipelines —\nUse when working with ci-integration patterns.\nGitHub Actions, mocking strategies, and cost control.\nTrigger with \"anthropic ci\", \"test claude in ci\", \"anthropic github actions\",\n\"claude automated testing\".","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fjeremylongshore\u002Fclaude-code-plugins-plus-skills\u002Fclade-ci-integration\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"clade ci integration","integration","ci","edit","CI\u002FCD","mocking","trigger","io","strategies","test and validate","patterns","use","testing","write","read","integrations","Bash","github actions","actions","code","2026-11-10 10:12:30",false,"---\nname: clade-ci-integration\ndescription: |\n  Test and validate Claude integrations in CI\u002FCD pipelines —\n  Use when working with ci-integration patterns.\n  GitHub Actions, mocking strategies, and cost control.\n  Trigger with \"anthropic ci\", \"test claude in ci\", \"anthropic github actions\",\n  \"claude automated testing\".\nallowed-tools: Read, Write, Edit, Bash(npm:*)\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\ncompatible-with: claude-code\ntags: [saas, anthropic, claude, ci, testing]\n---\n\n# Anthropic CI Integration\n\n## Overview\nTesting Claude integrations in CI requires handling API keys securely, mocking for unit tests, and making real calls only in integration tests.\n\n## GitHub Actions Setup\n```yaml\n# .github\u002Fworkflows\u002Ftest.yml\nname: Test Claude Integration\non: [push, pull_request]\n\njobs:\n  test:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: 20\n\n      - run: npm ci\n\n      # Unit tests — no API key needed (mocked)\n      - run: npm run test:unit\n\n      # Integration tests — real API calls\n      - run: npm run test:integration\n        env:\n          ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}\n```\n\n## Mock Strategy for Unit Tests\n```typescript\n\u002F\u002F tests\u002Fhelpers\u002Fmock-anthropic.ts\nimport { vi } from 'vitest';\n\nexport function mockAnthropicClient() {\n  return {\n    messages: {\n      create: vi.fn().mockResolvedValue({\n        id: 'msg_mock',\n        type: 'message',\n        role: 'assistant',\n        model: 'claude-sonnet-4-20250514',\n        content: [{ type: 'text', text: 'Mock response' }],\n        stop_reason: 'end_turn',\n        usage: { input_tokens: 10, output_tokens: 5 },\n      }),\n      stream: vi.fn().mockReturnValue({\n        async *[Symbol.asyncIterator]() {\n          yield { type: 'content_block_delta', delta: { type: 'text_delta', text: 'Mock' } };\n        },\n        finalMessage: vi.fn().mockResolvedValue({ usage: { input_tokens: 10, output_tokens: 5 } }),\n      }),\n    },\n  };\n}\n\n\u002F\u002F In your test:\nimport { mockAnthropicClient } from '.\u002Fhelpers\u002Fmock-anthropic';\n\ntest('summarize function returns text', async () => {\n  const client = mockAnthropicClient();\n  const result = await summarize(client, 'Some long text...');\n  expect(result).toBe('Mock response');\n  expect(client.messages.create).toHaveBeenCalledWith(\n    expect.objectContaining({ model: 'claude-sonnet-4-20250514' })\n  );\n});\n```\n\n## Integration Test (Real API)\n```typescript\n\u002F\u002F tests\u002Fintegration\u002Fclaude.test.ts\nimport Anthropic from '@claude-ai\u002Fsdk';\nimport { describe, test, expect } from 'vitest';\n\ndescribe('Claude API Integration', () => {\n  const client = new Anthropic(); \u002F\u002F Uses ANTHROPIC_API_KEY env var\n\n  test('messages.create returns valid response', async () => {\n    const message = await client.messages.create({\n      model: 'claude-haiku-4-5-20251001', \u002F\u002F Cheapest for CI\n      max_tokens: 50,\n      messages: [{ role: 'user', content: 'Say \"test passed\" in 2 words.' }],\n    });\n\n    expect(message.content[0].type).toBe('text');\n    expect(message.stop_reason).toBe('end_turn');\n    expect(message.usage.output_tokens).toBeGreaterThan(0);\n  }, 30_000); \u002F\u002F 30s timeout for API calls\n});\n```\n\n## Cost Control in CI\n| Strategy | How |\n|----------|-----|\n| Use Haiku only | Cheapest model, fast |\n| Limit max_tokens | `max_tokens: 50` for validation tests |\n| Skip on PRs from forks | Don't expose API key to untrusted code |\n| Run integration tests only on main | `if: github.ref == 'refs\u002Fheads\u002Fmain'` |\n| Budget cap | Set spending limits in Anthropic console |\n\n## Output\n- GitHub Actions workflow running unit tests (mocked, no API key needed)\n- Integration tests making real Claude API calls on main branch\n- Mock client returning realistic response shapes for unit tests\n- CI costs controlled via Haiku model and tight max_tokens\n\n## Error Handling\n| Error | Cause | Solution |\n|-------|-------|----------|\n| API Error | Check error type and status code | See `clade-common-errors` |\n\n## Examples\nSee GitHub Actions YAML, Mock Strategy with Vitest, Integration Test with real API, and Cost Control table above.\n\n## Resources\n- [GitHub Actions Secrets](https:\u002F\u002Fdocs.github.com\u002Fen\u002Factions\u002Fsecurity-for-github-actions\u002Fusing-secrets-in-github-actions)\n- [Anthropic SDK](https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fclaude-sdk-typescript)\n\n## Next Steps\nSee `clade-deploy-integration` for deploying to production.\n\n## Prerequisites\n- GitHub repository with Actions enabled\n- `ANTHROPIC_API_KEY` stored as GitHub Actions secret\n- Test framework installed (Vitest, Jest, or pytest)\n\n## Instructions\n\n### Step 1: Review the patterns below\nEach section contains production-ready code examples. Copy and adapt them to your use case.\n\n### Step 2: Apply to your codebase\nIntegrate the patterns that match your requirements. Test each change individually.\n\n### Step 3: Verify\nRun your test suite to confirm the integration works correctly.\n\n","# Anthropic CI Integration\n\n## Overview\nTesting Claude integrations in CI requires handling API keys securely, mocking for unit tests, and making real calls only in integration tests.\n\n## GitHub Actions Setup\n```yaml\n# .github\u002Fworkflows\u002Ftest.yml\nname: Test Claude Integration\non: [push, pull_request]\n\njobs:\n  test:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: 20\n\n      - run: npm ci\n\n      # Unit tests — no API key needed (mocked)\n      - run: npm run test:unit\n\n      # Integration tests — real API calls\n      - run: npm run test:integration\n        env:\n          ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}\n```\n\n## Mock Strategy for Unit Tests\n```typescript\n\u002F\u002F tests\u002Fhelpers\u002Fmock-anthropic.ts\nimport { vi } from 'vitest';\n\nexport function mockAnthropicClient() {\n  return {\n    messages: {\n      create: vi.fn().mockResolvedValue({\n        id: 'msg_mock',\n        type: 'message',\n        role: 'assistant',\n        model: 'claude-sonnet-4-20250514',\n        content: [{ type: 'text', text: 'Mock response' }],\n        stop_reason: 'end_turn',\n        usage: { input_tokens: 10, output_tokens: 5 },\n      }),\n      stream: vi.fn().mockReturnValue({\n        async *[Symbol.asyncIterator]() {\n          yield { type: 'content_block_delta', delta: { type: 'text_delta', text: 'Mock' } };\n        },\n        finalMessage: vi.fn().mockResolvedValue({ usage: { input_tokens: 10, output_tokens: 5 } }),\n      }),\n    },\n  };\n}\n\n\u002F\u002F In your test:\nimport { mockAnthropicClient } from '.\u002Fhelpers\u002Fmock-anthropic';\n\ntest('summarize function returns text', async () => {\n  const client = mockAnthropicClient();\n  const result = await summarize(client, 'Some long text...');\n  expect(result).toBe('Mock response');\n  expect(client.messages.create).toHaveBeenCalledWith(\n    expect.objectContaining({ model: 'claude-sonnet-4-20250514' })\n  );\n});\n```\n\n## Integration Test (Real API)\n```typescript\n\u002F\u002F tests\u002Fintegration\u002Fclaude.test.ts\nimport Anthropic from '@claude-ai\u002Fsdk';\nimport { describe, test, expect } from 'vitest';\n\ndescribe('Claude API Integration', () => {\n  const client = new Anthropic(); \u002F\u002F Uses ANTHROPIC_API_KEY env var\n\n  test('messages.create returns valid response', async () => {\n    const message = await client.messages.create({\n      model: 'claude-haiku-4-5-20251001', \u002F\u002F Cheapest for CI\n      max_tokens: 50,\n      messages: [{ role: 'user', content: 'Say \"test passed\" in 2 words.' }],\n    });\n\n    expect(message.content[0].type).toBe('text');\n    expect(message.stop_reason).toBe('end_turn');\n    expect(message.usage.output_tokens).toBeGreaterThan(0);\n  }, 30_000); \u002F\u002F 30s timeout for API calls\n});\n```\n\n## Cost Control in CI\n| Strategy | How |\n|----------|-----|\n| Use Haiku only | Cheapest model, fast |\n| Limit max_tokens | `max_tokens: 50` for validation tests |\n| Skip on PRs from forks | Don't expose API key to untrusted code |\n| Run integration tests only on main | `if: github.ref == 'refs\u002Fheads\u002Fmain'` |\n| Budget cap | Set spending limits in Anthropic console |\n\n## Output\n- GitHub Actions workflow running unit tests (mocked, no API key needed)\n- Integration tests making real Claude API calls on main branch\n- Mock client returning realistic response shapes for unit tests\n- CI costs controlled via Haiku model and tight max_tokens\n\n## Error Handling\n| Error | Cause | Solution |\n|-------|-------|----------|\n| API Error | Check error type and status code | See `clade-common-errors` |\n\n## Examples\nSee GitHub Actions YAML, Mock Strategy with Vitest, Integration Test with real API, and Cost Control table above.\n\n## Resources\n- [GitHub Actions Secrets](https:\u002F\u002Fdocs.github.com\u002Fen\u002Factions\u002Fsecurity-for-github-actions\u002Fusing-secrets-in-github-actions)\n- [Anthropic SDK](https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fclaude-sdk-typescript)\n\n## Next Steps\nSee `clade-deploy-integration` for deploying to production.\n\n## Prerequisites\n- GitHub repository with Actions enabled\n- `ANTHROPIC_API_KEY` stored as GitHub Actions secret\n- Test framework installed (Vitest, Jest, or pytest)\n\n## Instructions\n\n### Step 1: Review the patterns below\nEach section contains production-ready code examples. Copy and adapt them to your use case.\n\n### Step 2: Apply to your codebase\nIntegrate the patterns that match your requirements. Test each change individually.\n\n### Step 3: Verify\nRun your test suite to confirm the integration works correctly.\n\n",{"name":5,"tags":44,"author":48,"license":15,"version":49,"description":50,"allowed-tools":51,"compatible-with":52},[45,46,47,21,31],"saas","anthropic","claude","Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Test and validate Claude integrations in CI\u002FCD pipelines —\nUse when working with ci-integration patterns.\nGitHub Actions, mocking strategies, and cost control.\nTrigger with \"anthropic ci\", \"test claude in ci\", \"anthropic github actions\",\n\"claude automated testing\".\n","Read, Write, Edit, Bash(npm:*)","claude-code","main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Fjeremylongshore\u002Fclaude-code-plugins-plus-skills\u002Fclade-ci-integration",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":63,"prompt":73,"zipAvailable":74},[64,67,70],{"tool":65,"command":66},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill clade-ci-integration",{"tool":68,"command":69},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill clade-ci-integration",{"tool":71,"command":72},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill clade-ci-integration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fjeremylongshore\u002Fclaude-code-plugins-plus-skills\u002Fclade-ci-integration\u002FSKILL.md",true,[],[77,86,95,104,110,116],{"skillNo":78,"name":79,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":39},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[83,84,85],"model","model hierarchy","model hierarchy skill",{"skillNo":87,"name":88,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":39},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[92,93,94],"MCP","zoom","zoom mcp",{"skillNo":96,"name":97,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":39},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[101,102,103,93],"sdk","zoom apps sdk","apps",{"skillNo":105,"name":106,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":39},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[106],{"skillNo":111,"name":112,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":39},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[112],{"skillNo":117,"name":118,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":39},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[118]]