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…
от 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
.gitignorebefore 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!/.gitignoreitself (easy to miss —git add .gitignorethen 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
.envfiles. - 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 addper logical group, and never pass a gitignored path.git add -A <path> <gitignored-path>exits non-zero, so in an&&chain thegit commitnever runs. - Verify with
git log -1that the commit actually exists before pushing. Do not assume a chainedgit commitsucceeded. 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
originURL. - Push with a non-persistent credential mechanism such as
GIT_ASKPASSor 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 pushhangs 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:
base_treemust be the REMOTE commit's tree. A local tree
Установить 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), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic