project-consolidation

project-consolidation is a skill for Claude Code from linxule/memex-plugin. It costs 133 tokens per session (1,542 once invoked), scanned C, original, MIT.

A safe procedure for merging duplicate or incorrectly named project folders in a Memex vault. A Memex vault is a folder-based store of project observations and their searchable indexes.

In plain words
What is it for?
Use it to audit drifted folders, confirm that one folder is a duplicate or subset, and reassign its contents to the canonical project folder safely.
Why use it?
It prevents two different projects from being merged by mistake and preserves stored observations and their embeddings, which are data representations used for search.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths.

Part of the memex plugin — 5 skills, 3 commands, 5 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/linxule/memex-plugin/project-consolidation
Any agent
npx skills add linxule/memex-plugin --skill project-consolidation
Clone the repo
git clone --depth 1 https://github.com/linxule/memex-plugin

Made for: Claude Code.

Or install memex, the plugin that ships this one along with the rest of its 5 skills, 3 commands, 5 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for project-consolidation

README.md
[![agentmods](https://agentmods.dev/badge/skills/linxule/memex-plugin/project-consolidation.svg)](https://agentmods.dev/skills/linxule/memex-plugin/project-consolidation)
Your own site
<a href="https://agentmods.dev/skills/linxule/memex-plugin/project-consolidation"><img src="https://agentmods.dev/badge/skills/linxule/memex-plugin/project-consolidation.svg" alt="Measured on agentmods" height="20"></a>
Per session 133 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,542 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00133 $0.01542
Opus 5 $0.00067 $0.00771
Sonnet 5 $0.00027 $0.00308
Haiku 4.5 $0.00013 $0.00154

Measured 6d ago against content hash 4309f1683599, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade C, and why

project-consolidation scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf projects/<from>
skills/project-consolidation/SKILL.md · 108 lines

How it starts

The opening of the file, as written. The whole thing — 108 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Project-Folder Consolidation

Drifted project folders happen when session→project detection produced a non-canonical name: a cwd-path fragment (Apps-arena instead of arena), or a project split across folders (content under both personal-website and linxule_com). The detection bugs that caused this were fixed in v0.15.5/v0.15.6 (detect_project via true session cwd + restored project_mappings), so no new drift forms — this skill cleans up existing debt.

The cardinal rule

Never run memex obs reassign on a folder until you have confirmed it is a duplicate or strict subset of the canonical target. A wrong merge collapses two distinct projects. And never consolidate via git mv + memex index rebuild — the incremental rebuild detects the old paths as deleted and cascade-deletes the observations and their embeddings. obs reassign is the only safe primitive (it UPDATEs doc_path in observations + chunks, preserving embeddings).

Step 1 — Audit

memex check --folders            # human report: high-confidence drift + review list
memex check --folders --json     # machine-readable, for planning
  • High-confidence drift = cwd-fragment-shaped names, or content ⊆ another folder. Safe to act on after confirming duplication.
  • Review (lower confidence) = name≠canonical / canonical collisions. The git remote or a memo's recorded cwd can legitimately differ from a deliberately-chosen folder name (e.g. a real project whose folder ≠ its repo name). Verify manually; do not auto-act.

Step 2 — Confirm duplication (before touching anything)

Pick the canonical target — prefer the folder that already holds the most observations and matches detect_project / project_mappings. Then prove the source is redundant:

# Memo/transcript filename overlap (a strict subset is a clean duplicate):
comm -23 <(ls projects/<from>/memos/ | sort) <(ls projects/<to>/memos/ | sort)        # files UNIQUE to <from>
comm -23 <(ls projects/<from>/transcripts/ | sed 's/\.\(md\|jsonl\)$//' | sort -u) \
         <(ls projects/<to>/transcripts/ | sed 's/\.\(md\|jsonl\)$//' | sort -u)
# If a memo exists in both, diff it — often only the `project:` frontmatter line differs:
diff projects/<from>/memos/<file>.md projects/<to>/memos/<file>.md

Read the full file on GitHub · 108 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 108 lines · 133 tokens per session scan C 4309f1683599

Subscribe to this mod's changes

project-consolidation is a skill published in the GitHub repository linxule/memex-plugin (7 stars, last pushed 8d ago), licensed MIT. It adds 133 tokens to every session and 1,542 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories