agentleFS
ultimatethemedev-bitultimatethemedev-bit/claude-vitrine-kit/.claude/skills/github-init/SKILL.md

github-init

Skill0 starsChanged 57 days agoMITView on GitHub

Crée un repo GitHub, initialise git si besoin, et pousse le projet courant en une séquence guidée. Adapté projet Eulone (Astro, PowerShell, secrets jamais commités). Déclenche sur "crée un repo GitHub", "pousse sur GitHub", "initialise git et GitHub", "mets le projet sur GitHub". Préalable au déploiement Vercel (skill deploy-vercel).

  • Reads credentials
  • Deletes or force-pushes
  • Commits and pushes

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

github-init — repo GitHub + 1er push (projet Eulone)

Crée le repository GitHub, initialise git si nécessaire, pose un .gitignore propre (les secrets ne partent JAMAIS), et pousse le site. C'est le préalable au déploiement Vercel (deploy-vercel) : Vercel se branche sur ce repo.

Environnement : Windows / PowerShell. Jamais rm -rf → trash.

Étape 1 — Vérifications préalables

gh --version          # GitHub CLI installé ?
gh auth status        # connecté à GitHub ?
git status            # git initialisé ? fichiers non commités ?
  • gh absent → demande à l'utilisateur de lancer (préfixe ! dans le prompt) : ! winget install GitHub.cli puis redémarrer le terminal.
  • Non authentifié → ! gh auth login (humain : choisir GitHub.com → HTTPS → login via navigateur). C'est l'étape manuelle clé (OAuth) — une seule fois par machine.

Étape 2 — Collecter les infos

Demande :

  • Nom du repo (défaut = nom du dossier courant).
  • Visibilité : public ou privé (défaut : privé pour un site client).
  • Description courte (optionnel).

Étape 3 — Initialiser git si absent

git init
git branch -M main

Étape 4 — .gitignore (CRITIQUE pour les secrets)

Si absent, crée un .gitignore adapté à un projet Astro :

# dépendances
node_modules/
# build
dist/
.astro/
.vercel/
# secrets — NE JAMAIS COMMITER
.env
.env.*
!.env.example
# OS / éditeur
.DS_Store
Thumbs.db
.vscode/
# QA temporaire (skill responsive-qa)
.responsive-qa/

⚠️ Vérifie qu'aucun .env n'est déjà suivi avant de pousser. S'il l'est : git rm --cached .env puis commit. Le .env contient FAL_KEY, RESEND_API_KEY, etc. — sa fuite est grave. Crée aussi un .env.example (mêmes clés, valeurs vides) pour documenter sans exposer.

Étape 5 — Créer le repo et pousser

gh repo create NOM --private --description "DESC" --source=. --remote=origin --push

Remplace --private par --public si demandé.

Étape 6 — Commit initial si nécessaire

Si des fichiers ne sont pas commités :

git add .
git commit -m "feat: site initial"
git push -u origin main

Étape 7 — Confirmer

Affiche : l'URL du repo, le nombre de fichiers commités, et rappelle : « les variables d'environnement (.env) ne sont PAS sur GitHub — il faudra les reporter dans Vercel à l'étape déploiement ». Puis enchaîne sur deploy-vercel si on est dans la pipeline.

Règles

  • Jamais commiter .env, .env.* (sauf .env.example), secrets/, clés API.
  • Remote origin déjà présent → git remote set-url origin URL (ne pas recréer).
  • trash, jamais rm -rf.

Erreurs courantes

ErreurSolution
gh: command not found! winget install GitHub.cli puis redémarrer le terminal
Not authenticated! gh auth login
Repository already existsgit remote add origin URL (ou en choisir un autre nom)
remote origin already existsgit remote set-url origin URL
.env apparaît dans git statusl'ajouter au .gitignore + git rm --cached .env

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.