一键导入
manage-concepts-db
Manage the concepts database - verify, add, update, and check for duplicates before modifying concepts. MANDATORY for all concept operations.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Manage the concepts database - verify, add, update, and check for duplicates before modifying concepts. MANDATORY for all concept operations.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Automatically discover and add missing concepts on autopilot. Finds broken relatedConcepts references, explores MoCs, and mines the local notes repository. Re-enters continuously until no new concepts found.
Extract content from the public notes website at notes.dsebastien.net. Use when fetching MoCs, notes, or any content from the Obsidian Publish site.
Add Wikipedia reference links to concepts that don't have one. Searches for relevant Wikipedia articles and adds them to the references array.
基于 SOC 职业分类
| name | manage-concepts-db |
| description | Manage the concepts database - verify, add, update, and check for duplicates before modifying concepts. MANDATORY for all concept operations. |
| allowed-tools | Bash, Read, Edit, Write, Grep, Glob, Task |
MANDATORY for ALL concept operations: add, update, verify, merge duplicates, sync.
bun run fix-concepts AFTER adding/updating concepts| Script | Command | When |
|---|---|---|
| verify-concept.ts | bun scripts/verify-concept.ts --name "Name" --summary "Summary" | BEFORE adding |
| fix-concepts | bun run fix-concepts | AFTER adding/updating concepts |
| sync-concepts-db.ts | bun scripts/sync-concepts-db.ts | AFTER any change |
| find-duplicates.ts | bun scripts/find-duplicates.ts --threshold 80 | Periodic cleanup |
| merge-duplicates.ts | bun scripts/merge-duplicates.ts --source ID --target ID --strategy merge-fields | Merge confirmed duplicates |
| init-concepts-db.ts | bun scripts/init-concepts-db.ts | Database rebuild |
grep -ri "CONCEPT_NAME" src/data/concepts/ 2>/dev/null | head -5
If matches → stop, verify manually.
bun scripts/verify-concept.ts --name "Concept Name" --summary "Brief summary"
find $OBSIDIAN_VAULT_LOCATION/30\ Areas -type f -name "*KEYWORD*.md" 2>/dev/null | grep -v ".smart-env" | head -5
Convert path to URL: spaces→+, remove .md, prefix https://notes.dsebastien.net/
for f in $(grep -ril "KEYWORD" "$OBSIDIAN_VAULT_LOCATION/30 Areas/33 Permanent notes/33.04 Creations/Articles/"*.md 2>/dev/null | grep -v "(Draft)"); do
grep -m1 "^title:" "$f" | sed 's/title: //'
grep -m1 "^url:" "$f" | sed 's/url: //'
done
{
"id": "concept-id",
"name": "Concept Name",
"summary": "One-sentence summary",
"explanation": "Detailed explanation.",
"tags": ["tag1", "tag2"],
"category": "Category",
"icon": "FaLightbulb",
"featured": false,
"aliases": [],
"relatedConcepts": [],
"relatedNotes": [],
"references": [{"title": "Name - Wikipedia", "url": "https://en.wikipedia.org/wiki/...", "type": "website"}],
"articles": [],
"books": [],
"tutorials": [],
"datePublished": "YYYY-MM-DD",
"dateModified": "YYYY-MM-DD"
}
bun run fix-concepts
bun scripts/sync-concepts-db.ts
For 10+ concepts, use sub-agents:
Task tool (subagent_type="general-purpose"):
"Create concept JSON for [NAME]:
1. Read source note at [PATH] if available
2. Generate explanation if source thin
3. Search related notes in $OBSIDIAN_VAULT_LOCATION/30 Areas/ (32.02 or 33.02 Content)
4. Search related articles in .../33.04 Creations/Articles/ (skip Draft)
5. Create JSON at src/data/concepts/[id].json
6. Add Wikipedia reference if available"
After all complete:
bun run fix-concepts
bun scripts/sync-concepts-db.ts
bun run build 2>&1 | tail -5
# Review both
cat src/data/concepts/{source-id}.json
cat src/data/concepts/{target-id}.json
# Merge (combines tags, aliases, references; deletes source)
bun scripts/merge-duplicates.ts --source {source-id} --target {target-id} --strategy merge-fields
bun run fix-concepts
bun scripts/sync-concepts-db.ts
File: $OBSIDIAN_VAULT_LOCATION/30 Areas/33 Permanent notes/33.02 Content/Note Name.md
URL: https://notes.dsebastien.net/30+Areas/33+Permanent+notes/33.02+Content/Note+Name
Rules: spaces→+, remove .md, path starts 30+Areas/...
| Concept Type | Category |
|---|---|
| Cognitive bias | Cognitive Biases |
| Psychological | Psychology & Mental Models |
| Philosophical | Philosophy & Wisdom |
| Well-being | Well-Being & Happiness |
| Decision-making | Decision Science |
| Business | Business & Economics |
| Leadership | Leadership & Management |
| Learning | Learning & Education |
| Writing | Writing & Content Creation |
| Focus/attention | Attention & Focus |
| Communication | Communication |
| Thinking | Thinking |
| Software | Software Development |
| Productivity | Productivity |
| AI | AI |
| PKM method | Methods |
| Complete system | Systems |
| Principle | Principles |
| Technique | Techniques |
| Framework | Frameworks |
| Journaling | Journaling |
| Other | Concepts (minimize) |
strategies, businesses, decisionsbrainstorming), uncountable (knowledge), fields (psychology)well-being, systems-thinkingCheck existing:
grep -h '"tags"' src/data/concepts/*.json | tr ',' '\n' | tr -d '[]"' | sed 's/^[[:space:]]*//' | sort -u
# Find by tag
grep -l '"TAGNAME"' src/data/concepts/*.json | xargs -n1 basename | sed 's/.json$//'
# Find by category
grep -l '"category": "CATEGORY"' src/data/concepts/*.json | xargs -n1 basename | sed 's/.json$//'
# Find by keyword
grep -l 'KEYWORD' src/data/concepts/*.json | xargs -n1 basename | sed 's/.json$//'
Add cross-references in both directions via relatedConcepts array.
# Count
ls src/data/concepts/*.json | wc -l
# IDs
ls src/data/concepts/*.json | xargs -n1 basename | sed 's/.json$//' | sort
# Names
grep -h '"name"' src/data/concepts/*.json | sed 's/.*"name": "//;s/".*//' | sort
# Tags
grep -h '"tags"' src/data/concepts/*.json | tr ',' '\n' | tr -d '[]"' | sed 's/^[[:space:]]*//' | sort -u
# Categories
grep -h '"category"' src/data/concepts/*.json | sed 's/.*"category": "//;s/".*//' | sort -u
echo "Parkinson's Law" | tr '[:upper:]' '[:lower:]' | sed "s/'//g" | sed 's/ /-/g' | sed 's/[^a-z0-9-]//g'
# → parkinsons-law
# Stats
sqlite3 concepts.db "SELECT (SELECT COUNT(*) FROM concepts) as concepts, (SELECT COUNT(*) FROM concept_aliases) as aliases, (SELECT COUNT(*) FROM concept_tags) as tags;"
# Rebuild
rm concepts.db && bun scripts/init-concepts-db.ts
When source note is thin (1-2 sentences):
relatedNotesSkip concept only if: