一键导入
quantum-tunnel-claudes
Pull and merge Claude skills, learnings, and guidelines from a configured sync source into the current repo.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Pull and merge Claude skills, learnings, and guidelines from a configured sync source into the current repo.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Capture session learnings and save to skills, guidelines, or reference docs under ~/.claude/.
Orchestrate parallel claude -p sessions — bootstrap, launch, monitor, and converge. Works with any skill that produces manifest.json, item directories, and a runner script.
Create a request (pull request or merge request) or update an existing one following project conventions.
Resolve merge or rebase conflicts between branches.
Assess open PRs with unaddressed review comments and generate a parallel addressing script — produces manifest.json and let-it-rip.sh for address-request-comments execution.
Assess open work items and generate a parallel execution script — produces manifest.json and let-it-rip.sh for implement/clarify execution.
| name | quantum-tunnel-claudes |
| description | Pull and merge Claude skills, learnings, and guidelines from a configured sync source into the current repo. |
| disable-model-invocation | true |
Pull content from a configured sync source into the current repo. Analyzes incoming changes for relevance and redundancy before offering them, and does content-aware merging for diverged files.
/quantum-tunnel-claudes - Pull and merge from sync source/quantum-tunnel-claudes diff - Preview only (no changes applied)The sync source is configured in the current repo's CLAUDE.md via a sync-source: field:
sync-source: ~/WORKSPACE/mahoy-claude-stuff
The skill reads this on startup. If missing, it errors with instructions to add it.
SYNC_DIRS=(
".claude/commands/"
".claude/guidelines/"
".claude/learnings/"
)
EXCLUDES=(
"settings.json"
"settings.local.json"
"README.md"
"lab/"
"personas/"
"worktrees/"
)
~/.claude/skill-references/corpus-cross-reference.md — Read in step 3 for corpus loading and cross-referencing procedure~/.claude/commands/learnings/curate/classification-model.md — Read in step 3 for classifying incoming content~/.claude/learnings/cross-repo-sync.md — Read before step 1 for operational gotchas (path-mismatch gaps, PR→MR triage, grep verification, content-aware merge pitfalls)| Opportunity | When | How |
|---|---|---|
| Inventory | Always | Single inventory.sh call handles inventory, classification, git history, and source-unique diffs |
| Targeted reads | Analysis phase | Read specific target files for cross-reference in parallel |
| Apply merges | After approval | Write to independent files as parallel tool calls |
git rev-parse --show-toplevel to find the current repo root → TARGET<TARGET>/CLAUDE.md and parse the sync-source: value → SOURCE
~ to the user's home directorySOURCE exists and contains at least one of the SYNC_DIRSsync-source: is not found, error:
No sync source configured. Add this to your CLAUDE.md:
sync-source: /path/to/source/repo
Run the inventory script to get the full picture in one pass — file bucketing, classification, git history checks, and source-unique diffs:
bash ~/.claude/commands/quantum-tunnel-claudes/inventory.sh "<SOURCE>" "<TARGET>"
Why ~/.claude/ not <TARGET>: The skill is installed globally. Permission allowlists are configured for ~/.claude/commands/**, so using the global path gets prompt-free execution. Using <TARGET> would require per-project permission entries.
The script outputs structured sections that feed directly into step 2:
=== ONLY IN SOURCE === / === ONLY IN TARGET === — file lists=== COMMON FILES CLASSIFICATION === — per-file status lines (SUPERSET:source|..., BOTH_UNIQUE|..., etc.) plus summary counts=== GIT HISTORY CHECK === — PREVIOUSLY_REMOVED / GENUINELY_NEW for source-only files=== SOURCE-UNIQUE DIFFS === — the actual diff content for candidates (up to 30 lines each)Classification results:
| Status | Meaning | Next step |
|---|---|---|
| Identical | Same content — skip | Count for summary |
| Only in source | Candidate to pull — needs analysis (step 3) | Analyze |
| Only in target | Local content — skip | Count for summary |
| SUPERSET:source | Source has everything target has + more — overwrite candidate | Analyze (step 3) |
| SUPERSET:target | Target is already ahead — nothing to pull | Skip, count for summary |
| BOTH_UNIQUE | Both have unique content — merge candidate | Analyze (step 3) |
Only these need analysis in step 3: "only in source", "SUPERSET:source", and "BOTH_UNIQUE" files. Skip everything else.
This step evaluates the candidates identified in step 1. Read classification-model.md for the full classification criteria.
The inventory script (step 1) already provides git history checks and source-unique diffs. Parse its output:
PREVIOUSLY_REMOVED: <file> → was intentionally curated out of targetGENUINELY_NEW: <file> → never existed in target, candidate to pullScale the analysis to the number of candidates. Don't load the entire corpus for 2-3 candidates — use targeted checks instead.
For ≤5 candidates (typical):
grep searches in the target repo to check coverageFor >5 candidates:
~/.claude/skill-references/corpus-cross-reference.md and follow its full corpus loading procedureFor each candidate, determine:
| Assessment | How to verify |
|---|---|
| Already covered | grep for key terms/concepts in target files — if found, read that file and confirm full coverage |
| Partially covered | Related content exists in target but incoming adds new detail |
| Not covered | No matches found in target — genuinely new |
| Outdated | Incoming references patterns/tools that target has moved past (e.g., target genericized a Python-specific version) |
Watch for genericization: If the target has a stack-agnostic version of what the source has as stack-specific, the target version is better — mark source as redundant.
Watch for structural gaps: A term appearing in the target ecosystem doesn't mean the same file covers it. If the source adds a section to file X, check whether file X in the target has that section — not just whether some other file mentions the concept. Producer/consumer contracts (e.g., a planner skill producing a section that an executor skill consumes) are especially easy to miss with grep-only checks.
| Recommendation | Criteria | Default action |
|---|---|---|
| Pull | New content, not covered in target, passes relevance check | Include in selection |
| Merge | Diverged file where source has valuable unique sections | Include in selection |
| Skip (previously removed) | File has git history in target — was intentionally curated out | Exclude, mention in summary |
| Skip (redundant) | Content is already fully covered elsewhere in target | Exclude, mention in summary |
| Skip (outdated) | Content references stale patterns or is superseded | Exclude, mention in summary |
| Skip (target ahead) | Target is already a strict superset of source | Exclude, count in summary |
| Review | Uncertain — could be valuable or redundant, medium confidence | Include in selection with note |
ALWAYS use a markdown table — never prose paragraphs to list items.
## Sync Plan: pulling from <SOURCE> into <TARGET>
### Files to pull: N
| # | File | Status | Action | Assessment | Detail |
|---|------|--------|--------|------------|--------|
| 1 | learnings/skill-design.md | Diverged | Merge | Pull — 4 new sections not in target | source +4, target +82 |
| 2 | commands/learnings/curate/SKILL.md | Diverged | Merge | Review — source has minor edits, unclear value | source +15, target +149 |
| 3 | learnings/new-topic.md | New | Copy in | Pull — genuinely new, not covered | 2KB, new patterns |
### Skipped: M files
| File | Reason |
|------|--------|
| learnings/observability-workflow.md | Previously removed (curated out in commit abc123) |
| learnings/old-patterns.md | Redundant — covered by skill-design.md |
K files identical. J files local-only. P files where target is already ahead.
Action column values:
Copy in — file only exists in source, copy to targetMerge — both versions have unique content, produce merged version for targetOverwrite — source is a strict superset of target, replace target's versionAssessment column: the recommendation from step 2 with a brief rationale.
Use AskUserQuestion with multi-select to let the operator choose which items to pull.
Include the assessment and detail in each option's description field.
Do NOT proceed until the operator selects. If no items selected, inform the operator and exit.
If $ARGUMENTS is "diff", display both tables and exit without prompting.
Verify agent write permissions before launching. Before spawning any background merge agents, grep <TARGET>/.claude/settings.local.json (or the project's settings file) for Write(.claude/**) and Edit(.claude/**) allow patterns. Background agents can't prompt for permissions — missing patterns cause silent failures where the agent completes analysis but can't write results. If patterns are missing, either add them (with operator confirmation) or fall back to coordinator-managed merges (agents analyze, coordinator applies edits).
Route by divergence size. For diverged items with >15 source-unique lines, use background agents for parallel merges. For ≤15 source-unique lines, triage directly from the inventory diff — many will be skips (terminology-only, target already evolved past source). This mirrors the analysis-phase threshold in step 2b.
Batch agents for large sets. When launching >6 merge agents, batch in waves of 5-6 and wait for each wave's completions before launching the next. This keeps stragglers within the context window. If all must launch at once, record agent IDs in a tracking table so continuation sessions can check status via TaskOutput.
For each selected item:
Copy items (only in source):
Overwrite items (source is a strict superset):
Diverged items (both have unique content) — this is the core value of this skill:
⚡ Parallel: Writes to independent files can run as parallel tool calls.
Read back at least one file from each execution method used (copy, overwrite, agent-merge, direct-merge) to confirm content was saved correctly.
## Sync Complete: <SOURCE> → <TARGET>
**Actions taken:**
- learnings/skill-design.md — merged (4 new sections from source, preserved 6 local sections)
- commands/learnings/curate/SKILL.md — merged (preserved unique edits from both)
**Skipped:**
- learnings/observability-workflow.md — previously removed
- learnings/old-patterns.md — redundant
Pulled N items. K identical. J local-only. P target-ahead. M skipped (analyzed).
For prompt-free execution, ensure allow patterns in ~/.claude/settings.local.json cover both the source and target paths for Read/Write/Edit on the SYNC_DIRS. For example:
"Read(~/WORKSPACE/dotfiles/.claude/**)",
"Read(~/WORKSPACE/mahoy-claude-stuff/.claude/**)",
"Write(.claude/**)",
"Edit(.claude/**)"
AskUserQuestion before applying changes/learnings:curate after sync to prune or reorganize the pulled content