Claude Code for 1C: setting up an agent to work with a configuration
The agent edits BSL text modules, not the infobase. How to dump a configuration, what goes into CLAUDE.md, how to check edits and what it costs.
5 min · · IDE · агенты
Claude Code for 1C works as it does for any project: it reads and edits text files. So the first step is not installing the agent but getting the configuration sources as files. After that you need project rules (CLAUDE.md), a way to check edits and some care: the agent must not touch a working database. Below is the setup step by step, wording for CLAUDE.md and a cost calculation. The 1C platform features are described in general terms; check menu item names and command-line keys against the documentation for your platform version.
Step 1. Get the sources as files
The agent does not connect to the infobase. It needs a directory with modules. There are two usual ways:
- A dump from the Configurator. The Configurator can dump a configuration to files (a menu item in the "Configuration" section), and in batch mode the
DESIGNERcommand has a matching dump parameter. In the dump, modules lie in.bslfiles in object directories; for example, a common module's code is usually inCommonModules/<Name>/Ext/Module.bsl. - A project in 1C:EDT. If you work in the 1C:Enterprise Development Tools environment, the sources are already files in the project.
Use a development configuration, not a working database. Put the directory under git right away: a commit before each agent task lets you roll back any edits. Loading the modified files back into the database is done with your usual tools (the Configurator or EDT), not by the agent.
Step 2. Connect Claude Code to the key
Installation and variables are described in the Claude Code docs. In short:
export ANTHROPIC_BASE_URL=https://api.zukko.pro
export ANTHROPIC_AUTH_TOKEN=fetch_your_key
export ANTHROPIC_MODEL=claude-sonnet-5-5The address has no /v1, and the key goes into ANTHROPIC_AUTH_TOKEN. Run claude in the root of the dump directory. On Windows Claude Code runs natively or through WSL; see the Claude Code documentation for the install options.
Step 3. CLAUDE.md with BSL rules
Claude Code reads the CLAUDE.md file in the project root at the start of a session. Here you explain to the agent what a 1C developer knows without being told: the language, the structure and your conventions. General principles are in the article how to write CLAUDE.md. An example for 1C (the language keywords stay in Russian, as in the code):
## Project: 1C configuration (dump to files)
### What this is
A configuration dump in a directory. We edit only `.bsl` files. Do not edit
XML descriptions of metadata objects and forms (`Form.xml`, `*.mdo`): their
structure is fragile. If a task needs new attributes or forms, describe what
to create in the Configurator and do not create them yourself.
### Language and style
- Language: the built-in 1C language (BSL). Keywords and names in Russian, as in neighbouring code.
- Encoding and line endings: keep as in the source file, do not re-encode
or change line endings.
- Module structure: regions `#Область ... #КонецОбласти`. Put new procedures
in a suitable region, do not create a new one without need.Adapt it to yourself: the rule list should be short and verifiable. Rules from your organization's development standards can be added as separate items. Replace the analysis command line with a real one or delete it.
Step 4. Checks
The agent makes mistakes, especially with platform methods that are rare in open code. Three levels of checking:
- Static analysis. Third-party BSL analyzers exist (BSL Language Server, the SonarQube plugin for BSL). Run one with the command from its documentation and write that command into CLAUDE.md, and Claude Code will run it itself and fix the findings. Running it after every edit can be automated with hooks (Claude Code hooks).
- Loading and checking in the Configurator. The platform performs syntax control of modules itself. This is a mandatory step before going further.
- A test on a copy of the database. Check the result by hand on a test database, not a working one.
An example of a simple task after which you should open the diff:
Функция ПолучитьОстатки(Склад) Экспорт
Запрос = Новый Запрос;
Запрос.Текст =
"ВЫБРАТЬ
| Остатки.Номенклатура КАК Номенклатура,
| Остатки.КоличествоОстаток КАК Количество
|ИЗ
| РегистрНакопления.ТоварыНаСкладах.Остатки(, Склад = &Склад) КАК Остатки";
Запрос.УстановитьПараметр("Склад", Склад);
Возврат Запрос.Выполнить().Выгрузить();
КонецФункцииThe register name here is illustrative. Check that the agent uses real objects of your configuration and has not invented similar ones.
Which model to choose
For BSL we do not claim which model writes better: there is little open code in this language and the result depends on the task. A practical scheme: claude-sonnet-5-5 as the main model, and for hard edits switch to claude-opus-5-5 with /model and compare the results on two or three of your own tasks. Strength index in the catalogue: Opus 5.5 has 58, Sonnet 5.5 has 48. Both have a 1M-token context window, enough for large modules.
What a session costs
Assume (a hypothetical example) a session with several edits uses 2M input tokens, of which 1.7M are read from cache, 0.1M are written to cache and 0.2M are fresh; output 0.08M. Claude Code works in the Anthropic format, so the gateway sees cache reads and writes. Zukko prices as of October 18, 2026, $ per 1M tokens. Formula: fresh input × input price + read × read price + write × write price + output × output price.
claude-sonnet-5-5(input 0.4, read 0.05, write 0.5, output 2): 0.2 × 0.4 + 1.7 × 0.05 + 0.1 × 0.5 + 0.08 × 2 = 0.08 + 0.085 + 0.05 + 0.16 = $0.375.claude-opus-5-5(input 0.8, read 0.08, write 1, output 4): 0.2 × 0.8 + 1.7 × 0.08 + 0.1 × 1 + 0.08 × 4 = 0.16 + 0.136 + 0.1 + 0.32 = $0.716.
The token split is illustrative: see your own in the "Usage" section of the dashboard. Large modules and "read the whole configuration" spend more, so limit the task to specific modules. Create a separate key for the project with a daily limit, say $5.
Vibe coding and Codex for 1C
"Vibe coding" in 1C is possible, but its consequences are costlier than in a web project: a mistake in document posting or register processing will distort accounting data. So work in small tasks, commit before and after, and do not give the agent working databases and passwords. Codex has a similar scheme: instead of CLAUDE.md it reads AGENTS.md. If you need to integrate 1C with a model over the API from inside the configuration, that is a different topic: integrating a neural network into 1C.
Configuration source code may be a trade secret. Decide in advance which modules may be sent to an external model and exclude the rest from the working directory.
FAQ
Can Claude Code work with 1C directly in the database?
No, it works with files. The configuration must be dumped to a directory and the edits loaded back using platform tools.
Does the model know the 1C language?
Models usually know basic BSL syntax, but get rare platform methods and your own objects wrong. That is why you need CLAUDE.md with rules, static analysis and a check on a test database.
Is a subscription needed?
No. A Zukko key connects to Claude Code through environment variables, and you pay for tokens used. From Russia payment is available by SBP (the payment page adds an 8.5% fee on top), MasterCard or cryptocurrency.
Can I use a cheap model?
You can try one, for example glm-5.3-flash or deepseek-v4.1-flash, but check the result on your own tasks: GLM has a 128K window, which runs out sooner on long modules.
To get started, create a key in the Zukko dashboard, dump a test configuration to a directory and run claude in it.
zukko
Pay 25×
less
for Claude Code & ChatGPT
One fetch_* key and base URL api.zukko.pro — for Cursor, Claude Code, Codex, and any SDK.
Related articles
- Claude Code in Zed: connecting an external agent to your own keyIn Zed you can open Claude Code as a terminal thread, as an external agent over ACP, or configure the built-in agent. We cover each option and connect it to your key.
- Cursor CLI: the Cursor agent in the terminal, install and setupThe Cursor agent works in the terminal as well as the editor, with the agent command. Install it, configure it, run it in scripts and compare it with Claude Code and Codex.
- Cline in Russia: installation and model setup without a foreign cardThe Cline extension runs locally, so the only question is where model requests go and how you pay for them. Step-by-step setup with one key and a task cost estimate.
- Cline Rules: how to write project rules in .clinerulesRules in .clinerules stop you from repeating the same requests in every task. Structure, Python and TypeScript examples, and the price of extra lines.