create_project

create_project is a command for Claude Code from Galaxy-Dawn/claude-scholar. It costs 14 tokens per session (2,132 once invoked), scanned C, original, MIT.

A command that creates a new Python project from a local or GitHub template, then sets up uv, Git, branches, tags, and a GitHub remote repository.

In plain words
What is it for?
Use it to create a named project from a template, choose its location and source, initialize its uv environment and Git repository, and prepare the initial GitHub setup.
Why use it?
It automates the repetitive setup needed to start a project and checks for problems such as a missing template or an existing destination folder.

Command for Claude Code

Written for Claude Code: arguments in frontmatter.

Part of the claude-scholar plugin — 45 skills, 34 commands, 6 agents, 5 hooks shipped together

Good fit Use it to create a named project from a template, choose its location and source, initialize its uv environment and Git repository, and prepare the initial GitHub setup.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/galaxy-dawn/claude-scholar/create_project
About the project

Claude Scholar is a semi-automated research assistant for academic research and software development, supporting literature review, coding, experiments, reporting, writing, and project knowledge management. Computer science and AI researchers use it across the research workflow with several coding-agent platforms; the catalogue contains its skills, commands, agents, hooks, plugin, and instruction.

Galaxy-Dawn/claude-scholar · 5,381 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/Galaxy-Dawn/claude-scholar

Made for: Claude Code.

Or install claude-scholar, the plugin that ships this one along with the rest of its 45 skills, 34 commands, 6 agents, 5 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for create_project

