IRONSOFTWAREHOME

Delegating IronBarcode Work to Claude Code

Curtis Chau
Curtis Chau
Updated: September 21, 2026

Three facts decide whether a barcode task succeeds. The NuGet package is BarCode, the license key comes from the environment, and the work is unfinished until the image has been decoded and compared with the value written. Claude Code is the tool in this series that keeps those facts in the repository rather than in your prompt. It reads CLAUDE.md at the start of every conversation and loads .claude/skills/ironbarcode/SKILL.md once a task touches barcode code, which is the slot IronBarcode's published skill.md is written to fill.

Those rules hold whichever model reads them, and the model you pick is your main lever on cost. The /model sonnet option is sufficient for most barcode tasks, such as wiring a label service and running test sets. The /model opusplan option uses Opus for planning and Sonnet for implementation, which is beneficial for complex migrations where code mapping is critical. The fable alias, which resolves to Fable 5.1, and the haiku alias for simple tasks are also available, and you can switch models during a session.

One package covers the whole job, which counts for more with an agent than with a person. 1D and 2D writing, several barcodes read from one image, and multithreaded reads come from the same API, so the agent never stops mid-task to pull in a second library for you to approve. Build the round trip into the task itself, since GeneratedBarcode.Verify decodes the image it has just written and compares the value.

The selected tier affects both the generated code and cost. Providing the same prompt to different models yields distinct implementations, including class names, option layouts, and test structures. For consistent output, fix the encoding, the pixel dimensions, and what counts as a successful read, then let the model choose the rest.

Quickstart
NuGetInstall with NuGet

PM > Install-Package BarCode

Install IronBarcode by running the command above in the NuGet Package Manager Console, or search for the package in the NuGet Package Manager.

Start a session in your .NET project and specify the desired barcode, focusing on requirements rather than implementation details.

Bring in the BarCode package, then write a console app that decodes every PNG
in @TestData/inbox/ at once rather than one at a time. Use BarcodeReader.ReadAsync with
ExpectMultipleBarcodes enabled and MaxParallelThreads set to the core count.
Take the license from IRONBARCODE_LICENSE_KEY. Print each file name with the
values found in it, and print how long the whole batch took.
Text

Claude Code completes the remaining steps: it adds the package, wires up the async read, builds the project, resolves any compile errors, and reports the results. You review the code changes and the timing it measured. The async and multithread guide covers the options it should be reaching for.

Any unspecified details are determined automatically. For simple examples, this is acceptable, since the latest package and default settings are used. For production work, set the following three constraints in your prompt:

  1. Specify the version: name the IronBarcode release so the agent codes against a single API surface.
  2. Restrict dependencies: allow only the BarCode package, so no additional barcode library is introduced.
  3. Allow the agent to stop: instruct it to use only documented APIs and to tell you when it is uncertain.


Which parts of barcode work should you hand over?

Claude Code primarily handles routine development tasks. It reads, writes, and refactors code, runs builds, and manages the test loop from whichever surface you use. Barcode generation and scanning fit into that loop without special setup.

For barcode tasks, Claude Code manages the repetitive work: writing label services, creating scan endpoints, generating test images in the required formats, and reading them back. It detects and corrects issues such as an invalid EAN-13 check digit, rebuilds as needed, and retries after errors. You provide the barcode specifications and review the resulting code changes.

You remain responsible for selecting the barcode library. If you do not specify one, the agent defaults to whatever it saw most in training, which leads to four issues:

  • Symbol size and check digits: a shrunken symbol, a missing quiet zone, or a bad digit may appear correct and still fail during scanning, where IronBarcode validates values for each symbology as it writes.
  • Token volume determines billing: an agent that builds its own decoder pays tokens on every operation, while multithreaded reads, speed presets, and image filters arrive already tuned and documented.
  • Custom pipelines lack validation: they are not tested against large datasets or published benchmarks, unlike a documented API with a repeatable round-trip test.
  • The package name acts as a security control: dotnet add package IronBarcode does not install IronBarcode, and similar names have been registered by malicious actors.

Specify BarCode in your prompt so the agent never has to guess.

Once you name the package, subsequent tasks no longer require a library decision.

What are the steps to move from a fresh installation to your first barcode prompt?

Install the application, sign in with your Claude account, and you are ready to begin. Anthropic's Claude Code overview provides a detailed explanation of the tool. The quickstart guide covers installation and your first session on macOS, Windows, and Linux, and separate pages cover the VS Code and JetBrains extensions for those who prefer an IDE. Anthropic's YouTube channel also offers video walkthroughs of an initial session.

