QueryForge — EF & LINQ Analyzer

QueryForge detects risky LINQ and Entity Framework query patterns directly in your editor. Analysis runs locally and provides diagnostics, detailed guidance and safe quick fixes.
Built for VS Code and editors compatible with the VS Code extension ecosystem.
Install
Install from Visual Studio Marketplace ·
Install from Open VSX
Or open the Extensions view (Ctrl+Shift+X), search for QueryForge, and install queryforge-tools.queryforge-editor.
You can also install from the Command Palette (Ctrl+Shift+P):
ext install queryforge-tools.queryforge-editor
Install from VSIX
Download the .vsix from GitHub Releases.
- Open your editor.
- Go to Extensions.
- Open the actions menu (
...).
- Select Install from VSIX...
- Choose the downloaded file.
code --install-extension queryforge-editor-<version>.vsix
cursor --install-extension queryforge-editor-<version>.vsix
antigravity --install-extension queryforge-editor-<version>.vsix
Try it in 30 seconds
- Open the Command Palette.
- Run
QueryForge: Open Example.
- Click Analyze Example.
- Review the findings in the editor or Problems Panel.
- Use the lightbulb action on a diagnostic with a safe fix.
Quick start
- Open a C# file.
- Run
QueryForge: Analyze Current File.
- Review findings in the editor or Problems Panel.
- Open the diagnostic details.
- Apply a safe Quick Fix when available.
Example
Before:
var exists = await db.Products.CountAsync() > 0;
QueryForge reports COUNT_GREATER_THAN_ZERO and suggests:
var exists = await db.Products.AnyAsync();
Another pattern without a safe fix:
var products = await db.Products
.Where(product => product.CreatedAt.Year == year)
.ToListAsync();
QueryForge reports a function-on-column filter and recommends rewriting it as a date range. This requires review and is not automatically applied.
Not every diagnostic includes a Quick Fix. Review-required suggestions stay in hover guidance and the Problems Panel.
Features
- Analyze the current C# file on demand
- Analyze only the selected C# query or expression
- Built-in fictional C# example for quick evaluation
- Native Getting Started walkthrough
- Diagnostics in the editor and Problems Panel
- Detailed hover guidance with explanation, suggestion and rewrite plan
- Safe Quick Fix actions for fixes marked as
safe
- Optional analyze-on-save for saved C# files
- Output Channel with concise analysis summaries
- Status bar shortcut with per-document analysis state
Commands
| Command |
Description |
QueryForge: Analyze Current File |
Analyze the active C# document |
QueryForge: Analyze Current Selection |
Analyze the selected C# text |
QueryForge: Open Example |
Open a built-in fictional C# example |
QueryForge: Open Settings |
Open QueryForge extension settings |
QueryForge: Clear Diagnostics |
Clear QueryForge diagnostics and metadata |
QueryForge: Show Output |
Open the QueryForge output channel |
QueryForge: Support the Project |
Open GitHub Sponsors |
Current capabilities
| Capability |
Available |
| Analyze current C# file |
Yes |
| Analyze selected code |
Yes |
| Editor diagnostics |
Yes |
| Problems Panel |
Yes |
| Detailed hover guidance |
Yes |
| Safe Quick Fixes |
When provided by the Core |
| Analyze on save |
Optional |
| Workspace analysis |
Not yet |
| Roslyn semantic analysis |
No |
| Database connection |
No |
| SQL execution |
No |
Supported patterns
QueryForge focuses on common query-performance smells, including:
- early materialization
- tracking overhead
- existence checks using
Count
- unstable pagination and ordering
- non-sargable filters
- large
Take operations
- structural N+1 and round-trip patterns
- unnecessary includes
- client-side query behavior
The extension consumes the local programmatic API from QueryForge MCP/Core. It does not start the MCP server.
Diagnostics
Each QueryForge diagnostic includes:
- severity mapped from QueryForge levels
- rule code
- concise message
- source set to
QueryForge
Hover over a diagnostic to see explanation, suggestion, rewrite plan and confidence.
Diagnostics are cleared when the document changes. Run the analysis again to refresh the results.
Safe fixes
Quick Fix actions are offered only when fix.safety === "safe".
Review-required fixes are never applied automatically.
If the document changed after analysis, the extension blocks stale fixes and asks you to run analysis again.
How it works
QueryForge Editor reads the current C# text and calls the local QueryForge analysis library. It does not start the MCP server.
Flow:
C# editor text → QueryAnalysisService → QuerySmell[] → diagnostics → hover → safe Quick Fix
Supported editors
Target environments:
- Visual Studio Code
- Cursor
- Antigravity
Availability depends on marketplace distribution and editor compatibility.
Configuration
| Setting |
Default |
Description |
queryforge.analysis.provider |
ef-core |
Provider context passed to the analyzer |
queryforge.analysis.maxIssues |
100 |
Maximum diagnostics per analysis |
queryforge.analysis.runOnSave |
false |
Analyze saved C# files automatically on save |
queryforge.diagnostics.minimumSeverity |
info |
Minimum severity shown in the editor |
queryforge.output.showOnError |
true |
Open output channel on analysis errors |
Privacy
QueryForge analyzes source text locally. The analysis does not upload source code, connect to databases or execute SQL.
The extension does not use telemetry, analytics, AI services or login.
Limitations
- Heuristic analysis can produce false positives
- No Roslyn semantic analysis
- Does not validate generated SQL or execution plans
- Safe fixes are intentionally limited
- Human review remains necessary
Development
Requirements:
git clone https://github.com/luismpenholato/queryforge-editor.git
cd queryforge-editor
npm ci
npm run validate
Press F5 in VS Code/Cursor to launch the Extension Development Host.
Extension ID:
queryforge-tools.queryforge-editor
Support the project
QueryForge Editor is free and open source.
If the extension helps your daily work, consider supporting its continued maintenance through GitHub Sponsors.
Your support helps fund:
- analyzer and editor improvements;
- editor compatibility updates;
- documentation;
- issue resolution;
- ongoing open-source maintenance.
License
Licensed under the MIT License.