Agent skill
script-kit-architecture
Script Kit GPUI codebase architecture. Use when navigating the codebase, understanding module structure, or tracing data flow. Covers repository structure, SDK deployment, configuration, and secondary windows.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/script-kit-architecture
SKILL.md
Script Kit Architecture
Overview of the Script Kit GPUI codebase structure.
Repository Structure (Key Modules)
src/
main.rs- app entry + window setup + main render loop + ErrorNotification UIerror.rs-ScriptKitError,ErrorSeverity,NotifyResultExttheme.rs- theme systemprompts.rs- ArgPrompt, DivPrompt, EditorPromptactions.rs- ActionsDialogprotocol.rs- stdin JSON protocol +ParseResultscripts.rs- script loading + execution instrumentationconfig.rs- config loading + defaultsexecutor.rs- bun execution + timing spans + structured loggingwatcher.rs- file watcherspanel.rs- macOS panel configurationperf.rs- perf timing utilitieslogging.rs- dual-output logging (JSONL + pretty/compact)lib.rs- exportsutils.rs- shared utilitiesnotes/- Notes window moduleai/- AI chat window module
Logs: ~/.scriptkit/logs/script-kit-gpui.jsonl
SDK Deployment Architecture
SDK source: scripts/kit-sdk.ts
Two-tier deployment:
- Build time (dev):
build.rscopiesscripts/kit-sdk.tsto~/.scriptkit/sdk/ - Compile time:
executor.rsembeds viainclude_str!("../scripts/kit-sdk.ts") - Runtime:
ensure_sdk_extracted()writes embedded SDK to~/.scriptkit/sdk/kit-sdk.ts - Execution:
bun run --preload ~/.scriptkit/sdk/kit-sdk.ts <script>
Tests import ../../scripts/kit-sdk (repo path). Production uses runtime-extracted SDK.
tsconfig mapping:
{ "compilerOptions": { "paths": { "@scriptkit/sdk": ["./sdk/kit-sdk.ts"] } } }
User Configuration (~/.scriptkit/config.ts)
import type { Config } from "@scriptkit/sdk";
export default {
hotkey: { modifiers: ["meta"], key: "Semicolon" },
padding: { top: 8, left: 12, right: 12 },
editorFontSize: 16,
terminalFontSize: 14,
uiScale: 1.0,
builtIns: { clipboardHistory: true, appLauncher: true },
bun_path: "/opt/homebrew/bin/bun",
editor: "code"
} satisfies Config;
Rust helpers (use these; they handle defaults):
config.get_editor_font_size()(default 14)config.get_terminal_font_size()(default 14)config.get_padding()(top 8, left/right 12)config.get_ui_scale()(default 1.0)config.get_builtins()(clipboardHistory/appLauncher default true)config.get_editor()(default"code")
Font sizing:
- Editor:
line_height = font_size * 1.43 - Terminal:
line_height = font_size * 1.3
References
- System Diagrams - Architecture, state machine, execution flow diagrams
- Notes Window - Notes module details
- AI Window - AI chat module details
- Gotchas - Common issues and fixes
- Vibrancy - macOS vibrancy/blur patterns
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?