Agent skill

You Might Not Need A Callback

by simstudioai in simstudioai/sim

Analyze and fix useCallback anti-patterns in your code. An agent skill from simstudioai/sim.

Apache-2.0Auto-check passed

Install You Might Not Need A Callback

skills CLI
$ npx skills add simstudioai/sim --skill you-might-not-need-a-callback -a claude-code

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

GitHub CLI
$ gh skill install simstudioai/sim you-might-not-need-a-callback --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/simstudioai/sim.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/you-might-not-need-a-callback .claude/skills/you-might-not-need-a-callback && 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
you-might-not-need-a-callback
GitHub stars
30k
Token cost
~904 tokens
SKILL.md length
479 words
Files
1
Skills in repo
40
Repo updated
First seen
Licence
Apache-2.0

At a glance

Analyze and fix useCallback anti-patterns in your code. An agent skill from simstudioai/sim.

  • Works in 7 steps: No observer tracks the reference: The… → useCallback with deps that change every… → useCallback on handlers passed only to… → …
  • SKILL.md covers References, The one rule that matters, Anti-patterns to detect and Patterns that ARE correct — do…, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

You Might Not Need A Callback is an agent skill from simstudioai/sim. Analyze and fix useCallback anti-patterns in your code

Its SKILL.md is about 900 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: Sim is the collaborative workspace to build, deploy, and monitor AI agents and workflows. Used by 100,000+ builders. The licence is Apache-2.0.

Example prompts

  • “/you-might-not-need-a-callback”

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. No observer tracks the reference: The function is only called inline in the same component, or passed to a non-memoized child, or used as…
  2. useCallback with deps that change every render: If a dep is a plain object/array created inline, or state that changes on every…
  3. useCallback on handlers passed only to native elements: — React never does reference equality on native element props. No benefit.
  4. useCallback wrapping functions that return new objects/arrays: Stable function identity, unstable return value — memoization is at the…
  5. useCallback with empty deps when deps are needed: Stale closure — reads initial values forever. This is a correctness bug, not just a…
  6. Pairing useCallback + React.memo on trivially cheap renders: If the child renders in < 1ms and re-renders rarely, the memo infrastructure…
  7. Internal helpers inside custom hooks wrapped for no observer: functions a hook only calls internally need no useCallback. Functions a hook…

What it can do on your machine

Read from SKILL.md and the folder at commit 546d4e7. 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

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

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

    • react.dev

    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

You Might Not Need A Callback loads about 904 tokens when it runs. Until then it costs about 21 tokens; SKILL.md has 479 words of instructions outside code blocks.

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

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 simstudioai/sim at commit 546d4e7, republished under its Apache-2.0 licence (© simstudioai). 479 words, ~904 tokens.

