secondbrain-entity
БесплатноБез исполняемых скриптовНе проверенThis skill should be used when the user asks to "add entity", "create custom entity", "new entity type", "define entity", or mentions wanting to add a new…
от sergio-bershadsky★ 15 звёзд на GitHubОб этом скилле
Add Custom Entity
Create custom entity types with schema validation and VitePress integration.
Prerequisites
Verify secondbrain is initialized:
- Check for
.claude/data/config.yaml - If not found, suggest running
secondbrain-initfirst
Workflow
Step 1: Gather Entity Information
Collect from user:
- Entity Name — Plural name (e.g., "contacts", "projects", "bookmarks")
- Singular Name — For display (e.g., "contact", "project", "bookmark")
- Fields — Custom fields for the entity:
- Field name (snake_case)
- Field type (string, integer, boolean, date, array, enum)
- Required or optional
- For enums: allowed values
- ID Format — How records are numbered/identified:
- Sequential (
PREFIX-XXXX) - Date-based (
YYYY-MM-DD-slug) - UUID
- Sequential (
- Status Workflow (optional) — If entity has status tracking
Step 2: Generate Schema
Create .claude/data/<entity>/schema.yaml:
type: object
required: [records]
properties:
last_number:
type: integer
description: Last assigned sequential number
records:
type: array
items:
type: object
required: [id, title, created, file]
properties:
id:
type: string
description: Unique identifier
title:
type: string
description: Display title
created:
type: string
format: date
file:
type: string
description: Path to markdown file
status:
type: string
enum: [active, archived]
# ... custom fields
Step 3: Initialize Records File
Create .claude/data/<entity>/records.yaml:
last_number: 0
records: []
Step 4: Create Document Template
Create templates/entities/<entity>/TEMPLATE.md:
---
id: {{id}}
title: {{title}}
created: {{date}}
status: active
# ... custom fields
---
# {{title}}
## Overview
[Description]
## Details
[Content]
Step 5: Create VitePress Data Loader
Create docs/.vitepress/data/<entity>.data.ts:
import { defineLoader } from 'vitepress'
import fs from 'fs'
import yaml from 'js-yaml'
interface Record {
id: string
title: string
created: string
file: string
status: string
// ... custom fields
}
export interface Data {
records: Record[]
lastNumber: number
}
declare const data: Data
export { data }
export default defineLoader({
watch: ['.claude/data/<entity>/*.yaml'],
async load(): Promise<Data> {
const recordsPath = '.claude/data/<entity>/records.yaml'
if (!fs.existsSync(recordsPath)) {
return { records: [], lastNumber: 0 }
}
const content = fs.readFileSync(recordsPath, 'utf-8')
const parsed = yaml.load(content) as any
return {
records: parsed.records || [],
lastNumber: parsed.last_number || 0
}
}
})
Step 6: Create Documentation Index
Create docs/<entity>/index.md:
---
title: <Entity> Index
---
# <Entity>
<script setup>
import { data } from '../.vitepress/data/<entity>.data'
import EntityTable from '../.vitepress/theme/components/EntityTable.vue'
const columns = [
{ key: 'id', label: 'ID', sortable: true },
{ key: 'title', label: 'Title', sortable: true },
{ key: 'created', label: 'Created', sortable: true },
{ key: 'status', label: 'Status', sortable: true }
]
</script>
<EntityTable :data="data.records" :columns="columns" />
Step 7: Update Configuration
Add entity to .claude/data/config.yaml:
entities:
<entity>:
enabled: true
singular: <singular>
id_format: sequential # or date-based, uuid
prefix: PREFIX # for sequential IDs
freshness:
stale_after_days: 30
fields:
- name: field_name
type: string
required: true
Step 8: Update Sidebar
Add to docs/.vitepress/config.ts sidebar:
{
text: '<Entity>',
collapsed: true,
items: [
{ text: 'Overview', link: '/<entity>/' }
]
}
Step 9: Confirm Creation
## Entity Created
**Name:** <entity>
**Singular:** <singular>
**ID Format:** sequential (PREFIX-XXXX)
**Status Tracking:** Yes
### Fields
| Field | Type | Required |
|-------|------|----------|
| title | string | Yes |
| description | string | No |
| priority | enum (low, medium, high) | No |
### Files Created
- `.claude/data/<entity>/schema.yaml`
- `.claude/data/<entity>/records.yaml`
- `docs/.vitepress/data/<entity>.data.ts`
- `docs/<entity>/index.md`
### Next Steps
1. Create records using the new entity type
2. Add entity-specific skills if needed
3. Customize the index page layout
Field Types
| Type | YAML Schema | Example |
|---|---|---|
| string | type: string |
"Hello world" |
| integer | type: integer |
42 |
| number | type: number |
3.14 |
| boolean | type: boolean |
true/false |
| date | type: string, format: date |
2026-01-15 |
| datetime | type: string, format: date-time |
Установить secondbrain-entity в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл secondbrain-entity?
This skill should be used when the user asks to "add entity", "create custom entity", "new entity type", "define entity", or mentions wanting to add a new trackable data type to their secondbrain project beyond the predefined ADR, Note, Task, and Discussion types.
Как установить скилл secondbrain-entity?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл secondbrain-entity запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic