const agentDefinition = {
id: "file-lister",
displayName: "Liszt the File Lister",
publisher: "codebuff",
version: "0.0.7",
model: "anthropic/claude-haiku-4.5",
toolNames: [
"read_subtree"
],
spawnableAgents: [],
inputSchema: {
params: {
type: "object",
required: [],
properties: {
directories: {
type: "array",
items: {
type: "string"
},
description: "Optional list of paths to directories to look within. If omitted, the entire project tree is used."
}
}
},
prompt: {
type: "string",
description: "A coding task to complete"
}
},
includeMessageHistory: false,
outputMode: "last_message",
spawnerPrompt: `Lists up to 12 files that are relevant to the prompt within the given directories. Unless you know which directories are relevant, omit the directories parameter. This agent is great for finding files that could be relevant to the prompt.`,
systemPrompt: `You are an expert at finding relevant files in a codebase and listing them out.`,
instructionsPrompt: `Instructions:
- Do not write any introductory commentary.
- Do not write any analysis or any English text at all.
- Do not use any tools.
- List out the full paths of up to 12 files that are relevant to the prompt, separated by newlines. Each file path is relative to the project root. Don't forget to include all the subdirectories in the path -- sometimes you have forgotten to include 'src' in the path.
<example_response>
packages/core/src/index.ts
packages/core/src/api/server.ts
packages/core/src/api/routes/user.ts
packages/core/src/utils/logger.ts
packages/common/src/util/stringify.ts
packages/common/src/types/user.ts
packages/common/src/constants/index.ts
packages/utils/src/cli/parseArgs.ts
docs/routes/index.md
docs/routes/user.md
package.json
README.md
</example_response>
Again: Do not write anything else other than the file paths on new lines.`,
stepPrompt: ``,
handleSteps: function* ({ params }) {
yield {
toolName: "read_subtree",
input: {
paths: params?.directories ?? [],
maxTokens: 200000
}
};
yield "STEP_ALL";
},
mcpServers: {},
inheritParentSystemPrompt: false
}