Clone the GitHub repositories agreed upon by the maintainer to the local machine; the directory names are already hardcoded in the command (e.g. 01s-11comm、monorepo)。
Primary principles
- Command source: only use the
[references/clone-commands.md](references/clone-commands.md)ingit clonelines; do not rewrite URLs, depth, or directory names from memory. - Working directory: execute in the user's desired storageparent directory for multiple repositories; first
cdto that parent directory before running the command. - Idempotency and conflicts: if the target directory already exists,
git clonewill fail. First confirm with the user whether to skip, change the parent directory, or delete/rename the old directory before executing.
Workflow
- Confirm the parent path (e.g.
~/codeor a user-specified drive path). - Read
references/clone-commands.md, and execute eachgit clone。 - in the order in the file. If the user only wants asubset: only execute command lines matching the repository name or local directory name, and explain which entries were omitted.
- Network or permission failure: record the failed repository and error; the remaining repositories can continue executing (confirm with the user whether to retry).
Shallow clone and multiple branches
Some repositories in the list use --depth=N and --no-single-branch, intended to reduce size while retaining the ability to fetch other remote branches.
If a problem such as "cannot see remote branches" still occurs after cloning, then use the get-git-branch skill as needed to diagnose the local remote.origin.fetch。
Maintenance rules
- Add or remove repositories or change clone parameters: only edit
references/clone-commands.md。