AGENT SKILL

yun-sync-repo

Bring an external repo into the workspace as work material — cloned into repos/<name>/, gitignored, with its own .git.

License 许可
MIT
最近更新
2026-11-13
Stars
★ 1
Forks
0

01 前言 Front Matter

name
yun-sync-repo
description
Bring an external repo into the workspace as work material — cloned into repos/<name>/, gitignored, with its own .git.
disable-model-invocation
true

03 SKILL.md 正文

yun-sync-repo

Brings an external repository into the workspace as work material. The repo is cloned into repos/<name>/, which is gitignored — the workspace versions only the harness, never the projects' code.

Preconditions

  • You MUST be at the workspace root (the directory containing AGENTS.md and skills/). Verify with the shell test [ -e AGENTS.md ] && [ -d skills ], never a lister piped to a matcher — given no path argument it prints nothing and still exits 0. If you are not at the root, STOP and tell the user to open their agent from the workspace root (see AGENTS.md rule 1). Do not clone from anywhere else.

Inputs

  • A git URL (https://…/repo.git, git@…:owner/repo.git), OR
  • A GitHub shorthand owner/repo, OR
  • An explicit <name> for the target folder (optional; defaults to the repo basename).

Steps

  1. Resolve the target name. Use the explicit name if the user gave one; otherwise derive it from the URL basename without the .git suffix. Keep it kebab-case.

  2. Check for collision. Look at repos/<name>/:

    • If it already exists and is a clone of the same remote → do NOT re-clone. Report it is already synced, and offer git -C repos/<name> fetch --all --prune to update.
    • If it exists but points to a different remote, or is a dirty non-repo directory → STOP and ask the user how to proceed. Never overwrite blindly.
  3. Clone. git clone <url> repos/<name> — a full clone (worktrees need full history; do NOT use --depth). Expand a GitHub shorthand first — owner/repo → https://github.com/owner/repo.git — or git clone reads it as a local path.

  4. Verify the clone.

    • git -C repos/<name> rev-parse --is-inside-work-tree returns true.
    • git -C repos/<name> remote -v shows the expected remote.
  5. Confirm isolation. repos/ is gitignored at the workspace level, so git status at the workspace root must NOT list the new repo. If it does, the workspace .gitignore is broken — fix it before continuing.

  6. Report. Give the ready path repos/<name>/ and its default branch.

Notes

  • Never clone into the workspace root or into skills/. Only into repos/<name>/.
  • Do NOT cd into repos/<name>/ to keep working — stay at the workspace root so the harness stays loaded (AGENTS.md rule 1). Operate on the repo via git -C repos/<name>, or spawn an isolated worktree with yun-spawn-worktree.

04 同仓库更多 Skills

matiinchauspe
matiinchauspe/yunque

yun-write-wizard

Generate an interactive bash wizard that walks a human through steps only they can perform. Use when provisioning infrastructure, setting up credentials or CI secrets, walking an unfamiliar third-party dashboard, or running a one-off migration or cutover. Don't invoke this for steps the agent can perform itself.

★ 1
matiinchauspe
matiinchauspe/yunque

yun-write-spec

Write the spec — consolidate a large task's settled decisions into one durable document before it is sliced into tickets. Use when the decisions are settled and the user wants them written up, or says "write the spec" / "escribí el spec". Declines small fixes that need no spec.

★ 1
matiinchauspe
matiinchauspe/yunque

yun-write-pr

Write a pull request title and body that show the change — its ticket, its shape, the evidence it works, and how dangerous it is to merge.

★ 1
matiinchauspe
matiinchauspe/yunque

yun-write-handoff

Compact the current session into a disposable handoff baton for the next agent, pointing at durable memory instead of duplicating it.

★ 1
matiinchauspe
matiinchauspe/yunque

yun-write-agent-docs

Use when authoring or editing a document an agent reads in this workspace — a skill, a `skills/_shared/` contract, `AGENTS.md` or `skills/README.md` — deciding how it is invoked, what lives in it versus a linked file, naming it, or diagnosing why a skill misfires, bloats, or fires unreliably.

★ 1
matiinchauspe
matiinchauspe/yunque

yun-tdd

Test-driven development — the red → green loop, tests written only at pre-agreed seams. Use when the user wants to build a feature or fix a bug test-first, or mentions TDD or red-green. Reached by the implement flow to drive a build at a seam.

★ 1