agentleFS
accsoaccso/ai-monitoring/.github/skills/plugin-release/SKILL.md

plugin-release

Skill2 starsChanged 11 days agoApache-2.0View on GitHub

Use when releasing, installing, updating or rolling back the OpenCode ai-monitoring plugin (plugins/opencode): version bump, changelog, tests, build, install into ~/.config/opencode/plugins, verification and tagging. Drives scripts/install-plugin.sh and the mise plugin:* tasks.

5 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions5 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 5

    1. NanmiCoder/dsh-agent-teams★ 2.8ksame name
    2. nowledge-co/community★ 204same name
    3. v11g/agents-rock★ 9same name
    4. Compound-Leverage/THINK-school★ 2same name
    5. iroha924/sphica★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository2 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Plan first: Ask which bump level applies (patch/minor/major) and summarise the changes since the last release.

    line 14
  2. Very specific:

    Preconditions: Run mise run status; if the stack is down, run mise run up so integration tests are not skipped.

    line 15
  3. Distinctive:

    Do not claim success until data is seen.

    line 22
  4. Very specific:

    Commit and tag: If the directory is a git repository: commit with the Co-authored-by trailer, tag plugin-vX.Y.Z.

    line 23

“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

OpenCode plugin release flow

Details and rationale: docs/releasing.md, docs/plugin.md, ADR 0010. Never skip a step; stop and report on the first failure.

  1. Plan first. Ask which bump level applies (patch/minor/major) and summarise the changes since the last release. Wait for confirmation.
  2. Preconditions. Run mise run status; if the stack is down, run mise run up so integration tests are not skipped.
  3. Test. mise run plugin:test must pass (typecheck + unit + integration). For behaviour changes confirm the test was observed failing before the fix (see .github/instructions/ai-context-tdd.instructions.md for the red/green discipline).
  4. Version and changelog. Set the new version in plugins/opencode/package.json and add an entry at the top of plugins/opencode/CHANGELOG.md. If a significant decision was made, add an ADR in docs/adr/ and update its index.
  5. Install. Run scripts/install-plugin.sh (or mise run plugin:install). It runs typecheck and tests (Vitest on Node), bundles with esbuild, verifies the bundle default-exports only { id, setup, server }, and copies it atomically to ~/.config/opencode/plugins/ai-monitoring.js (removing a stale ai-monitoring/ directory). Use --dry-run to rehearse and --target DIR for another location. Never use --skip-tests for a release.
  6. Verify live. Tell the user to start a new opencode session and send a prompt (the plugin loads per session). Then check:
    • curl -s 'http://127.0.0.1:8428/api/v1/query?query=gen_ai_client_token_usage_sum' returns series for the expected provider/model/project;
    • grep ai-monitoring ~/.local/share/opencode/log/opencode.log shows no export warnings. Do not claim success until data is seen.
  7. Commit and tag. If the directory is a git repository: commit with the Co-authored-by trailer, tag plugin-vX.Y.Z. Otherwise say that no tag was created.

Rollback: git checkout plugin-v<previous> then scripts/install-plugin.sh, or scripts/install-plugin.sh --uninstall.

Pitfalls: one bundle for OpenCode 1 + 2 (default export { id, setup, server }, ADR 0018); never install a second copy or a plugin directory next to ai-monitoring.js (double loading counts twice); one tracker/exporter per call, flushed on cleanup/dispose; V2 has no plugin logger and console output is not forwarded, so V2 warnings go to ~/.local/share/opencode/log/ai-monitoring.log, V1 uses client.app.log (opencode.log); re-verify token sums vs. the opencode DB after changes, on V1 and V2.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.