Synthèse automatique
Ce skill permet de créer, modifier et gérer des configurations d'applications shizuku, y compris la génération de structure, l'ajout de fichiers de templates et l'implémentation de logique d'installation.
Points forts
- Automatisation complète du scaffold d'applications shizuku avec une architecture basée sur des interfaces.
- Gestion intégrée de l'installation Homebrew (formules, casks, taps).
- Support des fichiers de templates Go .tmpl et des variables de template.
- Couverture des capacités optionnelles comme la synchronisation de fichiers et les variables d'environnement.
Limites
- Limitée aux applications shizuku et à l'écosystème associé.
- Ne gère pas la configuration des dépendances non-Homebrew.
- La création de fichiers .tmpl complexes nécessite une connaissance des templates Go.
Utilisez ce skill lorsque vous devez créer une nouvelle application shizuku, ajouter des fichiers de template ou modifier la structure existante d'une application.
Ne l'utilisez pas pour des applications en dehors du framework shizuku ou si vous avez besoin d'un gestionnaire de packages autre que Homebrew.
Analyse de sécurité
SûrThe skill provides instructions for generating Go code and directory structures. It does not instruct the agent to execute arbitrary commands, download and run remote scripts, or exfiltrate data. The templates for Homebrew installation are code snippets, not direct command execution, and no destructive operations are described.
Aucun point d'attention détecté
Comment cette analyse est faiteExemples
Create a new shizuku app called tmux. It should be enabled by default, installed via Homebrew formula 'tmux', sync config files to ~/.config/tmux/, and have no template variables or remote files.Add Install() method to the existing 'alacritty' app that installs the Homebrew cask 'alacritty'.Scaffold a new shizuku app called 'starship' that is enabled by default and provides an environment variable STARSHIP_CONFIG pointing to ~/.config/starship.toml.name: app description: Create, modify, and manage shizuku app configurations. Use when the user wants to create a new app, add template files to an app, or modify existing app structure.
Shizuku App Manager
This skill helps create and manage shizuku application configurations.
What This Skill Does
When invoked, this skill helps you:
- Scaffold new apps - Create complete directory structure and registration
- Add template files - Create and manage .tmpl files in app contents
- Modify existing apps - Update app configurations and template data
- Add installer logic - Implement Install() method for Homebrew packages
App Structure Overview
Each shizuku app follows this pattern:
apps/{appName}/
├── {appName}.go # App struct with methods
└── contents/ # Template files and assets (optional)
├── file.conf # Regular files (copied as-is)
└── file.tmpl # Go templates (processed)
Modern App Architecture
Apps use an interface-based design with optional capabilities:
Core Interface (Required)
All apps must implement the App interface:
Name() string- Returns the app nameEnabled(config *shizukuconfig.Config) bool- Checks if app is enabled
Optional Interfaces
Apps can optionally implement:
FileSyncer- For apps that sync configuration filesSync(outDir string, config *shizukuconfig.Config) error
Installer- For apps that need installationInstall(config *shizukuconfig.Config) error
EnvProvider- For apps that provide environment variables/aliasesEnv() (*shizukuapp.EnvSetup, error)
Creating a New App
Step 1: Gather Requirements
Ask the user:
- App name - What is the name of the application? (e.g., "tmux", "alacritty")
- Default enabled - Should this app be enabled by default? (most apps: true, optional services: false)
- Installation - Does the app need installation via Homebrew? (y/n)
- If yes: package name, cask vs formula, any taps needed?
- File syncing - Does the app need to sync configuration files? (y/n)
- If yes: destination path (e.g., "~/.config/tmux/")
- Template data - Does the app need any template variables? (y/n)
- Remote files - Does the app need to download any remote resources like plugins? (y/n)
- Environment - Does the app need environment variables or aliases? (y/n)
Step 2: Create Directory Structure
mkdir -p apps/{appName}
# Only create contents/ if the app will sync files
mkdir -p apps/{appName}/contents
Step 3: Create the Go File
Create apps/{appName}/{appName}.go with the appropriate template:
Minimal App (No File Syncing)
package {appName}
import (
"github.com/eleonorayaya/shizuku/internal/shizukuconfig"
)
type App struct{}
func New() *App {
return &App{}
}
func (a *App) Name() string {
return "{appName}"
}
func (a *App) Enabled(config *shizukuconfig.Config) bool {
return config.GetAppConfigBool(a.Name(), "enabled", {defaultEnabled})
}
App with Installation
package {appName}
import (
"fmt"
"github.com/eleonorayaya/shizuku/internal/shizukuconfig"
"github.com/eleonorayaya/shizuku/internal/util"
)
type App struct{}
func New() *App {
return &App{}
}
func (a *App) Name() string {
return "{appName}"
}
func (a *App) Enabled(config *shizukuconfig.Config) bool {
return config.GetAppConfigBool(a.Name(), "enabled", {defaultEnabled})
}
func (a *App) Install(config *shizukuconfig.Config) error {
// For Homebrew formula
if err := util.InstallBrewPackage("{packageName}"); err != nil {
return fmt.Errorf("failed to install {packageName}: %w", err)
}
// For Homebrew cask
// if err := util.InstallCask("{caskName}"); err != nil {
// return fmt.Errorf("failed to install {caskName}: %w", err)
// }
// For custom tap
// if err := util.AddTap("{tapName}"); err != nil {
// return fmt.Errorf("failed to add tap: %w", err)
// }
return nil
}
App with File Syncing
package {appName}
import (
"fmt"
"github.com/eleonorayaya/shizuku/internal/shizukuapp"
"github.com/eleonorayaya/shizuku/internal/shizukuconfig"
)
type App struct{}
func New() *App {
return &App{}
}
func (a *App) Name() string {
return "{appName}"
}
func (a *App) Enabled(config *shizukuconfig.Config) bool {
return config.GetAppConfigBool(a.Name(), "enabled", {defaultEnabled})
}
func (a *App) Sync(outDir string, config *shizukuconfig.Config) error {
data := map[string]any{}
fileMap, err := shizukuapp.GenerateAppFiles("{appName}", data, outDir)
if err != nil {
return fmt.Errorf("failed to generate app files: %w", err)
}
if err := shizukuapp.SyncAppFiles(fileMap, "{destinationPath}"); err != nil {
return fmt.Errorf("failed to sync app files: %w", err)
}
return nil
}
App with Remote Files
func (a *App) Sync(outDir string, config *shizukuconfig.Config) error {
data := map[string]any{}
fileMap, err := shizukuapp.GenerateAppFiles("{appName}", data, outDir)
if err != nil {
return fmt.Errorf("failed to generate app files: %w", err)
}
remoteFiles := map[string]string{
"plugins/file.wasm": "https://example.com/file.wasm",
}
pluginMap, err := internal.FetchRemoteAppFiles(outDir, "{appName}", remoteFiles)
if err != nil {
return fmt.Errorf("failed to fetch remote files: %w", err)
}
maps.Copy(fileMap, pluginMap)
if err := shizukuapp.SyncAppFiles(fileMap, "{destinationPath}"); err != nil {
return fmt.Errorf("failed to sync app files: %w", err)
}
return nil
}
Note: If using maps.Copy, add import: "maps"
App with Environment Variables
func (a *App) Env() (*shizukuapp.EnvSetup, error) {
return &shizukuapp.EnvSetup{
Variables: []shizukuapp.EnvVar{
{Key: "EDITOR", Value: "nvim"},
},
Aliases: []shizukuapp.Alias{
{Name: "vim", Command: "nvim"},
},
}, nil
}
Step 4: Register the App
- Open
apps/app.go - Add import:
"github.com/eleonorayaya/shizuku/apps/{appName}" - Add to the return slice in
GetApps():{appName}.New(),
IMPORTANT: Apps are registered in apps/app.go, NOT in cmd/sync/sync.go or cmd/install/install.go. Those commands automatically load all apps via apps.GetApps().
Step 5: Build and Test
task build
task run -- list # Verify app appears
task run -- install # Test installation (if implemented)
task run -- sync # Test file syncing (if implemented)
Configuration System
Checking if App is Enabled
All apps implement Enabled() which checks the config:
func (a *App) Enabled(config *shizukuconfig.Config) bool {
return config.GetAppConfigBool(a.Name(), "enabled", true) // default: true
}
- Most apps default to
true(core functionality) - Optional services default to
false(protonpass, protonvpn, sfsymbols)
User Config Example
Users can control apps in ~/.config/shizuku/shizuku.yml:
apps:
nvim:
enabled: false
terraform:
enabled: false
protonpass:
enabled: true
Using Other Config Values
Use config.GetAppConfigBool() for boolean values:
useNerdFont := config.GetAppConfigBool(a.Name(), "nerd_font", true)
Use config.GetAppConfig() for other types:
theme, ok := config.GetAppConfig(a.Name(), "theme")
if ok {
themeStr, ok := theme.(string)
if ok {
data["Theme"] = themeStr
}
}
Adding Template Files
When the user wants to add configuration files to an app:
- Ask for file path - Relative to contents/ directory (e.g., "config.conf")
- Ask if it's a template - Does it need variable substitution? (y/n)
- Create the file - If template, use
.tmplextension - Update template data - If template, add necessary variables to the
datamap in the Sync method
Template Example
If creating contents/config.conf.tmpl:
# {{ .AppName }} Configuration
theme = "{{ .Theme }}"
Update the Sync method:
data := map[string]any{
"AppName": "MyApp",
"Theme": "monade",
}
Modifying Existing Apps
When modifying an app:
- Read the current Go file to understand existing structure
- List contents/ to see existing files (if applicable)
- Make requested changes while preserving the app pattern
- Ensure all required interfaces are still implemented
Important Notes
- No comments - Don't add comments unless explicitly requested (per CLAUDE.md)
- Error wrapping - Always use
fmt.Errorf("context: %w", err)pattern - Template extension -
.tmplfiles are processed, extension is removed in output - File syncing -
SyncAppFileshandles directory creation and file copying - App struct - Always use
type App struct{}withNew() *Appconstructor - Interface implementation - Implement only the interfaces the app needs
- Registration - Apps are registered in
apps/app.go, not in command files
Installation Utilities
Available Homebrew utilities in internal/util/homebrew.go:
InstallBrewPackage(packageName string) error- Install formula (auto-checks if exists)InstallCask(caskName string) error- Install cask (auto-checks if exists)AddTap(tapName string) error- Add Homebrew tap (auto-checks if exists)BrewPackageExists(packageName string) (bool, error)- Check if package is installed
All utilities are idempotent - safe to call multiple times.
Workflow
- Use TodoWrite to track the scaffolding steps
- Ask clarifying questions using AskUserQuestion
- Create all necessary files
- Update
apps/app.goregistration - Suggest running
task buildandtask run -- listto verify
Examples
Simple App (Installation Only)
- App: rust
- Default enabled: true
- Installation:
InstallBrewPackage("rustup") - No file syncing
App with File Syncing
- App: nvim
- Default enabled: true
- Installation:
InstallBrewPackage("neovim") - Syncs to: ~/.config/nvim/
- Provides: Environment variables (EDITOR=nvim, alias vim=nvim)
Optional Service App
- App: protonpass
- Default enabled: false
- Installation:
InstallCask("proton-pass") - No file syncing
App with Templates
- App: sketchybar
- Default enabled: true
- Installation: Tap + formula
- Syncs to: ~/.config/sketchybar/
- Templates: Uses {{ .Theme }} and other variables
App with Remote Files
- App: zellij
- Default enabled: true
- Installation:
InstallBrewPackage("zellij") - Syncs to: ~/.config/zellij/
- Remote: Downloads zjstatus.wasm plugin from GitHub
App with Custom Installer
- App: kitty
- Default enabled: true
- Installation: Uses curl installation script (not Homebrew)
- Syncs to: ~/.config/kitty/
Du fichier au premier essai
Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.
Consulter la source et ses fichiers annexesCe téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.
1. Télécharger le fichier
Télécharger SKILL.mdDepuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/shizuku-app-manager-mm78nmel/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.
Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.
mkdir -p '.skill-downloads/shizuku-app-manager-mm78nmel' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/shizuku-app-manager-mm78nmel/download' --output '.skill-downloads/shizuku-app-manager-mm78nmel/SKILL.md.part' && mv '.skill-downloads/shizuku-app-manager-mm78nmel/SKILL.md.part' '.skill-downloads/shizuku-app-manager-mm78nmel/SKILL.md'2. Vérifier les prérequis
Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.
Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.
Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.
3. Charger la skill
Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.
Claude Code
test -f '.skill-downloads/shizuku-app-manager-mm78nmel/SKILL.md' && test -s '.skill-downloads/shizuku-app-manager-mm78nmel/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/app' && cp -R '.skill-downloads/shizuku-app-manager-mm78nmel' '.claude/skills/app'OpenSkills
OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.
Installation officielle d’OpenSkillsopenskills install './.skill-downloads/shizuku-app-manager-mm78nmel'openskills read 'shizuku-app-manager-mm78nmel'La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.
Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.
openskills syncMode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.
4. Faire un premier essai
Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :
Lis .skill-downloads/shizuku-app-manager-mm78nmel/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.
Bonnes pratiques React Hook Form
Developpement
Maîtrisez React Hook Form : évitez les anti-patterns, gérez les abonnements, et traitez correctement reset, dirty state et entrées contrôlées.
Migration Emotion vers Mantine
Developpement
Migrer les styled-components Emotion vers des composants Mantine avec style props et modules CSS. Pour convertir .styled.tsx ou supprimer les imports @emotion.
Détecteur de dérive de périmètre
Developpement
Analyse les diffs git par rapport à une intention pour détecter la dérive de périmètre, fichiers non liés et PR trop larges, puis suggère de garder, diviser ou justifier.