opencode-skills-collection 3.1.17 → 3.1.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,175 @@
1
+ ---
2
+ name: routerbase-model-gateway
3
+ description: "Integrate RouterBase as an OpenAI-compatible model gateway for routing GPT, Claude, Gemini, media, audio, and embedding requests."
4
+ category: ai-ml
5
+ risk: safe
6
+ source: community
7
+ source_repo: zenlee123/routerbase-agent-skills
8
+ source_type: community
9
+ date_added: "2026-07-07"
10
+ author: zenlee123
11
+ tags: [routerbase, llm-routing, openai-compatible, model-gateway]
12
+ tools: [claude, cursor, gemini, codex, antigravity]
13
+ license: "MIT-0"
14
+ license_source: "https://github.com/zenlee123/routerbase-agent-skills/blob/main/LICENSE"
15
+ ---
16
+
17
+ # RouterBase Model Gateway
18
+
19
+ ## Overview
20
+
21
+ Use [routerbase](https://routerbase.com/) when an application needs one OpenAI-compatible API surface for model routing across GPT, Claude, Gemini, image, video, audio, and embedding workloads. This skill helps agents migrate existing OpenAI SDK calls, document model-selection tradeoffs, and produce safe implementation snippets without exposing credentials.
22
+
23
+ RouterBase model availability, pricing, and provider capabilities can change, so treat examples as starting points and verify current catalog data before production recommendations.
24
+
25
+ ## When to Use This Skill
26
+
27
+ - Use when migrating an OpenAI-compatible client to RouterBase by changing the base URL and model ID.
28
+ - Use when selecting primary and fallback models for chat, reasoning, vision, media generation, audio, or embeddings.
29
+ - Use when debugging RouterBase request setup, headers, environment variables, streaming, tool calls, JSON mode, or multimodal payloads.
30
+ - Use when documenting an internal model-routing plan that balances cost, latency, quality, and provider redundancy.
31
+
32
+ ## How It Works
33
+
34
+ ### Step 1: Classify the Workload
35
+
36
+ Identify the modality and hard constraints before choosing a model:
37
+
38
+ - Modality: chat, vision, image, video, audio, embeddings, or mixed.
39
+ - Quality target: draft, production, high-stakes review, or automated background task.
40
+ - Runtime constraints: latency budget, context length, streaming, JSON mode, tool calling, and retry tolerance.
41
+ - Business constraints: price ceiling, provider preference, regional requirements, and fallback rules.
42
+
43
+ ### Step 2: Configure the OpenAI-Compatible Client
44
+
45
+ Keep the RouterBase API key server-side in an environment variable such as `ROUTERBASE_API_KEY`. Do not put keys in browser, mobile, or public repository code.
46
+
47
+ ```python
48
+ import os
49
+ from openai import OpenAI
50
+
51
+ client = OpenAI(
52
+ api_key=os.environ["ROUTERBASE_API_KEY"],
53
+ base_url="https://routerbase.com/v1",
54
+ )
55
+
56
+ response = client.chat.completions.create(
57
+ model="google/gemini-2.5-flash",
58
+ messages=[{"role": "user", "content": "Write one sentence about model routing."}],
59
+ )
60
+
61
+ print(response.choices[0].message.content)
62
+ ```
63
+
64
+ ```js
65
+ import OpenAI from "openai";
66
+
67
+ const client = new OpenAI({
68
+ apiKey: process.env.ROUTERBASE_API_KEY,
69
+ baseURL: "https://routerbase.com/v1",
70
+ });
71
+
72
+ const response = await client.chat.completions.create({
73
+ model: "google/gemini-2.5-flash",
74
+ messages: [{ role: "user", content: "Write one sentence about model routing." }],
75
+ });
76
+
77
+ console.log(response.choices[0].message.content);
78
+ ```
79
+
80
+ ### Step 3: Validate Model IDs and Capabilities
81
+
82
+ When credentials and network access are available, check the live catalog before locking in a model ID or price-sensitive recommendation.
83
+
84
+ ```bash
85
+ curl "https://routerbase.com/api/v1/models?task=chat" \
86
+ -H "Authorization: Bearer $ROUTERBASE_API_KEY"
87
+ ```
88
+
89
+ Confirm feature assumptions with a small request fixture:
90
+
91
+ - Streaming works when `stream: true` is set.
92
+ - Tool calling accepts the exact schema used by the app.
93
+ - JSON mode returns parseable output and still passes application validation.
94
+ - Vision or media payloads use the expected OpenAI-compatible content shape.
95
+
96
+ ### Step 4: Design Fallbacks Conservatively
97
+
98
+ Use explicit application-level fallbacks unless the user's RouterBase account already has a smart-routing policy configured.
99
+
100
+ ```js
101
+ const modelPlan = [
102
+ "anthropic/claude-sonnet-4-6",
103
+ "google/gemini-2.5-flash",
104
+ ];
105
+
106
+ for (const model of modelPlan) {
107
+ try {
108
+ return await client.chat.completions.create({ model, messages });
109
+ } catch (error) {
110
+ if (!isRetryableRouterBaseError(error)) throw error;
111
+ }
112
+ }
113
+ ```
114
+
115
+ Treat transient network errors, timeouts, rate limits, and server errors as candidates for retry. Do not blindly retry authentication failures, invalid model IDs, validation errors, or policy refusals.
116
+
117
+ ## Examples
118
+
119
+ ### Migration Checklist
120
+
121
+ When converting an existing OpenAI SDK integration:
122
+
123
+ 1. Change the base URL to `https://routerbase.com/v1`.
124
+ 2. Read `ROUTERBASE_API_KEY` from server-side environment configuration.
125
+ 3. Replace the model name with a RouterBase model ID that matches the task.
126
+ 4. Preserve standard OpenAI request fields unless RouterBase documentation says otherwise.
127
+ 5. Run one minimal smoke test before shipping.
128
+
129
+ ### Routing Plan Format
130
+
131
+ Use this table when recommending a model strategy:
132
+
133
+ | Use case | Primary model | Fallback model | Reason | Validation |
134
+ | --- | --- | --- | --- | --- |
135
+ | Support chat | Provider/model ID | Provider/model ID | Low latency and acceptable quality | Streaming smoke test |
136
+ | Deep analysis | Provider/model ID | Provider/model ID | Strong reasoning, higher cost acceptable | Eval prompt plus human review |
137
+
138
+ ## Best Practices
139
+
140
+ - Do keep RouterBase keys in server-side environment variables or secret managers.
141
+ - Do verify current model availability and pricing before production decisions.
142
+ - Do document primary and fallback model assumptions in the code or runbook.
143
+ - Do validate structured outputs with application schemas.
144
+ - Do not paste, log, commit, or screenshot real API keys.
145
+ - Do not hard-code model pricing or provider availability as permanent facts.
146
+ - Do not expose RouterBase keys in client-side JavaScript, mobile apps, or public repos.
147
+
148
+ ## Limitations
149
+
150
+ - This skill does not replace RouterBase account configuration, live model catalog checks, or production observability.
151
+ - Some model features are provider-specific and must be tested with the exact selected model.
152
+ - High-stakes outputs still require human review and domain-specific evaluation.
153
+
154
+ ## Security & Safety Notes
155
+
156
+ - Treat RouterBase credentials as production secrets.
157
+ - Mask tokens in logs and support tickets.
158
+ - Ask for explicit user approval before running live API calls that consume credits.
159
+ - Use placeholders such as environment variables in examples; never invent or include realistic secret strings.
160
+
161
+ ## Common Pitfalls
162
+
163
+ - **Problem:** The code works with one provider but fails after switching models.
164
+ **Solution:** Re-test tool calling, JSON mode, streaming, and multimodal payloads for each selected model.
165
+
166
+ - **Problem:** Fallback logic retries non-retryable errors.
167
+ **Solution:** Retry only transient failures and fail fast on authentication, validation, and invalid model errors.
168
+
169
+ - **Problem:** A model recommendation becomes stale.
170
+ **Solution:** Re-check the RouterBase catalog and pricing page before finalizing the plan.
171
+
172
+ ## Related Skills
173
+
174
+ - `@api-analyzer` - Use when the task is only to validate one API request shape.
175
+ - `@langfuse` - Use when the task needs production LLM observability, tracing, and evaluation.
@@ -0,0 +1,218 @@
1
+ ---
2
+ name: tree-ring-memory
3
+ description: "Use Tree Ring Memory for local-first AI-agent memory lifecycle work: recall, evidence, audit, forgetting, and consolidation without transcript dumping."
4
+ category: development
5
+ risk: safe
6
+ source: community
7
+ source_repo: TerminallyLazy/Tree-Ring-Memory
8
+ source_type: community
9
+ date_added: "2026-07-08"
10
+ author: TerminallyLazy
11
+ tags: [agent-memory, local-first, recall, privacy, codex, sqlite, cli]
12
+ tools: [claude, codex, cursor, gemini, antigravity, opencode]
13
+ license: "Apache-2.0"
14
+ license_source: "https://github.com/TerminallyLazy/Tree-Ring-Memory/blob/main/LICENSE"
15
+ ---
16
+
17
+ # Tree Ring Memory
18
+
19
+ ## Overview
20
+
21
+ Tree Ring Memory is a framework-agnostic, local-first memory lifecycle layer for
22
+ AI agents. Use this skill when an agent should recall, preserve, audit, or
23
+ forget durable project memory without treating raw conversation transcripts as
24
+ memory.
25
+
26
+ The public runtime is a Rust CLI/TUI with local SQLite/FTS storage, scoped
27
+ recall, evidence records, audit, deterministic consolidation, maintenance,
28
+ DOX/Revolve source adapters, framework discovery, redaction, and explicit
29
+ forgetting.
30
+
31
+ ## When to Use This Skill
32
+
33
+ - Use before resuming a project where prior decisions, warnings, preferences,
34
+ or failed approaches may matter.
35
+ - Use before changing architecture, storage, security, privacy, release, or
36
+ agent-memory behavior.
37
+ - Use when the user asks to remember, recall, audit, redact, forget, or
38
+ consolidate agent memory.
39
+ - Use after tests, reviews, incidents, or production behavior validate a lesson
40
+ future agents should preserve.
41
+ - Use when a project contains `.tree-ring/SKILL.md`, `.tree-ring/CLI.md`, or
42
+ other Tree Ring bridge files.
43
+
44
+ ## How It Works
45
+
46
+ ### Step 1: Discover Local Guidance
47
+
48
+ Check whether the current project already has Tree Ring guidance:
49
+
50
+ ```bash
51
+ test -f .tree-ring/SKILL.md && sed -n '1,220p' .tree-ring/SKILL.md
52
+ test -f .tree-ring/CLI.md && sed -n '1,220p' .tree-ring/CLI.md
53
+ ```
54
+
55
+ Treat project-local `.tree-ring` files as more authoritative than generic
56
+ examples in this skill. If the CLI is installed, inspect the current command
57
+ surface before assuming flags:
58
+
59
+ ```bash
60
+ tree-ring --help
61
+ tree-ring recall --help
62
+ tree-ring remember --help
63
+ tree-ring evidence --help
64
+ tree-ring audit --help
65
+ tree-ring forget --help
66
+ ```
67
+
68
+ If Tree Ring is not installed, do not run remote installer commands
69
+ automatically. Point the user to the project repository or install docs and ask
70
+ whether they want installation help.
71
+
72
+ ## Step 2: Recall Before Risky Work
73
+
74
+ Use narrow, project-scoped recall first:
75
+
76
+ ```bash
77
+ tree-ring recall "release behavior" --scope project
78
+ tree-ring recall "sqlite migration" --scope project
79
+ tree-ring recall "user preference" --scope global
80
+ ```
81
+
82
+ Use recalled memory as context, not authority. Verify it against current source
83
+ files, tests, docs, issues, pull requests, logs, and runtime state before making
84
+ changes.
85
+
86
+ ## Step 3: Write Only Durable Memory
87
+
88
+ Write concise memory only when it is likely to help future agents:
89
+
90
+ ```bash
91
+ tree-ring remember "Run project-scoped recall before release changes." --event-type lesson --scope project
92
+ ```
93
+
94
+ Prefer specific event types when supported locally:
95
+
96
+ - `decision`
97
+ - `lesson`
98
+ - `warning`
99
+ - `correction`
100
+ - `user_preference`
101
+ - `tool_result`
102
+ - `summary`
103
+ - `hypothesis`
104
+
105
+ Store the durable lesson, decision, warning, or follow-up. Do not store the
106
+ full conversation.
107
+
108
+ ## Step 4: Record Evidence for Evaluated Outcomes
109
+
110
+ Use evidence records for test runs, incidents, reviewed changes, or other
111
+ evaluated outcomes:
112
+
113
+ ```bash
114
+ tree-ring evidence \
115
+ --outcome observed \
116
+ --summary "Installer smoke test passed in an isolated HOME." \
117
+ --evidence-ref "ci/install-smoke/2026-07-08"
118
+ ```
119
+
120
+ Outcome guidance:
121
+
122
+ - `promoted`: durable truth backed by strong evidence
123
+ - `rejected`: failed or rolled-back approach worth keeping visible
124
+ - `deferred`: unresolved idea or future option
125
+ - `observed`: normal evaluated result
126
+
127
+ Do not promote weak, stale, or unreviewed claims to durable truth.
128
+
129
+ ## Step 5: Use Source Adapters Carefully
130
+
131
+ When a repo has structured source records, run dry runs first:
132
+
133
+ ```bash
134
+ tree-ring dox sync --source-root . --dry-run
135
+ tree-ring revolve sync --source-root revolve --dry-run
136
+ tree-ring integrations scan --source-root .
137
+ ```
138
+
139
+ Only write adapter summaries when they are concise, source-linked, useful, and
140
+ privacy-safe. Imported memory does not replace the underlying `AGENTS.md`,
141
+ Revolve record, test, pull request, issue, or documentation.
142
+
143
+ ## Ring Selection
144
+
145
+ Use the smallest durable ring that fits:
146
+
147
+ - `cambium`: active or recent task context
148
+ - `outer`: recent decisions and task lessons
149
+ - `inner`: older compressed project knowledge
150
+ - `heartwood`: durable high-confidence truths
151
+ - `scar`: failures, regressions, rejected approaches, warnings
152
+ - `seed`: unresolved ideas, hypotheses, follow-ups
153
+
154
+ Prefer `outer` or `seed` unless the user confirms durability or the evidence is
155
+ strong.
156
+
157
+ ## Best Practices
158
+
159
+ - Recall before risky or repeat work.
160
+ - Keep project memory project-scoped unless it is a durable cross-project user
161
+ preference.
162
+ - Attach source references such as file paths, issue ids, PR ids, evaluation
163
+ runs, or docs paths.
164
+ - Re-check current source files and runtime state before acting on recalled
165
+ memory.
166
+ - Ask at closeout what future agents should remember, avoid, or revisit.
167
+ - Use redaction, deletion, or supersession when memory is wrong, stale,
168
+ sensitive, or replaced by a newer decision.
169
+
170
+ ## Security & Safety Notes
171
+
172
+ - Never use Tree Ring Memory as a hidden recorder.
173
+ - Do not store secrets, credentials, tokens, private keys, recovery codes, raw
174
+ chain-of-thought, or temporary scratchpad content.
175
+ - Do not store sensitive personal data unless the user explicitly asks and the
176
+ retention boundary is safe.
177
+ - Do not store copyrighted source text beyond short allowed excerpts.
178
+ - Do not run installer, network, destructive, or mutation commands without
179
+ explicit user approval and a clear target environment.
180
+ - Treat all examples as commands to adapt after checking local `--help`, not as
181
+ guaranteed command surfaces.
182
+
183
+ ## Limitations
184
+
185
+ - Tree Ring Memory is not a replacement for source control, issue trackers,
186
+ documentation, tests, logs, or live runtime verification.
187
+ - Recalled memory can be stale or wrong. Always verify important claims against
188
+ the current project before using them to make changes.
189
+ - The CLI surface can change across releases. Prefer local `.tree-ring`
190
+ guidance and `tree-ring --help` over copied command examples.
191
+ - It should not be used for secret storage, comprehensive transcript archives,
192
+ compliance retention, or unreviewed collection of sensitive personal data.
193
+ - Cross-agent interoperability depends on each tool's ability to call the local
194
+ CLI or read project-local guidance files.
195
+
196
+ ## Common Pitfalls
197
+
198
+ - **Problem:** Recalled memory conflicts with current source.
199
+ **Solution:** Treat source files, tests, docs, and runtime evidence as
200
+ authoritative; supersede or forget stale memory.
201
+
202
+ - **Problem:** Memory starts becoming transcript storage.
203
+ **Solution:** Store only durable decisions, warnings, preferences, outcomes,
204
+ and follow-ups.
205
+
206
+ - **Problem:** A lesson is useful but contains sensitive detail.
207
+ **Solution:** Store a redacted summary or do not store it.
208
+
209
+ ## Related Skills
210
+
211
+ - `@agent-memory-systems` - Use for broad agent-memory architecture choices.
212
+ - `@agent-memory` - Use for the listed hybrid memory MCP system.
213
+ - `@planning-with-files` - Use when simple persistent files are enough.
214
+
215
+ ## Additional Resources
216
+
217
+ - Tree Ring Memory repository: <https://github.com/TerminallyLazy/Tree-Ring-Memory>
218
+ - Codex plugin wrapper: <https://github.com/TerminallyLazy/tree-ring-memory-codex-plugin>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-skills-collection",
3
- "version": "3.1.17",
3
+ "version": "3.1.19",
4
4
  "description": "OpenCode CLI plugin that automatically downloads and keeps skills up to date.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",