Megatron Core Testing Guide
NVIDIA/Megatron-LM
Guide to the Megatron-LM test system: layout, recipe YAML, running and adding unit and functional tests, golden values, marker filters and CI parity.
Build repository-specific PostHog CI gates for SDK initialization, typed capture tests, release annotations, and secret boundaries.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill posthog-ci-integration -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace posthog-ci-integration --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ 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/posthog-ci-integration .claude/skills/posthog-ci-integration && rm -rf skills-srcUse ~/.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/
Install the "posthog-ci-integration" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/posthog-ci-integration into .claude/skills/posthog-ci-integration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "posthog-ci-integration", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/posthog-ci-integrationType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill posthog-ci-integration -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace posthog-ci-integration --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/.curated/posthog-ci-integration .agents/skills/posthog-ci-integration && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "posthog-ci-integration" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/posthog-ci-integration into .agents/skills/posthog-ci-integration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "posthog-ci-integration", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill posthog-ci-integration -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace posthog-ci-integration --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/.curated/posthog-ci-integration .cursor/skills/posthog-ci-integration && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "posthog-ci-integration" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/posthog-ci-integration into .cursor/skills/posthog-ci-integration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "posthog-ci-integration", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/jeremylongshore/tons-of-skills-marketplace.git --path skills/.curated/posthog-ci-integration--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill posthog-ci-integration -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace posthog-ci-integration --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/.curated/posthog-ci-integration .gemini/skills/posthog-ci-integration && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "posthog-ci-integration" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/posthog-ci-integration into .gemini/skills/posthog-ci-integration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "posthog-ci-integration", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install jeremylongshore/tons-of-skills-marketplace posthog-ci-integrationInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill posthog-ci-integration -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/.curated/posthog-ci-integration .github/skills/posthog-ci-integration && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "posthog-ci-integration" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/posthog-ci-integration into .github/skills/posthog-ci-integration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "posthog-ci-integration", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill posthog-ci-integration -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install jeremylongshore/tons-of-skills-marketplace posthog-ci-integration --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/.curated/posthog-ci-integration .opencode/skills/posthog-ci-integration && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "posthog-ci-integration" agent skill from https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/main/skills/.curated/posthog-ci-integration into .opencode/skills/posthog-ci-integration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "posthog-ci-integration", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
posthog-ci-integrationBuild repository-specific PostHog CI gates for SDK initialization, typed capture tests, release annotations, and secret boundaries.
Posthog CI Integration is an agent skill from jeremylongshore/tons-of-skills-marketplace. Build repository-specific PostHog CI gates for SDK initialization, typed capture tests, release annotations, and secret boundaries. Use when adding or reviewing PostHog checks in continuous integration. Trigger with "posthog CI", "PostHog GitHub Actions", or "test PostHog integration".
Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/official-docs.md`). Compatibility notes: Designed for Claude Code
It sits in DevOps & Cloud, covering CI/CD, Unit testing and Integration testing. It works with PostHog and GitHub Actions. 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.
5 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadWriteEditBash(gh:*)From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
ghFrom the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
us.i.posthog.comus.posthog.comAlso links to:
docs.github.composthog.comvitest.devFrom URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
POSTHOG_TEST_KEYPOSTHOG_PERSONAL_API_KEYNEXT_PUBLIC_POSTHOG_KEYFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Designed for Claude Code
From compatibility in the SKILL.md frontmatter.
Posthog CI Integration loads about 2k tokens when it runs, and up to ~2.2k if it reads all its reference files. Until then it costs about 77 tokens; SKILL.md has 293 words of instructions outside code blocks.
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.
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.
The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 293 words, ~2,041 tokens.
.claude/skills/posthog-ci-integration/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.Set up CI/CD pipelines for PostHog integrations. Covers mocked unit tests (no API key needed), integration tests against a PostHog dev project, and deployment annotations that mark releases in your PostHog timeline.
Use Read to inspect the relevant configuration and implementation before proposing changes. Use Write only for a new, explicitly requested artifact inside the target project. Use Edit for minimal changes to existing project files after the evidence pass.
set -euo pipefail
# Project key for integration tests (phc_... from dev project)
gh secret set POSTHOG_TEST_KEY --body "phc_dev_project_key"
# Personal key for deployment annotations (phx_...)
gh secret set POSTHOG_PERSONAL_API_KEY --body "phx_your_personal_key"
# Project ID for annotations
gh secret set POSTHOG_PROJECT_ID --body "12345"# .github/workflows/posthog-tests.yml
name: PostHog Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npm test -- --coverage
# Unit tests use mocked PostHog — no API key needed
integration-tests:
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: unit-tests
env:
NEXT_PUBLIC_POSTHOG_KEY: ${{ secrets.POSTHOG_TEST_KEY }}
POSTHOG_HOST: https://us.i.posthog.com
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npm run test:integration
timeout-minutes: 5
annotate-deploy:
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: integration-tests
steps:
- name: Create PostHog annotation
env:
POSTHOG_PERSONAL_API_KEY: ${{ secrets.POSTHOG_PERSONAL_API_KEY }}
POSTHOG_PROJECT_ID: ${{ secrets.POSTHOG_PROJECT_ID }}
run: |
curl -X POST "https://us.posthog.com/api/projects/$POSTHOG_PROJECT_ID/annotations/" \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
-H "Content-Type: application/json" \
-d "{
\"content\": \"Deploy: ${GITHUB_SHA::8} — ${GITHUB_EVENT_HEAD_COMMIT_MESSAGE:-$(git log -1 --pretty=%s)}\",
\"date_marker\": \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\",
\"scope\": \"project\"
}"// tests/analytics.test.ts — runs in CI without any API keys
import { describe, it, expect, vi, beforeEach } from 'vitest';
vi.mock('posthog-node', () => ({
PostHog: vi.fn().mockImplementation(() => ({
capture: vi.fn(),
identify: vi.fn(),
getFeatureFlag: vi.fn().mockResolvedValue('control'),
isFeatureEnabled: vi.fn().mockResolvedValue(true),
getAllFlags: vi.fn().mockResolvedValue({ 'new-feature': true }),
flush: vi.fn().mockResolvedValue(undefined),
shutdown: vi.fn().mockResolvedValue(undefined),
})),
}));
import { PostHog } from 'posthog-node';
describe('PostHog Analytics', () => {
let ph: InstanceType<typeof PostHog>;
beforeEach(() => {
vi.clearAllMocks();
ph = new PostHog('phc_test');
});
it('captures events with required properties', () => {
ph.capture({
distinctId: 'user-1',
event: 'subscription_started',
properties: { plan: 'pro', interval: 'annual' },
});
expect(ph.capture).toHaveBeenCalledWith(
expect.objectContaining({
event: 'subscription_started',
properties: expect.objectContaining({ plan: 'pro' }),
})
);
});
it('evaluates feature flags with default fallback', async () => {
const enabled = await ph.isFeatureEnabled('new-feature', 'user-1');
expect(enabled).toBe(true);
});
it('gets multivariate flag variant', async () => {
const variant = await ph.getFeatureFlag('experiment', 'user-1');
expect(variant).toBe('control');
});
});// tests/integration/posthog.test.ts
import { describe, it, expect, afterAll } from 'vitest';
import { PostHog } from 'posthog-node';
const KEY = process.env.NEXT_PUBLIC_POSTHOG_KEY;
describe.skipIf(!KEY)('PostHog Integration', () => {
const ph = new PostHog(KEY!, {
host: process.env.POSTHOG_HOST || 'https://us.i.posthog.com',
flushAt: 1,
flushInterval: 0,
});
afterAll(async () => await ph.shutdown());
it('captures and flushes an event', async () => {
ph.capture({
distinctId: `ci-${Date.now()}`,
event: 'ci_integration_test',
properties: {
ci: true,
run_id: process.env.GITHUB_RUN_ID || 'local',
},
});
await expect(ph.flush()).resolves.not.toThrow();
});
it('evaluates feature flags', async () => {
const flags = await ph.getAllFlags(`ci-${Date.now()}`);
expect(typeof flags).toBe('object');
});
it('resolves the flags endpoint', async () => {
const response = await fetch(`${process.env.POSTHOG_HOST}/flags?v=2`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ api_key: KEY, distinct_id: 'ci-test' }),
});
expect(response.status).toBe(200);
const data = await response.json();
expect(data).toHaveProperty('flags');
});
});{
"scripts": {
"test": "vitest run",
"test:integration": "vitest run tests/integration/",
"test:coverage": "vitest run --coverage"
}
}| Issue | Cause | Solution |
|---|---|---|
| Integration tests fail in CI | Secret not configured | Run gh secret set POSTHOG_TEST_KEY |
| Tests timeout | PostHog unreachable from CI runner | Increase timeout, add retry |
| Annotation fails | Wrong personal key | Verify phx_ key, check project ID |
| Mock type mismatch | PostHog SDK updated | Update mock to match new SDK exports |
For a Next.js service, inspect the analytics wrapper and test setup, add a mocked capture contract, and gate the workflow on type checks plus the focused test. Report the changed files, commands run, and whether a deployment annotation remains opt-in behind protected credentials.
See official PostHog references for current authority and verification boundaries.
For deployment patterns, see posthog-deploy-integration.
© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file (references) in skills/.curated/posthog-ci-integration of jeremylongshore/tons-of-skills-marketplace.
Open the folder on GitHubat commit cfae287
Posthog 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Posthog CI Integration this skilljeremylongshore/tons-of-skills-marketplace | 2.8k | — | ~2k | Automated safety check: Pass | MIT | |
| Megatron Core Testing GuideNVIDIA/Megatron-LM | 18k | — | ~2.1k | Automated safety check: Pass | Apache-2.0 | |
| Code PatternsAedelon/claude-code-blueprint | 120 | — | ~1.2k | Automated safety check: Pass | Custom licence | |
| Flaker Storage Cache On CImizchi/skills | 360 | — | ~1.6k | Automated safety check: Pass | None | |
| Mirrord CImetalbear-co/mirrord | 5.4k | 1 repos | ~3.2k | Automated safety check: Warn | MIT | |
| Bats Shell Testing Patternswshobson/agents | 40k | 12 repos | ~1.3k | Automated safety check: Pass | MIT |
NVIDIA/Megatron-LM
Guide to the Megatron-LM test system: layout, recipe YAML, running and adding unit and functional tests, golden values, marker filters and CI parity.
Aedelon/claude-code-blueprint
Reference patterns for REST APIs, pytest/vitest testing, Docker multi-stage builds, GitHub Actions CI/CD, PostgreSQL, TypeScript generics, Python async, and React Server Components.
mizchi/skills
Persist flaker's DuckDB storage across GitHub Actions runs and feed it from multiple sources (vitest reports, custom adapter reports, etc.).
metalbear-co/mirrord
Help users set up mirrord in CI pipelines for testing against real Kubernetes environments.
wshobson/agents
Writes unit tests for shell scripts with Bats: error-condition tests, fixtures and mocks, cross-shell checks, parallel runs, helper files and CI integration.
PostHog/posthog
Configures and manages Depot CI, a drop-in replacement for GitHub Actions that runs workflows entirely within Depot.
jeremylongshore/tons-of-skills-marketplace
Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.
jeremylongshore/tons-of-skills-marketplace
Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.
jeremylongshore/tons-of-skills-marketplace
Execute proactive auto-loading: automatically detects and loads agents.md files.
jeremylongshore/tons-of-skills-marketplace
Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.
jeremylongshore/tons-of-skills-marketplace
Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.
jeremylongshore/tons-of-skills-marketplace
Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.
Works with
Categories
Build repository-specific PostHog CI gates for SDK initialization, typed capture tests, release annotations, and secret boundaries. Posthog CI Integration is an agent skill from jeremylongshore/tons-of-skills-marketplace. Build repository-specific PostHog CI gates for SDK initialization, typed capture tests, release annotations, and secret boundaries.
Posthog CI Integration fits situations like: reviewing PostHog checks in continuous integration; with posthog CI; postHog GitHub Actions; test PostHog integration.
Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill posthog-ci-integration -a claude-code`. Or copy the skill folder (skills/.curated/posthog-ci-integration in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/posthog-ci-integration in your project. Claude Code loads it when a task matches its description.
Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill posthog-ci-integration -a codex`. Or copy the skill folder (skills/.curated/posthog-ci-integration in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/posthog-ci-integration in your project. Codex loads it when a task matches its description.
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 posthog-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/posthog-ci-integration, .gemini/skills/posthog-ci-integration, .github/skills/posthog-ci-integration and .opencode/skills/posthog-ci-integration in your project.
Going by SKILL.md and its folder, Posthog CI Integration needs the command-line tools its instructions call (gh) and credentials named POSTHOG_TEST_KEY, POSTHOG_PERSONAL_API_KEY and NEXT_PUBLIC_POSTHOG_KEY. Our summary lists: A credential in POSTHOG_TEST_KEY; A credential in POSTHOG_PERSONAL_API_KEY. Its frontmatter pre-approves these tools: Read, Write, Edit, Bash(gh:*). Compatibility (from SKILL.md): Designed for Claude Code.
SKILL.md names 5 domains. In commands or code: us.i.posthog.com and us.posthog.com; the agent is likely to contact these when it follows the instructions. As links in the text: docs.github.com, posthog.com and vitest.dev. This is read from the text; nothing was executed.
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.
Posthog 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.
About 2k tokens (SKILL.md is roughly 8.2k 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 199 tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Posthog CI Integration: Megatron Core Testing Guide (NVIDIA/Megatron-LM, 18k stars), Code Patterns (Aedelon/claude-code-blueprint, 120 stars), Flaker Storage Cache On CI (mizchi/skills, 360 stars) and Mirrord CI (metalbear-co/mirrord, 5.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
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.