Complete toolkit for configuring and extending OpenCode: agent creation, custom slash commands, configuration management, plugin development, and SDK usage.
75
94%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Create an OpenCode plugin that blocks any bash command containing "rm -rf" from executing. The plugin should:
tool.execute.before hook to intercept tool execution before it runsthrow new Error(...) to block the command — never return falsePlugin type from @opencode-ai/plugintool.execute.before handler as asynctool.execute.before hook to intercept executionthrow new Error(...) to block execution, NOT return falsePlugin type from @opencode-ai/plugintool.execute.before handler is declared as asyncreturn false instead of throw new Error(...) to block execution@opencode-ai/pluginasynctool.execute.after instead)