Agent skill

Clerk CI Integration

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Configure Clerk CI/CD integration with GitHub Actions and testing.

MITAuto-check passedDevOps & Cloud

Install Clerk CI Integration

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill clerk-ci-integration -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace clerk-ci-integration --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/clerk-ci-integration .claude/skills/clerk-ci-integration && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
clerk-ci-integration
GitHub stars
2.8k
Token cost
~1.7k tokens
SKILL.md length
235 words
Files
2 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Configure Clerk CI/CD integration with GitHub Actions and testing.

  • Works in 6 steps: GitHub Actions Workflow → Configure GitHub Secrets → Playwright Auth Setup → …
  • Setting up automated testing
  • SKILL.md covers Overview, Prerequisites, Instructions and Output, plus 4 more sections
  • Needs CLERK_TEST_USER_PASSWORD and NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY

What it does

Clerk CI Integration is an agent skill from jeremylongshore/tons-of-skills-marketplace. Configure Clerk CI/CD integration with GitHub Actions and testing. Use when setting up automated testing, configuring CI pipelines, or integrating Clerk tests into your build process. Trigger with phrases like "clerk CI", "clerk GitHub Actions", "clerk automated tests", "CI clerk", "clerk pipeline".

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/implementation-guide.md`). Compatibility notes: Designed for Claude Code

It sits in DevOps & Cloud, covering CI/CD. It works with GitHub Actions, Playwright and GitHub. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Setting up automated testing
  • Configuring CI pipelines
  • Integrating Clerk tests into your build process
  • With phrases like clerk CI

Example prompts

  • “clerk CI”
  • “clerk GitHub Actions”
  • “clerk automated tests”
  • “/clerk-ci-integration”

Requirements

  • Node.js
  • A credential in NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY
  • A credential in CLERK_SECRET_KEY
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Bash(gh:*)

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. GitHub Actions Workflow
  2. Configure GitHub Secrets
  3. Playwright Auth Setup
  4. Playwright Config with Auth State
  5. E2E Test Examples
  6. Test User Seed Script for CI

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Bash(gh:*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript and yaml).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • clerk.com
    • playwright.dev
    • docs.github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • CLERK_TEST_USER_PASSWORD
    • NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY
    • CLERK_SECRET_KEY
    • CLERK_WEBHOOK_SECRET

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Clerk CI Integration loads about 1.7k tokens when it runs, and up to ~3.1k if it reads all its reference files. Until then it costs about 80 tokens; SKILL.md has 235 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~80
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 235 words, ~1,718 tokens.

Download SKILL.mdSave it as .claude/skills/clerk-ci-integration/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
clerk-ci-integration
description
Configure Clerk CI/CD integration with GitHub Actions and testing. Use when setting up automated testing, configuring CI pipelines, or integrating Clerk tests into your build process. Trigger with phrases like "clerk CI", "clerk GitHub Actions", "clerk automated tests", "CI clerk", "clerk pipeline".
allowed-tools
Read, Write, Edit, Bash(gh:*)
compatibility
Designed for Claude Code
version
1.15.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, clerk, testing, ci-cd

Clerk CI Integration

Overview

Set up CI/CD pipelines with Clerk authentication testing. Covers GitHub Actions workflows, Playwright E2E tests with Clerk auth, test user management, and CI secrets configuration.

Prerequisites

  • GitHub repository with Actions enabled
  • Clerk test API keys (pk_test_ / sk_test_)
  • npm/pnpm project configured

Instructions

Step 1: GitHub Actions Workflow
yaml
# .github/workflows/test.yml
name: Test with Clerk Auth
on:
  pull_request:
    branches: [main]
  push:
    branches: [main]

jobs:
  test:
    runs-on: ubuntu-latest
    env:
      NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: ${{ secrets.CLERK_PK_TEST }}
      CLERK_SECRET_KEY: ${{ secrets.CLERK_SK_TEST }}
      CLERK_WEBHOOK_SECRET: ${{ secrets.CLERK_WEBHOOK_SECRET_TEST }}

    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
          cache: npm

      - run: npm ci
      - run: npm run build
      - run: npm test

      - name: Install Playwright
        run: npx playwright install --with-deps chromium

      - name: Run E2E tests
        run: npx playwright test
        env:
          CLERK_TEST_USER_EMAIL: ${{ secrets.CLERK_TEST_USER_EMAIL }}
          CLERK_TEST_USER_PASSWORD: ${{ secrets.CLERK_TEST_USER_PASSWORD }}
Step 2: Configure GitHub Secrets

Add these secrets in GitHub repo > Settings > Secrets:

SecretValue
CLERK_PK_TESTpk_test_... from dev instance
CLERK_SK_TESTsk_test_... from dev instance
CLERK_WEBHOOK_SECRET_TESTwhsec_... from dev webhooks
CLERK_TEST_USER_EMAILci-test@yourapp.com
CLERK_TEST_USER_PASSWORDStrong test password
Step 3: Playwright Auth Setup
typescript
// e2e/auth.setup.ts
import { test as setup, expect } from '@playwright/test'
import path from 'path'

const authFile = path.join(__dirname, '.auth/user.json')

setup('authenticate', async ({ page }) => {
  await page.goto('/sign-in')

  // Fill Clerk sign-in form
  await page.fill('input[name="identifier"]', process.env.CLERK_TEST_USER_EMAIL!)
  await page.click('button:has-text("Continue")')
  await page.fill('input[name="password"]', process.env.CLERK_TEST_USER_PASSWORD!)
  await page.click('button:has-text("Continue")')

  // Wait for redirect to authenticated page
  await page.waitForURL('/dashboard')
  await expect(page.locator('text=Dashboard')).toBeVisible()

  // Save auth state for reuse across tests
  await page.context().storageState({ path: authFile })
})
Step 4: Playwright Config with Auth State
typescript
// playwright.config.ts
import { defineConfig } from '@playwright/test'

export default defineConfig({
  testDir: './e2e',
  projects: [
    { name: 'setup', testMatch: 'auth.setup.ts' },
    {
      name: 'authenticated',
      testMatch: '*.spec.ts',
      dependencies: ['setup'],
      use: {
        storageState: 'e2e/.auth/user.json',
      },
    },
  ],
  webServer: {
    command: 'npm run dev',
    port: 3000,
    reuseExistingServer: !process.env.CI,
  },
})
Step 5: E2E Test Examples
typescript
// e2e/dashboard.spec.ts
import { test, expect } from '@playwright/test'

test('authenticated user sees dashboard', async ({ page }) => {
  await page.goto('/dashboard')
  await expect(page.locator('h1')).toContainText('Dashboard')
  await expect(page.locator('[data-clerk-user-button]')).toBeVisible()
})

test('unauthenticated user is redirected to sign-in', async ({ browser }) => {
  // Create fresh context without saved auth state
  const context = await browser.newContext()
  const page = await context.newPage()

  await page.goto('/dashboard')
  await expect(page).toHaveURL(/sign-in/)

  await context.close()
})

test('protected API returns data', async ({ page }) => {
  const response = await page.request.get('/api/data')
  expect(response.status()).toBe(200)
  const data = await response.json()
  expect(data.userId).toBeTruthy()
})
Step 6: Test User Seed Script for CI
typescript
// scripts/seed-ci-user.ts
import { createClerkClient } from '@clerk/backend'

const clerk = createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY! })

async function ensureTestUser() {
  const email = process.env.CLERK_TEST_USER_EMAIL!
  const password = process.env.CLERK_TEST_USER_PASSWORD!

  const existing = await clerk.users.getUserList({ emailAddress: [email] })
  if (existing.totalCount > 0) {
    console.log('Test user already exists')
    return
  }

  await clerk.users.createUser({
    emailAddress: [email],
    password,
    firstName: 'CI',
    lastName: 'TestUser',
  })
  console.log('Test user created')
}

ensureTestUser()

Output

  • GitHub Actions workflow with Clerk env vars from secrets
  • Playwright auth setup saving session state for reuse
  • E2E tests covering authenticated and unauthenticated flows
  • Test user seed script for CI environments
  • Protected API endpoint test

Error Handling

ErrorCauseSolution
Secret not found in CIMissing GitHub secretAdd in repo Settings > Secrets and variables > Actions
Test user sign-in failsUser not created or wrong passwordRun seed script, verify credentials
Timeout on sign-in pageClerk SDK not loaded in CI buildEnsure NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY is set
E2E auth state staleCached session expiredDelete .auth/ directory, re-run setup

Examples

Vitest Unit Test with Mocked Clerk
typescript
// __tests__/api.test.ts
import { describe, it, expect, vi } from 'vitest'

vi.mock('@clerk/nextjs/server', () => ({
  auth: vi.fn().mockResolvedValue({ userId: 'user_test_123', has: () => true }),
}))

describe('Protected API', () => {
  it('returns data for authenticated user', async () => {
    const { GET } = await import('@/app/api/data/route')
    const response = await GET()
    expect(response.status).toBe(200)
  })
})

Resources

Next Steps

Proceed to clerk-deploy-integration for deployment platform setup.

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in skills/.curated/clerk-ci-integration of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/implementation-guide.md

Open the folder on GitHubat commit cfae287

Compare with similar skills

Clerk CI Integration next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Clerk CI Integration compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Clerk CI Integration this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.7kAutomated safety check: PassMIT
CI Watchdoglatitude-dev/latitude-llm4.7k—~1.6kAutomated safety check: PassMIT
Megatron-LM CI Failure TriageNVIDIA/Megatron-LM18k—~1.6kAutomated safety check: PassApache-2.0
Parallel CI Triagespencerpauly/awesome-cursor-skills844—~793Automated safety check: PassCC0-1.0
Playwright CIzebbern/claude-code-guide4.7k2 repos~675Automated safety check: PassMIT
Gh Fix CIJetBrains/skills3667 repos~953Automated safety check: PassApache-2.0

Similar skills

  • CI Watchdog

    latitude-dev/latitude-llm

    Continuously monitor GitHub PR CI checks and automatically fix failures until all checks pass.

    4.7k GitHub stars~1.6k tokensUpdated 2 days ago
    DevOps & CloudAuto-check passed
  • Official

    Investigates a failing GitHub Actions run or job for Megatron-LM, finds the root cause plus the PR and test author involved, and files a structured bug issue.

    18k GitHub stars~1.6k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Parallel CI Triage

    spencerpauly/awesome-cursor-skills

    When GitHub Actions fails, fetch failing job logs and assign each failing job to a separate subagent that fixes its slice of the problem in parallel.

    844 GitHub stars~793 tokensUpdated 2 mo ago
    DevOps & CloudAuto-check passed
  • Playwright CI

    zebbern/claude-code-guide

    Production-ready CI/CD configurations for Playwright — GitHub Actions, GitLab CI, CircleCI, Azure DevOps, Jenkins, Docker, parallel sharding, reporting, code coverage, and global setup/teardown.

    4.7k GitHub starsUsed in 2 repos~675 tokens
    DevOps & CloudAuto-check passed
  • Gh Fix CI

    JetBrains/skills

    Official

    A skill your agent uses when a user asks to debug or fix failing GitHub PR checks that run in GitHub Actions; use gh to inspect checks and logs, summarize failure context, draft a fix plan, and…

    366 GitHub starsUsed in 7 repos~953 tokens
    DevOps & CloudAuto-check passed
  • Devops Pipeline

    luongnv89/skills

    Configure pre-commit hooks and lean GitHub Actions for shift-left quality assurance.

    131 GitHub stars~4.8k tokensUpdated 2 days ago
    DevOps & CloudAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Questions about Clerk CI Integration

What does Clerk CI Integration do?

Configure Clerk CI/CD integration with GitHub Actions and testing. Clerk CI Integration is an agent skill from jeremylongshore/tons-of-skills-marketplace. Configure Clerk CI/CD integration with GitHub Actions and testing.

When should I use Clerk CI Integration?

Clerk CI Integration fits situations like: setting up automated testing; configuring CI pipelines; integrating Clerk tests into your build process; with phrases like clerk CI.

How do I install Clerk CI Integration in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill clerk-ci-integration -a claude-code`. Or copy the skill folder (skills/.curated/clerk-ci-integration in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/clerk-ci-integration in your project. Claude Code loads it when a task matches its description.

How do I install Clerk CI Integration in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill clerk-ci-integration -a codex`. Or copy the skill folder (skills/.curated/clerk-ci-integration in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/clerk-ci-integration in your project. Codex loads it when a task matches its description.

Can I use Clerk CI Integration in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill clerk-ci-integration -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/clerk-ci-integration, .gemini/skills/clerk-ci-integration, .github/skills/clerk-ci-integration and .opencode/skills/clerk-ci-integration in your project.

What does Clerk CI Integration need to run?

Going by SKILL.md and its folder, Clerk CI Integration needs credentials named CLERK_TEST_USER_PASSWORD, NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY, CLERK_SECRET_KEY and CLERK_WEBHOOK_SECRET. Our summary lists: Node.js; A credential in NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY; A credential in CLERK_SECRET_KEY. Its frontmatter pre-approves these tools: Read, Write, Edit, Bash(gh:*). Compatibility (from SKILL.md): Designed for Claude Code.

Does Clerk CI Integration access the network?

SKILL.md names 3 domains. As links in the text: clerk.com, playwright.dev and docs.github.com. This is read from the text; nothing was executed.

Is Clerk CI Integration safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Clerk CI Integration use?

Clerk CI Integration is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Clerk CI Integration use?

About 1.7k tokens (SKILL.md is roughly 6.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.4k tokens, read only when the agent opens those files.

What are the alternatives to Clerk CI Integration?

Skills that share tags, products or a category with Clerk CI Integration: CI Watchdog (latitude-dev/latitude-llm, 4.7k stars), Megatron-LM CI Failure Triage (NVIDIA/Megatron-LM, 18k stars), Parallel CI Triage (spencerpauly/awesome-cursor-skills, 844 stars) and Playwright CI (zebbern/claude-code-guide, 4.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Clerk CI Integration?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.