cli-feature
БесплатноБез исполняемых скриптовНе проверенAdd a new command or TUI view to the WhoDB CLI
от clidey★ 5 073 звезды на GitHubОб этом скилле
Add a CLI Feature
Adding a New Command
1. Create Command File
cli/cmd/<name>.go:
package cmd
import "github.com/spf13/cobra"
var <name>Cmd = &cobra.Command{
Use: "<name>",
Short: "Description",
RunE: func(cmd *cobra.Command, args []string) error {
// Implementation using database.Manager
return nil
},
}
func init() {
rootCmd.AddCommand(<name>Cmd)
}
2. Key Rules
- Use
database.Managerfor all DB operations (direct plugin access, not GraphQL) - Identity-driven text: write
whodbin command examples; usepkg/identityhelpers for display names and home-dir paths, never hardcode edition-specific names - Structured output: use
pkg/outputwriters (table/json/csv/ndjson) for machine-readable commands - Keep
main.gothin — it calls the shared runtime, nothing else
3. Verification
cd cli && go build . && go vet ./...
Adding a New TUI View
1. Create View File
cli/internal/tui/<name>_view.go:
Implement the Bubble Tea model interface:
Init() tea.CmdUpdate(msg tea.Msg) (tea.Model, tea.Cmd)View() string
2. Add to MainModel
- Add view mode to
cli/internal/tui/model.go - Add navigation in
Update() - Use
pkg/stylesfor consistent rendering
3. Key Patterns
- Vim-like navigation (hjkl)
- Tab for view switching
- Esc for going back
- Don't use lipgloss Padding with viewport output (use manual prefix)
- Use
database.Managerfor data access
4. Verification
cd cli && go test ./internal/tui/... && go build .
Установить cli-feature в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл cli-feature?
Add a new command or TUI view to the WhoDB CLI
Как установить скилл cli-feature?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл cli-feature запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic