跳到主内容
智客 ZICQ

技能库 智客分类:Agent 工作流 solana-mobile

Solana Mobile

使用Solana-mobile CLI、Expo和React Industrial为Android设计的Scaffold、配置和故障解答索拉纳移动应用程序。 在创建新的索拉纳移动应用程序时使用,选择一个模板,将索拉纳添加到现有的博览会应用程序中,检查Android工具链,管理Android仿真器或被连接的设备,安装一个钱包APK进行测试,运行设备可以到达的本地验证器,或者生成一个开发架构.

7831 安装量

官方网址:skills.sh

技能介绍

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

做什么

为Android使用索拉娜-移动 CLI 、 博览会 和 React Industrial 的 Scaffold, 配置和故障解答 Solana Mobile 应用程序

何时用

创建新的索拉纳移动应用程序,选择一个模板,将索拉纳添加到现有的博览会应用程序中,检查Android工具链,管理Android仿真器或连接设备,安装钱包APK进行测试,运行设备可以到达的本地验证器,或者生产出一个去velo

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:Solana Mobile projects、Non-negotiable constraint、First: work out which situation you are in、Create a new project、Choosing a template、After scaffolding。

文件分析

文件分析:除 SKILL.md 外,正文引用了 references/cli.md、references/add-to-existing-app.md、references/troubleshooting.md,属于带资源的技能包,这些文件按需再读。

官方 description(原文)

Scaffold, configure, and troubleshoot Solana Mobile apps for Android using the solana-mobile CLI, Expo, and React Native. Use when creating a new Solana mobile app, picking a template, adding Solana to an existing Expo app, checking the Android toolchain, managing Android emulators or connected devices, installing a wallet APK for testing, running a local validator the device can reach, or producing a development build.

Solana Mobile projectsNon-negotiable constraintFirst: work out which situation you are inCreate a new projectChoosing a templateAfter scaffoldingCheck the environmentManage Android emulatorsPrepare a fresh emulatorWork with a connected deviceRun a local validatorTest a wallet without an app

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
solana-mobile
description
Scaffold, configure, and troubleshoot Solana Mobile apps for Android using the solana-mobile CLI, Expo, and React Native. Use when creating a new Solana mobile app, picking a template, adding Solana to an existing Expo app, checking the Android toolchain, managing Android emulators or connected devices, installing a wallet APK for testing, running a local validator the device can reach, or producing a development build.
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。
指令中引用的文件 · 3
  • references/cli.md
  • references/add-to-existing-app.md
  • references/troubleshooting.md

以下路径提取自原文;文件是否齐全请以来源仓库中的完整目录为准。

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

安装这个技能

Skills CLI ↗

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

该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。

交给 Agent 安装

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

把 Agent Skill「solana-mobile」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-37aab49ce65941f5-Solana-Mobile.html
请存为 .cursor/skills/solana-mobile/SKILL.md 或 .claude/skills/solana-mobile/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/solana-mobile/solana-mobile-skills 取完整目录,不要只建一个 SKILL.md。

GitHub 完整包 ↗

终端安装 · Skills CLI

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

npx skills add 'https://github.com/solana-mobile/solana-mobile-skills' --list

npx skills add 'https://github.com/solana-mobile/solana-mobile-skills' --skill 'solana-mobile'

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

