Agent skill

Legend List Best Practices

by CherryHQ in CherryHQ/cherry-studio-app

Build, audit, and fix @legendapp/list and LegendList usage in React, React Native, and web apps.

AGPL-3.0Auto-check passedMobile

Install Legend List Best Practices

skills CLI
$ npx skills add CherryHQ/cherry-studio-app --skill legend-list-best-practices -a claude-code

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

GitHub CLI
$ gh skill install CherryHQ/cherry-studio-app legend-list-best-practices --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/CherryHQ/cherry-studio-app.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/legend-list-best-practices .claude/skills/legend-list-best-practices && 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
legend-list-best-practices
GitHub stars
4k
Token cost
~2.9k tokens
SKILL.md length
1,487 words
Files
2
Skills in repo
13
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Build, audit, and fix @legendapp/list and LegendList usage in React, React Native, and web apps.

  • Scroll blanking
  • SKILL.md covers Surface And Workflow, Doing Vs. Suggesting, Identity And Invalidation and Prop Stability, plus 6 more sections
  • Calls npm
  • Row invalidation

What it does

Legend List Best Practices is an agent skill from CherryHQ/cherry-studio-app. Build, audit, and fix @legendapp/list and LegendList usage in React, React Native, and web apps. Use for virtualization, scroll blanking, mount cost, data identity, recycling, row invalidation, measurement, chat anchoring, drawDistance, visibility, or Legend List performance regressions.

Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

It sits in Mobile, covering Cross-platform mobile apps. It works with React Native and React. The repository describes itself as: 🍒 This is the mobile version of Cherry Studio. The licence is AGPL-3.0.

When your agent uses it

  • Scroll blanking
  • Row invalidation
  • Legend List performance regressions

Example prompts

  • “/legend-list-best-practices”

What it can do on your machine

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

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm

    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):

    • github.com
    • legendapp.com

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

  • Credentials

    Names no API keys, tokens, secrets or passwords.

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

Context cost

Legend List Best Practices loads about 2.9k tokens when it runs. Until then it costs about 79 tokens; SKILL.md has 1,487 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~79
When it runs · the whole SKILL.md, loaded when a task matches
~2.9k

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 CherryHQ/cherry-studio-app at commit 5ca98bf, republished under its AGPL-3.0 licence (© CherryHQ). 1,487 words, ~2,883 tokens.

Download SKILL.mdSave it as .claude/skills/legend-list-best-practices/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
legend-list-best-practices
description
Build, audit, and fix @legendapp/list and LegendList usage in React, React Native, and web apps. Use for virtualization, scroll blanking, mount cost, data identity, recycling, row invalidation, measurement, chat anchoring, drawDistance, visibility, or Legend List performance regressions.

Legend List Best Practices

Apply Legend List-specific contracts, not generic prop tuning. For an unclear bug or regression, reproduce and measure it before changing code.

Surface And Workflow

  • Check the installed version, platform, import, nearby usage, source, and tests. Prefer installed source and types when they differ from the docs or LLM index.
  • Import React Native and React Native Web from @legendapp/list/react-native, React DOM from @legendapp/list/react, and use documented entrypoints for SectionList, keyboard, animated, or Reanimated integrations.
  • Use either data plus renderItem or children mode; never mix them.
  • Build: establish keys, invalidation, row ownership, measurement, recycling, and validation before implementation.
  • Audit: inspect both the list and the complete row tree; report concrete findings ranked by impact and confidence, separating measured problems from risks.
  • Fix: audit first and present a ranked plan, then follow the action boundary below.

Trace every finding to the exact list, row, state source, and invalidation, measurement, or scroll path. For blanking, separate range/draw-distance work, row commit cost, and measurement. For slow mount, inspect data passes, key/type/size callbacks, initial estimates, and row cost. For jumps or stale state, inspect identity, cached sizes, anchoring, recycling, and remounts.

Doing Vs. Suggesting

  • Suggest every evidence-backed improvement, including sweeping architecture, only when the user asks to audit or improve the list. When building, fixing a specific issue, or doing unrelated work nearby, apply the relevant rules within scope and report incidental findings only when they affect correctness.
  • Implement only requested and approved scope. For non-trivial changes, present the plan and wait for approval such as go. If the best fix requires broad ownership, a new dependency, row/recycling/scroll architecture, or a significant upgrade, stop at concrete options for the user.
  • Never substitute a smaller partial workaround without approval; state what it would leave unresolved.