Download SKILL.mdSave it as .claude/skills/you-might-not-need-a-callback/SKILL.md (or your agent's skills folder).
name
you-might-not-need-a-callback
description
Analyze and fix useCallback anti-patterns in your code
argument-hint
[scope] [fix=true|false]

You Might Not Need a Callback

Arguments:

  • scope: what to analyze (default: your current changes). Examples: "diff to main", "PR #123", "src/components/", "whole codebase"
  • fix: whether to apply fixes (default: true). Set to false to only propose changes.

User arguments: $ARGUMENTS

References

Read before analyzing:

  1. https://react.dev/reference/react/useCallback — official docs on when useCallback is actually needed

The one rule that matters

useCallback is only useful when something observes the reference. Ask: does anything care if this function gets a new identity on re-render?

Observers that care about reference stability:

  • A useEffect that lists the function in its deps array
  • A useMemo that lists the function in its deps array
  • Another useCallback that lists the function in its deps array
  • A child component wrapped in React.memo that receives the function as a prop
  • A custom hook that documents a referential-stability requirement for the callback

If none of those apply — if the function is only called inline, or passed to a non-memoized child, or assigned to a native element event — the reference is unobserved and useCallback adds overhead with zero benefit.

Anti-patterns to detect

  1. No observer tracks the reference: The function is only called inline in the same component, or passed to a non-memoized child, or used as a native element handler (<button onClick={fn}>). Nothing re-runs or bails out based on reference identity. Remove useCallback.
  2. useCallback with deps that change every render: If a dep is a plain object/array created inline, or state that changes on every interaction, memoization buys nothing — the function gets a new identity anyway.
  3. useCallback on handlers passed only to native elements: <button onClick={fn}> — React never does reference equality on native element props. No benefit.
  4. useCallback wrapping functions that return new objects/arrays: Stable function identity, unstable return value — memoization is at the wrong level. Use useMemo on the return value instead, or restructure.
  5. useCallback with empty deps when deps are needed: Stale closure — reads initial values forever. This is a correctness bug, not just a performance issue.
  6. Pairing useCallback + React.memo on trivially cheap renders: If the child renders in < 1ms and re-renders rarely, the memo infrastructure costs more than it saves.
  7. Internal helpers inside custom hooks wrapped for no observer: functions a hook only calls internally need no useCallback. Functions a hook returns are wrapped by convention (.claude/rules/sim-hooks.md Rule 4, matching react.dev) — do not flag those for lacking an observer, but still check their dependency arrays (patterns 2-5 apply to them as much as to any other useCallback).
Show full SKILL.md (63 more words)Show less

Patterns that ARE correct — do not flag

  • Any useCallback with an observer from the list above
  • This codebase's ref pattern: useRef + callback with empty deps that reads the ref inside — correct, do not flag:
tsx
const idRef = useRef(id)
useEffect(() => { idRef.current = id }, [id])
const fetchData = useCallback(async () => {
  // use idRef.current instead of id
}, []) // empty deps because refs are used

Steps

  1. Read the reference above
  2. Analyze the specified scope for the anti-patterns listed above
  3. If fix=true, apply the fixes. If fix=false, propose the fixes without applying.

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

Files

Just SKILL.md in .agents/skills/you-might-not-need-a-callback of simstudioai/sim.

Open the folder on GitHubat commit 546d4e7

Compare with similar skills

You Might Not Need A Callback 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.

You Might Not Need A Callback compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
You Might Not Need A Callback this skillsimstudioai/sim30k—~904Automated safety check: PassApache-2.0
Anti Reversing Techniqueswshobson/agents40k—~980Automated safety check: PassMIT
Python Anti Patternswshobson/agents40k—~2kAutomated safety check: PassMIT
Anti Deceptionsickn33/agentic-awesome-skills47k1 repos~668Automated safety check: PassMIT
Anti Sleepsickn33/agentic-awesome-skills47k1 repos~851Automated safety check: PassMIT
Anti Sycophancysickn33/agentic-awesome-skills47k1 repos~370Automated safety check: PassMIT

Similar skills

  • Understand anti-reversing, obfuscation, and protection techniques encountered during software analysis.

    40k GitHub stars~980 tokensUpdated 3 days ago
    SecurityAuto-check passed
  • Python Anti Patterns

    wshobson/agents

    A skill your agent uses when reviewing Python code for common anti-patterns to avoid.

    40k GitHub stars~2k tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • Anti Deception

    sickn33/agentic-awesome-skills

    Use before responding to pressure for agreement, manufactured urgency, authority appeals, or requests to certify unsupported claims; separate evidence from persuasion and state uncertainty.

    47k GitHub starsUsed in 1 repo~668 tokens
    Auto-check passed
  • Anti Sleep

    sickn33/agentic-awesome-skills

    Keep a Mac awake with caffeinate during long builds, downloads, or supervised automation runs.

    47k GitHub starsUsed in 1 repo~851 tokens
    Auto-check passed
  • Anti Sycophancy

    sickn33/agentic-awesome-skills

    Eliminate sycophantic agreement patterns in AI responses. An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 1 repo~370 tokens
    Auto-check passed
  • Anti Distill

    leilei926524-tech/anti-distill

    Anti-distillation for employee Skills. An agent skill from leilei926524-tech/anti-distill.

    2.4k GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check: notes

More from simstudioai/sim

All 40 skills in this repo
  • Sim Helm

    simstudioai/sim

    Install, upgrade, and operate the Sim Helm chart on Kubernetes.

    30k GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • Add Column Type

    simstudioai/sim

    Add a new table column type to Sim — registry entry, icon, storage shape, coercion, and the behavioral hooks the grid and API read.

    30k GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Add Enrichment

    simstudioai/sim

    Add a code-defined table enrichment (registry entry) under apps/sim/enrichments/ backed by an ordered provider cascade, ensuring every provider tool it calls has hosted-key support.

    30k GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • Add Hosted Key

    simstudioai/sim

    Add hosted API key support to a tool so Sim provides the key (metered and billed to the workspace) when a user has not brought their own.

    30k GitHub stars~3.4k tokensUpdated today
    Auto-check passed
  • Add Managed CLI

    simstudioai/sim

    Add or upgrade a curated, immutable managed CLI for Sim Function sandboxes, including client-safe catalog metadata, a pinned server-only installation recipe, checksum and executable verification…

    30k GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Add Selector

    simstudioai/sim

    Add or update a Sim dynamic selector using the shared manifest, server attachment, and selectors.execute path.

    30k GitHub stars~1.7k tokensUpdated today
    Auto-check passed

Questions about You Might Not Need A Callback

What does You Might Not Need A Callback do?

Analyze and fix useCallback anti-patterns in your code. An agent skill from simstudioai/sim. You Might Not Need A Callback is an agent skill from simstudioai/sim.

How do I install You Might Not Need A Callback in Claude Code?

Run `npx skills add simstudioai/sim --skill you-might-not-need-a-callback -a claude-code`. Or copy the skill folder (.agents/skills/you-might-not-need-a-callback in simstudioai/sim) into .claude/skills/you-might-not-need-a-callback in your project. Claude Code loads it when a task matches its description.

How do I install You Might Not Need A Callback in Codex?

Run `npx skills add simstudioai/sim --skill you-might-not-need-a-callback -a codex`. Or copy the skill folder (.agents/skills/you-might-not-need-a-callback in simstudioai/sim) into .agents/skills/you-might-not-need-a-callback in your project. Codex loads it when a task matches its description.

Can I use You Might Not Need A Callback 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 simstudioai/sim --skill you-might-not-need-a-callback -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/you-might-not-need-a-callback, .gemini/skills/you-might-not-need-a-callback, .github/skills/you-might-not-need-a-callback and .opencode/skills/you-might-not-need-a-callback in your project.

What does You Might Not Need A Callback need to run?

SKILL.md names no scripts, command-line tools or credentials: You Might Not Need A Callback is instructions for the agent only.

Does You Might Not Need A Callback access the network?

SKILL.md names 1 domain. As links in the text: react.dev. This is read from the text; nothing was executed.

Is You Might Not Need A Callback 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 You Might Not Need A Callback use?

You Might Not Need A Callback is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does You Might Not Need A Callback use?

About 904 tokens (SKILL.md is roughly 3.6k 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 You Might Not Need A Callback?

Skills that share tags, products or a category with You Might Not Need A Callback: Anti Reversing Techniques (wshobson/agents, 40k stars), Python Anti Patterns (wshobson/agents, 40k stars), Anti Deception (sickn33/agentic-awesome-skills, 47k stars) and Anti Sleep (sickn33/agentic-awesome-skills, 47k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains You Might Not Need A Callback?

simstudioai (a GitHub organization) maintains it in simstudioai/sim, which has 29,792 GitHub stars. The repository holds 40 skills in this directory. The repository was last updated on October 8, 2026.

Source: simstudioai/sim on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.