.claude/skills/refactor-pass/SKILL.md
Perform a refactor pass focused on simplicity after recent changes. Use when the user asks for a refactor/cleanup pass, simplification, dead-code removal, or says "refactor pass".
npx skillsauth add bitsocialnet/bitsocial-web refactor-passInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Review recent changes — identify simplification opportunities:
git diff for unstaged changesgit diff --cached for staged changesgit log --oneline -5 for recent commits if no uncommitted changesApply refactors (in priority order):
useMemo, useCallback, etc.)src/hooks/) or shared components (src/components/)Verify — run all three checks:
yarn build:verify && yarn lint && yarn typecheck
Optional suggestions — identify abstractions or reusable patterns only if they clearly improve clarity. Keep suggestions brief; don't refactor speculatively.
When refactoring, watch for these anti-patterns from AGENTS.md:
| Anti-pattern | Refactor to |
| ------------------------------------------------------- | --------------------------------------------------- |
| useState for shared state | Zustand store in src/stores/ |
| useEffect for data fetching | plebbit-react-hooks (useComment, useFeed, etc.) |
| useEffect to sync derived state | Calculate during render |
| Copy-pasted logic across components | Custom hook in src/hooks/ |
| Boolean flag soup (isLoading, isError, isSuccess) | State machine in Zustand |
| Prop drilling through many layers | Zustand store |
npx oxfmt <file> after changesdevelopment
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
data-ai
Add or update i18next translation keys across all language files by spawning translator subagents. Use when the user asks to add a new translation, update existing translations, translate text, or work with i18n keys. Triggers on "translate", "add translation", "translation key", "i18n", "localization".
development
Test and debug Android wrapper features for Bitsocial Web using a local Android emulator or attached device. Manages emulator lifecycle, builds and installs the wrapper when commands are provided, runs focused checks, captures logcat diagnostics, and debugs WebView or TWA behavior. Use when the user asks to test Android, debug WebView behavior, run emulator tests, or says "test-apk".
testing
Review an open GitHub pull request, inspect bot and human feedback, decide which findings are valid, implement fixes on the PR branch, and merge the PR into master when it is ready. Use when the user says "check the PR", "address review comments", "review PR feedback", or "merge this PR".