pub struct CreateSkillParams {
pub name: String,
pub instructions: String,
}Expand description
Args for the browser create_skill tool (src/app/chat/tools/misc.rs)
— the write half of the SKILLS LOOP (upsert by name).
Fields§
§name: StringA short handle for the skill (e.g. “summarize”, “daily-standup”), max 48 chars. Re-using an existing name REPLACES that skill’s instructions.
instructions: StringThe reusable instruction/prompt fragment that defines what the skill does when invoked — a focused recipe (max 600 chars). Make it self-contained and actionable.
Implementations§
Source§impl CreateSkillParams
impl CreateSkillParams
Sourcepub fn schema() -> Value
pub fn schema() -> Value
Wire input_schema, generated from the SAME table as the struct
fields. Single type per property, no unions / oneOf /
additionalProperties — Gemini-safe by construction.
Sourcepub fn lenient(args: &Value) -> Self
pub fn lenient(args: &Value) -> Self
Lenient extraction: a missing or wrong-typed field falls back
to its default ("" / None / 0) instead of erroring — the
browser chat tools’ historical .get().and_then().unwrap_or()
semantics, preserved exactly (validation stays in the tool body).
req_u64 fields extract to None here; the error fires at
their generated accessor, matching the old inline ok_or_else.