README.md
[![agentmods](https://agentmods.dev/badge/commands/galaxy-dawn/claude-scholar/create_project.svg)](https://agentmods.dev/commands/galaxy-dawn/claude-scholar/create_project)
Your own site
<a href="https://agentmods.dev/commands/galaxy-dawn/claude-scholar/create_project"><img src="https://agentmods.dev/badge/commands/galaxy-dawn/claude-scholar/create_project.svg" alt="Measured on agentmods" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,132 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00014 $0.02132
Opus 5 $0.00007 $0.01066
Sonnet 5 $0.00003 $0.00426
Haiku 4.5 $0.00001 $0.00213

Measured 8d ago against content hash fae11eacf240, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade C, and why

create_project scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf "$TEMP_TEMPLATE_DIR"
commands/create_project.md · 240 lines

How it starts

The opening of the file, as written. The whole thing — 240 lines — stays where its author put it; the contents beside it link to each section on GitHub.

创建新项目

此命令基于模板创建新项目,包含以下步骤:

  1. 从 GitHub 或本地获取模板文件
  2. 替换项目名称
  3. 初始化 uv 项目
  4. 配置 Git 仓库和分支策略
  5. 创建初始 tag
  6. 初始化 GitHub 远程仓库
# 解析参数
PROJECT_NAME="{{project_name}}"
PROJECT_PATH="${path:-$HOME/Code}"
FULL_PATH="$PROJECT_PATH/$PROJECT_NAME"
TEMPLATE_REPO="{{template_repo:-gaoruizhang/template}}"
USE_LOCAL="{{local}}"
INITIAL_TAG="v0.1.0"

# 确定使用本地还是 GitHub 模板
if [ "$USE_LOCAL" = "true" ]; then
  # local 参数优先
  TEMPLATE_PATH="$HOME/Code/template"
  USE_LOCAL_TEMPLATE=true
else
  # 使用 GitHub 模板
  if [[ "$TEMPLATE_REPO" == https://github.com/* ]] || [[ "$TEMPLATE_REPO" == [email protected]:* ]]; then
    TEMPLATE_URL="$TEMPLATE_REPO"
  else
    # owner/repo 格式,转换为 HTTPS URL
    TEMPLATE_URL="https://github.com/$TEMPLATE_REPO"
  fi
  USE_LOCAL_TEMPLATE=false
fi

echo "🚀 创建新项目: $PROJECT_NAME"
echo "📁 路径: $FULL_PATH"
echo ""

# 检查模板源
if [ "$USE_LOCAL_TEMPLATE" = true ]; then
  if [ ! -d "$TEMPLATE_PATH" ]; then
    echo "❌ 错误: 本地模板目录不存在: $TEMPLATE_PATH"
    exit 1
  fi
  echo "📋 使用本地模板: $TEMPLATE_PATH"
else
  echo "📋 使用 GitHub 模板: $TEMPLATE_URL"
fi

# 检查目标目录是否已存在
if [ -d "$FULL_PATH" ]; then
  echo "❌ 错误: 目录已存在: $FULL_PATH"
  exit 1
fi

# 1. 创建项目目录
echo "📂 创建项目目录..."
mkdir -p "$FULL_PATH"

# 2. 获取模板文件
echo "📋 获取模板文件..."
if [ "$USE_LOCAL_TEMPLATE" = true ]; then
  # 本地模板:使用 rsync 复制(排除 .git、.idea、.DS_Store 等)
  rsync -av --exclude='.git' \
            --exclude='.idea' \
            --exclude='.DS_Store' \
            --exclude='__pycache__' \
            --exclude='*.pyc' \
            "$TEMPLATE_PATH/" "$FULL_PATH/"
else
  # GitHub 模板:使用 git clone 到临时目录,然后移动文件
  TEMP_TEMPLATE_DIR=$(mktemp -d)
  git clone --depth 1 "$TEMPLATE_URL" "$TEMP_TEMPLATE_DIR"

  # 移动文件到目标目录(排除 .git)
  rsync -av --exclude='.git' \
            --exclude='.idea' \
            --exclude='.DS_Store' \
            --exclude='__pycache__' \
            --exclude='*.pyc' \
            "$TEMP_TEMPLATE_DIR/" "$FULL_PATH/"

  # 清理临时目录
  rm -rf "$TEMP_TEMPLATE_DIR"
fi

# 3. 替换项目名称
echo "✏️  替换项目名称..."
cd "$FULL_PATH"

# 替换 README.md 第一行(如果是示例标题)
if [ -f "README.md" ]; then
  # 检查第一行是否是 # 开头的标题
  FIRST_LINE=$(head -n 1 README.md)
  if [[ "$FIRST_LINE" == "#"* ]]; then
    # 替换第一行为项目名称
    echo "# $PROJECT_NAME" > README.md.new
    tail -n +2 README.md >> README.md.new
    mv README.md.new README.md
    echo "   ✓ 更新 README.md 标题"
  fi
fi

# 替换 pyproject.toml 中的项目名称(如果存在)
if [ -f "pyproject.toml" ]; then
  sed -i.bak "s/name = \".*\"/name = \"$PROJECT_NAME\"/" pyproject.toml
  rm -f pyproject.toml.bak
  echo "   ✓ 更新 pyproject.toml 项目名"
fi

# 4. 初始化 uv 项目
echo "🔧 初始化 uv 项目..."
uv init --no-readme  # README 已从模板复制

# 4.5 生成 uv.lock(最佳实践:初始提交应包含 lockfile)
echo "🔒 生成 uv.lock..."
uv sync

# 5. 初始化 Git 仓库(默认在 master 分支)
echo "🔧 初始化 Git 仓库..."
git init

# 6. 初始提交在 master
echo "📝 创建初始提交..."
git add .
git commit -m "chore: 初始化项目

基于模板创建项目结构
- 配置项目结构
- 初始化 uv 依赖管理(包含 uv.lock)
- 设置 Git 工作流 (master/develop)
- 创建初始版本 $INITIAL_TAG"

# 7. 创建初始 tag(在 master 上)
echo "🏷️  创建初始标签: $INITIAL_TAG"
git tag -a "$INITIAL_TAG" -m "release: $INITIAL_TAG 初始版本

项目初始化完成"

# 8. 创建 develop 分支
echo "🌿 创建 develop 分支..."
git checkout -b develop

# 9. 询问是否创建 GitHub 仓库
echo ""
echo "✅ 项目创建完成!"
echo ""
echo "📍 项目位置: $FULL_PATH"
echo "🏷️  初始版本: $INITIAL_TAG"
echo ""
echo "📌 下一步操作:"
echo "   cd $FULL_PATH"
echo ""

# 询问是否创建 GitHub 远程仓库
read -p "是否创建 GitHub 远程仓库?(y/n): " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
  # 检查 gh CLI 是否安装
  if ! command -v gh &> /dev/null; then
    echo "⚠️  GitHub CLI (gh) 未安装,跳过远程仓库创建"
    echo "   安装: brew install gh"
  else
    echo "🌐 创建 GitHub 远程仓库..."
    cd "$FULL_PATH"

    # 使用 gh CLI 创建仓库
    gh repo create "$PROJECT_NAME" --private --source=. --remote=origin

    # 推送分支和标签(先切换回 master)
    echo "📤 推送分支和标签到远程..."
    git checkout master
    git push -u origin master
    git push origin "$INITIAL_TAG"
    git push -u origin develop
    git checkout develop

    echo ""
    echo "✅ GitHub 仓库创建完成!"

    # 获取仓库 URL
    REPO_URL=$(git config --get remote.origin.url)

Read the full file on GitHub · 240 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 240 lines · 14 tokens per session scan C fae11eacf240

Subscribe to this mod's changes

create_project is a command published in the GitHub repository Galaxy-Dawn/claude-scholar (5,381 stars, last pushed 12d ago), licensed MIT. It adds 14 tokens to every session and 2,132 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.