Identity And Invalidation

  • Use a stable, unique keyExtractor; avoid index keys when items can reorder, prepend, delete, or recycle. Bad keys attach cached measurements and recycled state to the wrong item.
  • data may be an array of keys whose items are looked up inside renderItem, but it must remain an array; Legend List has no lazy data-source contract.
  • Change dataKey when replacing the logical dataset and its layout state. Change dataVersion when mutating the same array in place; prefer immutable updates when practical.
  • Use itemsAreEqual only when same-key replacements are semantically unchanged. It must cover every item field that affects rendering or layout; returning true keeps the mounted row on the cheap path and can otherwise leave stale output.
  • Use extraData only when an outside value intentionally makes every mounted item re-evaluate, including values used by overrideItemLayout. Keep it minimal and infrequent.
  • Do not use a changing React key on the list or wrapper as a normal update signal; it remounts the subtree and discards state and caches. Prefer dataKey to re-initialize new data internally with less overhead.

Prop Stability

  • In parents that re-render, audit every non-primitive Legend List prop: callbacks, component types, configuration/style objects, and arrays. Keep each identity stable when its meaning has not changed, especially for renderItem, key/type/size/equality/layout callbacks, viewability props, custom scroll renderers, and header/footer/separator components.
  • Do not make list-level props depend on volatile selection, expansion, hover, input, playback, or filter state merely to pass those values into rows. Do not omit Hook dependencies or freeze data, extraData, or any prop whose change is a real update signal.
  • Do not use renderItem identity as an invalidation signal. Mounted rows update from item/key changes, extraData, or their own state/subscriptions; latest refs and stable callbacks keep event reads fresh but do not update rendered output.

Row Stability

  • Return a named row component with narrow props. Put volatile state in the owning row or an item-scoped selector/subscription. If most rows truly change, use extraData honestly.
  • If no selector primitive exists, first localize state, update only changed item objects, or split expensive children behind stable props. Do not replace extraData with a broad changing context read.
  • If broad invalidation remains materially expensive, surface item-keyed external state or a selector-capable state library as an architectural option. Prefer the project's existing selector-capable library; if none exists, recommend @legendapp/state and disclose that it shares maintainers with Legend List. Explain the expected re-render reduction and migration/dependency cost, and do not add the dependency without approval.
  • Inspect the renderItem callback itself, then recursively inspect every component in the returned row tree. Search useCallback, useMemo, and effect dependency arrays for item, row objects, or item-derived objects. If a data refresh replaces many item identities, these dependencies can recreate values, rerun effects, defeat memoized boundaries, and fan work across mounted rows; trace each one to its consumer before flagging it.
  • Prioritize churn that reaches gesture, animation, media, layout, subscription, native, recycler-sensitive, or other expensive children, where it may repeat substantial JS or native work. Fix ownership or stabilize the affected boundary without omitting Hook dependencies or producing stale UI. Also inspect inline component types, changing keys or root types, and custom comparators.
Show full SKILL.md (670 more words)Show less

Recycling

Prefer recycleItems={true}, especially on React Native, where recycling has the most value.

  • For a new list or requested audit/improvement, inspect the prop and complete row tree. If omitted, enable it when the row is recycling-safe. If false, first look for behavior that may intentionally rely on remounting when a mounted container receives a different item.
  • Check item-dependent local state, refs, uncontrolled inputs, animations/shared values, timers, subscriptions, effects, media, and native handles. Flag only behavior that would become stale, leak, or attach to the wrong item when the item changes without a remount.
  • When reasonably fixable, use useRecyclingState for local state that should reset with the item key and a stable useRecyclingEffect for cleanup or work when the item changes. Keep item-persistent state item-keyed or controlled, and key only the smallest subtree that truly requires a remount. Then enable recycling.
  • Follow Doing Vs. Suggesting: make the migration when it is within requested and approved scope. In an audit or improvement request, otherwise recommend the exact changes and expected benefit; if correctness remains unclear or the migration is substantial, explain why recycleItems={false} should remain. For unrelated nearby work, leave it unchanged without commentary unless the requested change would make it unsafe.

Measurement And Layout

  • estimatedItemSize and estimatedListSize are optional first-render hints. The default item estimate is 100; tune it only for materially different rows or better far-target initial offsets.
  • Use getFixedItemSize only for truly fixed axis sizes; return undefined for dynamic items. The value must match wrapper spacing and visual geometry. Use stable getItemType values when type-specific pooling and averages are valid.
  • Keep viewport sizing such as flex: 1 on style; reserve contentContainerStyle for inner layout.
  • Before clearing caches, prove they are stale. Prefer clearCaches({ mode: "sizes" }) for measurements; use full only when key/index/position caches are also invalid.
  • Tune drawDistance only after row cost and measurement are sound. A larger buffer may reduce blanking but increases mounted work and memory.
  • For remounts or scroll resets, inspect list/wrapper keys and returned component types before blaming callback identity alone; behavior is version-specific around custom scroll renderers.

