PixelPilot uiux-infinite-scroll.instructions.md

A pattern for loading more items as someone reaches the end of a page or feed. It uses browser visibility detection, loading placeholders, an end-of-content message, error recovery, and a button fallback, while accounting for accessibility and reduced motion.

In plain words
What is it for?
Use it for news feeds, product lists, timelines, search results, or any page that fetches additional content while the user scrolls.
Why use it?
It avoids making users click through pages while still providing a usable option when automatic loading is unavailable or unsuitable.

Instructions file for GitHub Copilot

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/dev-lou/pixelpilot/uiux-infinite-scroll
Clone the repo
git clone --depth 1 https://github.com/dev-lou/PixelPilot

Made for: GitHub Copilot.

Per session 3,885 This file is loaded in full into every session.
When invoked 3,885 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.03885 $0.03885
Opus 5 $0.01943 $0.01943
Sonnet 5 $0.00777 $0.00777
Haiku 4.5 $0.00388 $0.00388

Measured 2d ago against content hash 1f25603b605d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

PixelPilot uiux-infinite-scroll.instructions.md 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 2d 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.

vscode/.github/instructions/uiux-infinite-scroll.instructions.md · 677 lines

How it starts

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

UI/UX Infinite Scroll

Load more content as user scrolls with Intersection Observer. Accessible, performant, with graceful fallbacks.


OVERVIEW

This skill covers:

  1. Intersection Observer implementation
  2. Loading skeleton during fetch
  3. "End of content" message
  4. Manual "Load more" button fallback
  5. Error handling and retry
  6. Accessibility considerations

HTML STRUCTURE

<div class="feed" id="feed" role="feed" aria-busy="false">
  <!-- Content items -->
  <article class="feed__item">...</article>
  <article class="feed__item">...</article>
  <article class="feed__item">...</article>
  
  <!-- Sentinel element for intersection observer -->
  <div class="feed__sentinel" id="feed-sentinel" aria-hidden="true"></div>
  
  <!-- Loading state -->
  <div class="feed__loading" id="feed-loading" hidden>
    <div class="skeleton skeleton--card"></div>
    <div class="skeleton skeleton--card"></div>
    <div class="skeleton skeleton--card"></div>
  </div>
  
  <!-- End of content -->
  <div class="feed__end" id="feed-end" hidden>
    <p>You've reached the end!</p>
  </div>
  
  <!-- Error state -->
  <div class="feed__error" id="feed-error" hidden>
    <p>Failed to load more content.</p>
    <button class="btn btn--secondary" id="retry-btn">Try Again</button>
  </div>
  
  <!-- Manual load more (fallback) -->
  <button class="btn btn--secondary feed__load-more" id="load-more-btn" hidden>
    Load More
  </button>
</div>

<!-- Screen reader announcements -->
<div id="feed-status" role="status" aria-live="polite" class="sr-only"></div>

CSS STYLES

.feed {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.feed__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.feed__sentinel {
  height: 1px;
  width: 100%;
}

.feed__loading {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.feed__end {
  text-align: center;
  padding: var(--space-8) var(--space-4);
  color: var(--muted);
}

.feed__end p {
  font-size: var(--text-sm);
}

.feed__error {
  text-align: center;
  padding: var(--space-6);
  background: var(--color-error-soft);
  border-radius: var(--radius-lg);
}

.feed__error p {
  color: var(--color-error);
  margin-bottom: var(--space-4);
}

.feed__load-more {
  align-self: center;
  margin-top: var(--space-4);
}

/* Skeleton loading */
.skeleton--card {
  height: 200px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.skeleton--card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transform: translateX(-100%);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton--card::after {
    animation: none;
    transform: none;
    background: rgba(255, 255, 255, 0.1);
  }
}

Read the full file on GitHub · 677 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. 2d ago First seen · 677 lines · 3,885 tokens per session scan A 1f25603b605d

Subscribe to this mod's changes

PixelPilot uiux-infinite-scroll.instructions.md is an instructions file published in the GitHub repository dev-lou/PixelPilot (2 stars, last pushed 4mo ago), licensed MIT. It adds 3,885 tokens to every session, about $0.0194 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-31.