menu-testing-ssr

menu-testing-ssr is a skill for Claude Code, Codex from asmyshlyaev177/react-horizontal-scrolling-menu. It costs 144 tokens per session (3,434 once invoked), scanned A, original, MIT.

Guidance for server-rendering and testing a React horizontal scrolling menu. Server rendering creates the first page on the server, while the browser later determines which items are actually visible.

In plain words
What is it for?
Use it when adding this menu to a Next.js application, choosing the initial arrow state, or writing Playwright tests. It covers visibility attributes and browser-based scrolling checks.
Why use it?
It helps avoid incorrect first-page controls and tests that disagree with what users see. It explains how client-only browser behavior affects the initial markup.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import Page from '../app/menu/page';.

Good fit Use it when adding this menu to a Next.js application, choosing the initial arrow state, or writing Playwright tests. It covers visibility attributes and browser-based scrolling checks.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/asmyshlyaev177/react-horizontal-scrolling-menu
agentmods
npx agentmods add skills/asmyshlyaev177/react-horizontal-scrolling-menu/menu-testing-ssr

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for menu-testing-ssr

README.md
[![agentmods](https://agentmods.dev/badge/skills/asmyshlyaev177/react-horizontal-scrolling-menu/menu-testing-ssr.svg)](https://agentmods.dev/skills/asmyshlyaev177/react-horizontal-scrolling-menu/menu-testing-ssr)
Your own site
<a href="https://agentmods.dev/skills/asmyshlyaev177/react-horizontal-scrolling-menu/menu-testing-ssr"><img src="https://agentmods.dev/badge/skills/asmyshlyaev177/react-horizontal-scrolling-menu/menu-testing-ssr.svg" alt="Measured on agentmods" height="20"></a>
Per session 144 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,434 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00144 $0.03434
Opus 5 $0.00072 $0.01717
Sonnet 5 $0.00029 $0.00687
Haiku 4.5 $0.00014 $0.00343

Measured 8d ago against content hash 4acb2e570c11, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

menu-testing-ssr scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/menu-testing-ssr/SKILL.md · 437 lines

How it starts

The opening of the file, as written. The whole thing — 437 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Testing and SSR

The library is SSR-safe but client-only: the first render emits plain markup and IntersectionObserver attaches client-side. What the server paints is whatever useIsVisible's defaultValue argument says; real visibility exists only after the observer fires in the browser. Every integration and testing decision below follows from that.

Setup

An SSR-safe menu page for Next.js App Router. The data-cy / data-visible attributes double as the test contract used by the Playwright patterns below.

// app/menu/page.tsx
'use client';
import React from 'react';
import {
  ScrollMenu,
  VisibilityContext,
  type publicApiType,
} from 'react-horizontal-scrolling-menu';
import 'react-horizontal-scrolling-menu/dist/styles.css';

const items = Array.from({ length: 10 }, (_, i) => `item-${i}`);

function LeftArrow() {
  const api = React.useContext<publicApiType>(VisibilityContext);
  // Bakes useIsVisible('first', true): the server paints a DISABLED left
  // arrow — correct for a row scrolled to its start.
  const disabled = api.useLeftArrowVisible();
  return (
    <button disabled={disabled} onClick={() => api.scrollPrev()}>
      Left
    </button>
  );
}

function RightArrow() {
  const api = React.useContext<publicApiType>(VisibilityContext);
  // Bakes useIsVisible('last', false): the server paints an ENABLED right arrow.
  const disabled = api.useRightArrowVisible();
  return (
    <button disabled={disabled} onClick={() => api.scrollNext()}>
      Right
    </button>
  );
}

function Card({ itemId }: { itemId: string }) {
  const api = React.useContext<publicApiType>(VisibilityContext);
  const visible = api.useIsVisible(itemId, false);
  return (
    <div data-cy={itemId} data-visible={visible} style={{ width: '160px' }}>
      {itemId}
    </div>
  );
}

export default function Page() {
  return (
    <ScrollMenu LeftArrow={LeftArrow} RightArrow={RightArrow}>
      {items.map((id) => (
        <Card itemId={id} key={id} />
      ))}
    </ScrollMenu>
  );
}

Read the full file on GitHub · 437 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 437 lines · 144 tokens per session scan A 4acb2e570c11

Subscribe to this mod's changes

menu-testing-ssr is a skill published in the GitHub repository asmyshlyaev177/react-horizontal-scrolling-menu (788 stars, last pushed 2d ago), licensed MIT. It adds 144 tokens to every session and 3,434 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits with the [compiler] or [rust-compiler] prefix.

react/react · 42 tokens

compiler-port

Port a compiler pass from TypeScript to Rust. Gathers context, plans the port, implements in a subagent with test-fix loop, then reviews.

react/react · 35 tokens

compiler-verify

Use when you need to run all compiler checks (tests, lint, format) before committing. Detects whether TS or Rust code changed and runs the appropriate checks.

react/react · 37 tokens

storybook-stories

Write Storybook stories for PostHog UI components. Covers the provider stack stories run inside, the key gotcha that tRPC/useHostTRPC queries never resolve in Storybook (so data-fetching components render empty), and the pure-presentational split that makes a component storyable. Use when adding or fixing a…

PostHog/posthog · 77 tokens

organizing-conversations-code

File layout for the conversations product. Use when adding, moving, renaming, or reviewing files under products/conversations/ — especially frontend components, scenes, helpers, and tests. Conversations React components live in their own folder under products/conversations/frontend/components/, never as loose files in…

PostHog/posthog · 80 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens