registering-new-views
БесплатноБез исполняемых скриптовНе проверенInteractive skill for creating new Bases Views. Guides through adaptive questioning, then generates all necessary files.
Об этом скилле
Creating New Views
This skill guides you through creating a new Bases View with all required files.
Process Overview
Discovery → Confirmation → Generation → Verification
Phase 1: Discovery - Ask These Questions Adaptively
Start with basic questions, then deepen based on responses.
Level 1 - Basic (always ask)
Name: "What should this view be called?"
- Derive:
id(kebab-case),ViewName(PascalCase), filenames
- Derive:
Purpose: "What does this view do in one sentence?"
- Use this to infer what options might be needed
Level 2 - Visual (always ask)
- Icon: "What icon represents this view?"
- Suggest based on description or ask for lucide icon name
- Format:
lucide-{icon-name}
Level 3 - Data (adaptive)
- Properties: "What entry properties does it need to display?"
- If images mentioned → ask about
aspectRatio,mediaFit,mediaProperty - If dates mentioned → ask about format, range display
- If text mentioned → ask about truncation
- If images mentioned → ask about
Level 4 - Layout (adaptive)
- If mentions "cards", "grid", "list":
- "Should the size be configurable?" → slider option
- "Should gap between elements be configurable?" → slider option
- "Should column count be configurable?" → slider or dropdown
- "Can we reuse existing Card component?" → use
useCardConfighook
Level 5 - Interaction (adaptive)
If likely to have many elements:
- "Does it need virtualization for performance with long lists?"
If has clickable elements:
- Confirm will use
onEntryClickhandler
- Confirm will use
Level 6 - Additional (adaptive)
- "Any other configuration option the user should have?"
Phase 2: Confirmation
Before generating, present this summary:
## View Summary
**Name**: {ViewName}
**ID**: {view-id}
**Icon**: lucide-{icon}
**Description**: {description}
**Files to generate**:
- src/views/{ViewName}/index.ts
- src/views/{ViewName}/{ViewName}View.tsx
- src/views/{ViewName}/{ViewName}View.stories.tsx
- src/views/{ViewName}/__fixtures__/configs.ts
- (Optional) src/views/{ViewName}/constants.ts - if many options
- (Optional) src/views/{ViewName}/types.ts - if complex types
- Update src/views/index.ts
**Configuration options**:
| Group | Option | Type | Default |
|-------|--------|------|---------|
| {group} | {option} | {type} | {default} |
**Features**:
- [x/] Uses virtualization
- [x/] Supports entry click
- [x/] Shows images
- [x/] Reuses Card component
Proceed to generate?
Wait for user confirmation before generating.
Phase 3: Generation
Generate ALL these files:
1. src/views/{ViewName}/index.ts
Simple view (inline options):
import { ReactBasesView } from "@/lib/view-class";
import type { BaseViewDef } from "@/types";
import {ViewName}View from "./{ViewName}View";
const {VIEW_NAME}_ID = "{view-id}";
const {VIEW_NAME}_VIEW: BaseViewDef = {
id: {VIEW_NAME}_ID,
name: "{Display Name}",
icon: "lucide-{icon}",
factory: (controller, containerEl) =>
new ReactBasesView({VIEW_NAME}_ID, {ViewName}View, controller, containerEl),
options: () => [
{
type: "group",
displayName: "{GroupName}",
items: [
// Options go here based on conversation
],
},
],
};
export default {VIEW_NAME}_VIEW;
View reusing Card options:
import { CARD_CONFIG_OPTIONS } from "@/components/Card/constants";
import { ReactBasesView } from "@/lib/view-class";
import type { BaseViewDef } from "@/types";
import {ViewName}View from "./{ViewName}View";
const {VIEW_NAME}_ID = "{view-id}";
const {VIEW_NAME}_VIEW: BaseViewDef = {
id: {VIEW_NAME}_ID,
name: "{Display Name}",
icon: "lucide-{icon}",
factory: (controller, containerEl) =>
new ReactBasesView({VIEW_NAME}_ID, {ViewName}View, controller, containerEl),
options: () => [
// Add view-specific options first
...CARD_CONFIG_OPTIONS,
],
};
export default {VIEW_NAME}_VIEW;
Complex view (options in constants.ts):
import { ReactBasesView } from "@/lib/view-class";
import type { BaseViewDef } from "@/types";
import { {VIEW_NAME}_OPTIONS } from "./constants";
import {ViewName}View from "./{ViewName}View";
const {VIEW_NAME}_ID = "{view-id}";
const {VIEW_NAME}_VIEW: BaseViewDef = {
id: {VIEW_NAME}_ID,
name: "{Display Name}",
icon: "lucide-{icon}",
factory: (controller, containerEl) =>
new ReactBasesView({VIEW_NAME}_ID, {ViewName}View, controller, containerEl),
options: () => {VIEW_NAME}_OPTIONS,
};
export default {VIEW_NAME}_VIEW;
2. src/views/{ViewName}/{ViewName}View.tsx
Simple view:
import { Container } from "@/components/Obsidian/Container";
import { useConfig } from "@/hooks/use-config";
import type { ReactBaseViewProps } from "@/types";
export type {ViewName}Config = {
// Type each config option
};
const {ViewName}View = ({
config,
data,
isEmbedded,
onEntryClick,
}: ReactBaseViewProps) => {
const viewConfig = useConfig<{ViewName}Config>(config, {
Установить registering-new-views в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл registering-new-views?
Interactive skill for creating new Bases Views. Guides through adaptive questioning, then generates all necessary files.
Как установить скилл registering-new-views?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл registering-new-views запускает скрипты?
Нет, скилл состоит только из инструкций (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