[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7737X5A8SQDH10FFYNPH5C0":3,"skill-same:01M7737X5A8SQDH10FFYNPH5C0":61},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M7737X5A8SQDH10FFYNPH5C0","solana-wallet-adapter",null,"Trigger: wallet-adapter, Solana wallet connect, Phantom, SIWS, sign message, sign transaction, WASM wallet. Connect browser-extension Solana wallets from Rust\u002FWASM frontends via the wallet-adapter crate.","davidcoachdev\u002Fdcfiles","davidcoachdev","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F69812733?v=4","01M758C4BR16TAV1N47W319E9V","David H. Caycedo Blum.","01M758C4CCZA2ZYGA0BGMXCDRH",1,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fdavidcoachdev\u002Fdcfiles\u002Fblob\u002Fmain\u002Fconfig\u002F.config\u002Fopencode\u002Fskills\u002Fsolana-wallet-adapter\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: solana-wallet-adapter\ndescription: \"Trigger: wallet-adapter, Solana wallet connect, Phantom, SIWS, sign message, sign transaction, WASM wallet. Connect browser-extension Solana wallets from Rust\u002FWASM frontends via the wallet-adapter crate.\"\nlicense: Apache-2.0\nmetadata:\n  author: gentleman-programming\n  version: \"1.0\"\n---\n\n# Solana Wallet Adapter (Rust \u002F WASM)\n\n## Activation Contract\nUse when building a Rust frontend (Dioxus, Leptos, Yew, Sycamore, or any `trunk`\u002F`wasm-bindgen` app) that must connect to a browser-extension Solana wallet (Phantom, Solflare, Backpack) and sign messages or transactions through the Wallet Standard. This crate is NOT for native\u002FCLI clients.\n\n## Hard Rules\n- **WASM-only**: compile to `wasm32-unknown-unknown` with a bundler (trunk or `dioxus web`). It will not link in a native binary.\n- **Init once**: call `WalletAdapter::init()` (or `init_with_channel_capacity` \u002F `init_custom`) exactly once at startup. It registers `wallet-standard:register-wallet` and `wallet-standard:app-ready` events on `window`\u002F`document`. Without it, `adapter.wallets()` stays empty.\n- **No web-sys flags needed**: the crate already enables the required `web-sys` features in its own manifest. Add `solana-sdk`, `bincode`, `jzon`, `serde` only for the sign\u002Fsend flows.\n- **SIWS needs address**: `sign_in` REQUIRES `SigninInput::set_address(&address)`; omitting it throws `MessageResponseMismatch`.\n- **Async connection info**: `adapter.connection_info()` \u002F `connected_account()` are `async` (RwLock-wrapped). Await them. Clone `ConnectionInfo` \u002F `WalletStorage` before moving into closures or `async move` background tasks.\n- **Tx = bincode bytes**: serialize with `bincode::serialize(&tx)`; the wallet deserializes from bytes. Build with `solana_sdk::transaction::Transaction`.\n- **Send needs blockhash**: `sign_and_send_transaction` requires a valid recent blockhash in the tx (fetch `getLatestBlockhash`) plus `SendOptions`.\n- **Verify signatures**: every `sign_*` returns `WalletError` on mismatch — never trust output without handling the error.\n\n## Decision Gates\n| Goal | Method |\n| Connect a wallet | `connect_by_name(\"Phantom\")` or `connect(wallet)` |\n| Disconnect | `disconnect().await` |\n| Login \u002F auth (SIWS) | `sign_in(&SigninInput, pubkey).await` |\n| Prove ownership off-chain | `sign_message(bytes).await` |\n| Sign, send yourself | `sign_transaction(&tx_bytes, Some(cluster)).await` |\n| Sign + broadcast | `sign_and_send_transaction(&tx_bytes, cluster, SendOptions).await` |\n\n## Execution Steps\n1. Add deps — see `assets\u002Fexamples.md#cargo`.\n2. `let mut adapter = WalletAdapter::init()?;` once at startup.\n3. `adapter.connect_by_name(\"Phantom\").await?;` then guard with `if adapter.is_connected().await { .. }`.\n4. Check support before calling: `if adapter.solana_sign_transaction().await? { .. }`.\n5. Perform the action from the table above.\n6. Listen for `WalletEvent`s (`Register`, `Disconnected`, `AccountChanged`) via `adapter.events().recv().await`.\n\n## Output Contract\nReturn a snippet tailored to the requested operation (connect \u002F SIWS \u002F sign message \u002F sign tx \u002F sign+send) plus the matching Cargo deps and the init-once reminder.\n\n## References\n- `references\u002Fupstream.md` — docs.rs, book, and repo links.\n- `assets\u002Fexamples.md` — full runnable Cargo.toml and code per operation.\n","# Solana Wallet Adapter (Rust \u002F WASM)\n\n## Activation Contract\nUse when building a Rust frontend (Dioxus, Leptos, Yew, Sycamore, or any `trunk`\u002F`wasm-bindgen` app) that must connect to a browser-extension Solana wallet (Phantom, Solflare, Backpack) and sign messages or transactions through the Wallet Standard. This crate is NOT for native\u002FCLI clients.\n\n## Hard Rules\n- **WASM-only**: compile to `wasm32-unknown-unknown` with a bundler (trunk or `dioxus web`). It will not link in a native binary.\n- **Init once**: call `WalletAdapter::init()` (or `init_with_channel_capacity` \u002F `init_custom`) exactly once at startup. It registers `wallet-standard:register-wallet` and `wallet-standard:app-ready` events on `window`\u002F`document`. Without it, `adapter.wallets()` stays empty.\n- **No web-sys flags needed**: the crate already enables the required `web-sys` features in its own manifest. Add `solana-sdk`, `bincode`, `jzon`, `serde` only for the sign\u002Fsend flows.\n- **SIWS needs address**: `sign_in` REQUIRES `SigninInput::set_address(&address)`; omitting it throws `MessageResponseMismatch`.\n- **Async connection info**: `adapter.connection_info()` \u002F `connected_account()` are `async` (RwLock-wrapped). Await them. Clone `ConnectionInfo` \u002F `WalletStorage` before moving into closures or `async move` background tasks.\n- **Tx = bincode bytes**: serialize with `bincode::serialize(&tx)`; the wallet deserializes from bytes. Build with `solana_sdk::transaction::Transaction`.\n- **Send needs blockhash**: `sign_and_send_transaction` requires a valid recent blockhash in the tx (fetch `getLatestBlockhash`) plus `SendOptions`.\n- **Verify signatures**: every `sign_*` returns `WalletError` on mismatch — never trust output without handling the error.\n\n## Decision Gates\n| Goal | Method |\n| Connect a wallet | `connect_by_name(\"Phantom\")` or `connect(wallet)` |\n| Disconnect | `disconnect().await` |\n| Login \u002F auth (SIWS) | `sign_in(&SigninInput, pubkey).await` |\n| Prove ownership off-chain | `sign_message(bytes).await` |\n| Sign, send yourself | `sign_transaction(&tx_bytes, Some(cluster)).await` |\n| Sign + broadcast | `sign_and_send_transaction(&tx_bytes, cluster, SendOptions).await` |\n\n## Execution Steps\n1. Add deps — see `assets\u002Fexamples.md#cargo`.\n2. `let mut adapter = WalletAdapter::init()?;` once at startup.\n3. `adapter.connect_by_name(\"Phantom\").await?;` then guard with `if adapter.is_connected().await { .. }`.\n4. Check support before calling: `if adapter.solana_sign_transaction().await? { .. }`.\n5. Perform the action from the table above.\n6. Listen for `WalletEvent`s (`Register`, `Disconnected`, `AccountChanged`) via `adapter.events().recv().await`.\n\n## Output Contract\nReturn a snippet tailored to the requested operation (connect \u002F SIWS \u002F sign message \u002F sign tx \u002F sign+send) plus the matching Cargo deps and the init-once reminder.\n\n## References\n- `references\u002Fupstream.md` — docs.rs, book, and repo links.\n- `assets\u002Fexamples.md` — full runnable Cargo.toml and code per operation.\n",{"name":5,"license":15,"metadata":24,"description":7},{"author":25,"version":26},"gentleman-programming","1.0","main","5dc86f90a5cbe45db3acd917825461b3ed6937fb","config\u002F.config\u002Fopencode\u002Fskills\u002Fsolana-wallet-adapter",0,"https:\u002F\u002Fgithub.com\u002Fdavidcoachdev\u002Fdcfiles","https:\u002F\u002Fgithub.com\u002Fdavidcoachdev","🌐 Apasionado por crear soluciones web escalables y eficientes. \r\n🧑‍🏫 Coach Dev.\r\n💻 Frontend Dev. \r\n🎚️Backend Dev.\r\n📊 Agile\u002FScrum.\r\n🚀100% remoto.","2026-08-26 07:28:05",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add davidcoachdev\u002Fdcfiles --skill solana-wallet-adapter",{"tool":41,"command":42},"bunx","bunx skills add davidcoachdev\u002Fdcfiles --skill solana-wallet-adapter",{"tool":44,"command":45},"pnpm","pnpm dlx skills add davidcoachdev\u002Fdcfiles --skill solana-wallet-adapter","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdavidcoachdev\u002Fdcfiles\u002Fblob\u002Fmain\u002Fconfig\u002F.config\u002Fopencode\u002Fskills\u002Fsolana-wallet-adapter\u002FSKILL.md",true,[49,55],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"assets\u002Fexamples.md","ASSET","资产文件",4741,"https:\u002F\u002Fgithub.com\u002Fdavidcoachdev\u002Fdcfiles\u002Fblob\u002Fmain\u002Fconfig\u002F.config\u002Fopencode\u002Fskills\u002Fsolana-wallet-adapter\u002Fassets\u002Fexamples.md",{"path":56,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":59,"sourceHtmlUrl":60},"references\u002Fupstream.md","REFERENCE","参考文档",610,"https:\u002F\u002Fgithub.com\u002Fdavidcoachdev\u002Fdcfiles\u002Fblob\u002Fmain\u002Fconfig\u002F.config\u002Fopencode\u002Fskills\u002Fsolana-wallet-adapter\u002Freferences\u002Fupstream.md",[62,69,76,83,91,98],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M7740FETMZY1VTYAEFY1TWY7","zustand-5","Zustand 5 state management patterns. Trigger: When managing React state with Zustand.","https:\u002F\u002Fgithub.com\u002Fdavidcoachdev\u002Fdcfiles\u002Fblob\u002Fmain\u002Fconfig\u002F.config\u002Fopencode\u002Fskills\u002Fzustand-5\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M773ZZM9V68SA1AKP4WF4J29","zod-4","Zod 4 schema validation patterns. Trigger: When using Zod for validation - breaking changes from v3.","https:\u002F\u002Fgithub.com\u002Fdavidcoachdev\u002Fdcfiles\u002Fblob\u002Fmain\u002Fconfig\u002F.config\u002Fopencode\u002Fskills\u002Fzod-4\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M773ZJFR90CQAY0N9QR40QVP","x-bookmark-quote-posts","Workflow para revisar bookmarks de X\u002FTwitter y convertirlos en drafts de quote posts. Accede a la sección de bookmarks vía browser headless, extrae posts recientes, y genera drafts con voz personal del usuario. No publica ni muta X — solo genera contenido para revisión. Trigger: X bookmarks, Twitter bookmarks, quote posts, bookmark automation, crear quote posts, revisar bookmarks, growth content X.","https:\u002F\u002Fgithub.com\u002Fdavidcoachdev\u002Fdcfiles\u002Fblob\u002Fmain\u002Fconfig\u002F.config\u002Fopencode\u002Fskills\u002Fx-bookmark-quote-posts\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":87,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M773Z2RGV3786FV310SDB0YD","writing-skills","Use when creating new skills, editing existing skills, or verifying skills work before deployment","MIT","https:\u002F\u002Fgithub.com\u002Fdavidcoachdev\u002Fdcfiles\u002Fblob\u002Fmain\u002Fconfig\u002F.config\u002Fopencode\u002Fskills\u002Fwriting-skills\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":87,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M773YJH3KDSW467CSS63CSRJ","writing-plans","Use when you have a spec or requirements for a multi-step task, before touching code","https:\u002F\u002Fgithub.com\u002Fdavidcoachdev\u002Fdcfiles\u002Fblob\u002Fmain\u002Fconfig\u002F.config\u002Fopencode\u002Fskills\u002Fwriting-plans\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M773Y3S3H2CPRK5S8YFHWB5C","work-unit-commits","Plan commits as reviewable work units. Trigger: implementation, commit splitting, chained PRs, or keeping tests and docs with code.","https:\u002F\u002Fgithub.com\u002Fdavidcoachdev\u002Fdcfiles\u002Fblob\u002Fmain\u002Fconfig\u002F.config\u002Fopencode\u002Fskills\u002Fwork-unit-commits\u002FSKILL.md",[],[]]