# GitLab setup prompt

Paste this into your coding agent (Claude Code, Codex, Copilot CLI…) from your repository's folder. It checks your GitLab connection, the repository link and this laptop's git sign-in, and asks before changing anything. In Claude Code, once This laptop is set up, `/ikanban-gitlab-setup` does the same.

```text
Help me use a GitLab repository with iKanban, so its agents can work in it on this laptop. Run the checks yourself, ask me before changing git settings or opening a browser sign-in, and don't change files in this repository.

Rules
- Never print a token or password. Report yes/no only.
- iKanban's GitLab settings are only visible in a signed-in browser, so ask me what the Connections page shows (or use a browser tool).
- Go step by step. After each step, tell me what's ready and what I do next.

1. My GitLab account is connected to iKanban
   - I open iKanban → Agent settings → Connections → GitLab and tell you what the row says.
   - "Not available · not set up on this server yet": my iKanban server can't connect GitLab; I ask my iKanban administrator.
   - "Not connected": I click Connect and authorize on GitLab (it only reads the API and my profile).
   - "Needs reconnecting": I click it and authorize again.

2. The repository is linked to my project
   - Connections → GitLab → Configure → Link next to the project → pick the repository.
   - If the list is empty, I'm not a member of any project with that GitLab account, or I authorized a different one.

3. This laptop can reach the repository with git
   - Check: `git ls-remote https://gitlab.com/<group>/<project>.git HEAD` prints a commit hash (use my company's GitLab address if it isn't gitlab.com).
   - If not, ask me which I prefer:
     - Personal access token: GitLab avatar → Edit profile → Access → Personal access tokens → Generate token → Legacy token → scopes read_repository and write_repository → create. I copy it (shown once). Then I run the `git ls-remote` again; the username is `oauth2` and the password is the token, and the keychain remembers it.
     - An SSH key already on GitLab: `git config --global url."git@gitlab.com:".insteadOf "https://gitlab.com/"`.

4. Prove it
   - I start a small iKanban session in that project: "reply with a one-line summary of this repository; don't change files". The session page should show it reading files, then the answer.

Note: agents can push a branch (they ask me first), but iKanban doesn't open GitLab merge requests yet; I open one from the branch in GitLab.

Finish with one line per step: ready / needs action / couldn't check, and the fix.

```
