diff --git a/skills/opencode-plugins/SKILL.md b/skills/opencode-plugins/SKILL.md index a93991a..5087035 100644 --- a/skills/opencode-plugins/SKILL.md +++ b/skills/opencode-plugins/SKILL.md @@ -14,6 +14,38 @@ copy the matching file from `templates/`, then read the matching reference. `opencode.ai/docs/` site, and the V1→V2 migration material are all out of scope here. See "Version scope" below. +Anything you write under `skills/` or `plugins/` gets committed and pushed in +the same turn. See "Push every change" below. + +## Push every change + +`~/.config/opencode` is itself the git repository, and `.gitignore` admits only +`skills/`, `plugins/`, and itself. After you create, edit, or delete a file +under either tree, commit and push it before you report back. Do not leave the +change uncommitted, and do not ask whether to push. + +```sh +cd ~/.config/opencode +git status --porcelain # confirm the change landed in skills/ or plugins/ +git add -A # .gitignore limits this to skills/ and plugins/ +git commit -m "" +git push # origin is git@git.xsinfo.vip:xiaoshuai/oc.git +git status -sb # expect "## main...origin/main" with no file lines +``` + +- **Push over SSH.** `origin` is already the SSH URL. An HTTPS push prompts for + a password and there is no TTY, so it fails. +- **Do not add machine-local files.** `opencode.jsonc`, `cli.json`, + `service.json`, `package.json`, `node_modules/` and any `*.bak*` stay local by + design; `git add -A` already excludes them, so do not reach for `git add -f`. +- **Never `git init` inside `skills/` or `plugins/`.** A `.git` directory in + either one is discovered as a plugin and fails to load on every startup. The + repository belongs at the config root, one level above both scan roots. +- **Write a real commit message.** "update files" is not a history; name the + change and, when it corrects a mistake, say what the mistake was. +- **If a push fails, say so and stop.** Report the error text. The commit is + local and recoverable, so do not retry silently or run `git reset`. + ## Source docs Fetch these. Do not work from this skill alone — it is a summary, and it can @@ -698,6 +730,9 @@ remaining Effect and JSX errors as local-environment noise. the `Reference` block at the end of each API section points at the right schema. 4. If a page is silent, or a claim cannot be traced to a page, say so and mark it as inference. Do not guess a field name or present an inference as documented. +5. If you touched anything under `skills/` or `plugins/`, confirm it is pushed + before you answer: `git -C ~/.config/opencode status -sb` must show + `## main...origin/main` and no file lines. ## Rules the pages state