Command Palette

Search for a command to run...

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

repository-routing-security

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

Use when changing fork routing, forge-profile identity, provider-plugin host selection, repository URL persistence, credential redaction, the repo-config…

kunchenguidот kunchenguid★ 9 314 звёзд на GitHub

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

Fork Routing

  • repos.upstream_url is the default parent repository; a run's explicit integration pin supplies its PR base routing instead. repos.fork_url is an optional GitHub fork push target. User-facing selection semantics are owned by docs/src/content/docs/reference/cli.md (--base-remote).
  • no-mistakes init --fork-url <url> expects origin to point at the GitHub parent repository and <url> at the contributor fork; plain no-mistakes init preserves an existing fork URL on idempotent refresh.
  • Push code must resolve the push URL via resolvePushURL (internal/pipeline/steps/common_git.go) so configured forks still receive branch updates, including after a CI repair restarts validation. Without a fork, resolveUpstreamURL verifies a pinned destination through Destination.RuntimeURL; only unpinned runs use its origin/registration fallback. Repo.PushURL() remains correct only for fork-only callers (e.g. rebase.go), since fork URLs carry no embedded credentials.
  • GitHub PR code must keep --repo pointed at the parent and use --head <fork_owner>:<branch> when fork_url is set; existing-PR lookup must list by the bare branch and filter head-owner fields, never pass <owner>:<branch> to gh pr list --head.
  • Non-GitHub fork MR/PR routing is intentionally out of scope until implemented end to end; if a legacy row has fork_url for another provider, PR creation must skip instead of opening a self PR.
  • Every new run best-effort refreshes registered upstream/fork URLs from the working clone through gate.RefreshRepoURLs: origin is the upstream authority, an existing fork requires one uniquely matching clone remote, both DB fields replace atomically, and every discovery/validation/write failure logs only a bounded reason and continues with the exact old registration. The refresh never rewrites clone or gate remotes; Repo.URLsVerified is run-scoped evidence that trusted fetch/push may use the refreshed DB URL instead of an inherited stale gate origin.
  • Fork-as-origin detection (internal/gate/forklayout.go, issue #1178): a plain init (no --fork-url, no previously recorded fork) refuses when origin is a GitHub fork and a separate upstream remote already names its real parent - the layout gh repo fork --clone leaves behind, which otherwise opens scratch PRs inside the contributor's own fork and never binds a parent-PR attestation. Contract is restore-style (VISION R1: refuse loudly with --fork-url/CONTRIBUTING guidance), not auto-adopt, per the maintainer's triage on #1178 (opt-in was the acceptable alternative; silently rewriting remotes or always auto-rerouting was explicitly rejected). Detection fails OPEN, never closed: it needs positive proof (github.RepoParent's gh api repos/<slug> "fork" + "parent" answer for origin matching what upstream names) and skips silently otherwise - no upstream remote, either remote not on GitHub, an unrelated upstream (different repo name, or a different host from origin - both checked locally before ever shelling out to gh, so init never pays network latency for a template/reference upstream), or gh unavailable/unauthenticated/offline. The host check exists because a GitHub fork always shares its parent's host (forking across GitHub.com/GHE instances does not exist), so an upstream on a different host can never be origin's parent however its owner/name happen to read - comparing owner/name alone would wrongly match two unrelated same-named repos on different hosts (Greptile finding on PR #1183). resolveForkParent (package var in internal/gate/forklayout.go) is the test seam over the real gh call, mirroring ensureGateHooksPathIsolation.

Repository Forge Identity (internal/forgecontext)

  • Optional global forge_profiles map raw remote host tokens/SSH aliases (gh_user keys optionally scoped as host/owner) to one isolated gh or glab config directory, plus an optional expected_login pin, or to a gh_user login whose token githubUserEnvironment reads once per run with gh auth token --user and carries only in Context.Environment (runenv.Overlay never prints values; refusal on a login gh cannot serve, never an active-account fallback). An owner-scoped match outranks a plain host match across parent/fork, falls back to the plain host key, and never activates routing for other owners (selectProfile, profilesActivateProvider). Regressions: internal/forgecontext/ghuser_test.go, TestMergeTakesForgeProfilesFromGlobalOnly. The resolver owns profile selection, validation, parent/fork ambiguity, provider-specific fail-closed activation, and the immutable run environment; do not add ambient account switching or per-step routing. Profile identity for the parent/fork same-profile check is the config directory AND the pin, so conflicting pins fail as ambiguous instead of silently picking one account (sameProfile/expectLogin own the rationale).
  • A resolved context must reach buil
Полный SKILL.md на GitHub

Установить repository-routing-security в Claude Code и Claude Desktop

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

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

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

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

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

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

FAQ

Что делает скилл repository-routing-security?

Use when changing fork routing, forge-profile identity, provider-plugin host selection, repository URL persistence, credential redaction, the repo-config trust boundary (trusted-default-branch-only fields), gate-agent instruction neutralization, or repository-declared extra gates.

Как установить скилл repository-routing-security?

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

Скилл repository-routing-security запускает скрипты?

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

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

Сравнить repository-routing-security с