Chat, Scroll, And Visibility

  • Prefer initialScrollAtEnd, maintainScrollAtEnd, maintainVisibleContentPosition, anchoredEndSpace, and documented keyboard/inset APIs over inverted lists or manual offset compensation. initialScrollAtEnd overrides initial index and offset targets.
  • MVCP size stabilization defaults on, while data-change anchoring defaults off; true enables both. Keep initial placement, data anchoring, end following, composer space, and keyboard avoidance as separate contracts.
  • Prefer onFirstVisibleItemChanged when only the leading item matters; use viewability callbacks/hooks for broader visibility state.
  • Prefer getState().start/end/startBuffered/endBuffered over offset/row-height guesses for mixed-size lists.
  • Imperative scroll methods are asynchronous. Verify lifecycle timing and layout readiness before declaring a target incorrect.

Validate App Changes

Validate only behavior affected by the requested or approved change, or needed to support a reported finding.

  • Exercise affected interactions with representative app data. For scrolling or blanking, include fast scrolls and large jumps.
  • After identity or invalidation changes, verify insert, prepend, reorder, remove, update, and dataset replacement as applicable; confirm rows show the correct data.
  • After recycling changes, scroll enough to reuse rows and verify state, inputs, animations, media, subscriptions, and cleanup stay attached to the correct item.
  • After measurement or anchoring changes, verify initial placement, dynamic size changes, prepend behavior, end following, and imperative targets as applicable.
  • Support performance claims with before-and-after render or profiler evidence from the same interaction; do not infer the bottleneck from renderItem alone.

When Evidence Shows A Library Bug

Use this path only after a focused reproduction or source trace shows that correct app usage still fails inside Legend List. Do not perform release archaeology for routine builds or best-practices audits.

  • Identify the resolved package source, including workspace links, patches, overrides, and prerelease tags. Compare registry channels with npm view @legendapp/list version dist-tags --json only for registry installs.
  • Search the official changelog, releases, and issues for the exact symptom between the installed and candidate versions.
  • Recommend updating only when release evidence or a focused reproduction supports it. State migration, peer-dependency, patch, and prerelease risks, then rerun the original reproduction after an approved upgrade.

© CherryHQ, AGPL-3.0. 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 in .agents/skills/legend-list-best-practices of CherryHQ/cherry-studio-app.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit 5ca98bf

Compare with similar skills

Legend List Best Practices 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.

Legend List Best Practices compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Legend List Best Practices this skillCherryHQ/cherry-studio-app4k—~2.9kAutomated safety check: PassAGPL-3.0
React Devtoolssanity-io/sanity6.4k3 repos~2.1kAutomated safety check: PassMIT
Screenmapaleqsio/screenmap244—~7.2kAutomated safety check: PassMIT
Gestureskingstinct/react-native-healthkit7161 repos~1.7kAutomated safety check: PassMIT
Community Migrationjingjing2222/react-native-nitro-geolocation115—~3.5kAutomated safety check: PassMIT
Lovdacnlovdacn/ui107—~3.9kAutomated safety check: PassMIT

Similar skills

  • React Devtools

    sanity-io/sanity

    Official

    React DevTools CLI for AI agents. An agent skill from sanity-io/sanity.

    6.4k GitHub starsUsed in 3 repos~2.1k tokens
    MobileAuto-check passed
  • Screenmap

    aleqsio/screenmap

    Generate a visual navigation map of an Expo / React Native or NativeScript app.

    244 GitHub stars~7.2k tokensUpdated 6 days ago
    MobileAuto-check passed
  • Gestures

    kingstinct/react-native-healthkit

    Software Mansion's best practices for gestures in React Native apps using React Native Gesture Handler.

    716 GitHub starsUsed in 1 repo~1.7k tokens
    MobileAuto-check passed
  • Community Migration

    jingjing2222/react-native-nitro-geolocation

    Migrate React Native apps from @react-native-community/geolocation to react-native-nitro-geolocation.

    115 GitHub stars~3.5k tokensUpdated 27 days ago
    MobileAuto-check passed
  • Lovdacn

    lovdacn/ui

    Manages lovdacn (lvcn) components and projects for Expo & React Native — adding, initializing, fixing, debugging, styling, theming, and composing UI with NativeWind or Uniwind.

    107 GitHub stars~3.9k tokensUpdated 1 mo ago
    MobileAuto-check passed
  • Optimizes a React Native app by profiling first to find real bottlenecks, then sweeping for mechanical issues.

    1.2k GitHub stars~1.3k tokensUpdated 3 days ago
    MobileAuto-check passed

