File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010from src .query import query_data
1111from src .todos import AgentState , todo_tools
1212from src .form import generate_form
13- from skills import load_all_skills
13+ from skills import load_all_skills , load_skill
1414
15- # Load all visualization skills
16- _skills_text = load_all_skills ()
15+ # Load visualization skills (excalidraw loaded separately — it targets MCP tools, not widgetRenderer)
16+ _widget_skills_text = load_all_skills (exclude = ["excalidraw-diagram-skill" ])
17+ _excalidraw_skill_text = load_skill ("excalidraw-diagram-skill" )
1718
1819agent = create_agent (
1920 model = ChatOpenAI (model = "gpt-5.4-2026-03-05" ),
4647
4748 Follow the skills below for how to produce high-quality visuals:
4849
49- { _skills_text }
50+ { _widget_skills_text }
51+
52+ ## Excalidraw Diagramming Skills
53+
54+ You also have access to Excalidraw MCP tools (`Excalidraw:read_me` and
55+ `Excalidraw:create_view`) for creating animated, interactive diagrams.
56+
57+ When a user asks you to draw a diagram, flowchart, architecture map, or any
58+ visual that would benefit from the Excalidraw canvas — use the Excalidraw MCP
59+ tools instead of `widgetRenderer`. Follow the skill below exactly:
60+
61+ { _excalidraw_skill_text }
5062 """ ,
5163)
5264
Original file line number Diff line number Diff line change @@ -17,10 +17,17 @@ def load_skill(name: str) -> str:
1717 return path .read_text ()
1818
1919
20- def load_all_skills () -> str :
21- """Load and concatenate all .txt skill files in this directory."""
20+ def load_all_skills (exclude : list [str ] | None = None ) -> str :
21+ """Load and concatenate all .txt skill files in this directory.
22+
23+ Args:
24+ exclude: Optional list of skill names (without extension) to skip.
25+ """
26+ skip = set (exclude or [])
2227 parts : list [str ] = []
2328 for path in sorted (_SKILLS_DIR .glob ("*.txt" )):
29+ if path .stem in skip :
30+ continue
2431 parts .append (f"\n \n { '=' * 60 } \n # SKILL: { path .stem } \n { '=' * 60 } \n \n " )
2532 parts .append (path .read_text ())
2633 return "" .join (parts )
You can’t perform that action at this time.
0 commit comments