Best for
- Guide a developer through connecting their repository to the RaiSE server. Detect what's already done, show a clear status, and execute only the missing steps. This is the first thing a new developer runs after installi…
humansys/raise/packages/raise-cli/src/raise_cli/skills_base/rai-onboard-repo/SKILL.md
Connect a repository to the RaiSE server. Detects what's done, guides through what's missing.
Decision brief
Connect a repository to the RaiSE server. Detects what's done, guides through what's missing.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/humansys/raise --skill "packages/raise-cli/src/raise_cli/skills_base/rai-onboard-repo"Inspect the Agent Skill "rai-onboard-repo" from https://github.com/humansys/raise/blob/88a77d6e4065e3c8bdbae9be4aff5b84e6a7a5eb/packages/raise-cli/src/raise_cli/skills_base/rai-onboard-repo/SKILL.md at commit 88a77d6e4065e3c8bdbae9be4aff5b84e6a7a5eb. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Run all 4 checks and present a summary before doing anything:
If Check 1 failed, do not attempt the device flow. Print instructions and exit:
1. Detect the project name from the directory:
After project initialization, attempt zero-prompt adapter setup if Atlassian env vars are available:
1. Detect git remote and repo name:
Permission review
The documentation asks the agent to run terminal commands or scripts.
git remote get-url originThe documentation asks the agent to create, modify, or delete local files.
rai project create <repo-name>The documentation asks the agent to create, modify, or delete local files.
Commands used: rai connect, rai init, rai repo register, rai project create, rai project link-repoEvidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 91/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 71 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Guide a developer through connecting their repository to the RaiSE server. Detect what's already done, show a clear status, and execute only the missing steps. This is the first thing a new developer runs after installing the CLI.
When to use: First time setting up a repo with RaiSE, or to verify onboarding is complete.
When to skip: Already fully onboarded (all 4 checkpoints pass).
Key difference from /rai-project-onboard: This skill connects the repo to the server (infrastructure). /rai-project-onboard sets up governance (docs, discovery, guardrails).
Run all 4 checks and present a summary before doing anything:
Check 1 — Server Connection:
cat ~/.rai/server.json 2>/dev/null
Parse server_url and org_name from the JSON. If file missing or empty → not connected.
Check 2 — Project Initialized:
ls .raise/manifest.yaml 2>/dev/null
If exists, read the name field. If missing → not initialized.
Check 3 — Repository Registered:
rai repo list
Match the current repo by comparing git remote get-url origin against the listed git remote URLs, or by matching the directory name against slugs. If no match → not registered.
Check 4 — Project Linked:
rai project list
Check if any project exists that could be linked to this repo. Then verify the link:
# If the repo slug matches a project slug, it's likely linked (1:1 convention)
Note: There is no CLI command yet to verify links directly. Use the convention that project slug = repo slug as a heuristic. If the project exists with the same slug, assume linked.
Present the status:
--- Onboarding Status ---
✓ Connected to api.raise.sh (org: humansys)
✓ Project initialized (raise-commons)
✗ Repository not registered on server
✗ Not linked to any project
2 steps remaining. Continue? [Y/n]
| Condition | Action |
|---|---|
| All 4 pass | Check graph status (see below), then suggest next steps |
| Some missing | Show status, ask to continue |
| User declines | Exit cleanly |
When all 4 pass — graph check:
Even when infrastructure onboarding is complete, the knowledge graph may not exist yet. Before declaring "Already onboarded", check and run graph build+push if missing:
rai graph build --check 2>/dev/null
If --check is not available, probe via the graph query CLI (reads the global DB — never open per-project .db files directly, S8204.2):
rai graph query "module" --limit 1 --format compact >/dev/null 2>&1 \
&& echo "GRAPH_OK" || echo "NO_GRAPH"
| Condition | Action |
|---|---|
GRAPH_OK | Print "Already onboarded ✓" |
NO_GRAPH | Run Step 5b (graph build + push), then print summary |
This ensures that re-running /rai-onboard-repo on an already-onboarded project still completes the graph if it was missed.
If Check 1 failed, do not attempt the device flow. Print instructions and exit:
Not connected to a RaiSE server.
To connect, run:
rai connect <org-slug>
Your org admin will need to approve the device. Once connected,
run /rai-onboard-repo again to continue.
Exit here. The device flow requires browser interaction and possibly admin approval — it does not belong inside a skill.
If Check 2 failed:
basename $(git rev-parse --show-toplevel 2>/dev/null || pwd)
No RaiSE project found in this directory.
Detected name: raise-commons
Initialize with this name? [Y/n/custom]
| Response | Action |
|---|---|
| Y (default) | run init with detected name |
| n | Exit with note: "Run rai init manually when ready" |
| custom text | run init with custom name |
rai init --name <detected-or-custom> --detect
After project initialization, attempt zero-prompt adapter setup if Atlassian env vars are available:
# Check if Jira env vars are set
if [ -n "$JIRA_URL" ] && [ -n "$JIRA_API_TOKEN" ] && [ -n "$JIRA_USERNAME" ]; then
echo "Atlassian credentials detected — configuring adapters..."
rai adapter setup auto
else
echo "⊘ No Atlassian env vars — skipping adapter auto-setup"
echo " To configure later: rai adapter setup auto"
echo " Required: JIRA_URL, JIRA_API_TOKEN, JIRA_USERNAME"
fi
| Condition | Action |
|---|---|
| JIRA_URL + token + username set | Run rai adapter setup auto (includes Confluence if those vars are set too) |
| Any Jira var missing | Skip with note — not an error |
| Auto-setup fails | Warn and continue — adapters can be configured later |
This step is best-effort — adapter config is not required for onboarding to succeed. The developer can always run the setup commands manually later.
If Check 3 failed:
git remote get-url origin
Extract name from remote URL (last path component, strip .git).
Present and confirm:
Repository not registered on server.
Name: raise-commons
Remote: [email protected]:humansys/raise-commons.git
Slug: raise-commons
Register? [Y/n]
| Response | Action |
|---|---|
| Y (default) | register the repo |
| n | Skip — note that project linking will also be skipped |
rai repo register <name> --url <remote>
If register returns 409 (already exists): treat as success — the repo was registered by someone else or in a previous attempt.
If no git remote found:
No git remote 'origin' detected.
Enter repository name manually: ___
If Check 4 failed:
Repository 'raise-commons' is not linked to any project.
1. Create new project 'raise-commons' and link (Recommended)
2. Link to existing project
3. Skip — I'll do this later
Choice [1]:
Option 1 — Create and link (default):
rai project create <repo-name>
rai project link-repo <repo-slug> <repo-slug> --primary
If project create returns 409 (already exists), continue to link-repo.
Option 2 — Link to existing:
rai project list
Show the list and ask:
Available projects:
1. raise-commons
2. raise-server
3. raise-admin
Link to which project? [number or slug]: ___
Then:
rai project link-repo <chosen-project> <repo-slug> --primary
Option 3 — Skip: Note in summary that project linking was skipped.
After project linking, build the local knowledge graph and sync it to the server so team members can query cross-repo context:
rai graph build
If the build succeeds and the server is connected (Check 1 passed), push:
rai graph push
| Condition | Action |
|---|---|
| Build succeeds + server connected | Push to server |
| Build succeeds + no server | Skip push, note graph is local-only |
| Build fails | Warn and continue — rai graph build can be run later |
| Push fails | Warn and continue — rai graph push can be retried later |
This step is best-effort — graph sync completes the data loop but is not required for onboarding to succeed.
Present final status:
--- Onboarding Complete ---
✓ Connected to api.raise.sh (org: humansys)
✓ Project initialized (raise-commons)
✓ Repository registered (raise-commons)
✓ Linked to project raise-commons (primary)
✓ Knowledge graph built (843 nodes) and synced to server
Next steps:
- Run /rai-session-start to begin working
- Run /rai-project-onboard for governance setup (discovery + docs)
If any steps were skipped:
--- Onboarding Partial ---
✓ Connected to api.raise.sh (org: humansys)
✓ Project initialized (raise-commons)
✓ Repository registered (raise-commons)
⊘ Project link skipped
⊘ Graph push skipped (no project link)
Run /rai-onboard-repo again to complete remaining steps.
| Item | Destination |
|---|---|
| Connection | ~/.rai/server.json (via rai connect, not this skill) |
| Manifest | .raise/manifest.yaml (via rai init) |
| Adapter configs | .raise/backlog.yaml + .raise/docs.yaml (via rai adapter setup auto, best-effort) |
| Registered repo | raise-server API |
| Project link | raise-server API |
| Knowledge graph | .raise/rai/memory/index.json (local) + raise-server (remote) |
| Next | /rai-session-start or /rai-project-onboard |
/rai-project-onboard (governance onboarding)/rai-session-startFrequently asked questions
Connect a repository to the RaiSE server. Detects what's done, guides through what's missing.
The source record exposes this install command: npx skills add https://github.com/humansys/raise --skill "packages/raise-cli/src/raise_cli/skills_base/rai-onboard-repo". Inspect the command and pinned source before running it.
Static rules flagged exec-script, write-files in the source; the page lists the matching lines and excerpts.