跳到主内容
智客 ZICQ

技能库 智客分类:Agent 工作流 argent-react-native-app-workflow

Argent React Native App Workflow

在iOS模拟器或Android模拟器上开发或调试回放原生应用程序的分步工作流程. 启动应用程序时使用,调试地铁,修复构建,诊断运行时间出错,或运行测试.

31178 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

在iOS模拟器或Android模拟器上开发或调试 React Independent 应用程序的分步工作流程

何时用

启动应用程序, 调试地铁, 修复构建, 诊断运行时间错误, 或运行测试

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:1. Starting the React Native App、1.1 Read the project's configuration first、1.2 Start Metro、1.3 Run the App、2. Metro Already on the Port?、3. Build, Reload, Reinstall。

文件分析

文件分析:这是一份仅含 SKILL.md 的指令型技能,代理激活后整份正文进入上下文。

官方 description(原文)

Step-by-step workflows for developing or debugging React Native apps on iOS simulator or Android emulator. Use when starting the app, debugging Metro, fixing builds, diagnosing runtime errors, or running tests.

1. Starting the React Native App1.1 Read the project's configuration first1.2 Start Metro1.3 Run the App2. Metro Already on the Port?3. Build, Reload, Reinstall4. Runtime Problems in the App5. Testing the App

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
argent-react-native-app-workflow
description
Step-by-step workflows for developing or debugging React Native apps on iOS simulator or Android emulator. Use when starting the app, debugging Metro, fixing builds, diagnosing runtime errors, or running tests.
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「argent-react-native-app-workflow」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-a6c6a792a7358c01-Argent-React-Native-App-Workflow.html
请存为 .cursor/skills/argent-react-native-app-workflow/SKILL.md 或 .claude/skills/argent-react-native-app-workflow/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/software-mansion/argent' --list