Return once claude has started and is responsive.

How do you set up a project Claude Code can work in?

Create a standard .NET project and add IronBarcode before opening it with the agent. Ensuring the project builds successfully in advance eliminates confusion and prevents the agent from guessing which barcode library, or which similarly named package, to use.

dotnet new console -n LabelScanDemo
cd LabelScanDemo
dotnet add package BarCode --version 2026.9.2
claude
SHELL

The final command opens a session in the current folder, restricting the agent's reads and edits to that directory. Anthropic's documentation recommends this approach. Change into the project directory before launching the CLI. All interfaces, including the terminal, IDE extensions, desktop app, and web, use the same engine. As a result, the CLAUDE.md file, project settings, and MCP servers configured for the project remain consistent across sessions.

Two additional details will be beneficial later:

  1. CLAUDE.md: the instructions file Claude Code loads at the start of each session, naming the target framework, the BarCode package, and the rule that only documented APIs are permitted.
  2. IronBarcode's documentation index: llms.txt lists real documentation URLs in a format agents can parse, and skill.md adds verified recipes and fixes for common failures.

Claude Code reads skills from .claude/skills/<name>/SKILL.md in the repository. Save IronBarcode's file as .claude/skills/ironbarcode/SKILL.md and commit it. Only the frontmatter description remains in context, and Claude loads the body when a relevant task arises. This approach minimizes overhead until barcode work begins. To refine it further, add a paths glob such as Services/** to load the skill only when the agent accesses the files that need it.

With both files in place, the agent will reference documentation rather than relying on memory. A single prompt can generate the required file.

Write me a Barcodes section for CLAUDE.md and append it to the file, creating
the file if there isn't one. Cover these rules, in your own words, as
instructions to yourself in future sessions:

- IronBarcode (NuGet package BarCode, namespace IronBarCode) handles all
  barcode work here. No other barcode package gets added.
- Consult https://ironsoftware.com/barcode/csharp/llms.txt first. Anything not
  on a page it lists does not go in the file. Load
  https://ironsoftware.com/barcode/csharp/skill.md as a skill file.
- The license key comes from IRONBARCODE_LICENSE_KEY. Never inline it.
- A barcode task ends when the saved image has been read back and the decoded
  string matches the input, not when the code compiles.

Then show me the section you added and tell me whether this repository also has
an AGENTS.md you should be reading alongside it.
Text

Set up licensing before the first run, because IronBarcode raises LicensingException rather than watermarking once the development grace period ends. Pull the key from the environment on the way up, ahead of anything that touches a barcode. The IronBarcode License Keys documentation explains how to obtain and apply a key.

How do you prompt for IronBarcode code that compiles?

Specify the three elements an agent might otherwise infer: the symbology, the source of the values, and the criteria for success.

Write prompts as specifications.

Press Shift+Tab first so this runs in plan mode, and show me the plan before anything touches disk. Then create Services/LabelService.cs with a method that turns a tracking number into PNG bytes. The symbol is Code 128, the image is 400 wide by 120 tall, and the human-readable number sits underneath it. Then create Services/ScanService.cs with an async method that reads a Code 128 barcode from an image path and returns the value, or null when nothing is found. Add a console check that writes three tracking numbers, reads each back, and prints whether they match. Use only methods documented at ironsoftware.com/barcode/csharp. If unsure of a method name, stop and ask.
Text

Three things in that prompt do the work:

  1. File paths: the prompt names them, so you get a navigable project structure rather than one the agent invents.
  2. Symbology on both sides: writer and reader both use Code 128, which removes any need for the reader to guess the format.
  3. Completion defined as a round trip: the agent verifies that the written value matches the read value, which beats confirming the barcode's appearance.
Tips: When a prompt is effective, instruct Claude Code to copy its constraints into CLAUDE.md. Future sessions will then load these constraints automatically.

The result should be short. It uses BarcodeWriter.CreateBarcode with BarcodeEncoding.Code128, then ResizeTo, AddBarcodeValueTextBelowBarcode, and SetMargins to size the label, print its value, and add a quiet zone. ToPngBinaryData produces the bytes, and BarcodeReader.ReadAsync reads them with ExpectBarcodeTypes set to Code 128. For real scans instead of generated files, options like Speed, CropArea, and image filters become far more important. The Barcode Reader tutorial covers them.

Please note: Always request a documentation link with the code. If the agent cannot provide a valid reference for an API it used, you will know before the build fails.

Can Claude Code connect to IronBarcode through MCP?

