一键导入
ugit-ci-setup
// Inspect a repository, scaffold `.ugit/workflows/<workflow>/`, verify ugit prerequisites, and optionally trigger remote validation through the existing ugit CLI.
// Inspect a repository, scaffold `.ugit/workflows/<workflow>/`, verify ugit prerequisites, and optionally trigger remote validation through the existing ugit CLI.
| name | ugit-ci-setup |
| description | Inspect a repository, scaffold `.ugit/workflows/<workflow>/`, verify ugit prerequisites, and optionally trigger remote validation through the existing ugit CLI. |
Use this skill when the user wants Codex to set up ugit CI for a repository.
This skill scaffolds .ugit/workflows/<workflow>/ packages. It does not
replace ugit create, ugit serve, ugit workflow run, ugit workflow logs,
or ugit pr create.
Read these references before editing workflow files:
references/workflow-contract.mdreferences/remote-validation.mdReuse these template assets when you scaffold a workflow package:
templates/package.json.template.jsontemplates/run-ugit-ci.sh.templateResolve the target repository.
git rev-parse --show-toplevel..ugit/workflows/* packages before proposing a new
workflow name.Inspect the repository before asking questions. Collect signals in parallel:
.ugit/workflows/**/*package.json, pnpm-workspace.yaml,
pnpm-lock.yaml, package-lock.json, yarn.lock, and bun.lockb.github/workflows/*, .gitlab-ci.yml,
and .circleci/**/*Cargo.toml, go.mod, pyproject.toml, and
Makefilegit remote -v and
git config --local --get ugit.machinePrefer these sources when you infer the validation command:
ci scriptlint, test, then buildcargo test, go test ./..., pytest, or
make testAsk only for missing high-signal inputs:
ugit pr createDo not invent a placeholder ugit:ci command. If inference is weak, stop
and ask the user for the exact validation command to wrap.
Scaffold or update .ugit/workflows/<workflow>.
.ugit/workflows/<workflow>/package.json.ugit/workflows/<workflow>/run-ugit-ci.shrun-ugit-ci.sh executable.Verify the local workflow package shape.
package.json exists and defines scripts.ugit:ci.run-ugit-ci.sh returns to the repository root before running the
wrapped command.pnpm --dir .ugit/workflows/<workflow> run ugit:ci when the command
is safe to execute locally.Verify ugit prerequisites before remote validation. Stop before remote execution if any of these checks fail:
ugit is available. When you are inside this repository and the binary is
missing, build it with pnpm --filter ugit-cli build.~/.local/share/ugit/config.json exists and includes the requested or
configured machine.git config --local --get ugit.machine or an explicit -mgit remote get-url origin points at the ugit repository that ugit
commands will publish to, or the repository has already been created with
ugit createreferences/workflow-contract.mdRemediation should point back to existing ugit commands instead of reimplementing them:
ugit create -m <machine> [directory]~/.local/share/ugit/config.json, SSH, or
ugit serve -m <machine>ugit pr create, not a custom branch-publish
flowOffer remote validation only after prerequisites pass.
ugit workflow run [-m <machine>] <workflow> [directory]ugit workflow logs [-m <machine>] <workflowId> [directory]ugit pr create --base <branch> --title <title> ... only when the
user explicitly asks for PR-backed CI or auto-merge semantics.Close out with a practical summary. Include: