AgentSkillsCN

create-repo

新建一个GitHub仓库,配备初始框架、.gitignore文件、README文档以及暂存分支。在启动一个需要完善Git/GitHub配置的新项目时使用。

SKILL.md
--- frontmatter
name: create-repo
description: Create a new GitHub repository with initial scaffolding, .gitignore, README, and staging branch. Use when starting a new project that needs a proper Git/GitHub setup.
disable-model-invocation: true

Create Repository

Create a new GitHub repository with scaffolding and staging branch.

Input

Repository name: $ARGUMENTS

If no name provided, ask the user for a repository name.

Steps

1. Create Project Directory

bash
mkdir -p projects/$ARGUMENTS
cd projects/$ARGUMENTS

2. Initialize Git

bash
git init
git branch -M main

3. Create Initial Files

  • Create README.md with the project name and a placeholder description
  • Create .gitignore appropriate for the expected tech stack (detect from context or ask)
  • Ensure .gitignore includes state/, node_modules/, __pycache__/, .env

4. Initial Commit

bash
git add -A
git commit -m "Initial commit"

5. Create GitHub Repository

bash
gh repo create $ARGUMENTS --private --source . --push

6. Create Staging Branch

bash
git checkout -b staging
git push -u origin staging

7. Return to Main

bash
git checkout main

Output

Report the GitHub repository URL and confirm both main and staging branches exist.