stark-ai-de/agent-skills / skills/claude-operations/claude-memory-curator
claude-memory-curator
VerifiedAudit and safely curate Claude Code instructions, rules, auto memory, and memory settings. Use when reviewing stale or misplaced Claude Code context, not Claude app memory or API memory stores.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 13.8 KB |
| assets/cleanup-plan-template.md | markdown | 2.0 KB |
| assets/review-report-template.md | markdown | 2.3 KB |
| references/classification-rubric.md | markdown | 5.6 KB |
| references/conflict-resolution.md | markdown | 1.9 KB |
| references/context-surface-anatomy.md | markdown | 4.2 KB |
| references/example-review-report.md | markdown | 2.3 KB |
| references/plan-lifecycle.md | markdown | 1.8 KB |
| references/review-procedure.md | markdown | 2.8 KB |
| references/safe-editing-procedure.md | markdown | 5.5 KB |
| references/settings-and-hooks.md | markdown | 1.6 KB |
| scripts/backup-claude-memory.mjs | script | 42.1 KB |
| scripts/inventory-claude-memory.mjs | script | 12.6 KB |
| scripts/memory-source-discovery.mjs | script | 2.2 KB |
| scripts/scan-claude-memory-risks.mjs | script | 11.5 KB |
scripts/memory-source-discovery.mjs
View on GitHubimport fs from "node:fs";
import path from "node:path";
const ignoredDirectories = new Set([
".git",
".hg",
".svn",
".next",
".turbo",
"dist",
"build",
"coverage",
"node_modules",
]);
export function isDirectory(value) {
try {
return fs.statSync(value).isDirectory();
} catch {
return false;
}
}
export function isFile(value) {
try {
return fs.statSync(value).isFile();
} catch {
return false;
}
}
export function walk(dir, predicate = () => true) {
const files = [];
function visit(current) {
let entries;
try {
entries = fs.readdirSync(current, { withFileTypes: true });
} catch {
return;
}
for (const entry of entries) {
const fullPath = path.join(current, entry.name);
if (entry.isDirectory()) {
if (!ignoredDirectories.has(entry.name)) visit(fullPath);
} else if (entry.isFile() && predicate(fullPath)) {
files.push(fullPath);
}
}
}
if (isDirectory(dir)) visit(dir);
return files.sort();
}
export function collectAncestorAgentFiles(repo) {
const files = [];
let directory = path.dirname(path.resolve(repo));
while (true) {
const candidate = path.join(directory, "AGENTS.md");
if (isFile(candidate)) files.push(candidate);
const parent = path.dirname(directory);
if (parent === directory) break;
directory = parent;
}
return files;
}
export function collectProjectFiles(repo) {
return [
...collectAncestorAgentFiles(repo),
path.join(repo, "CLAUDE.md"),
path.join(repo, ".claude", "CLAUDE.md"),
path.join(repo, "CLAUDE.local.md"),
path.join(repo, ".claude", "settings.json"),
path.join(repo, ".claude", "settings.local.json"),
...walk(repo, (file) => {
const name = path.basename(file);
const relative = path.relative(repo, file).split(path.sep);
const isProjectRule = relative.some(
(part, index) => part === ".claude" && relative[index + 1] === "rules",
);
return (
(isProjectRule && file.endsWith(".md")) ||
name === "CLAUDE.md" ||
name === "CLAUDE.local.md" ||
(name === "AGENTS.md" && !path.relative(repo, file).split(path.sep).includes(".agents"))
);
}),
];
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |