Detect when user is working in an un-indexed project and proactively suggest enabling semantic memory. Activates on first code question in new projects to guide users through initial setup.
Detects when you ask a code question in an un-indexed project and proactively suggests enabling semantic memory. Activates on your first code question in new projects to guide you through quick setup.
/plugin marketplace add squirrelsoft-dev/infinite-memory/plugin install infinite-memory@squirrelsoft-dev-toolsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Proactively suggest indexing when user would benefit from semantic memory.
Activate when ALL of these conditions are met:
Check if indexed:
# Calculate project hash
PROJECT_PATH=$(pwd)
PROJECT_HASH=$(echo -n "$PROJECT_PATH" | sha256sum | cut -c1-16)
# Check for database
if [ ! -d ~/.pixeltable/$PROJECT_HASH ]; then
echo "Not indexed"
fi
Check project size:
# Count supported files
FILE_COUNT=$(find . -type f \( \
-name "*.py" -o \
-name "*.js" -o \
-name "*.ts" -o \
-name "*.md" -o \
-name "*.txt" -o \
-name "*.json" -o \
-name "*.yaml" -o \
-name "*.yml" \
) | wc -l)
Don't prompt if already asked:
# Create session marker directory
SESSION_DIR=~/.claude/memory/sessions
mkdir -p $SESSION_DIR
# Check if already prompted
SESSION_FILE=$SESSION_DIR/${PROJECT_HASH}-prompted
if [ -f "$SESSION_FILE" ]; then
# Already prompted this session, skip
exit 0
fi
Large Project (>50 files):
š” I notice this project isn't indexed for semantic search yet.
With {FILE_COUNT} files, semantic memory could help me:
- Find relevant code instantly when you ask questions
- Remember architectural patterns across sessions
- Search documentation and comments semantically
Indexing typically takes ~30 seconds. Would you like me to index this project?
[Index Now] [Ask Me Later] [Learn More]
Medium Project (10-50 files):
This project isn't indexed yet. I can enable semantic search (takes ~5-10 seconds)
to help answer code questions faster.
Enable memory for this project?
[Yes, index it] [No thanks]
Small Project (<10 files):
Don't prompt - project is small enough that traditional search works fine. Semantic search overhead not worth it for tiny projects.
If User Accepts:
/index-project command automaticallyIf User Declines:
/index-project anytime to enable semantic search"If User Clicks "Learn More":
Show brief explanation:
Semantic Memory for Code
Infinite Memory indexes your code with vector embeddings, enabling:
⨠Natural language search
"How does authentication work?" ā Finds auth-related files
šÆ Concept-based finding
Finds code by what it does, not just keywords
ā” Fast and local
1,500+ files/sec, all data stays on your machine
š Performance
- Indexing: ~0.3s for 500 files
- Search: <200ms latency
- Storage: ~2KB per file
Try it?
[Index Now] [Maybe Later]
# Mark as prompted for this session
touch $SESSION_FILE
# Optional: Clean up old markers (>24 hours)
find $SESSION_DIR -name "*-prompted" -mtime +1 -delete
DO NOT prompt for:
ā Very small projects (<10 files)
ā System directories:
ā User explicitly said "no" this session:
ā Non-code questions:
Marker File Format:
Location: ~/.claude/memory/sessions/{PROJECT_HASH}-prompted
Content: Empty (existence is the flag)
Lifetime: Cleaned up after 24 hours or on manual cleanup
Why session-based?
Handoff Pattern:
This creates a smooth flow:
User: "How does auth work?"
ā
Setup: "Project not indexed. Index now?"
ā
User: [Index Now]
ā
Indexing... ā
Complete!
ā
Semantic Search: "Authentication uses JWT tokens:
1. Login handler (auth.py, 92% match)..."
User: "Where is the database configured?"
Use when working with Payload CMS projects (payload.config.ts, collections, fields, hooks, access control, Payload API). Use when debugging validation errors, security issues, relationship queries, transactions, or hook behavior.