Adds a caller-provided skills hook so a consuming repo can ship its own opencode skills instead of them being hardcoded in this shared framework. First use: moving the deploy-host node1-ssh skill out to the homelab repo (companion PR: homelab#feat/own-node1-skill).
Mechanism
A caller repo commits skills under .gitea/agent-skills/<name>/:
SKILL.md — the opencode Skill doc (copied verbatim into the registry)
skill.json — {"agents":["senior","lead"]} — which agents may load it
setup.sh (optional) — runtime setup (e.g. write an SSH alias). Runs only when the running agent is allowed the skill; receives $SECRETS_JSON (= toJSON(secrets)) and extracts the repo-specific secrets it needs via jq (the framework can't know their names).
install-caller-skills.sh scans the checked-out caller workspace, installs the allowed skills, runs their setup, and merges them into the permission.skill allow-list opencode already wrote.
Changes
newinstall-caller-skills.sh
agent.yml — replace the hardcoded node1 step with the generic caller-skills step (NAME, WORKSPACE, SECRETS_JSON)
deleteskill-node1-ssh.sh; drop "node1-ssh" from agents.json (senior/lead) — homelab owns it now
run-agent.sh — note caller skills aren't in the roster (route via the caller's AGENTS.md)
Verification
toJSON(secrets) confirmed supported on this Gitea (1.27) via an isolated workflow_dispatch probe (valid JSON, real values in-env, masked in logs). YAML validated. Merge this before the homelab PR so the hook exists when homelab's skill lands.
Adds a **caller-provided skills** hook so a consuming repo can ship its own opencode skills instead of them being hardcoded in this shared framework. First use: moving the deploy-host `node1-ssh` skill out to the `homelab` repo (companion PR: `homelab#feat/own-node1-skill`).
## Mechanism
A caller repo commits skills under `.gitea/agent-skills/<name>/`:
- `SKILL.md` — the opencode Skill doc (copied verbatim into the registry)
- `skill.json` — `{"agents":["senior","lead"]}` — which agents may load it
- `setup.sh` (optional) — runtime setup (e.g. write an SSH alias). Runs only when the running agent is allowed the skill; receives `$SECRETS_JSON` (= `toJSON(secrets)`) and extracts the repo-specific secrets it needs via `jq` (the framework can't know their names).
`install-caller-skills.sh` scans the checked-out caller workspace, installs the allowed skills, runs their setup, and merges them into the `permission.skill` allow-list opencode already wrote.
## Changes
- **new** `install-caller-skills.sh`
- `agent.yml` — replace the hardcoded node1 step with the generic caller-skills step (`NAME`, `WORKSPACE`, `SECRETS_JSON`)
- **delete** `skill-node1-ssh.sh`; drop `"node1-ssh"` from `agents.json` (senior/lead) — homelab owns it now
- `run-agent.sh` — note caller skills aren't in the roster (route via the caller's `AGENTS.md`)
## Verification
`toJSON(secrets)` confirmed supported on this Gitea (1.27) via an isolated `workflow_dispatch` probe (valid JSON, real values in-env, masked in logs). YAML validated. Merge this **before** the homelab PR so the hook exists when homelab's skill lands.
A consuming repo can now add repo-specific skills under .gitea/agent-skills/<name>/
(SKILL.md + skill.json + optional setup.sh); the framework installs the ones
allowed for the running agent. This keeps deploy-target / infra specifics in the
repo they belong to instead of hardcoded in the shared workflow.
- install-caller-skills.sh: scans the caller workspace, installs each skill whose
skill.json `agents` list includes the running agent, runs its optional setup.sh
with all inherited secrets available as $SECRETS_JSON (toJSON(secrets) — so a
caller's setup can read repo-specific secret names the framework can't know),
and merges the allowed skills into the permission.skill allow-list.
- agent.yml: replace the hardcoded node1-ssh step with the generic caller-skills
step (passes NAME, WORKSPACE, SECRETS_JSON).
- Remove the built-in node1-ssh skill: delete skill-node1-ssh.sh, drop "node1-ssh"
from agents.json (senior/lead). The homelab repo now owns that skill.
- run-agent.sh: note caller-provided skills aren't in the roster (route them via
the caller's AGENTS.md).
toJSON(secrets) verified supported on this Gitea (1.27) via an isolated probe.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Adds a caller-provided skills hook so a consuming repo can ship its own opencode skills instead of them being hardcoded in this shared framework. First use: moving the deploy-host
node1-sshskill out to thehomelabrepo (companion PR:homelab#feat/own-node1-skill).Mechanism
A caller repo commits skills under
.gitea/agent-skills/<name>/:SKILL.md— the opencode Skill doc (copied verbatim into the registry)skill.json—{"agents":["senior","lead"]}— which agents may load itsetup.sh(optional) — runtime setup (e.g. write an SSH alias). Runs only when the running agent is allowed the skill; receives$SECRETS_JSON(=toJSON(secrets)) and extracts the repo-specific secrets it needs viajq(the framework can't know their names).install-caller-skills.shscans the checked-out caller workspace, installs the allowed skills, runs their setup, and merges them into thepermission.skillallow-list opencode already wrote.Changes
install-caller-skills.shagent.yml— replace the hardcoded node1 step with the generic caller-skills step (NAME,WORKSPACE,SECRETS_JSON)skill-node1-ssh.sh; drop"node1-ssh"fromagents.json(senior/lead) — homelab owns it nowrun-agent.sh— note caller skills aren't in the roster (route via the caller'sAGENTS.md)Verification
toJSON(secrets)confirmed supported on this Gitea (1.27) via an isolatedworkflow_dispatchprobe (valid JSON, real values in-env, masked in logs). YAML validated. Merge this before the homelab PR so the hook exists when homelab's skill lands.