阅读排版
--- name: solana-mobile description: Scaffold, configure, and troubleshoot Solana Mobile apps for Android using the solana-mobile CLI, Expo, and React Native. Use when creating a new Solana mobile app, picking a template, adding Solana to an existing Expo app, checking the Android toolchain, managing Android emulators or connected devices, installing a wallet APK for testing, running a local validator the device can reach, or producing a development build. --- # Solana Mobile projects Set up and maintain Solana Mobile apps. The `solana-mobile` CLI does the scaffolding, environment checks, and emulator management — prefer it over hand-rolled setup. Run it without installing: ```bash npx solana-mobile@latest --help ``` `pnpm dlx solana-mobile@latest` and `bunx solana-mobile@latest` are the equivalents. Match whichever package manager the project already uses, and keep `@latest` so the runner does not reuse an older cached version. | Command | Use for | | --- | --- | | `create` | [Scaffolding a new project](#create-a-new-project) | | `device` | [Installing APKs, opening URLs, preparing a device](#work-with-a-connected-device) | | `doctor` | [Checking the toolchain](#check-the-environment) | | `emulator` (`emu`) | [Creating and running emulators](#manage-android-emulators) | | `localnet` | [A local validator the device can reach](#run-a-local-validator) | | `playground` | [Testing a wallet without building an app](#test-a-wallet-without-an-app) | | `templates` | Maintaining a template repository — template authors only | | `webshell` | Wrapping an existing web app in an Android WebView shell | Every flag of every command: [references/cli.md](references/cli.md). Do not guess at flags — the CLI ships its own help, and `--help` on any command is authoritative. ## Non-negotiable constraint **Mobile Wallet Adapter requires a development build. Expo Go will not work** — MWA depends on native Android modules that Expo Go does not bundle. If someone reports wallet connection failing in Expo Go, that is the cause; there is no workaround, they need `expo run:android`. Android is the only platform with wallet support. iOS builds run, but no MWA. ## First: work out which situation you are in | Situation | Do this | | --- | --- | | No project yet | [Create a new project](#create-a-new-project) | | Existing Expo app, no Solana | Read [references/add-to-existing-app.md](references/add-to-existing-app.md) | | Project exists, build or toolchain broken | [Check the environment](#check-the-environment) | | Project exists, needs wallet features | Use the `solana-mobile-wallet` skill | | Wallet connect or signing needs testing | [Test a wallet without an app](#test-a-wallet-without-an-app) | ## Create a new project ```bash npx solana-mobile@latest create ``` Interactive by default. To skip the prompts, name the project and template: ```bash npx solana-mobile@latest create my-app --template expo-kit-wallet ``` Useful flags: | Flag | Effect | | --- | --- | | `-t, --template ` | Pick a template non-interactively | | `--pm ` | Package manager to use | | `--minimal` | Use the minimal template | | `--list-templates` | Print the template catalog | | `--list-template-ids` | Print template ids as a JSON array | | `--skip-install` | Do not install dependencies | | `--skip-git` | Do not initialise a git repo | | `-d, --dry-run` | Show what would happen, write nothing | ### Choosing a template Templates come in two families. **Pick an `expo-kit-*` template.** `@solana/kit` is the current Solana client library, and these are the templates the CLI maintains most actively. Reach for `expo-web3js-*` only when the user is deliberately continuing an existing `@solana/web3.js` codebase, or asks for it by name. If they ask without a reason, say kit is the better starting point before going along with it — a new app on web3.js starts life needing a migration. `expo-kit-minimal` is the clearest reference for how the kit pieces fit together, and worth reading even when building on a different template. | Template | Stack | Use for | | --- | --- | --- | | `expo-kit-wallet` | Kit + MWA + Uniwind | **Best default.** Wallet connect, sign, send already wired | | `expo-kit-minimal` | Kit | Bare starting point, no UI kit | | `expo-kit-uniwind` | Kit + Uniwind | Tailwind-style styling, no wallet yet | | `expo-kit-privy` | Kit + Privy + Uniwind | Privy auth instead of, or alongside, MWA | | `expo-web3js-wallet` | web3.js + MWA | Legacy wallet app | | `expo-web3js-paper` | web3.js + RN Paper | Legacy, Material UI | | `expo-web3js-minimal` | web3.js | Legacy bare starting point | Template ids are also accepted in full `gh:solana-mobile/templates/mobile/` form. Re-run `--list-templates` rather than trusting this table if a template seems missing — the catalog ships with the CLI, not with this skill. ### After scaffolding ```bash cd my-app && npm run android ``` That runs `expo run:android`, which builds and installs the development build. The first Android build is slow (Gradle cold start); later builds reuse the cache. ## Check the environment Before debugging a build failure, check the toolchain: ```bash npx solana-mobile@latest doctor ``` It reports on the local Android and Node toolchain with recommendations for anything missing. `--json` gives a stable report worth parsing when you need to branch on a specific check; `--verbose` adds resolved paths and diagnostics. Run `doctor` first whenever a build fails for reasons that are not obviously in app code. ## Manage Android emulators ```bash npx solana-mobile@latest emu list npx solana-mobile@latest emu status npx solana-mobile@latest emu create npx solana-mobile@latest emu start my_phone npx solana-mobile@latest emu stop my_phone ``` `emu` is an alias for `emulator`. Subcommands: `create`, `delete`, `images`, `list`, `start`, `status`, `stop`, `tune`. System images live under `emu images` (`install`, `list`, `delete`). Create a named emulator on a specific device profile: ```bash npx solana-mobile@latest emu create local_phone --device pixel_9 ``` ### Prepare a fresh emulator A newly created AVD is not ready for wallet work: it is not running, its first-run dialogs are still armed, and it has no wallet app. Boot it tuned, then install one — in that order, since `device install` needs a booted device to install onto: ```bash npx solana-mobile@latest emu start local_phone --tune npx solana-mobile@latest device install fakewallet ``` `--tune` disables the animations, first-run dialogs, lock screen, and notifications that otherwise sit on top of the app on a fresh AVD. Tuning is opt-in — `emu start` and `emu create --start` apply it only when passed `--tune` — and in that form it is non-interactive, which is what makes it the one to reach for in a script. `emu create` takes `--start --tune` to do all of this at creation time. `device install fakewallet` puts the Mobile Wallet Adapter test wallet on the running emulator. Without a wallet app, MWA has nothing to hand off to and connect silently does nothing — the most common cause of "connect does nothing on the emulator". Anything gated on the Seeker Genesis Token still needs a real Seeker device; an emulator cannot hold one. See the `seeker-genesis-token` skill. ## Work with a connected device `device` covers everything that goes over adb, for emulators and physical phones alike. ```bash npx solana-mobile@latest device list # serials, states, names npx solana-mobile@latest device install fakewallet # catalog APK npx solana-mobile@latest device install ./app-release.apk # local file npx solana-mobile@latest device open http://localhost:3000 # opens on the device npx solana-mobile@latest device tune --all -y # prepare for automation ``` `device open` creates the `adb reverse` for a localhost URL itself, so a dev server on this machine is reachable from a USB-connected phone. Prefer it to hand-written `adb reverse` plus `am start` incantations. `device tune` and `emu tune` apply the same tweaks but differ in two ways, and the second one bites in scripts. `device tune` accepts physical devices, takes `--device ` or `--all`, and falls back to the only connected device. `emu tune` refuses non-emulator serials, takes the AVD name or serial as a positional argument, and opens a picker whenever it is given none — even with exactly one emulator running, and even under `-y`, which skips the tweak prompt and not the emulator one. Name the target in anything unattended: `emu tune local_phone -y`. ## Run a local validator ```bash npx solana-mobile@latest localnet start npx solana-mobile@latest localnet check ``` `localnet start` gets a validator serving on the host and forwards its ports to every connected device, so the app reaches `localhost:8899` as if the validator ran on the device. It reuses a localnet container it already started, attaches to a validator already answering on those ports — a native one, needing no Docker at all — and starts a container only when neither is there. `check` verifies reachability from each device — which is the question to ask when an app cannot see a validator that is plainly running on this machine. `localnet forward` re-applies the forwards after plugging in a new device, and `logs`, `status`, and `stop` do what they say. ## Test a wallet without an app ```bash npx solana-mobile@latest playground ``` Serves a wallet testing page, opens it on the device, and streams every MWA interaction back to the terminal: connect, sign in (SIWS), sign message, sign transaction, sign and send. It runs against devnet by default; `--cluster localnet` points it at the `localnet` validator, and mainnet needs your own `--url` because the public endpoint rejects browser-origin requests. **Use this to split an app bug from a setup bug.** If the playground cannot sign either, the problem is the wallet or the device, not the code being debugged. It needs an MWA wallet installed — `device install fakewallet` if there is none. ## Reference material - [references/cli.md](references/cli.md) — every `solana-mobile` command and flag, including `templates` and `webshell` - [references/add-to-existing-app.md](references/add-to-existing-app.md) — wiring Solana into an Expo app that already exists: crypto polyfill, providers, dependencies - [references/troubleshooting.md](references/troubleshooting.md) — build, polyfill, and emulator failures with known causes ## Related skills - `solana-mobile-wallet` — connecting wallets, signing, sending transactions - `solana-mobile-publishing` — signing a release APK and shipping to the dApp Store - `seeker-genesis-token` — verifying Seeker device ownership - `seeker-domains` — `.skr` domain name resolution For general non-mobile Solana work — Anchor or Pinocchio programs, Codama client generation, testing, security review — use the Solana Foundation's `solana-dev` skill instead. `create` installs it into `.agents/skills/solana-dev/`, so a scaffolded project already has it. ## Links - CLI source: https://github.com/solana-mobile/solana-mobile-cli - Templates: https://github.com/solana-mobile/templates - Solana Mobile docs: https://docs.solanamobile.com

相关技能

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)完成一个功…