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?
Impact
—
No eval scenarios have been run
Passed
No known issues
Create a custom OpenCode tool that searches for TODOs in the codebase. The tool should:
directory argument (string, optional, defaults to ".")pattern argument (string, optional, defaults to "TODO")Place the file at the correct location for a project-scoped tool.
tool from @opencode-ai/plugin (not from @opencode-ai/sdk).opencode/tool/ directory.describe() to both the directory and pattern argumentsexecute handler to return a string (not an object or Promise<object>).optional() or .default(...)tool from @opencode-ai/plugin, NOT from @opencode-ai/sdk.opencode/tool/ directorydirectory and pattern arguments include .describe() calls.optional() or .default(...) for the optional argumentstool from @opencode-ai/sdk instead of @opencode-ai/plugin.opencode/tool/ directory.describe() on one or both schema argumentsexecute handler returns an object or non-string value