Skip to content

Commit b646352

Browse files
authored
Feat kql expert (#137)
* feat: KQL expert skill with requires-mcp, trigger cleanup, syntax highlighting - Add kql-expert skill (SKILL.md) with 35 triggers, requires-mcp: fabric-rti-mcp - Add requires-mcp frontmatter support in skill-loader + approach-resolver - Add MCP enrichment wiring in agent index.ts - Add --mcp setup-fabric-rti CLI command - Clean generic triggers across 7 skills to prevent false matches - Add hljs-kql.ts grammar (derived from @kusto/monaco-kusto MIT) - Register KQL/Kusto syntax highlighting in markdown-renderer via createRequire - Add intent-matcher regression tests (27 tests: 22 positive + 5 guards) - Add skill-loader tests (8 tests) and approach-resolver MCP tests (8 tests) All 2396 tests pass. Typecheck clean. Fmt clean. Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com> * fix: gate diagnostic output behind --verbose/--debug flags - Rust: gate [hyperlight-analysis] eprintln! behind HYPERAGENT_VERBOSE/DEBUG env vars - MCP: gate [mcp] Connected/Auth success messages behind isVerbose() - MCP: pipe subprocess stderr when not verbose to suppress Python INFO logs - KQL skill: remove azuremcpserver reference, add anti-pattern to use fabric-rti-mcp only Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com> * docs: update skill tables and add requires-mcp documentation - Add all 9 skills to tables in docs/SKILLS.md, README.md, skills/CLAUDE.md, and .github/instructions/skills.instructions.md (was missing kql-expert, xlsx-expert, mcp-services in various files) - Document requires-mcp frontmatter field in docs/SKILLS.md - Add requires-mcp to YAML examples in instruction files - Alphabetise skill tables for consistency Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com> * fix: address PR #137 review feedback (9 issues) - Fix #2: Use MCP_SETUP_COMMANDS lookup for correct CLI setup hints (was generating 'setup-rti-mcp' instead of '--mcp-setup-fabric-rti') - Fix #3: Show unconfigured status when mcpManager is null - Fix #4: Update test assertion to match corrected setup command - Fix #5: Add highlight.js ^10.7.3 as explicit dependency (was transitive) - Fix #6: Validate Fabric RTI options — reject missing values & unknown flags - Fix #7: Set HYPERAGENT_VERBOSE=1 from cli.verbose flag - Fix #8: Update skill count from 9 to 10 in docs/SKILLS.md - Fix #9: Use stderr 'ignore' instead of 'pipe' to avoid back-pressure - Fix #10: Add CLI parser test for --mcp-setup-fabric-rti flag Comment #1 (hljs types) is invalid — typecheck passes with /// <reference>. Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com> --------- Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
1 parent 17134a1 commit b646352

27 files changed

Lines changed: 1741 additions & 57 deletions

File tree

.github/instructions/skills.instructions.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ antiPatterns:
2828
- "Don't do X"
2929
allowed-tools:
3030
- tool_name
31+
requires-mcp:
32+
- mcp-server-name
3133
---
3234

3335
# Skill Title
@@ -39,13 +41,16 @@ Detailed instructions for the LLM when this skill is active.
3941

4042
| Skill | Purpose |
4143
|-------|---------|
42-
| `pptx-expert` | PowerPoint presentation building |
44+
| `api-explorer` | API discovery, testing, and documentation |
45+
| `data-processor` | Data processing workflows |
46+
| `kql-expert` | KQL/Kusto queries via Fabric RTI MCP |
47+
| `mcp-services` | External MCP server integration |
4348
| `pdf-expert` | PDF document building |
49+
| `pptx-expert` | PowerPoint presentation building |
50+
| `report-builder` | Report and document generation |
4451
| `research-synthesiser` | Research and synthesis |
45-
| `data-processor` | Data processing workflows |
4652
| `web-scraper` | Web scraping |
47-
| `report-builder` | Report generation |
48-
| `api-explorer` | API exploration |
53+
| `xlsx-expert` | Excel workbook generation |
4954

5055
## Triggers
5156

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ Useful skills include:
175175
| `pptx-expert` | Professional PowerPoint decks |
176176
| `pdf-expert` | Structured PDF reports |
177177
| `xlsx-expert` | Excel workbook generation |
178+
| `kql-expert` | Kusto queries via Fabric RTI MCP tools |
178179
| `report-builder` | Multi-format reports and document output |
179180
| `data-processor` | Data cleaning, joins, aggregation, and export |
180181
| `api-explorer` | Understanding and calling APIs |

docs/SKILLS.md

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,16 @@ You: /skill pptx-expert
3838

3939
| Skill | Description |
4040
|-------|-------------|
41-
| `pptx-expert` | Building professional PowerPoint presentations |
42-
| `web-scraper` | Extracting data from web pages |
43-
| `research-synthesiser` | Combining multiple sources into reports |
44-
| `data-processor` | Transforming and analyzing data |
45-
| `report-builder` | Creating structured reports |
46-
| `api-explorer` | Discovering and using APIs |
41+
| `api-explorer` | Discover, test, and document REST/GraphQL/JSON APIs |
42+
| `data-processor` | Transform, filter, and analyse data using sandbox handlers |
43+
| `kql-expert` | KQL expertise for Kusto queries via Fabric RTI MCP tools |
44+
| `mcp-services` | Connect and use external MCP servers (M365, GitHub, custom) |
45+
| `pdf-expert` | Professional PDF documents using sandbox modules |
46+
| `pptx-expert` | Professional PowerPoint presentations using sandbox modules |
47+
| `report-builder` | Generate documents, reports, and formatted output |
48+
| `research-synthesiser` | Multi-source research synthesised into structured reports |
49+
| `web-scraper` | Extract data from web pages using fetch plugin |
50+
| `xlsx-expert` | Excel XLSX workbooks using sandbox modules |
4751

4852
## Skill File Format
4953

@@ -66,6 +70,8 @@ antiPatterns:
6670
allowed-tools:
6771
- register_handler
6872
- execute_javascript
73+
requires-mcp:
74+
- mcp-server-name
6975
---
7076
```
7177

@@ -104,6 +110,18 @@ and always produce high-quality Z.
104110
| `patterns` | No | Code patterns relevant to this skill |
105111
| `antiPatterns` | No | Common mistakes to avoid |
106112
| `allowed-tools` | No | Tools the LLM can use with this skill |
113+
| `requires-mcp` | No | MCP server names that must be connected for this skill |
114+
115+
### MCP Server Dependencies
116+
117+
If `requires-mcp` is specified, the skill declares which MCP servers it needs. The approach resolver checks whether required servers are connected and shows their status:
118+
119+
```yaml
120+
requires-mcp:
121+
- fabric-rti-mcp
122+
```
123+
124+
When the skill is matched, the agent enriches the guidance with MCP connection status so the LLM knows whether to prompt the user to connect the server first.
107125
108126
### Tool Restrictions
109127
@@ -218,9 +236,10 @@ Skills are discovered automatically from:
218236
List available skills:
219237
```
220238
You: /skill list
221-
📚 Available skills (6):
222-
pptx-expert - Expert at building professional PowerPoint presentations
223-
web-scraper - Extracting data from web pages
239+
📚 Available skills (10):
240+
api-explorer - Discover, test, and document REST/GraphQL/JSON APIs
241+
data-processor - Transform, filter, and analyse data
242+
kql-expert - KQL expertise for Kusto queries via Fabric RTI MCP
224243
...
225244
```
226245

package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"@hyperlight/js-host-api": "file:deps/js-host-api",
3636
"@modelcontextprotocol/sdk": "^1.29.0",
3737
"boxen": "^8.0.1",
38+
"highlight.js": "^10.7.3",
3839
"hyperlight-analysis": "file:src/code-validator/guest",
3940
"marked": "^15.0.12",
4041
"marked-terminal": "^7.3.0",

skills/CLAUDE.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ antiPatterns:
2424
- "Don't do X"
2525
allowed-tools:
2626
- tool_name
27+
requires-mcp:
28+
- mcp-server-name
2729
---
2830

2931
# Skill Title
@@ -35,13 +37,16 @@ Detailed instructions for the LLM when this skill is active.
3537

3638
| Skill | Purpose |
3739
|-------|---------|
38-
| `pptx-expert` | PowerPoint presentation building |
40+
| `api-explorer` | API discovery, testing, and documentation |
41+
| `data-processor` | Data processing workflows |
42+
| `kql-expert` | KQL/Kusto queries via Fabric RTI MCP |
43+
| `mcp-services` | External MCP server integration |
3944
| `pdf-expert` | PDF document building |
45+
| `pptx-expert` | PowerPoint presentation building |
46+
| `report-builder` | Report and document generation |
4047
| `research-synthesiser` | Research and synthesis |
41-
| `data-processor` | Data processing workflows |
4248
| `web-scraper` | Web scraping |
43-
| `report-builder` | Report generation |
44-
| `api-explorer` | API exploration |
49+
| `xlsx-expert` | Excel workbook generation |
4550

4651
## Triggers
4752

skills/api-explorer/SKILL.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ triggers:
1111
- API documentation
1212
- API reference
1313
- test endpoint
14-
- request
15-
- response
1614
- status code
1715
- rate limit
1816
- webhook
17+
- API call
18+
- REST API
19+
- HTTP endpoint
1920
patterns:
2021
- fetch-and-process
2122
- data-extraction

skills/data-processor/SKILL.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ description: Transform, filter, and analyse data using sandbox handlers
44
triggers:
55
- CSV
66
- JSON
7-
- transform
8-
- convert
9-
- process
10-
- analyse
11-
- analyze
12-
- data
13-
- filter
14-
- aggregate
15-
- sort
16-
- parse
7+
- TSV
8+
- CSV to JSON
9+
- JSON to CSV
10+
- data pipeline
11+
- ETL
12+
- tabular data
13+
- parse CSV
14+
- parse JSON
15+
- transform CSV
16+
- transform JSON
1717
patterns:
1818
- data-transformation
1919
- two-handler-pipeline

0 commit comments

Comments
 (0)