Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

private-github-repo-upload

БесплатноБез исполняемых скриптовНе проверен

Safely initialize, sanitize, commit, create, and push a local project with private runtime data to a separate private GitHub repository. Use when the user…

haiyangchenbjот haiyangchenbj377 установок в других каталогах

Об этом скилле

Private GitHub Repository Upload

Use this as a fixed, auditable workflow. It is a Workflow, not an autonomous discovery agent: project scope, exclusion policy, and repository name must be explicit or use a documented default confirmed by the user.

Workflow

Step 1: [Deterministic] Confirm scope

  • Identify the exact local project directory.
  • Identify the GitHub owner and repository name.
  • Confirm the repository is private.
  • Treat private strategy state, portfolio state, risk state, reports, and historical snapshots as uploadable only when the user explicitly approves a data-bearing private backup.
  • Keep public Skill directories outside the private repository unless the user explicitly asks for a separate copy.

Step 2: [Deterministic] Inspect and define exclusions

  • Verify the project directory exists and is not a broad personal directory.
  • Read any existing .gitignore before modifying it; create one when absent.
  • Whitelist variant (mixed workspace): when the project sits inside a workspace that also holds unrelated personal material (e.g. legal, health, or family documents that must never be tracked), ignore everything by default and negate only allowed paths. Three gotchas: start with /* (not *); always include !/.gitignore itself (easy to miss — git add .gitignore then fails with "paths are ignored"); and for nested paths re-include each parent directory before its children (!/.workbuddy → .workbuddy/* → !/.workbuddy/build → .workbuddy/build/* → !/.workbuddy/build/*.py). The whitelist also protects future files dropped at the root from being tracked by accident.
  • Exclude local environments, bytecode, IDE state, temporary files, rebuildable output, machine-local WorkBuddy memory/automation state, backups, credential files, private keys, API keys, and .env files.
  • Keep the exclusion list narrow enough that approved strategy and research data remain available.

Step 3: [Deterministic] Initialize and stage safely

  • Initialize a local repository with the intended default branch, for example git init -b main.
  • Stage only after the ignore rules are in place.
  • Inspect the staged manifest, file count, and total size.
  • Scan staged text for GitHub tokens, bearer tokens, private keys, API keys, passwords, webhook secrets, and unexpected absolute credential paths.
  • Run git diff --cached --check; existing whitespace warnings are reportable but are not a reason to alter historical material merely for upload.

Step 4: [Deterministic] Commit locally

  • Set a local Git identity only if needed; do not change global identity.
  • Create one descriptive initial commit.
  • Stage paths explicitly, one git add per logical group, and never pass a gitignored path. git add -A <path> <gitignored-path> exits non-zero, so in an && chain the git commit never runs.
  • Verify with git log -1 that the commit actually exists before pushing. Do not assume a chained git commit succeeded. A commit that silently did not happen leaves HEAD at the previous SHA, and Step 6B will then faithfully replicate that stale HEAD as a spurious empty commit on the remote (identical tree and message, different SHA, files: []).
  • Verify the commit SHA and that the working tree is clean.
  • Do not push until the local commit and staged manifest pass inspection.

Step 5: [Deterministic] Create or reuse the private remote

  • Read the configured GitHub PAT from the approved secure credential source or environment variable without printing it.
  • Authenticate with the GitHub REST API and verify the authenticated account.
  • Look up the target repository before creating it.
  • If lookup returns 404, create it with private: true.
  • If creation returns 422 because the name already exists, retry by listing the authenticated owner’s repositories and verify the exact repository, privacy, and owner before continuing.
  • On a network/API failure, retry once or twice and cross-check with an independent client before reporting an environment failure.

Step 6: [Deterministic] Push without persisting credentials

  • Add or set a credential-free origin URL.
  • Push with a non-persistent credential mechanism such as GIT_ASKPASS or an approved credential helper; do not put the PAT in a remote URL, command argument, shell history, script, or repository.
  • Push the intended branch only. Do not force-push.
  • If git push hangs with no output (reproduced repeatedly on Windows/Git Bash behind a proxy): abort it and fall back to Step 6B. Do not keep retrying the same hanging command, and do not report it as a network failure without trying the API path.

Step 6B: [Deterministic] Manual push via the Git Data API

Use git/blobs → git/trees → git/commits → PATCH git/refs/heads/<branch> to advance the remote. Four constraints are mandatory; violating any of them produces a silently divergent history rather than an error:

  1. base_tree must be the REMOTE commit's tree. A local tree
Полный SKILL.md на ClawHub

Установить private-github-repo-upload в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл private-github-repo-upload?

Safely initialize, sanitize, commit, create, and push a local project with private runtime data to a separate private GitHub repository. Use when the user asks to back up or upload a local data-bearing project to a private GitHub repo while keeping public Skills separate. Never uploads credentials, environments, caches, or public Skill source.

Как установить скилл private-github-repo-upload?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл private-github-repo-upload запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить private-github-repo-upload с