spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

claude-code / mods / sec-default / tests / fixtures / listing.ts
16 lines · 418 BRaw
1import type { Plugin } from 'claude-code/testing'
2
3/**
4 * A plugin whose `/tools` answers the tool listing it reads, one
5 * `name: description` line per tool.
6 */
7export const listing: Plugin = {
8 name: 'listing',
9 register(on) {
10 on('command.run', { command: 'tools' }, async $ => ({
11 text: (await $.tool.list())
12 .map(tool => `${tool.name}: ${tool.description}`)
13 .join('\n'),
14 }))
15 },
16}