agentleFS
gastonmorixegastonmorixe/project-factory/.claude/skills/create-repo/SKILL.md

create-repo

Skill0 starsChanged 9 months agoMITView on GitHub

Create a new GitHub repository, scaffold a project, and push it. Use when the user describes a new project they want to build.

  • Deletes or force-pushes
  • Sends data out
  • Commits and pushes

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. ambroselittle/agent-skills★ 0same name
    2. gitt510/agent-skills★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repositoryOne other file it gives its agents.

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    CRITICAL: Use PAT in the HTTPS URL. This bypasses the sandbox's scoped git proxy and authenticates directly.

    line 93
  2. Distinctive:

    Use your knowledge to create appropriate project structure.

    line 114
  3. Very specific:

    Remove the cloned directory to avoid leaking the PAT (it's in .git/config):

    line 133
  4. Distinctive:

    Network unreachable: Verify environment is set to "Full internet access"

    line 164
  5. Distinctive:

    Push rejected: Check if repo was actually initialized (needs at least one commit)

    line 165
  6. Very specific:

    Never echo $GITHUB_PAT or write it to committed files

    line 169
  7. Very specific:

    Never commit .git/config or any file containing the PAT

    line 171

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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_PAT environment variable must be set (validated by SessionStart hook)
  • GITHUB_USER environment 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 private unless 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://$GITHUB_PAT@github.com/$GITHUB_USER/<repo-name>.git"
cd <repo-name>
git config user.name "Claude"
git config user.email "noreply@anthropic.com"

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-appropriate
  • CLAUDE.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.txt or Makefile, 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://$GITHUB_PAT@github.com/$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_PAT in 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_PAT or write it to committed files
  • The PAT appears in .git/config of the cloned repo — always rm -rf after push
  • Never commit .git/config or any file containing the PAT
  • The PAT is scoped to the user's GitHub account — treat it like a password

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.