integration-react-native — скилл для Claude Code
Скилл integration-react-native помогает добавить аналитику PostHog в React Native-приложение, настроить идентификацию пользователей и отслеживание ошибок.
MIT 109 установок ★ 80 обновлён 2026-10-24
npx skills add PostHog/skills --skill integration-react-native -a claude-codeЧто делает integration-react-native
Скилл проводит интеграцию по четырём этапам: начальная настройка, правки, пересмотр и завершение. В комплекте есть пример проекта и справочные материалы по React Native, идентификации пользователей и каждому этапу настройки. Агент должен сверяться с примером и добавлять код PostHog рядом с существующими интеграциями, не перестраивая их.
Для ключей нужны переменные POSTHOG_PROJECT_TOKEN и POSTHOG_HOST из .env, загружаемые через react-native-config: они встраиваются при сборке. Пакет SDK называется posthog-react-native, а react-native-svg требуется ему как peer dependency. При React Navigation v7 разместите PostHogProvider внутри NavigationContainer — иначе расположение провайдера не будет соответствовать указанной совместимости. Скилл также советует добавить отслеживание ошибок около важных пользовательских сценариев и границ API.
Какие задачи решает
- добавить PostHog в React Native-приложение
- настроить передачу ключа и адреса PostHog через
.env - идентифицировать пользователей при входе и регистрации
- связать клиентскую сессию с серверными запросами
- добавить отслеживание ошибок в критические сценарии
Примеры запросов агенту
- Добавь аналитику PostHog в моё React Native-приложение и проведи настройку по этапам.
- Настрой идентификацию пользователей при входе и регистрации в React Native.
- Добавь отслеживание ошибок PostHog вокруг важных сценариев и границ API.
Как установить integration-react-native
1Через Skills CLI (Vercel)
npx skills add PostHog/skills --skill integration-react-native -a claude-code2Вручную: положить файлы
~/.claude/skills/integration-react-native/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/integration-react-native/
1Через Skills CLI (Vercel)
npx skills add PostHog/skills --skill integration-react-native -a codex2Вручную: положить файлы
.agents/skills/integration-react-native/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add PostHog/skills --skill integration-react-native -a cursor2Вручную: положить файлы
.cursor/skills/integration-react-native/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install PostHog/skills skills/posthog/all/skills/integration-react-native2Вручную: положить файлы
.github/skills/integration-react-native/SKILL.md1Через Skills CLI (Vercel)
npx skills add PostHog/skills --skill integration-react-native -a gemini-cli2Командой платформы
gemini skills install https://github.com/PostHog/skills --path skills/posthog/all/skills/integration-react-nativeВручную: положить файлы
.devin/skills/integration-react-native/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add PostHog/skills --skill integration-react-native -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы об integration-react-native
Как установить integration-react-native в Claude Code?
Выполните npx skills add PostHog/skills --skill integration-react-native -a claude-code. Файл скилла находится по пути ~/.claude/skills/integration-react-native/SKILL.md.
Что делает integration-react-native?
Помогает встроить аналитику PostHog в React Native-приложение. Включает настройку SDK, идентификацию пользователей и отслеживание ошибок.
Что нужно для работы PostHog в React Native?
Скилл использует posthog-react-native и требует react-native-svg как peer dependency. Ключ POSTHOG_PROJECT_TOKEN и адрес POSTHOG_HOST загружаются через react-native-config из .env и встраиваются при сборке.
Исходный текст
SKILL.md · MIT
--- name: integration-react-native description: PostHog integration for React Native applications metadata: author: PostHog version: 1.9.4 --- # PostHog integration for React Native This skill helps you add PostHog analytics to React Native applications. ## Workflow Follow these steps in order to complete the integration: 1. `basic-integration-1.0-begin.md` - PostHog Setup - Begin ← **Start here** 2. `basic-integration-1.1-edit.md` - PostHog Setup - Edit 3. `basic-integration-1.2-revise.md` - PostHog Setup - Revise 4. `basic-integration-1.3-conclude.md` - PostHog Setup - Conclusion ## Reference files - `references/EXAMPLE.md` - React Native example project code - `references/react-native.md` - React native - docs - `references/identify-users.md` - Identify users - docs - `references/basic-integration-1.0-begin.md` - PostHog setup - begin - `references/basic-integration-1.1-edit.md` - PostHog setup - edit - `references/basic-integration-1.2-revise.md` - PostHog setup - revise - `references/basic-integration-1.3-conclude.md` - PostHog setup - conclusion The example project shows the target implementation pattern. Consult the documentation for API details. ## Key principles - **Environment variables**: Always use environment variables for PostHog keys. Never hardcode them. - **Minimal changes**: Add PostHog code alongside existing integrations. Don't replace or restructure existing code. - **Match the example**: Your implementation should follow the example project's patterns as closely as possible. ## Framework guidelines - posthog-react-native is the React Native SDK package name - Use react-native-config to load POSTHOG_PROJECT_TOKEN and POSTHOG_HOST from .env (variables are embedded at build time, not runtime) - react-native-svg is a required peer dependency of posthog-react-native (used by the surveys feature) and must be installed alongside it - Place PostHogProvider INSIDE NavigationContainer for React Navigation v7 compatibility ## Identifying users Identify users during login and signup events. Refer to the example code and documentation for the correct identify pattern for this framework. If both frontend and backend code exist, pass the client-side session and distinct ID using `X-POSTHOG-DISTINCT-ID` and `X-POSTHOG-SESSION-ID` headers to maintain correlation. ## Error tracking Add PostHog error tracking to relevant files, particularly around critical user flows and API boundaries.
© PostHog · MIT · PostHog/skills