SQL Query Analyzer skill
A pure-Python skill that parses a batch 1C query into subqueries and temp tables, builds a dependency graph and returns it as JSON
- 0 ★ on the repository
- Last commit
Minimal access
Why this level
- Only parses query text, never touches a database or executes queries
- The output is a local JSON file or console output
Install
- Works in
- Services
In your terminal, with SkillFoxx CLI
npx skillfoxx add skills/sql-query-analyzerDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewMinimal accessThe tool runs nothing and makes no network calls.
- Only parses query text, never touches a database or executes queries
- The output is a local JSON file or console output
This is third-party code. Review the repository files before installing.
What it does
The tool parses a monolithic batch 1C query language statement (or equivalent SQL) with ПОМЕСТИТЬ/INTO, ИЗ/FROM, СОЕДИНЕНИЕ/JOIN, ОБЪЕДИНИТЬ ВСЕ/UNION ALL, УНИЧТОЖИТЬ/DROP commands and nested subqueries into a manageable set of nodes and builds a dependency graph over temp tables. The result is JSON with nodes (name, type: temp table, result or subquery, expanded text, parent, children, tables it reads, an unused-stub flag) and dependency edges between them, plus a list of dropped temp tables. It works as an importable Python module, as a CLI reading from a file or stdin, and with a detailed mode that splits UNION into parts. It has no dependencies beyond the Python 3.8+ standard library. A separate SKILL.md packages the project as a skill with ready analysis and Markdown report generation scripts.
Who it is for. For 1C developers and analysts who need to quickly break a multi-layer reporting query into its parts and see which temp table depends on which.
Good fit when
- You need to break a long batch reporting query into subqueries and see the temp table dependency graph
- You need a JSON format to further automate processing of the query structure
- You need to find unused temp tables that are created but never read
Not a fit when
- You need to execute the query or optimize its execution plan, not just parse its text structure
- The query uses syntax outside the supported command set, so parsing may be incomplete
Example request
Break down this batch reporting query into temp tables and show the dependency graphLimitations
The supported syntax is limited to the table in the README: temp tables, sources, joins, unions, drops, aliases, comments and nested subqueries; more complex 1C query language constructs may not parse correctly. The tool is purely structural: it does not check the query for execution errors and never touches a database.
How to disable. Delete the skill folder from your agent's skills directory or the repo clone.
FAQ
Do I need external libraries?
No, the tool uses only the Python 3.8+ standard library.
What does detailed mode do?
It splits ОБЪЕДИНИТЬ ВСЕ/UNION ALL nodes into child Часть_N nodes instead of one combined node.
Discussion
No questions or reviews yet.
Related
All 1C:Enterprise tools1C Database Queries for Agents
1c-llm-requests
A tiny 1C extension with an HTTP service plus a skill, so an agent writes 1C queries itself and gets database data as TSV
1C AI development environment
1C AI Development Environment
1C development environment with an MCP server offering 10 tools: 11 BSL analyzers, JSON DSL to XML, dependency graph, and EPF build without 1C
A large set of skills, rules and commands that let an agent build and parse 1C sources in the platform's format, without the Designer
The 1c-dev Claude Code plugin: discussing a 1C task in dialogue, a technical spec, dependency-aware steps, and executing one verified step at a time
An MCP server for analyzing large 1C codebases with less context: the agent runs scripts server-side and gets only a compact result
A 1C development skill collection for Codex and Claude Code: XML sources, forms, data composition, infobases, web publishing and an HTTP test bridge
README in short
The README gives a table mapping 1C and SQL syntax, dependency-free installation, three ways to run it (Python module, CLI from a file or stdin, detailed mode), the analyze_sql_query function parameters, and a full description of the result format's node and edge fields. It separately mentions tests via tests.py and a four-file project layout. The README does not explicitly state a license.
README badge
Original SKILL.md
--- name: sql-query-analyzer description: | Анализатор пакетных SQL/1C-запросов. Разбирает запрос на подзапросы, строит граф зависимостей по временным таблицам (ВТ) и возвращает JSON. Применяется для структурного разбора сложных 1С-запросов отчетов НПО (в частности, форма 0420258 и других многослойных запросов). --- # SQL-QUERY-ANALYZER - Skill анализа 1C/SQL-запросов ## Назначение Разбор монолитных пакетных запросов 1С (ВЫБРАТЬ / SELECT с ПОМЕСТИТЬ / INTO) на управляемый набор компонентов с построением графа зависимостей.