npx skills add 'https://github.com/software-mansion/argent' --skill 'argent-react-native-app-workflow'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- name: argent-react-native-app-workflow description: Step-by-step workflows for developing or debugging React Native apps on iOS simulator or Android emulator. Use when starting the app, debugging Metro, fixing builds, diagnosing runtime errors, or running tests. --- Physical iPhone (`kind: "device"`): Metro debugging and profiling tools reject it. Use a simulator. react-native-macos app: start Metro (§1.2), then follow `argent-macos-app-interact` instead of `run-macos`. ## 1. Starting the React Native App ### 1.1 Read the project's configuration first **Before running commands**, read the project's build and run setup: every `package.json` script (custom scripts such as `start:local`, `start:dev`, `ios`, `build:ios` or flavors take priority over the defaults) and `metro.config.js` (a non-default port or `watchFolders`). Do NOT default to `npx react-native …` or `npx expo …` without checking. Before the first build, install dependencies if `node_modules` or `ios/Pods` is missing. **If the project structure is convoluted, ask the user before proceeding.** Once you know how the project starts Metro, builds and runs the app, and what environment setup it needs, **save that to project memory** so you don't need to rediscover it each time. ### 1.2 Start Metro 1. If Metro is already running on the project's port, do not start another (§2). 2. Start it in the background with the project's start script (e.g. `npm run start:local`, `yarn start:dev`). With none: `npx expo start` in an Expo project, `npx react-native start` otherwise. 3. Verify with `debugger-status`: `status: "connected"` or `reason: "no_app_connected"` both mean Metro is up (the app just hasn't attached yet); `reason: "metro_not_running"` means Metro is not reachable. ### 1.3 Run the App Start the app only once Metro is ready, from the project root. Use the project's build/run script if one exists (e.g. `npm run ios`, `npm run android`, `yarn ios:debug`); fall back to the defaults below only if there is none. **Pass the target device explicitly**, taken from `list-devices`: use the platform the user named, and do not pick a cabled physical phone just because it is listed. If the device isn't booted yet, boot it with `boot-device` (see `argent-ios-simulator-setup` / `argent-android-emulator-setup`). ```bash npx expo run:ios --device # Expo npx expo run:android --device npx react-native run-ios --udid # bare RN (needs @react-native-community/cli) npx react-native run-android --deviceId= ``` --- ## 2. Metro Already on the Port? The default port is 8081 unless the project configures another. Check it with `lsof -i :`. If something is listening, `debugger-status` tells you whether it is Metro: `status: "connected"` or `reason: "no_app_connected"` means it is. `reason: "metro_not_running"` while `lsof` shows a listener means the port is held by something that is **not** Metro; the result's `detail` shows what answered (`... (got: ...)`). In that case ask the user whether you may kill the process. To stop a Metro process, use the `stop-metro` tool. --- ## 3. Build, Reload, Reinstall | Situation | Action | | --------------------------------------------- | ---------------------------------------------------------------- | | JS/React only changed | `debugger-reload-metro`, or `restart-app`. No rebuild. | | Native code, pods or project config changed | Rebuild with the project's run command (Metro can stay running). | | App needs reinstalling from a `.app` / `.apk` | `reinstall-app`. | When a build fails (e.g. xcodebuild exit code 65), try the simplest fix first: clean the build folder and retry, then clear caches and reinstall dependencies and pods. **After 2-3 failed build or run attempts, STOP and ask the user for guidance.** The user may know about required env vars, Xcode version requirements, custom build configurations, monorepo-specific setup, or required external services. If the correct build approach is not obvious, **ask the user early** rather than guessing. --- ## 4. Runtime Problems in the App | Problem type | Where to look | | --------------------------------- | ---------------------------------------------------------------------------------------------------------------- | | **JavaScript errors / logs** | `debugger-log-registry` for a summary and the log file path, then `Grep` the file | | **React component hierarchy** | `debugger-component-tree`, or `debugger-inspect-element` at logical pixel coordinates (not normalized 0-1) | | **App state** | `debugger-evaluate` to run JavaScript in the app's runtime | | **Native crashes / native stack** | iOS: `~/Library/Logs/DiagnosticReports/`. Android: `adb -s logcat -d`, with `-b crash` for crashes only | If `list-devices` returns a `hint` about the adb server, prefix the `adb` command above as the hint shows. For connection failures, component inspection and searching the console log file, use the `argent-metro-debugger` skill. Do not open the React Native DevMenu by default; use the argent tools instead. --- ## 5. Testing the App Ask the user before running tests: which suite (unit, E2E, or both), whether to use existing CI commands, and whether they want you to run existing tests, write new ones, or explore test cases yourself. Find the test commands in `package.json` and the test config (Jest, Detox, …). For interactive UI testing with screenshot verification after each action, use the `argent-test-ui-flow` skill. For visible UI changes, follow the `argent-screenshot-diff` skill when stable before/after screenshots add meaningful pixel-visible evidence.

相关技能

Agent 工作流

Skill Creator

创造有效技能指南。 当用户想创造出新的技能(或更新现有的技能),以专业知识,工作流程,或工具集成来扩展克洛德的能力时,应该使用这种技能.

Agent 工作流

Clawdhub

使用ClawdHub CLI搜索,安装,更新并发布从taladhub.com的代理技能. 需要获取苍蝇上的新技能时使用,将安装的技能同步到最新版本或特定版本,或者发布 npm-instainddhub CLI 的新/更新的技能文件夹.

Agent 工作流

Agent Team Orchestration

管弦乐团多代理团队,任务设定周期,交接协议,审查工作流程. 使用时间: (1)建立2+特派员队伍,具有不同专业,(2)确定任务路线和生命周期(收录框_ spec_建设_审查_完成),(3)在特派员之间制定交接协议,(4)建立审查和质量关口,(5)管理特派员之间的交流和文物共享.

Agent 工作流

Superpowers

Spec-first,TDD,子代理驱动的软件开发工作流程. 当:(1)构建任何新功能或应用——触发脑暴_计划_子代理执行回路,(2)调试出一个bug或测试失败——触发系统性的根起过程,(3)用户说"让我们构建","帮助我计划","我想添加X",或"这个被打破",(4)完成一个功…