Receber por email
← Voltar para o catálogo

publish

Publish repository to GitHub with full setup — topics, license, Pages, Dependabot, CI, .gitignore, README scaffold. Triggers: "publish", "/publish", "publish repo", "опубликуй репо"

11estrelas
Atualizado há 3 meses

Ver no GitHub ↗ Licença: MIT

Como adicionar

/plugin marketplace add DefaultPerson/agent-setup

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Para o autor da skill

Cole no README do seu repo

Mostra que sua skill está catalogada na Skillteca, gera backlink e tráfego rastreável.

[![Skillteca](https://www.skillteca.com.br/api/badge/publish-defaultperson/svg)](https://www.skillteca.com.br/skills/publish-defaultperson)

Skills relacionadas

Ver todas de Desenvolvimento →

Alerta por categoria

Receba novas skills de Desenvolvimento toda segunda

1 email curto, só com as skills novas de Desenvolvimento. 4 minutos de leitura, sem spam, cancela com 1 clique.

Você confirma o email no primeiro envio. Sem spam. Cancela com 1 clique.

Ler descrição completa

Context

  • Remote: !git remote -v 2>/dev/null || echo "No remote"
  • Branch: !git branch --show-current 2>/dev/null || echo "Not a git repo"
  • GitHub repo: !gh repo view --json nameWithOwner,visibility,description --jq '"\(.nameWithOwner) (\(.visibility)) — \(.description)"' 2>/dev/null || echo "Not on GitHub yet"

Interactive repo publication workflow. Uses gh CLI for everything.

Algorithm

  1. Detect state: git remote -v — check if origin points to GitHub.
  2. New repo (no origin): full creation flow (steps 2-13).
  3. Existing repo (origin exists): update flow — go to step 2 to review/update settings.
  4. No git repo: git init first.
  1. Ask questions (AskUserQuestion, single batch — all repos):
  2. Owner: personal account or organization? List available with gh api user/orgs --jq '.[].login' + personal account from gh api user --jq .login.
  3. Visibility: public / private / Keep current (existing repos only)
  4. Description: show auto-detected (from README.md or CLAUDE.md), ask to use or enter custom
  5. License: MIT (Recommended for public) / Apache-2.0 / GPL-3.0 / Keep current / None
  6. GitHub Pages: Yes (MkDocs Material) / No / Keep current
  7. Dependabot: Enable dependency updates? Yes / No / Keep current
  8. CI workflow: Set up GitHub Actions CI? Yes (auto-detect stack) / No / Keep current
  9. .gitignore: Generate smart .gitignore? Yes (auto-detect stack + scan repo) / No / Keep current
  10. README.md: Scaffold README if missing? Yes / No
  1. Auto-detect (no user input needed):
  2. Repo name: from current directory name
  3. Topics: detect from stack files:
  4. package.json → nodejs, javascript/typescript
  5. pyproject.toml / requirements.txt → python
  6. go.mod → golang
  7. Cargo.toml → rust
  8. Dockerfile → docker
  9. Also infer from README content (keywords, frameworks)
  10. For existing repos: fetch current values with gh repo view --json description,repositoryTopics,visibility and show diff
  1. Create or update repo:
  2. New: gh repo create <owner>/<name> --public|--private --description "<desc>" --source . --push
  3. Existing: gh repo edit --description "<desc>" --visibility public|private (only if changed)
  1. Set topics:

``bash gh repo edit --add-topic <tag1> --add-topic <tag2> ... ``

  1. License (if selected/changed):
  2. Fetch license text: gh api licenses/<spdx-id> --jq .body > LICENSE
  3. Replace [year] and [fullname] placeholders
  4. Commit and push
  1. GitHub Pages (if selected/changed):
  2. Create mkdocs.yml with Material theme, docs/index.md from README
  3. Add GitHub Actions workflow .github/workflows/docs.yml for auto-deploy
  4. Commit and push
  1. Dependabot (if selected):
  2. Create .github/dependabot.yml with update schedules based on detected ecosystem
  3. Weekly schedule, auto-rebase, max 10 open PRs
  4. Commit and push
  1. CI workflow (if selected):
  2. Create .github/workflows/ci.yml based on detected stack
  3. Trigger on push to main and PRs
  4. Commit and push
  1. .gitignore (if selected):
  2. Stack-based templates from GitHub API + common block + repo scan
  3. Merge logic: no .gitignore → create; exists → ask overwrite/merge/skip
  4. Commit and push
  1. README.md (if selected and missing or empty):
  2. Generate from project metadata
  3. If README.md exists and is non-empty: skip (never overwrite)
  4. Commit and push
  1. Polish (automatic):
  2. If repo is public: suggest setting a social preview image
  1. Output:

`` Repo: https://github.com/<owner>/<name> Visibility: public/private Topics: tag1, tag2, tag3 License: MIT Pages: enabled at https://<owner>.github.io/<name> Dependabot: enabled (npm, pip, github-actions) CI: enabled (.github/workflows/ci.yml) .gitignore: created (Node + Python + 3 patterns from repo scan) README: scaffolded / already exists Changes: [list of what was created/updated] ``

Compartilhar X LinkedIn