# animation-derived-value

animation-derived-value is a Claude Code rule for computing one animated shared value from another. It applies to React Native Reanimated code that derives values.

- rule · `type=rule` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline · ★ 88 repo stars
- Author: alexj11324
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/alexj11324/Mikka/tree/HEAD/.claude/skills/react-native-skills/rules/animation-derived-value.md
- Updated: 2026-11-17
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/rules/animation-derived-value

## What it does

The rule directs the agent to use `useDerivedValue` for a value calculated from another shared value. The hook follows the values used in its calculation and exposes the result for use elsewhere.

Reserve `useAnimatedReaction` for effects such as logging or calling `runOnJS`. It is not the rule’s choice for producing a derived value. The guidance concerns animations built with React Native Reanimated.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/rules/animation-derived-value.md` — The paths frontmatter field limits the files

### Codex

**AGENTS.md**
- Codex reads AGENTS.md: paste the rule text there

### Cursor

**Manually: put the files in place**
- File: `.cursor/rules/animation-derived-value.mdc` — Frontmatter: description, globs, alwaysApply

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/instructions/animation-derived-value.instructions.md` — The applyTo field sets which files it applies to

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/rules/animation-derived-value.md`

### Cline

**Manually: put the files in place**
- File: `.clinerules/animation-derived-value.md`

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/alexj11324/Mikka/tree/HEAD/.claude/skills/react-native-skills/rules/animation-derived-value.md

## When to use it
- calculate opacity from animation progress
- replace a reaction that computes a value with a derived value
- separate animated calculations from side effects

## Example prompts
- Calculate opacity from animation progress with the appropriate Reanimated hook.
- Check whether `useAnimatedReaction` is being used correctly to compute this value.
- Rewrite this shared-value calculation as a derived value.

## Similar
- [lottie-animation](https://affpapa.org/en/nevibecode/skills/lottie-animation.md) — skill · 3800 installs
- [swiftui-animation](https://affpapa.org/en/nevibecode/skills/jamesrochabrun-swiftui-animation.md) — skill · 572 installs
- [rerender-derived-state-no-effect](https://affpapa.org/en/nevibecode/rules/rerender-derived-state-no-effect.md) — rule · ★ 7191 repo stars
- [rerender-derived-state](https://affpapa.org/en/nevibecode/rules/rerender-derived-state.md) — rule · ★ 1064 repo stars
- [animation-vocabulary](https://affpapa.org/en/nevibecode/skills/animation-vocabulary.md) — skill · 295100 installs
- [find-animation-opportunities](https://affpapa.org/en/nevibecode/skills/find-animation-opportunities.md) — skill · 265400 installs

From the same set: [alexj11324/mikka](https://affpapa.org/en/nevibecode/by/alexj11324/mikka.md) — 47 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
