New comprehension tools: - sx_find_across: search pattern across all .sx files in a directory - sx_comp_list: list all definitions (defcomp/defisland/defmacro/defpage/define) - sx_comp_usage: find all uses of a component across files - sx_diff: structural diff between two .sx files (ADDED/REMOVED/CHANGED) - sx_eval: REPL — evaluate SX expressions in the MCP server env Smart read_tree enhancements: - Auto-summarise large files (>200 lines) - focus param: expand only matching subtrees, collapse rest - max_depth/max_lines/offset for depth limiting and pagination Smart editing tools: - sx_rename_symbol: rename all occurrences of a symbol in a file - sx_replace_by_pattern: find+replace first/all pattern matches - sx_insert_near: insert before/after a pattern match (top-level) - sx_rename_across: rename symbol across all .sx files (with dry_run) - sx_write_file: create .sx files with parse validation Development tools: - sx_pretty_print: reformat .sx files with indentation (also used by all edit tools) - sx_build: build JS bundle or OCaml binary - sx_test: run test suites with structured pass/fail results - sx_format_check: lint for empty bindings, missing bodies, duplicate params - sx_macroexpand: evaluate expressions with a file's macro definitions loaded Also: updated hook to block Write on .sx files, added custom explore agent. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
28 lines
1.3 KiB
Markdown
28 lines
1.3 KiB
Markdown
---
|
|
name: explore
|
|
description: Explore codebase using sx-tree MCP tools for .sx files
|
|
tools: Read, Grep, Glob, Bash, mcp__sx-tree__sx_summarise, mcp__sx-tree__sx_read_tree, mcp__sx-tree__sx_read_subtree, mcp__sx-tree__sx_find_all, mcp__sx-tree__sx_get_context, mcp__sx-tree__sx_get_siblings, mcp__sx-tree__sx_validate
|
|
hooks:
|
|
PreToolUse:
|
|
- matcher: "Read"
|
|
hooks:
|
|
- type: command
|
|
command: "bash .claude/hooks/block-sx-edit.sh"
|
|
---
|
|
|
|
Fast codebase exploration agent. Use for finding files, searching code, and answering questions about the codebase.
|
|
|
|
## Critical rule for .sx and .sxc files
|
|
|
|
NEVER use Read on .sx or .sxc files. The hook will block it. Instead use the sx-tree MCP tools:
|
|
|
|
- `mcp__sx-tree__sx_summarise` — structural overview at configurable depth
|
|
- `mcp__sx-tree__sx_read_tree` — full annotated tree with path labels
|
|
- `mcp__sx-tree__sx_read_subtree` — expand a specific subtree by path
|
|
- `mcp__sx-tree__sx_find_all` — search for nodes matching a pattern
|
|
- `mcp__sx-tree__sx_get_context` — enclosing chain from root to target
|
|
- `mcp__sx-tree__sx_get_siblings` — siblings of a node with target marked
|
|
- `mcp__sx-tree__sx_validate` — structural integrity checks
|
|
|
|
For all other file types, use Read, Grep, Glob, and Bash as normal.
|