plugin-logging
Use client.app.log() instead of console.log in OpenCode plugins
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use client.app.log() instead of console.log in OpenCode plugins
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Create and manage isolated git worktrees safely.
Opinionated workflow for submodule development + PRs + control-center pointer bumps.
Store Apple notarization IDs in Keychain and notarize/staple OpenWork DMGs locally.
Sync control-center master and update submodule pointers safely.
Require every OpenCode plugin to expose get_skills and get_version tools.
Guide for creating effective skills. Use when users want to create or update a skill that extends Claude with specialized knowledge, workflows, or tool integrations.
| name | plugin-logging |
| description | Use client.app.log() instead of console.log in OpenCode plugins |
Use client.app.log() for structured logs inside OpenCode plugins. Do not use console.log().
Why:
service / level)export const MyPlugin = async ({ client }) => {
await client.app.log({
service: "my-plugin",
level: "info",
message: "Plugin initialized",
extra: { foo: "bar" },
});
};
Inside tool({ ... async execute(args, ctx) { ... } }), prefer:
await ctx.client.app.log({
service: "my-plugin",
level: "info",
message: "did thing",
extra: { args },
});
If you’re not sure ctx.client.app.log exists (older plugin API), use a guarded call:
if (ctx?.client?.app?.log) {
await ctx.client.app.log({ service: "my-plugin", level: "info", message: "..." });
}