degit
できること
プロジェクトのテンプレートやリポジトリのスナップショットを、Gitの履歴を含めずに新しいフォルダーにコピーする方法を示します。テンプレートから素早くプロジェクトを始めたい開発者向けです。
使う場面
- ✓開発者が、GitHubやGitLabのテンプレートから新しいプロジェクトを始めたいとき。
- ✓開発者が、Gitの履歴を含まないリポジトリのコピーを欲しいとき。
- ✓開発者が、リポジトリの特定のファイルやフォルダーだけを欲しいとき。
スキルのリンク
https://github.com/Rich-Harris/degit/blob/master/skills/degit/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“GitHubにあるスターターテンプレートから、新しいプロジェクトを始めたいです。コピーの方法を教えてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
このスキルは、リポジトリのスナップショットをフォルダーにコピーするコマンドを示し、ブランチやサブフォルダーの扱いも手伝います。GitHub、GitLab、Bitbucket、Sourcehut、Gistに対応しています。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)を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.
よくある質問
コピーにはGitの履歴が含まれますか?
いいえ。このスキルはdegitをスナップショットのコピーと説明しているため、履歴は含まれません。
一部のファイルだけをコピーできますか?
はい。特定のファイルやフォルダーだけをコピーする方法を説明します。
ファイルがすでにあるフォルダーで使えますか?
コピー先は空である必要があると、このスキルは説明しています。本当に必要な場合を除き、強制的な上書きは勧めません。
詳細
人気
- GitHubのスター
- 8.0k
- ランキング
- #12654
- ライセンス
- MIT
- 更新日
- 2026/10/21
コメント
- …
似ているスキル
diffs
394k編集内容の実際の共有可能な差分を、手書きの要約ではなく、ビューアーのリンクや画像ファイルとして作成するようエージェントを支援します。
coding-agent
394kCodex、Claude Code、OpenCodeに大きめのコーディング作業をバックグラウンドのワーカーとして渡し、その進捗を確認するようエージェントを支援します。
gh-issues
394kGitHubのイシューを探し、取り組むものを選び、修正を含むプルリクエストを開くようエージェントを支援します。レビューコメントへの対応も含みます。