用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Daiki48/dotfiles --skill dioxus-guide命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
承認済み計画の指定された1コミット単位だけを実装・検証し、Daikiの確認とコミットを待つ。Plan ID、Issue、docs、または同一セッションの合意計画があり、「1コミット目を実装」「次のコミット」「このコミット分を修正」と依頼されたときに使う。方針未確定の調査や全コミット後の最終監査には使わない。
方針未確定の変更要求を実装前に調査し、仕様・docs・GitHub Issue・コード・履歴・外部一次情報を照合して、後方互換性・安全性・堅牢性・性能を含む合意可能な計画を作る。詳しい調査、原因調査、設計相談、実装方針、コミット分割、提示済み計画の承認と永続化で使う。承認済み計画の1コミット実装や全コミット後の最終監査には使わない。
承認済み計画の全コミット完了後、Daikiが対象ブランチを選択した状態で、baseとの差分をコードレビュー3周とファクトチェック3周で最終監査する。「全コミット完了」「最終レビュー」「PR前確認」「リリース前確認」で使う。個別コミットの実装、未コミット変更がある状態、方針未確定の調査には使わない。
正在显示 SKILL.md
基于 SOC 职业分类
| name | dioxus-guide |
| description | Dioxus v0.7.x desktop app guide. Components, Signal state, rsx! macro, hooks, events, Context API, async. |
Deprecated in 0.7:
cx / Scope → Not neededuse_state → use_signaluse_ref → use_signaluse dioxus::prelude::*;
fn main() { dioxus::launch(App); }
#[component]
fn App() -> Element {
rsx! { "Hello, Dioxus!" }
}
[dependencies]
dioxus = { version = "0.7.2", features = ["router"] }
[features]
default = ["desktop"]
web = ["dioxus/web"]
desktop = ["dioxus/desktop"]
rsx! {
div { class: "container", color: "red",
width: if condition { "100%" }, // Conditional attr
"Hello!"
}
for i in 0..5 { div { "{i}" } } // Loop (prefer for over iter)
if condition { div { "True!" } } // Conditional
{children} // Expressions in braces
}
#[component]
fn MyComponent(
title: String,
#[prop(optional)] class: Option<String>,
#[prop(default = 10)] limit: usize,
children: Element,
) -> Element {
rsx! {
div { class: class.unwrap_or_default(),
h1 { "{title}" }
{children}
}
}
}
Props: Must be owned types (String, not &str), implement PartialEq + Clone
#[component]
fn Counter() -> Element {
let mut count = use_signal(|| 0);
rsx! {
h1 { "Count: {count}" }
button { onclick: move |_| *count.write() += 1, "+" }
}
}
// Read
count() // Clone value
count.read() // Reference (&T)
// Write
count.set(10)
*count.write() = 10
count.with_mut(|c| *c += 1)
let doubled = use_memo(move || count() * 2);
// Provider
#[component]
fn App() -> Element {
let theme = use_signal(|| "light".to_string());
use_context_provider(|| theme);
rsx! { Child {} }
}
// Consumer
#[component]
fn Child() -> Element {
let theme = use_context::<Signal<String>>();
rsx! { div { "Theme: {theme}" } }
}
let data = use_resource(move || async move { fetch_data().await });
match data() {
Some(result) => rsx! { div { "{result}" } },
None => rsx! { "Loading..." },
}
// With dependency
let user = use_resource(move || {
let id = user_id(); // Re-runs when this changes
async move { fetch_user(id).await }
});
#[derive(Routable, Clone, PartialEq)]
enum Route {
#[layout(NavBar)]
#[route("/")]
Home {},
#[route("/blog/:id")]
BlogPost { id: i32 },
}
#[component]
fn NavBar() -> Element {
rsx! {
nav { a { href: "/", "Home" } }
Outlet::<Route> {}
}
}
#[component]
fn App() -> Element {
rsx! { Router::<Route> {} }
}
rsx! {
button { onclick: move |_| { /* click */ }, "Click" }
input {
oninput: move |e| set_value(e.value()),
prop:value: value,
}
input { onkeydown: move |e| {
if e.key() == Key::Enter { /* enter pressed */ }
}}
form { onsubmit: move |e| {
e.prevent_default();
// submit
}}
}
[desktop.window]
title = "MyApp"
width = 1200
height = 800
curl -sSL http://dioxus.dev/install.sh | sh # Install dx CLI
dx serve # Dev server
dx build --release
dx bundle --release # Create .deb etc.
| Item | Dioxus 0.7 | Leptos 0.8 |
|---|---|---|
| Signal | use_signal (Copy-like) | signal() (may need clone) |
| Macro | rsx! {} | view! {} |
| Desktop | Native support | Needs Tauri |