Skip to content

Commit 5fcbae3

Browse files
phernandezclaude
andcommitted
feat: Add /organize slash command for knowledge graph maintenance
User-invoked command to complement the knowledge-organize skill. Actions: - /organize health - Quick overview of KB status (default) - /organize orphans - Find notes with no relations - /organize duplicates - Find similar/overlapping notes - /organize relations [note] - Suggest connections for a note - /organize tags - Review and normalize tag consistency Always confirms before modifying notes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: phernandez <paul@basicmachines.co>
1 parent 68ee310 commit 5fcbae3

2 files changed

Lines changed: 108 additions & 1 deletion

File tree

PLUGIN.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,25 @@ Show recent activity in Basic Memory.
101101
/recent today specs
102102
```
103103

104+
### `/organize [action] [project]`
105+
106+
Organize and maintain your knowledge graph.
107+
108+
```
109+
/organize # Quick health check
110+
/organize orphans # Find unlinked notes
111+
/organize duplicates # Find similar notes
112+
/organize relations "Note" # Suggest links for a note
113+
/organize tags # Review tag consistency
114+
```
115+
116+
Actions:
117+
- `health` - Overview of knowledge base status (default)
118+
- `orphans` - Find notes with no relations
119+
- `duplicates` - Find overlapping notes
120+
- `relations` - Suggest connections
121+
- `tags` - Review tag consistency
122+
104123
---
105124

106125
## Skills
@@ -232,7 +251,8 @@ basic-memory/
232251
│ ├── remember.md # /remember command
233252
│ ├── continue.md # /continue command
234253
│ ├── context.md # /context command
235-
│ └── recent.md # /recent command
254+
│ ├── recent.md # /recent command
255+
│ └── organize.md # /organize command
236256
├── skills/
237257
│ ├── knowledge-capture/
238258
│ ├── continue-conversation/

commands/organize.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
---
2+
description: Organize and maintain your Basic Memory knowledge graph
3+
argument-hint: [health|orphans|duplicates|relations|tags] [project]
4+
allowed-tools: mcp__basic-memory__search_notes, mcp__basic-memory__read_note, mcp__basic-memory__list_directory, mcp__basic-memory__edit_note, mcp__basic-memory__write_note
5+
---
6+
7+
# Organize
8+
9+
Help organize, link, and maintain your Basic Memory knowledge graph.
10+
11+
## Arguments
12+
13+
- `$1` - Action (optional): `health`, `orphans`, `duplicates`, `relations`, `tags` (default: `health`)
14+
- `$2` - Project (optional): defaults to "main"
15+
16+
## Actions
17+
18+
### `/organize` or `/organize health`
19+
20+
Run a quick health check:
21+
1. Count total notes
22+
2. Identify orphan notes (no relations)
23+
3. Check for potential duplicates
24+
4. Show folder distribution
25+
5. Report any issues found
26+
27+
### `/organize orphans`
28+
29+
Find and address orphan notes:
30+
1. Search for notes with empty Relations sections
31+
2. List orphans found
32+
3. For each orphan, suggest potential relations based on content
33+
4. Offer to add relations or create index notes
34+
35+
### `/organize duplicates`
36+
37+
Find potentially duplicate notes:
38+
1. Search for notes with similar titles
39+
2. Compare content for overlap
40+
3. Suggest: merge, differentiate, or link with `supersedes`
41+
42+
### `/organize relations [note-title]`
43+
44+
Suggest relations for a specific note (or recent notes if not specified):
45+
1. Read the target note
46+
2. Search for related content
47+
3. Suggest relation types:
48+
- `relates-to` - General connection
49+
- `extends` - Builds upon
50+
- `implements` - Realizes concept
51+
- `depends-on` - Requires understanding of
52+
4. Offer to add selected relations
53+
54+
### `/organize tags`
55+
56+
Review tag consistency:
57+
1. Gather all tags across notes
58+
2. Find similar/duplicate tags (e.g., `arch` vs `architecture`)
59+
3. Identify over-used or under-used tags
60+
4. Suggest normalization
61+
62+
## Your Task
63+
64+
Execute: `/organize $ARGUMENTS`
65+
66+
Based on the action requested:
67+
68+
1. **Gather data** using search and list tools
69+
2. **Analyze** for the specific issue (orphans, duplicates, etc.)
70+
3. **Present findings** clearly with counts and examples
71+
4. **Offer solutions** - ask before making changes
72+
5. **Apply fixes** using edit_note or write_note when user approves
73+
74+
Always confirm before modifying notes. Show what will change and get approval.
75+
76+
## Examples
77+
78+
```
79+
/organize # Quick health check
80+
/organize health # Same as above
81+
/organize orphans # Find unlinked notes
82+
/organize duplicates # Find similar notes
83+
/organize relations # Suggest links for recent notes
84+
/organize relations "My Note" # Suggest links for specific note
85+
/organize tags # Review tag consistency
86+
/organize health specs # Health check on specs project
87+
```

0 commit comments

Comments
 (0)