
Security News
Socket Releases Free Certified Patches for Nuxt Security Vulnerabilities
Socket releases free Certified Patches for high-severity Nuxt vulnerabilities, including server-side remote code execution through server island props.
@tyronerossjr/claude-code-debugger
Advanced tools
Debugging memory system for Claude Code - never solve the same bug twice
Never solve the same bug twice
A debugging memory system for Claude Code that automatically learns from past incidents and suggests solutions based on similar problems you've already solved.
.claude/audit files when manual storage is missed.claude/memory/~/.claude-memory/ for cross-project learningFirst, configure npm to use GitHub Packages for this scope. Create or edit ~/.npmrc:
@YOUR_GITHUB_USERNAME:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=YOUR_GITHUB_TOKEN
Then install:
# Project-specific installation
npm install @YOUR_GITHUB_USERNAME/claude-memory
# Global installation for CLI access anywhere
npm install -g @YOUR_GITHUB_USERNAME/claude-memory
read:packages scope~/.npmrc as shown above# Check current configuration
claude-memory config
# Show memory statistics
claude-memory status
# Search memory before debugging
claude-memory debug "Search filters not working"
# Search for specific incidents
claude-memory search "react hooks"
# Suggest patterns to extract
claude-memory patterns
# Extract and store patterns
claude-memory patterns --extract
# Mine audit trail for missed incidents
claude-memory mine --days 30
# Store mined incidents
claude-memory mine --days 30 --store
import {
debugWithMemory,
storeDebugIncident,
checkMemory,
extractPatterns,
mineAuditTrail
} from '@YOUR_GITHUB_USERNAME/claude-memory';
// Before debugging: Check for similar incidents
const result = await debugWithMemory("Search filters not working", {
min_confidence: 0.7
});
console.log('Session ID:', result.context_used.session_id);
// After fixing: Store the incident
await storeDebugIncident(sessionId, {
root_cause: {
description: "Missing useMemo dependency caused infinite re-renders",
category: "react-hooks",
confidence: 0.9
},
fix: {
approach: "Added missing dependency to useMemo array",
changes: ["components/SearchBar.tsx"],
time_to_fix: 15
},
verification: {
status: 'verified',
regression_tests_passed: true,
user_journey_tested: true,
success_criteria_met: true
}
});
// Search memory directly
const memory = await checkMemory("infinite render loop", {
similarity_threshold: 0.5,
max_results: 5
});
// Extract patterns from incidents
const patterns = await extractPatterns({
min_incidents: 3,
min_similarity: 0.7,
auto_store: true
});
// Mine audit trail
const incidents = await mineAuditTrail({
days_back: 30,
auto_store: true,
min_confidence: 0.7
});
Local Mode (default)
.claude/memory/ directoryShared Mode
~/.claude-memory/ globally# Use shared mode for this command
claude-memory status --shared
# Set shared mode via environment variable
export CLAUDE_MEMORY_MODE=shared
claude-memory status
# In code
import { getConfig } from '@YOUR_GITHUB_USERNAME/claude-memory';
const config = getConfig({
storageMode: 'shared'
});
# Storage mode: 'local' or 'shared'
CLAUDE_MEMORY_MODE=shared
# Custom memory path (overrides mode defaults)
CLAUDE_MEMORY_PATH=/custom/path/to/memory
Each incident captures:
When 3+ similar incidents are detected:
Pattern-First Approach:
Recover incidents from .claude/audit/ files:
debug <symptom>Check memory for similar incidents before debugging.
claude-memory debug "Search filters not working"
claude-memory debug "API timeout" --threshold 0.6
claude-memory debug "Infinite render loop" --shared
Options:
--shared: Use shared memory mode--threshold <number>: Similarity threshold (0-1, default: 0.5)statusShow memory system statistics.
claude-memory status
claude-memory status --shared
configDisplay current configuration.
claude-memory config
search <query>Search memory for incidents matching a query.
claude-memory search "react hooks"
claude-memory search "API error" --threshold 0.6
Options:
--shared: Use shared memory mode--threshold <number>: Similarity threshold (default: 0.5)patternsSuggest or extract patterns from incidents.
# Preview patterns that could be extracted
claude-memory patterns
# Extract and store patterns
claude-memory patterns --extract
Options:
--extract: Extract and store patterns (vs just preview)--shared: Use shared memory modemineMine audit trail for incidents not manually stored.
# Preview what would be mined
claude-memory mine --days 30
# Mine and store incidents
claude-memory mine --days 30 --store
Options:
--days <number>: Days to look back (default: 30)--store: Store mined incidents (vs just preview)--shared: Use shared memory modedebugWithMemory(symptom, options)Check memory before debugging and prepare for storage.
const result = await debugWithMemory("symptom description", {
agent: 'coder',
auto_store: true,
min_confidence: 0.7
});
Returns: DebugResult with session ID and memory context
storeDebugIncident(sessionId, incidentData)Store incident after debugging is complete.
await storeDebugIncident(sessionId, {
root_cause: { ... },
fix: { ... },
verification: { ... }
});
checkMemory(symptom, config)Search memory for similar incidents.
const memory = await checkMemory("symptom", {
similarity_threshold: 0.5,
max_results: 5,
temporal_preference: 90,
memoryConfig: { storageMode: 'shared' }
});
Returns: RetrievalResult with patterns and/or incidents
extractPatterns(options)Extract reusable patterns from incidents.
const patterns = await extractPatterns({
min_incidents: 3,
min_similarity: 0.7,
auto_store: true,
config: { storageMode: 'shared' }
});
mineAuditTrail(options)Recover incidents from audit trail.
const incidents = await mineAuditTrail({
days_back: 30,
auto_store: true,
min_confidence: 0.7,
config: { storageMode: 'shared' }
});
import {
storeIncident,
loadIncident,
loadAllIncidents,
storePattern,
loadPattern,
loadAllPatterns,
getMemoryStats
} from '@YOUR_GITHUB_USERNAME/claude-memory';
import { getConfig, getMemoryPaths } from '@YOUR_GITHUB_USERNAME/claude-memory';
const config = getConfig({
storageMode: 'shared',
autoMine: false,
defaultSimilarityThreshold: 0.7
});
const paths = getMemoryPaths(config);
// paths.incidents, paths.patterns, paths.sessions
All TypeScript types are exported:
import type {
Incident,
Pattern,
RootCause,
Fix,
Verification,
QualityGates,
RetrievalResult,
MemoryConfig
} from '@YOUR_GITHUB_USERNAME/claude-memory';
your-project/
└── .claude/
└── memory/
├── incidents/ # Individual incident JSON files
├── patterns/ # Extracted pattern JSON files
└── sessions/ # Temporary debug session files
~/.claude-memory/
├── incidents/ # All incidents from all projects
├── patterns/ # All patterns from all projects
└── sessions/ # Temporary session files
Include in your agent prompts:
Before debugging, check memory:
- Run: `npx claude-memory debug "symptom description"`
- Review similar incidents and patterns
- Apply known solutions if confidence is high
After fixing:
- Store incident with: `npx claude-memory store`
- Or use programmatic API from TypeScript
Set up periodic audit mining:
# Weekly cron job to mine audit trail
0 0 * * 0 cd /path/to/project && npx claude-memory mine --days 7 --store
claude-memory debug "symptom" --threshold 0.7
Include all fields for maximum reuse:
# Weekly pattern extraction
claude-memory patterns --extract
# Monthly audit mining
claude-memory mine --days 30 --store
export CLAUDE_MEMORY_MODE=shared
git clone https://github.com/YOUR_GITHUB_USERNAME/claude-memory.git
cd claude-memory
npm install
npm run build
npm test
npm run watch
# Update version in package.json
npm version patch|minor|major
# Build
npm run build
# Publish to GitHub Packages
npm publish
This package uses semantic versioning:
npm list @YOUR_GITHUB_USERNAME/claude-memoryclaude-memory status to see statistics.claude/memory/~/.claude-memory/ permissionsread:packages scope.npmrc configurationSee PUBLISHING-GUIDE.md for detailed instructions on:
Contributions welcome! Please:
MIT
Never solve the same bug twice. 🧠
FAQs
Debugging memory system for Claude Code - never solve the same bug twice
The npm package @tyronerossjr/claude-code-debugger receives a total of 0 weekly downloads. As such, @tyronerossjr/claude-code-debugger popularity was classified as not popular.
We found that @tyronerossjr/claude-code-debugger demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket releases free Certified Patches for high-severity Nuxt vulnerabilities, including server-side remote code execution through server island props.

Security News
An open letter signed by 50 companies, from NVIDIA and Microsoft to Mistral and Hugging Face, urges Washington not to restrict open weight AI.

Security News
/Research
A fake corepack.org site is impersonating the Node.js tool and delivers an infostealer and proxyware to developers who download it.