本文へスキップ
Skillpedia
一般的なプログラミング8.0k · #12654

degit

できること

プロジェクトのテンプレートやリポジトリのスナップショットを、Gitの履歴を含めずに新しいフォルダーにコピーする方法を示します。テンプレートから素早くプロジェクトを始めたい開発者向けです。

使う場面

  • ✓開発者が、GitHubやGitLabのテンプレートから新しいプロジェクトを始めたいとき。
  • ✓開発者が、Gitの履歴を含まないリポジトリのコピーを欲しいとき。
  • ✓開発者が、リポジトリの特定のファイルやフォルダーだけを欲しいとき。

スキルのリンク

https://github.com/Rich-Harris/degit/blob/master/skills/degit/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/Rich-Harris/degit/blob/master/skills/degit/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

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 --force unless the user explicitly wants to overwrite its contents.
  • Use --cache to 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 --verbose to diagnose failures. --mode=git still 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 git on PATH and working repository credentials.
  • For reusable shortcuts, use degit alias <repo> <name>, then degit <name>; use degit ls and degit unalias <name> to manage aliases.
  • If a template needs post-download changes, explain that its top-level degit.json can use clone, search_replace, and remove actions. search_replace uses a named environment variable for its replacement value.
  • A downloaded degit.json runs automatically and is template-controlled. For untrusted templates, prefer --no-actions to skip actions, or --allow-env <names> to limit which environment variables search_replace may read.

If source, ref, destination, or whether the destination is empty is unknown, ask before giving a potentially destructive command.

よくある質問

コピーにはGitの履歴が含まれますか?

いいえ。このスキルはdegitをスナップショットのコピーと説明しているため、履歴は含まれません。

一部のファイルだけをコピーできますか?

はい。特定のファイルやフォルダーだけをコピーする方法を説明します。

ファイルがすでにあるフォルダーで使えますか?

コピー先は空である必要があると、このスキルは説明しています。本当に必要な場合を除き、強制的な上書きは勧めません。

詳細

作者による元の説明

Download a repository snapshot or template with degit

repo: Rich-Harris/degit

人気

GitHubのスター
8.0k
ランキング
#12654
ライセンス
MIT
更新日
2026/10/21

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

似ているスキル