From edea33310beb7ac0eeb168fd3cbf735616301e4c Mon Sep 17 00:00:00 2001
From: Hikari
Date: Mon, 13 Apr 2026 10:19:50 -0700
Subject: [PATCH] feat: expose disableSkillShellExecution setting in config UI
(closes #259)
---
src-tauri/src/config.rs | 11 +++++++++++
src-tauri/src/wsl_bridge.rs | 16 ++++++++++++++--
src/lib/components/ConfigSidebar.svelte | 17 +++++++++++++++++
src/lib/components/StatusBar.svelte | 1 +
src/lib/stores/config.test.ts | 3 +++
src/lib/stores/config.ts | 3 +++
6 files changed, 49 insertions(+), 2 deletions(-)
diff --git a/src-tauri/src/config.rs b/src-tauri/src/config.rs
index 2fb18f4..fc89406 100644
--- a/src-tauri/src/config.rs
+++ b/src-tauri/src/config.rs
@@ -54,6 +54,9 @@ pub struct ClaudeStartOptions {
#[serde(default)]
pub session_name: Option,
+
+ #[serde(default)]
+ pub disable_skill_shell_execution: bool,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
@@ -203,6 +206,11 @@ pub struct HikariConfig {
#[serde(default)]
pub model_overrides: Option>,
+
+ /// Prevents skill scripts from executing shell commands (Claude Code v2.1.91+).
+ /// Passes `"disableSkillShellExecution": true` via the `--settings` flag.
+ #[serde(default)]
+ pub disable_skill_shell_execution: bool,
}
impl Default for HikariConfig {
@@ -254,6 +262,7 @@ impl Default for HikariConfig {
enable_claudeai_mcp_servers: true,
auto_memory_directory: None,
model_overrides: None,
+ disable_skill_shell_execution: false,
}
}
}
@@ -405,6 +414,7 @@ mod tests {
assert!(config.enable_claudeai_mcp_servers);
assert!(config.auto_memory_directory.is_none());
assert!(config.model_overrides.is_none());
+ assert!(!config.disable_skill_shell_execution);
}
#[test]
@@ -459,6 +469,7 @@ mod tests {
"claude-opus-4-6".to_string(),
"arn:aws:bedrock:us-east-1::foundation-model/anthropic.claude-opus-4-6-v1".to_string(),
)])),
+ disable_skill_shell_execution: true,
};
let json = serde_json::to_string(&config).unwrap();
diff --git a/src-tauri/src/wsl_bridge.rs b/src-tauri/src/wsl_bridge.rs
index 7919d4d..6a8f9a6 100644
--- a/src-tauri/src/wsl_bridge.rs
+++ b/src-tauri/src/wsl_bridge.rs
@@ -316,7 +316,7 @@ impl WslBridge {
.map(|m| !m.is_empty())
.unwrap_or(false);
- if has_memory_dir || has_overrides {
+ if has_memory_dir || has_overrides || options.disable_skill_shell_execution {
let mut settings = serde_json::Map::new();
if let Some(ref dir) = options.auto_memory_directory {
if !dir.is_empty() {
@@ -333,6 +333,12 @@ impl WslBridge {
}
}
}
+ if options.disable_skill_shell_execution {
+ settings.insert(
+ "disableSkillShellExecution".to_string(),
+ serde_json::Value::Bool(true),
+ );
+ }
if let Ok(settings_json) = serde_json::to_string(&settings) {
cmd.args(["--settings", &settings_json]);
}
@@ -503,7 +509,7 @@ impl WslBridge {
.map(|m| !m.is_empty())
.unwrap_or(false);
- if has_memory_dir || has_overrides {
+ if has_memory_dir || has_overrides || options.disable_skill_shell_execution {
let mut settings = serde_json::Map::new();
if let Some(ref dir) = options.auto_memory_directory {
if !dir.is_empty() {
@@ -520,6 +526,12 @@ impl WslBridge {
}
}
}
+ if options.disable_skill_shell_execution {
+ settings.insert(
+ "disableSkillShellExecution".to_string(),
+ serde_json::Value::Bool(true),
+ );
+ }
if let Ok(settings_json) = serde_json::to_string(&settings) {
let escaped = settings_json.replace('\'', "'\\''");
claude_cmd.push_str(&format!(" --settings '{}'", escaped));
diff --git a/src/lib/components/ConfigSidebar.svelte b/src/lib/components/ConfigSidebar.svelte
index 0a26a2b..b9ccb1b 100644
--- a/src/lib/components/ConfigSidebar.svelte
+++ b/src/lib/components/ConfigSidebar.svelte
@@ -63,6 +63,7 @@
enable_claudeai_mcp_servers: true,
auto_memory_directory: null,
model_overrides: null,
+ disable_skill_shell_execution: false,
max_output_tokens: null,
trusted_workspaces: [],
background_image_path: null,
@@ -585,6 +586,22 @@
+
+
+
+
+ Passes disableSkillShellExecution: true to prevent skill scripts
+ from executing shell commands (requires Claude Code v2.1.91+)
+
+
+