一键导入
add-plugin
Research and create a new plugin for the day/night cycle automation. Use when user asks to "add a plugin for [app name]" or "add support for [app name]".
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Research and create a new plugin for the day/night cycle automation. Use when user asks to "add a plugin for [app name]" or "add support for [app name]".
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | add-plugin |
| description | Research and create a new plugin for the day/night cycle automation. Use when user asks to "add a plugin for [app name]" or "add support for [app name]". |
| allowed-tools | WebSearch, WebFetch, Read, Write, Edit, Glob, Grep, Bash |
Automatically research and create a new plugin for the day/night cycle automation system.
This skill helps you add support for new applications to the day/night cycle automation. Given an app name, it will:
When adding a plugin, follow these steps:
First, understand how theme switching works for the target application:
Key questions to answer:
Create a new plugin file in the plugins/ directory:
Read existing plugins first:
Read: plugins/iterm2.go # or any other plugin as example
Read: plugins/plugin.go # for helper functions
Create new file: plugins/[app_name].go
Plugin function signature:
package plugins
func [AppName](cfg map[string]interface{}, isLight bool) error {
// Implementation
}
Implementation patterns by type:
JSON Config Files:
UpdateJSONTheme(path, key, value) from plugins/plugin.goAppleScript (macOS apps):
exec.Command("osascript", "-e", script)CLI Commands:
exec.Command() with argumentsAvailable helpers in plugins/plugin.go:
UpdateJSONTheme(path, key, value) - Update JSON config filesExpandPath(path) - Expand ~ in file pathsError handling requirements:
fmt.Errorf()Register the plugin in the Registry:
Edit plugins/plugin.go:
var Registry = map[string]Func{
// ... existing plugins
"[app-name]": [AppName],
}
Test the plugin:
# Build first
make build
# Test light mode
./bin/day-night-cycle --config config.yaml light
# Test dark mode
./bin/day-night-cycle --config config.yaml dark
# Check status
./bin/day-night-cycle --config config.yaml status
Provide the user with:
config.yaml:plugins:
- name: [app-name]
enabled: true
# Include any custom options discovered
Before completing the task, verify:
plugins/ directory (e.g., plugins/vscode.go)package plugins declarationfunc [AppName](cfg map[string]interface{}, isLight bool) errorisLight parameterplugins/plugin.go Registry mapUser: "Add a plugin for Visual Studio Code"
Expected workflow:
~/Library/Application Support/Code/User/settings.jsonworkbench.colorTheme propertyplugins/vscode.go with VSCode functionplugins/plugin.go Registry map as "vscode"plugins/ directory for implementation patternsplugins/plugin.go for available helper functionsplugins/iterm2.go)plugins/plugin.go when appropriate