Create repo
Skill gastonmorixe/project-factory/.claude/skills/create-repo
Create a new GitHub repository, scaffold a project, and push it. Use when the user describes a new project they want to build.From its SKILL.md
npx -y skills add gastonmorixe/project-factory --skill create-repoAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
5.0 KB, ~1.3k tokens by cl100k_base, as published. Nobody here has run it
Skill: Create Repository & Scaffold Project
Overview
This skill creates a new GitHub repo, scaffolds initial project files based on the user's description, pushes everything, and provides the user with next steps. All operations use the GITHUB_PAT environment variable for authentication.
Prerequisites
GITHUB_PATenvironment variable must be set (validated by SessionStart hook)GITHUB_USERenvironment variable is set by the SessionStart hook- Network access must be "Full internet" in the Claude Code Web environment
Procedure
1. Parse the User's Request
Extract:
- Project name → sanitize to a valid GitHub repo name (lowercase, hyphens, no spaces)
- Language / framework → determines scaffold template
- Description → one-line for the GitHub repo description
- Visibility → default to
privateunless user says otherwise
2. Check if Repo Already Exists
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" \
-H "Authorization: Bearer $GITHUB_PAT" \
-H "Accept: application/vnd.github+json" \
"https://api.github.com/repos/$GITHUB_USER/<repo-name>")
if [ "$HTTP_CODE" = "200" ]; then
echo "Repository already exists!"
fi
3. Create the Repository
Option A: Bare repo with auto_init
curl -sf -X POST \
-H "Authorization: Bearer $GITHUB_PAT" \
-H "Accept: application/vnd.github+json" \
https://api.github.com/user/repos \
-d '{
"name": "<repo-name>",
"description": "<description>",
"private": true,
"auto_init": true
}'
Option B: From a template repo (if templates exist)
curl -sf -X POST \
-H "Authorization: Bearer $GITHUB_PAT" \
-H "Accept: application/vnd.github+json" \
"https://api.github.com/repos/$GITHUB_USER/<template-repo>/generate" \
-d '{
"owner": "'$GITHUB_USER'",
"name": "<repo-name>",
"description": "<description>",
"private": true
}'
4. Wait for Repo Initialization
GitHub needs a moment after creation. Poll until the repo has at least one commit:
for i in $(seq 1 10); do
COMMIT_COUNT=$(curl -sf \
-H "Authorization: Bearer $GITHUB_PAT" \
-H "Accept: application/vnd.github+json" \
"https://api.github.com/repos/$GITHUB_USER/<repo-name>/commits?per_page=1" \
| jq 'length')
if [ "$COMMIT_COUNT" -gt 0 ]; then
break
fi
sleep 2
done
5. Clone with PAT Auth
CRITICAL: Use PAT in the HTTPS URL. This bypasses the sandbox's scoped git proxy and authenticates directly.
cd /tmp
git clone "https://[email protected]/$GITHUB_USER/<repo-name>.git"
cd <repo-name>
git config user.name "Claude"
git config user.email "[email protected]"
6. Scaffold the Project
Generate project files based on the user's description. Common scaffolds:
For any project — always create:
README.md— project name, description, setup instructions.gitignore— language-appropriateCLAUDE.md— coding standards, build commands, architecture notes
Language-specific scaffolding:
Use your knowledge to create appropriate project structure. Some examples:
- Swift/iOS: Xcode project structure, Package.swift for SPM, or basic source layout
- TypeScript/Node:
package.json,tsconfig.json,src/index.ts - Ruby:
Gemfile,lib/directory,.ruby-version - C/C++:
CMakeLists.txtorMakefile,src/,include/ - React/Web: Vite or Next.js scaffold
- Python:
pyproject.toml,src/package,requirements.txt
7. Commit and Push
git add -A
git commit -m "Initial scaffold: <short description>"
git push "https://[email protected]/$GITHUB_USER/<repo-name>.git" main
8. Clean Up
Remove the cloned directory to avoid leaking the PAT (it's in .git/config):
cd /
rm -rf "/tmp/<repo-name>"
9. Report to User
Provide:
✅ Repository created: https://github.com/<user>/<repo-name>
📁 Scaffolded files:
- README.md
- CLAUDE.md
- .gitignore
- <list other files>
🚀 Next steps:
1. Open Claude Code: https://claude.ai/code
2. Select repository: <repo-name>
3. Describe what you want to build — Claude will have the scaffold ready
💡 Or continue here if you want me to add more files before you switch.
Error Handling
- PAT invalid/expired: Tell user to update
GITHUB_PATin their environment settings - Repo name taken: Suggest alternatives (append
-2, date suffix, etc.) - Network unreachable: Verify environment is set to "Full internet access"
- Push rejected: Check if repo was actually initialized (needs at least one commit)
Security Notes
- Never
echo $GITHUB_PATor write it to committed files - The PAT appears in
.git/configof the cloned repo — alwaysrm -rfafter push - Never commit
.git/configor any file containing the PAT - The PAT is scoped to the user's GitHub account — treat it like a password
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.