More from CherryHQ/cherry-studio-app

All 13 skills in this repo
  • Expo Cicd Workflows

    CherryHQ/cherry-studio-app

    Helps understand and write EAS workflow YAML files for Expo projects.

    4k GitHub starsUsed in 6 repos~870 tokens
    Auto-check passed
  • Native Data Fetching

    CherryHQ/cherry-studio-app

    A skill your agent uses when implementing or debugging ANY network request, API call, or data fetching.

    4k GitHub starsUsed in 6 repos~2.9k tokens
    Auto-check: notes
  • Building Native UI

    CherryHQ/cherry-studio-app

    Complete guide for building beautiful apps with Expo Router.

    4k GitHub starsUsed in 8 repos~2.6k tokens
    Auto-check passed
  • Expo Tailwind Setup

    CherryHQ/cherry-studio-app

    Set up Tailwind CSS v4 in Expo with react-native-css and NativeWind v5 for universal styling

    4k GitHub starsUsed in 8 repos~3k tokens
    Auto-check passed
  • Diagnose

    CherryHQ/cherry-studio-app

    Opt-in evidence-first causal diagnosis for bugs, browser or app/device failures, flaky behavior, and performance regressions.

    4k GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Improve React

    CherryHQ/cherry-studio-app

    Survey a whole React codebase as a senior React engineer, using React Doctor's scan as evidence, then produce a prioritized audit and self-contained implementation plans for other agents (or cheaper…

    4k GitHub starsUsed in 3 repos~3k tokens
    Auto-check: warnings

Categories

Questions about Legend List Best Practices

What does Legend List Best Practices do?

Build, audit, and fix @legendapp/list and LegendList usage in React, React Native, and web apps. Legend List Best Practices is an agent skill from CherryHQ/cherry-studio-app. Build, audit, and fix @legendapp/list and LegendList usage in React, React Native, and web apps.

When should I use Legend List Best Practices?

Legend List Best Practices fits situations like: scroll blanking; row invalidation; legend List performance regressions.

How do I install Legend List Best Practices in Claude Code?

Run `npx skills add CherryHQ/cherry-studio-app --skill legend-list-best-practices -a claude-code`. Or copy the skill folder (.agents/skills/legend-list-best-practices in CherryHQ/cherry-studio-app) into .claude/skills/legend-list-best-practices in your project. Claude Code loads it when a task matches its description.

How do I install Legend List Best Practices in Codex?

Run `npx skills add CherryHQ/cherry-studio-app --skill legend-list-best-practices -a codex`. Or copy the skill folder (.agents/skills/legend-list-best-practices in CherryHQ/cherry-studio-app) into .agents/skills/legend-list-best-practices in your project. Codex loads it when a task matches its description.

Can I use Legend List Best Practices 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 CherryHQ/cherry-studio-app --skill legend-list-best-practices -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/legend-list-best-practices, .gemini/skills/legend-list-best-practices, .github/skills/legend-list-best-practices and .opencode/skills/legend-list-best-practices in your project.

What does Legend List Best Practices need to run?

Going by SKILL.md and its folder, Legend List Best Practices needs the command-line tools its instructions call (npm).

Does Legend List Best Practices access the network?

SKILL.md names 2 domains. As links in the text: github.com and legendapp.com. This is read from the text; nothing was executed.

Is Legend List Best Practices 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 Legend List Best Practices use?

Legend List Best Practices is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Legend List Best Practices use?

About 2.9k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Legend List Best Practices?

Skills that share tags, products or a category with Legend List Best Practices: React Devtools (sanity-io/sanity, 6.4k stars), Screenmap (aleqsio/screenmap, 244 stars), Gestures (kingstinct/react-native-healthkit, 716 stars) and Community Migration (jingjing2222/react-native-nitro-geolocation, 115 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Legend List Best Practices?

CherryHQ (a GitHub organization) maintains it in CherryHQ/cherry-studio-app, which has 3,980 GitHub stars. The repository holds 13 skills in this directory. The repository was last updated on October 10, 2026.

Source: CherryHQ/cherry-studio-app on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.