skills: require every skills/ and plugins/ change to be pushed

Editing the skill, or a plugin under plugins/, is a change to the
~/.config/opencode repository. That had no rule attached to it, so work
landed locally and the remote silently drifted.

Add "Push every change" near the top of SKILL.md, where it is read before
the reference material rather than buried at the end, plus a fifth item in
"Verifying before you answer" so the push is part of the final check rather
than a separate task that gets skipped.

The section records the three constraints that are not guessable:

- Push over SSH. origin is git@git.xsinfo.vip:xiaoshuai/oc.git; an HTTPS push
  prompts for a password and there is no TTY, so it fails outright.
- Never git init inside skills/ or plugins/. OpenCode discovers every immediate
  subdirectory of plugins/ as a plugin package, so a .git there is loaded as
  plugins/.git/index and fails on each startup. The repository belongs at the
  config root, one level above both scan roots.
- Do not git add -f past .gitignore. opencode.jsonc, cli.json, service.json,
  package.json and node_modules/ are machine-local by design.
This commit is contained in:
2026-10-08 13:17:48 +08:00
parent 15a1bbcee0
commit 13d353e96d
+35
View File
@@ -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 "<what changed and why>"
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