/claude-resources:ref [-p|--pull] [-u|--update] <slug|path> [slug2 ...] — repo slug (e.g. zmod) or full pathfrom claude-resources
References another project's code or setup without leaking sensitive info. Resolves repo slugs or paths, with optional pull to refresh.
Ships in claude-resources. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
DO NOT auto-invoke this skill. Referencing another project exposes its contents to the current session, which may leak private/client information across project boundaries. Always ask for user confirmation before proceeding.
Use this command when you need to reference, copy, or learn from another project's setup, structure, or patterns.
Arguments can be slugs (short names) or full paths. Multiple slugs/paths can be provided, space-separated.
Slug resolution rule:
For each slug argument (any argument that is NOT an absolute path starting with /):
$HOME/repos/*/{slug} (one level of category directories)Examples:
/ref zmod → resolves $HOME/repos/*/zmod → e.g. $HOME/repos/zp/zmod/ref zmod dotfiles → resolves both slugs independently/ref $HOME/repos/zp/zmod → uses full path directly# Resolution command for each slug
ls -d $HOME/repos/*/{slug} 2>/dev/null
-p / --pull)The referenced repo is a working checkout, not a pristine mirror. It may sit on a stale commit, or on someone's topic branch, or hold half-finished edits. Reading it in that state means referring to data that isn't the project's current truth — the exact failure this flag exists to prevent.
When -p or --pull is passed, run the freshness gate below for each resolved path,
before reading a single file from it. The gate composes with every other mode: with
-u it runs before /x-as-pr is invoked there.
Run every command with git -C <resolved-path> … — never cd into the referenced repo
for the gate.
git -C <path> rev-parse --abbrev-ref HEAD # current branch
git -C <path> symbolic-ref --quiet refs/remotes/origin/HEAD # default branch (origin/<default>)
If symbolic-ref fails, fall back in this order and stop at the first that answers:
git -C <path> remote show origin | sed -n 's/.*HEAD branch: //p'
gh repo view --json defaultBranchRef -q .defaultBranchRef.name # run with cwd = <path>
If none resolves, tell the user the default branch can't be determined and ask which
branch to treat as default. Do not assume main.
If current branch == default branch: go to Step 2.
If current branch != default branch: STOP and ask the user. Do not check out anything on your own — this is a checkout of a repo the user may be mid-work in.
The referenced repo
<slug>is not on its default branch<default>— it's on<current-branch>. Check out<default>there instead of<current-branch>?
git -C <path> checkout <default>, then go to Step 2.
If checkout fails (local changes would be overwritten), report the git error verbatim
and go to the Step 2 dirty-tree question instead of forcing anything.git -C <path> status --porcelain
git -C <path> diff --stat
git -C <path> diff --cached --stat
Clean tree → go to Step 3.
Dirty tree → classify what's there. Judge by what the files are, not by how many.
Benign — proceed to Step 3 without asking:
dist/, build/, .next/, out/, compiled CSS/JS)tmp/, __inbox/, .cache/, node_modules/ noise)package.json change.DS_Store, *.swp)Not benign — STOP and ask:
The referenced repo
<slug>has uncommitted changes that look like real work:<short file list + diffstat>. How should I handle this? I can (a) leave them and pull anyway if it fast-forwards, (b) skip the pull and refer to the repo as-is, or (c) cancel referring to this repo.
Act on the answer only. Never stash, checkout --, reset, or clean in the
referenced repo — those discard the user's work in a repo they didn't ask you to
modify. If they want a stash, they can make one themselves.
git -C <path> pull --ff-only
--ff-only is deliberate: a pull that can't fast-forward means the local branch has
diverged, which is exactly the "something is going on there" case. On failure, report the
git error and ask the user how to proceed — do not merge or rebase to force it through.
Then confirm the checkout actually advanced to current upstream:
git -C <path> log -1 --format='%h %ad %s' --date=short
git -C <path> status -sb | head -1 # should show no "behind"
Report the result in one line before reading anything:
<slug>@<default>— pulled, now at<sha> <date> <subject>
If the repo was already up to date, say that instead. Either way the user must see which commit the reference is based on, so a stale reference is visible rather than silent.
/ref -p zmod how does it configure vitest
zmod → $HOME/repos/*/zmoddevelop (its default) — if it's on topic/foo, ask before checking out developgit pull --ff-only, report zmod @ develop — pulled, now at abc1234 2026-08-29 <subject>-pDefault behaviour is unchanged — the repo is read exactly as it sits on disk. If you
notice while reading that the repo looks stale or is on a topic branch, mention it and
offer -p; don't run the gate uninvited, since it mutates another repo's checkout.
-u / --update)When -u or --update is passed, this skill switches to fix-and-PR mode: you've found a problem in the referenced project and want to fix it there directly.
cd into the resolved project path/x-as-pr -co from the main branch with the fix instructions/x-as-pr workflow handles branching, implementing, reviewing, and opening a draft PR/x-as-prcd back to the original project and resume workThe PR on the referenced project must:
/ref -u zmod fix the broken export path in package.json
This will:
zmod → $HOME/repos/*/zmodcd into that directory/x-as-pr -co fix the broken export path in package.json-u (you can't fix multiple projects at once)-u, report an error and stopWhen referencing another project, you MUST protect project-specific sensitive information. Never copy concrete content or secrets - only copy patterns, structures, and configurations.
NEVER leak the referenced project's name or directory path into the current project's artifacts. This includes:
The referenced project may belong to a work client. Exposing client names or project identifiers in public or semi-public artifacts (issues, PRs, commits) causes real problems. Always use generic descriptions like "another project" or "reference implementation" instead.
.env values, API tokens, passwordsParse $ARGUMENTS to extract:
-p or --pull flag: If present, run the freshness gate on every resolved path before reading anything (see "Pull Mode" above)-u or --update flag: If present, switch to update mode (see "Update Mode" above)/x-as-pr -coFlags are independent and may be combined: -p alone freshens then reads; -p -u freshens then fixes; -u alone fixes whatever is on disk.
-u flag)-p was passed: run the Pull Mode gate on every resolved path first, and abort any repo the gate cancelsWhen copying Docusaurus setup from $HOME/foo/bar/:
Safe to reference:
docusaurus.config.js structure and plugin configurationsdocs/, src/, static/)Must NOT copy:
Always ask yourself: "Does this contain information specific to the source project?" If yes, do not copy it directly. Extract the pattern and apply it fresh to the target project.
What SKILL.md sets; muted values are Claude Code's defaults
84 skills in this plugin
/bambu-3mfCreate/edit Bambu Studio 3MF projects from a saved printer template. Use for Bambu/H2D printable parts, plate arrangement, 3MF revisions, or print settings, even when the input is STL/STEP./big-planPlan work as one epic plus child GitHub issues, with review and verification. Use for /big-plan, implementation planning/decomposition, UI brainstorming that should end in a plan (-pr), or issue sweeps (-is/-isask)./cclogsLoad recent prototypes, plans, logs and artifacts from the repo-scoped cclogs dir to continue earlier work. Use for /cclogs, or whenever the user refers to a prior session's prototype/plan/report as if it exists.npx claudepluginhub takazudo/claude-resources --plugin claude-resourcesOther plugins' skills for the same job