Why use it: You don't want to switch to DisCo, you just want to borrow a few repo skills (e.g. vllm, sglang) for the agent you're using.
What it produces: <target-skills-root>/repositories/{repo-skills,repo-skills-router}/ in the target agent, with repository-index.jsonl and the router regenerated for exactly the chosen set.
1. Shortcut — ask the Creator to do it
# Claude Code (skills root cấp user)
disco --creator -p "/skill:import-repo-skills-to-agent import vllm and sglang to ~/.claude"
# Codex (agent root cấp user hiện hành — KHÔNG phải ~/.codex cũ)
disco --creator -p "/skill:import-repo-skills-to-agent import vllm and sglang to ~/.agents"
Restart the target agent after importing.
2. Exact route — call the helper directly
The skill is only a wrapper; every file-writing operation is done by a single script:
cli/packages/coding-agent/src/disco/skills/import-repo-skills-to-agent/scripts/export_repo_skills_to_agent.mjs
Selective export to Codex:
node <đường-dẫn-skill>/scripts/export_repo_skills_to_agent.mjs \
--source-agent-dir ~/.disco/agent \
--target-agent-dir ~/.agents \
--target-agent codex \
--include-skill vllm \
--include-skill sglang
Export everything, agent-neutral, into exactly one skills root:
node <đường-dẫn-skill>/scripts/export_repo_skills_to_agent.mjs \
--source-agent-dir ~/.disco/agent \
--target-skills-root ~/.claude/skills \
--target-agent agent-neutral
Flags (read from the parser in export_repo_skills_to_agent.mjs):
| Flag | Meaning |
|---|---|
--source-agent-dir <dir> |
Source agent root. Default $DISCO_CODING_AGENT_DIR, otherwise ~/.disco/agent |
--target-skills-root <dir> |
Target is already skills root (~/.agents/skills, ~/.claude/skills) |
--target-agent-dir <dir> |
Target is agent root; the helper appends skills/repositories |
--target <dir> --target-kind skills-root|agent-root |
General form when the folder name doesn't say it by itself |
--target-agent codex|agent-neutral |
codex will additionally insert agents/openai.yaml with policy.allow_implicit_invocation: false |
--include-skill <id> |
Repeatable, or pass a comma-separated list. Omit this flag entirely = export everything |
--overwrite-skill <id> |
Allow overwriting exactly that skill. Without the flag → the helper refuses conflict |
--router-visibility enabled|disabled |
Only use when the user explicitly says they want to change it; by default keep the target router's visibility as is |
--resume <transaction-dir> |
Re-run the exact saved transaction after an interruption |
-h, --help |
Print help then exit 0 |
Exit code: 0 = commit succeeded; 2 = any error (with rollback if the mutation phase was already entered). No other codes. Unknown argument → ExportError: unknown argument: <x> → exit 2.
3. What the helper actually does (9 steps, transactional)
- Validate source/target, symlink safety, skill identity,
repo-routing-metadata.jsonv2, assignment taxonomy, and source/target do not overlap. - Generate a router filtered to the chosen set — does not touch the source collection.
- Merge selected records with unrelated records at the target, according to
skill_id+owner/repository. - Stage the final
repo-skills/tree. - For a Codex target: add/update
agents/openai.yamlnext to everySKILL.mdroot and child — exceptrepo-skills-router. - Regenerate
repository-index.jsonland the router from the merged records (no copying the old index, no concatenating Markdown). - Revalidate taxonomy, links, index, router visibility, selected/unselected boundary, Codex policy.
- Only replace
repositories/repo-skills/andrepositories/repo-skills-router/at the destination, via a persisted transaction. - Validate the installed version, then commit — or restore the old destination to its original state if a later mutation step fails.
Verifiable constraint: repository-index.jsonl the original must byte-for-byte match repo-skills-router/references/index/repositories.jsonl. The exported subset must not leak unselected skills into any index or area/family page. Unrelated skill repositories already present at the destination must remain intact.
4. When interrupted midway
The helper prints the transaction directory. Re-run exactly that transaction:
node <đường-dẫn-skill>/scripts/export_repo_skills_to_agent.mjs --resume /path/to/transaction-dir
- Do not hand-patch a half-finished destination tree.
- No need to retype the arguments; but any argument retyped must match the manifest, a mismatch stops the resume before mutation.
- If rollback cannot restore the exact snapshot: keep the staging/backup paths it reports and stop to inspect manually.
5. At the destination agent, how to use it
repo-skills-router keeps the model-visible state intact; skill repos stay hidden from implicit selection (via portable frontmatter, and for Codex additionally via an OpenAI policy applied only at the destination). That means in Claude Code you call the router or call the skill directly, rather than it jumping into every conversation on its own.
⚠️ If ~/.claude/skills or ~/.agents/skills already has many skills: the helper only touches the subdirectory repositories/, the rest is untouched.
⚠️ License: each skill repo carries its own license in SKILL.md. Copying to another agent is redistribution — check that field first.
Next step
05-creator-tao-repo-skill.md if you want to create skills yourself instead of just borrowing them.