degit
What it does
Shows how to copy a project template or repository snapshot into a new folder with degit, without the full git history. It is for developers who want to start a project quickly from a template.
When to use it
- ✓When a developer wants to start a new project from a GitHub or GitLab template.
- ✓When a developer wants a copy of a repository without its git history.
- ✓When a developer wants only certain files or folders from a repository.
Skill link
https://github.com/Rich-Harris/degit/blob/master/skills/degit/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“I want to start a new project from a starter template on GitHub. Help me copy it.”
5 new skills a week. 1 minute to read.
How it works
The skill gives the command to copy a repository snapshot into a folder, and helps with branches and subfolders. It works with GitHub, GitLab, Bitbucket, Sourcehut and Gists.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Help the user scaffold a project with degit. Use npx degit@latest unless they have installed degit globally.
Start with the smallest command that matches their request:
npx degit@latest user/repo
npx degit@latest user/repo my-project
npx degit@latest user/repo#branch my-project
Sources can be GitHub (user/repo, github:user/repo, or a GitHub URL), GitLab (gitlab:user/repo, a GitLab URL, or gitlab://host/user/repo), Bitbucket (bitbucket:user/repo or URL), Sourcehut (git.sr.ht/user/repo, SSH form, or URL), or Gist (https://gist.github.com/<id>, https://gist.github.com/<user>/<id>, git@gist.github.com:<id>.git, or ssh://git@gist.github.com/<id>). A #ref can name a branch, tag, or commit. A source may include a subdirectory path.
- The destination defaults to the current directory and must be empty. Do not suggest
--forceunless the user explicitly wants to overwrite its contents. - Use
--cacheto require a cached copy (no network). Without--cache, degit tries the network first and falls back to the cached copy if the network is unreachable. Use--verboseto diagnose failures.--mode=gitstill works but is unnecessary; tar snapshots are the default. - Use
--files <paths>or-F <paths>to clone only specific files or directories; separate multiple paths with commas or repeat the flag. - Private repositories are handled automatically, with SSH fallback when needed. SSH/private use requires
gitonPATHand working repository credentials. - For reusable shortcuts, use
degit alias <repo> <name>, thendegit <name>; usedegit lsanddegit unalias <name>to manage aliases. - If a template needs post-download changes, explain that its top-level
degit.jsoncan useclone,search_replace, andremoveactions.search_replaceuses a named environment variable for its replacement value. - A downloaded
degit.jsonruns automatically and is template-controlled. For untrusted templates, prefer--no-actionsto skip actions, or--allow-env <names>to limit which environment variablessearch_replacemay read.
If source, ref, destination, or whether the destination is empty is unknown, ask before giving a potentially destructive command.
FAQ
Does the copy include the git history?
No. The skill describes degit as copying a snapshot, so the history is not included.
Can I copy only some files?
Yes. The skill explains how to copy only specific files or folders.
Can I use it in a folder that already has files?
The skill says the destination must be empty, and it does not suggest forcing an overwrite unless you really want that.
Details
Original description by the author
Download a repository snapshot or template with degit
repo: Rich-Harris/degit
Popularity
- GitHub stars
- 8.0k
- Ranking position
- #12654
- License
- MIT
- Updated
- 10/21/2026
Comments
- …
Similar skills
diffs
394kLets your agent produce a real, shareable diff of edits as a viewer link or image file, instead of a hand-written summary.
coding-agent
394kHelps your agent hand a larger coding job to Codex, Claude Code, or OpenCode as a background worker, then check on its progress.
gh-issues
394kHelps your agent find GitHub issues, pick the ones to work on, and open pull requests with fixes, including follow-up on review comments.