بنقرة واحدة
add-tool
Scaffold a new agent tool package for spaceduck
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Scaffold a new agent tool package for spaceduck
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Research any topic using web search and browsing, then store a concise summary to memory. Use for scheduled research tasks or one-off deep dives.
Summarize the day's conversations and store key takeaways to long-term memory. Use when running as a scheduled end-of-day review.
Categorize and prioritize incoming messages across channels. Use when triggered by a new message event to decide urgency and routing.
Identify contradictory, stale, or duplicate memories and propose cleanup. Use when running as a scheduled weekly maintenance task.
Scaffold a new messaging channel package for spaceduck
Scaffold a new memory storage backend for spaceduck
| name | add-tool |
| description | Scaffold a new agent tool package for spaceduck |
Scaffolds a new agent tool under packages/tools/<name>/.
packages/tools/<name>/
package.json # @spaceduck/tool-<name>
src/
<name>-tool.ts # main tool class
types.ts # (optional) interfaces/options
index.ts # barrel export
__tests__/
<name>.test.ts # bun:test suite
package.json:{
"name": "@spaceduck/tool-<name>",
"version": "0.1.0",
"private": true,
"type": "module",
"main": "src/index.ts",
"types": "src/index.ts",
"scripts": { "test": "bun test" },
"dependencies": {},
"devDependencies": { "bun-types": "latest" }
}
export interface <Name>ToolOptions {
maxChars?: number; // default 50,000
// tool-specific options with sensible defaults
}
export class <Name>Tool {
constructor(options: <Name>ToolOptions = {}) { /* ... */ }
// Public methods return Promise<string> -- the text the LLM will see
async doSomething(args: ...): Promise<string> { /* ... */ }
}
Key conventions:
Promise<string> (tool results are always text for the LLM)maxChars (default 50,000) with [truncated] markerURL:, Title:, File:)Write tests in src/__tests__/<name>.test.ts:
.. (the barrel)describe/it/expect from bun:testRun bun install from root to link the new workspace
Run bun test packages/tools/<name>/ to verify
Export from src/index.ts:
export { <Name>Tool, type <Name>ToolOptions } from "./<name>-tool";
See existing tools for examples:
packages/tools/browser/ -- heavyweight Playwright browser automationpackages/tools/web-fetch/ -- lightweight HTTP fetch + HTML-to-text