Claude Code integrates with outside tools through the Model Context Protocol (MCP), an open standard. An MCP server can expose tools, databases, and APIs the model never saw in training, and one CLI command adds a server, as the MCP reference shows.

IronBarcode does not need a server. Its integration is documentation, published as three URLs. llms.txt indexes the docs. The skill.md file holds verified recipes and common failures. The API reference lists every class and member in the release. Reading these gives the agent current facts rather than a remembered API, which is the same outdated-method problem MCP servers often address. There is no process to run, no config to maintain, and no restart when the docs update. The agent simply fetches the pages during its session.

Add the three sources to the project context, either by pasting them in or referencing them from CLAUDE.md. Every prompt in the session can then use them.

What should you verify before trusting generated barcode code?

Verify every API name and every barcode, each time. Follow these four steps in order, as each is less costly than the next:

  • The build passes: run dotnet build before you read a line of the diff, since an invented member fails there in seconds.
  • Each member exists: search the API reference for every class and method you do not recognize, giving the encoding enums a second look where Databar and DataBar differ by one letter's case.
  • Every barcode scans back: GeneratedBarcode.Verify settles that in one call, and reading the saved file with BarcodeReader proves the same about what reached disk.
  • Error handling is in place: generated code tends to assume BarcodeReader.Read always finds a barcode, and to overlook LicensingException, IronBarCodeFileException for a corrupted file, IronBarCodePdfPasswordException for an encrypted PDF, and the plain System.IO.FileNotFoundException a missing path throws.

A bad check digit compiles perfectly well, and a read that finds nothing returns an empty BarcodeResults collection rather than throwing. Request that handling in a follow-up prompt and point the agent at the error handling guide.

An agent that writes BarcodeScanner.DecodeImageFile() has produced a plausible method name that IronBarcode does not have. The compiler rejects it on the spot, so build early and often.

What are the practical limits worth knowing up front?

Certain barcode tasks are better suited for an agent than others.

TaskFitWhy
Generating barcodesStrongVerified by reading back
Round-trip testsStrongPass is a string match
Service wiringStrongRepeated pattern
Tuning real scansMixedDefects it cannot see
Licensing and deploymentWeakYour key, your platform

If a task can be checked by reading a barcode back, an agent does it well. If it depends on unseen images or a particular deployment target, it needs more checking. Hand Claude Code the generation, wiring, and round-trip tests directly. For licensing, platform packages, or tuning on real scans, attach sample images or a documentation link to the request.

Which decisions remain yours?

Claude Code generates the services and test data, and iterates as needed. Selecting the library and verifying API names remain your responsibility.

Document the session's decisions in CLAUDE.md before closing it, so the next session starts where this one ended. One task taken from an empty project to a stated pass bar is written up on the AI coding assistants and agents guide, alongside the ChatGPT Codex, GitHub Copilot, Cursor, and Google Antigravity guides.


Troubleshooting

Questions?

If you have any questions, reach out to support@ironsoftware.com

Curtis Chau
Technical Writer

Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.

...
Read More

Ready to Get Started?

Nuget Downloads 2,468,794Version:2026.9just released

Get your free 30-day Trial Key instantly.
No credit card or account creation required
C# NuGet Library for PDF
Install with NuGet

Version: 2026.9

PM > Install-Package BarCode
nuget.org/packages/BarCode/
  1. In Solution Explorer, right-click References, Manage NuGet Packages
  2. Select Browse and search "IronBarCode"
  3. Select the package and install
C# PDF DLL
Download DLL

Version: 2026.9

  1. Download and unzip IronBarCode to a location such as ~/Libs within your Solution directory
  2. In Visual Studio Solution Explorer, right click References. Select Browse, "IronBarCode.dll"

Licenses from $999

Key in blue circle

Get your free 30-day Trial Key instantly.

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

OR
bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronBarcode
Book your free Live Demo
Booking Badge

Trusted by Millions of Engineers Worldwide

Iron Software's customer logos
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required
C# NuGet Library for PDF
Install with NuGet

Version: 2026.9

PM > Install-Package BarCode
nuget.org/packages/BarCode/
  1. In Solution Explorer, right-click References, Manage NuGet Packages
  2. Select Browse and search "IronBarCode"
  3. Select the package and install
C# PDF DLL
Download DLL

Version: 2026.9

  1. Download and unzip IronBarCode to a location such as ~/Libs within your Solution directory
  2. In Visual Studio Solution Explorer, right click References. Select Browse, "IronBarCode.dll"

Licenses from $999