# Grounding Cursor in IronBarcode's Documentation
`BarcodeReaderOptions.CropArea` in IronBarcode takes an `IronSoftware.Drawing.Rectangle`, not the `System.Drawing` type of the same name, and a model working from memory reaches for the familiar one. The same habit writes `dotnet add package IronBarcode`, but the package is `BarCode` and the namespace is `IronBarCode`.
Cursor used to answer this by indexing a documentation site behind an `@Docs` mention. That mention no longer appears in Cursor's documentation. What stands in its place is a link pasted into the prompt, which the agent's web tool fetches, or guidance carried in a rule or a skill. All three point the agent at real pages, and none of them waits on an index.
Cursor is an AI-first editor, and its agent works at two very different reaches:
- **Inline edit and Tab** work where your cursor is, with `Ctrl+K` (`Cmd+K` on a Mac) stating a change in one sentence and Tab predicting your next edit.
- **Agent mode** plans across files, runs the build, reads the errors, and iterates, while Plan mode makes it settle the approach with you first.
Tab opens a portal to another file when the follow-on change lands there, and an inline edit shows its diff in place for you to accept or reject.
Rules reach agent mode and chat, and nothing else. Cursor's documentation states plainly that rules do not impact Cursor Tab or other AI features. So a rule you committed is not there when Tab suggests a method.
Grounding Cursor for barcode work takes two committed files and a link pasted into the prompt. That preparation matters most on precise changes, narrowing reader options, adding a [crop region](https://ironsoftware.com/barcode/csharp/how-to/set-crop-region/), picking a [reading speed](https://ironsoftware.com/barcode/csharp/how-to/reading-speed-options/), or identifying the single [image correction](https://ironsoftware.com/barcode/csharp/how-to/image-correction/) that rescues a batch of bad scans.
Nothing here concerns the confidence scoring inside IronBarcode's reader, which has its own [worked example](https://ironsoftware.com/barcode/csharp/examples/confidence-threshold/).
*as-heading:2(Quickstart)*
!!!--LIBRARY_NUGET_INSTALL_BLOCK--!!!
Open a C# project in Cursor and give the agent a page to read before it writes.
```text
In Program.cs, generate a Code 128 barcode for an asset tag and style it for a
printed label. Set the bar color and the background with ChangeBarCodeColor and
ChangeBackgroundColor, size it with ResizeTo, and print the value under the
bars. The license comes out of IRONBARCODE_LICENSE_KEY.
Work from https://ironsoftware.com/barcode/csharp/llms-full.txt, use only
members that appear in it, and tell me which page each styling call came from.
```
The color and sizing members are easy to half-remember, which is why the prompt sends the agent to the page first. The [barcode styling guide](https://ironsoftware.com/barcode/csharp/how-to/customize-barcode-style/) names all three exactly.
[[i:(Any prompt you paste is stored in the session, so a license key pasted into one is a key you have published to your editor's history. Read it from the environment instead, as the [license key guide](https://ironsoftware.com/barcode/csharp/get-started/license-keys/) sets out.)]]
<div class="hsg-featured-snippet">
<h3>Minimal Workflow in 5 Steps</h3>
<ol>
<li><a class="js-modal-open" data-modal-id="trial-license-after-download" href="https://www.nuget.org/packages/BarCode/">Download the C# barcode library from NuGet</a></li>
<li>Paste IronBarcode's <code>llms-full.txt</code> link into any prompt that writes barcode code</li>
<li>Save IronBarcode's <code>skill.md</code> as <code>.cursor/skills/ironbarcode/SKILL.md</code></li>
<li>Commit a project rule pinning the BarCode version and your conventions</li>
<li>Build, read every barcode back, and check every API name against the <a href="https://ironsoftware.com/barcode/csharp/object-reference/api/">API reference</a></li>
</ol>
</div>
<br class="clear" />
---
## Which model should run your barcode session?
Cursor is the only tool in this series where you choose the model. Composer, its own agentic model, is tuned for tool use, file edits, and terminal work inside the editor, and its fast variant is what you get by default. The picker also lists frontier models from OpenAI, Anthropic, Google, and SpaceXAI. Tab sits outside that choice and works from your recent edits, the surrounding code, and linter errors.
Most of a barcode session is cheap and repetitive. You add a format, rebuild, decode the test set, and tweak. Now and then a batch of real scans will not decode and no error says why, and that is when to switch to a model that reasons longer before editing. The model also shapes the code, so pin the symbology, the output size, and the read-back condition instead of leaving them to a default.
This is where the series overlaps. Run a Claude model in Cursor and the notes in the [Claude Code guide](https://ironsoftware.com/barcode/csharp/ai-agents/claude-code/) apply to its output. The model is the same. Only the interface differs.
## How do you ground Cursor in IronBarcode's documentation?
Three moves replace the old index, and they stack:
- **Paste the link:** point at [`llms-full.txt`](https://ironsoftware.com/barcode/csharp/llms-full.txt) rather than the documentation hub, so one URL puts the guides, the examples, and the member names in front of the agent.
- **Commit the skill:** save IronBarcode's published [`skill.md`](https://ironsoftware.com/barcode/csharp/skill.md) as `.cursor/skills/ironbarcode/SKILL.md`, set `name: ironbarcode` to match the folder, and commit it.
- **Commit the rule:** the next section covers what goes in it.
Cursor loads Agent Skills from `.cursor/skills/` and `.agents/skills/`, in the project root or in a subdirectory, each skill a folder holding a `SKILL.md` whose frontmatter carries `name` and `description`. The agent pulls one in when a task looks relevant, and typing `/ironbarcode` calls it directly. `.agents/skills/` is the neutral path for the same file, so Codex and Antigravity load it from there as well.
Skip all three and the model answers from training data that was never checked against the current release. Method names go first. `BarcodeScanner.DecodeImageFile()` reads like a real call and fails at the build.
With a page to work from, questions that would have been guesses become lookups.
```text
Which options narrow a read to two symbologies inside a fixed region of a
larger image? Give me the exact class and property names, and quote the lines
you took them from in https://ironsoftware.com/barcode/csharp/llms-full.txt.
```
If the agent cannot quote a page for the API it suggested, verify before building on it.
[[t:(This works for any unfamiliar class. With the file in context, `BarcodeReaderOptions` is something you interrogate rather than scroll, and the answer cites the [API reference](https://ironsoftware.com/barcode/csharp/object-reference/api/) page it came from.)]]
## How do you write project rules that encode your IronBarcode conventions?
Project rules go in a `.cursor/rules` folder at the repository root. They are under version control, committed with the code, so every developer gets the same behavior with zero setup.
Each rule is an `.mdc` file, which is markdown with YAML frontmatter that sets `description`, `globs`, and `alwaysApply`. Cursor searches the folder recursively, so subfolders work. A plain `.md` file there is ignored, because it has no frontmatter to activate it. An IronBarcode rule looks like this.
```yaml
---
description: IronBarcode conventions for barcode reading and writing in this project
globs: ["**/Services/**/*.cs", "**/Barcodes/**/*.cs"]
alwaysApply: false
---
# IronBarcode conventions
Applies to the barcode code in this folder only.
- IronBarcode (package BarCode, namespace IronBarCode) writes and reads every
barcode here. Never reach for a second barcode package.
- Reader options are explicit: set ExpectBarcodeTypes to the formats this
feature really reads, and reuse one BarcodeReaderOptions per format set
rather than allocating per call.
- Reads on a request path are async.
- CropArea takes IronSoftware.Drawing.Rectangle, not System.Drawing.
- Verified recipes: https://ironsoftware.com/barcode/csharp/skill.md
- If you are unsure a member exists, say so and cite the page. Do not guess a
method name that sounds plausible.
```
Telling the model that uncertainty is acceptable is what stops the invented API, and a rule says it once for every session that follows.
Copy the `globs` line on purpose. A rule with `alwaysApply: true` loads into every request and spends context on work that has no barcodes in it. Scoping it to the folders that hold barcode code keeps it where it belongs.
[[i:(Cursor also reads a plain `AGENTS.md`, the same file ChatGPT Codex and Google Antigravity use. It carries no frontmatter and therefore no globs, and Cursor reads it in the project root and in subdirectories, so nesting is the only scoping it offers. Use `.cursor/rules` when you want glob patterns, and `AGENTS.md` when you want one instructions file for several tools.)]]
## Which mode fits the change?
Cursor offers more ways to edit than any other tool in this series. Pick by size, from a single line to the whole repository:
| Mode | Use it when | Barcode example |
|---|---|---|
| Tab | The next edit is predictable | Repeating a reader option |
| Inline edit | One file, one sentence | Narrowing a read to two formats |
| Agent | Work spans files and needs a build loop | A label endpoint and a scan endpoint |
| Plan mode | The rewrite is too big to review afterwards | Migrating off another barcode library |
| Cloud agent | It can run unattended | Round-trip tests across every format |
## What does an `@` mention change?
An `@` mention hands the agent the thing to read, which can be a file, a folder, a terminal, an earlier chat, a Git diff, or the browser. Referencing the file that reads barcodes beats describing it, because a description loses the detail that the bug lives in.
```text
@Services/ScanService.cs @TestData/depot/
Read https://ironsoftware.com/barcode/csharp/llms-full.txt for the options.
Half the photos in TestData/depot/ come back empty. The reader options are
where this gets fixed, not the label generator. Name the setting that was
missing, and give me a decode rate for the folder before your change and after
it.
```
A folder mention suits module-wide work, and the whole codebase is there when you cannot say which file matters. Pairing the code with the documentation covers both halves of the question: the file shows what your code does now, and the page shows what the library actually provides.
Which setting rescues a batch of photos depends on how they are damaged, and no description substitutes for the agent running against the images. The [reading speed](https://ironsoftware.com/barcode/csharp/how-to/reading-speed-options/) and [image correction](https://ironsoftware.com/barcode/csharp/how-to/image-correction/) pages cover the individual settings.
## How do you plan and run a migration to IronBarcode?
An unreviewed rewrite across many files gets expensive during a migration, because undoing it is harder than writing it. Plan mode exists for this. Press `Shift+Tab` from the chat input, or pick it from the mode dropdown, and the agent asks clarifying questions, reads the codebase, and produces a plan you edit in chat or as markdown before any code appears. Plans save to your home directory, and "Save to workspace" moves one into the repository for the team to review.
```text
The barcode code in @Labels/ belongs to another library. Using
https://ironsoftware.com/barcode/csharp/llms-full.txt, work out what replacing
it with IronBarcode would actually involve. Which files change, what the
equivalent call is for each thing the folder does today, and where the
documentation says no clean equivalent exists.
Public method signatures are fixed. If the plan needs one to change, say so in
the plan rather than changing it.
```
Read the plan, fix it with a sentence or two, and send it back to build. Agent mode then reads the code, edits across files, runs commands, checks the output, and iterates, so the next prompt can be short.
```text
Carry out the plan we agreed. Compile it, clear whatever errors come up, and
satisfy yourself that every symbology the folder handles still comes back out
the same as it went in. Show me the diff at the end. BarCode is the only package
that may appear in the .csproj.
```
Drop those two limits and agents redesign the calling pattern while they migrate.
Work that needs no supervision can go to a cloud agent, formerly the background agent, while you keep the editor. A round-trip test suite suits that, because its assertions are decoded values rather than implementation details, so writing them does not wait on the migration.
```text
@Services/
Send this to a cloud agent while I keep working on the reader options.
Cover the migrated service with xUnit. Use a [Theory] over the symbologies it
supports rather than one [Fact] per format, so adding a format later costs one
line. Each case writes a sample value and reads it back, and the assertion is on
the decoded string and the decoded format together.
Then three edge cases as their own facts: an empty image returns no results
instead of throwing, a letters-only value is refused as EAN-13, and a missing
path fails with a readable message. Image bytes are off limits as an assertion
target.
```
Ruling out byte comparisons is what keeps the suite stable across platforms.
## Where do reading problems live?
Unreadable barcodes are the most frequent IronBarcode question, and the answer almost always lives in the reader options rather than in the label. What Cursor adds is that you do not have to describe the failure. Mention the service and the folder of failing images, and the editor works from both.
```text
Photos of returns labels read fine on a handheld scanner but come back empty
from @Services/ScanService.cs, and a few product photos carrying no barcode at
all return a value. Samples of both are in @TestData/returns/.
Explain the cause of each before changing anything, then fix both in the reader
options.
```
Insisting on the explanation first leaves you with an argument to check instead of a change to reverse-engineer. Here the two symptoms need opposite fixes. Missed reads want a narrower format list, a crop area, and the right image filter, which the [Barcode Not Recognized guide](https://ironsoftware.com/barcode/csharp/troubleshooting/barcode-not-recognized/) works through. Phantom values want `RemoveFalsePositive` and a confidence threshold, covered in the [false positives guide](https://ironsoftware.com/barcode/csharp/troubleshooting/false-positives/).
A deployment failure usually traces back to the `.csproj` or the container image, not to any C# file, and an agent with terminal access can read both and run the build itself.
```text
@Dockerfile @LabelScan.csproj @Terminals
Reading works on Windows but fails in our Linux container. The failing build is
in the terminal output above, so read it there rather than asking me to paste it.
Check which BarCode package the project references and whether the image has
the native dependencies IronBarcode needs on Linux. Explain the cause, then
propose the change. Don't modify C# code unless the cause is there.
```
Say explicitly that the C# is not to be touched. Given a failing call and no boundary, an agent will reach for a try/catch and report the problem as solved. The [Docker on Linux guide](https://ironsoftware.com/barcode/csharp/get-started/docker-linux/) lists what the image actually needs.
## What should you set up first?
The skill file and one scoped rule take about fifteen minutes, and they apply to every session after that. Pasting the documentation link stays a per-prompt habit, and it costs one line.
Change the model behind the editor and three checks still stand: the code compiles, the barcode decodes, and every member you used appears in IronBarcode's documented API. Those three are exactly what the [AI coding assistants and agents guide](https://ironsoftware.com/barcode/csharp/ai-agents/ai/) measures. There is a page apiece for [Claude Code](https://ironsoftware.com/barcode/csharp/ai-agents/claude-code/), [ChatGPT Codex](https://ironsoftware.com/barcode/csharp/ai-agents/chatgpt-codex/), [GitHub Copilot](https://ironsoftware.com/barcode/csharp/ai-agents/github-copilot/) and [Google Antigravity](https://ironsoftware.com/barcode/csharp/ai-agents/antigravity/).
---
## Troubleshooting
- [Apply a License Key in IronBarcode](https://ironsoftware.com/barcode/csharp/troubleshooting/apply-a-license-key-in-ironbarcode/) when an inline edit compiles and the run refuses.
- [Barcode Not Recognized](https://ironsoftware.com/barcode/csharp/troubleshooting/barcode-not-recognized/) when reader options are the thing still to tune.
- [IronBarcode NuGet Packages](https://ironsoftware.com/barcode/csharp/troubleshooting/nuget-packages/) when the version in your project rule and the version in the `.csproj` disagree.
- [Run IronBarcode in Docker on Linux](https://ironsoftware.com/barcode/csharp/get-started/docker-linux/) when local reads succeed and container reads do not.
---
## Questions?
If you have any questions, reach out to [support@ironsoftware.com](mailto:support@ironsoftware.com)
BarcodeReaderOptions.CropArea in IronBarcode takes an IronSoftware.Drawing.Rectangle, not the System.Drawing type of the same name, and a model working from memory reaches for the familiar one. The same habit writes dotnet add package IronBarcode, but the package is BarCode and the namespace is IronBarCode.
Cursor used to answer this by indexing a documentation site behind an @Docs mention. That mention no longer appears in Cursor's documentation. What stands in its place is a link pasted into the prompt, which the agent's web tool fetches, or guidance carried in a rule or a skill. All three point the agent at real pages, and none of them waits on an index.
Cursor is an AI-first editor, and its agent works at two very different reaches:
Inline edit and Tab work where your cursor is, with Ctrl+K (Cmd+K on a Mac) stating a change in one sentence and Tab predicting your next edit.
Agent mode plans across files, runs the build, reads the errors, and iterates, while Plan mode makes it settle the approach with you first.
Tab opens a portal to another file when the follow-on change lands there, and an inline edit shows its diff in place for you to accept or reject.
Rules reach agent mode and chat, and nothing else. Cursor's documentation states plainly that rules do not impact Cursor Tab or other AI features. So a rule you committed is not there when Tab suggests a method.
Grounding Cursor for barcode work takes two committed files and a link pasted into the prompt. That preparation matters most on precise changes, narrowing reader options, adding a crop region, picking a reading speed, or identifying the single image correction that rescues a batch of bad scans.
Nothing here concerns the confidence scoring inside IronBarcode's reader, which has its own worked example.
Quickstart
Install with NuGet
PM > Install-Package BarCode
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.
Open a C# project in Cursor and give the agent a page to read before it writes.
In Program.cs, generate a Code 128 barcode for an asset tag and style it for aprinted label. Set the bar color and the background with ChangeBarCodeColor andChangeBackgroundColor, size it with ResizeTo, and print the value under thebars. The license comes out of IRONBARCODE_LICENSE_KEY.Work from https://ironsoftware.com/barcode/csharp/llms-full.txt, use onlymembers that appear in it, and tell me which page each styling call came from.
In Program.cs, generate a Code 128 barcode for an asset tag and style it for a
printed label. Set the bar color and the background with ChangeBarCodeColor and
ChangeBackgroundColor, size it with ResizeTo, and print the value under the
bars. The license comes out of IRONBARCODE_LICENSE_KEY.
Work from https://ironsoftware.com/barcode/csharp/llms-full.txt, use only
members that appear in it, and tell me which page each styling call came from.
Text
The color and sizing members are easy to half-remember, which is why the prompt sends the agent to the page first. The barcode styling guide names all three exactly.
Please note: Any prompt you paste is stored in the session, so a license key pasted into one is a key you have published to your editor's history. Read it from the environment instead, as the license key guide sets out.
Paste IronBarcode's llms-full.txt link into any prompt that writes barcode code
Save IronBarcode's skill.md as .cursor/skills/ironbarcode/SKILL.md
Commit a project rule pinning the BarCode version and your conventions
Build, read every barcode back, and check every API name against the API reference
Which model should run your barcode session?
Cursor is the only tool in this series where you choose the model. Composer, its own agentic model, is tuned for tool use, file edits, and terminal work inside the editor, and its fast variant is what you get by default. The picker also lists frontier models from OpenAI, Anthropic, Google, and SpaceXAI. Tab sits outside that choice and works from your recent edits, the surrounding code, and linter errors.
Most of a barcode session is cheap and repetitive. You add a format, rebuild, decode the test set, and tweak. Now and then a batch of real scans will not decode and no error says why, and that is when to switch to a model that reasons longer before editing. The model also shapes the code, so pin the symbology, the output size, and the read-back condition instead of leaving them to a default.
This is where the series overlaps. Run a Claude model in Cursor and the notes in the Claude Code guide apply to its output. The model is the same. Only the interface differs.
How do you ground Cursor in IronBarcode's documentation?
Three moves replace the old index, and they stack:
Paste the link: point at llms-full.txt rather than the documentation hub, so one URL puts the guides, the examples, and the member names in front of the agent.
Commit the skill: save IronBarcode's published skill.md as .cursor/skills/ironbarcode/SKILL.md, set name: ironbarcode to match the folder, and commit it.
Commit the rule: the next section covers what goes in it.
Cursor loads Agent Skills from .cursor/skills/ and .agents/skills/, in the project root or in a subdirectory, each skill a folder holding a SKILL.md whose frontmatter carries name and description. The agent pulls one in when a task looks relevant, and typing /ironbarcode calls it directly. .agents/skills/ is the neutral path for the same file, so Codex and Antigravity load it from there as well.
Skip all three and the model answers from training data that was never checked against the current release. Method names go first. BarcodeScanner.DecodeImageFile() reads like a real call and fails at the build.
With a page to work from, questions that would have been guesses become lookups.
Which options narrow a read to two symbologies inside a fixed region of alarger image? Give me the exact class and property names, and quote the linesyou took them from in https://ironsoftware.com/barcode/csharp/llms-full.txt.
Which options narrow a read to two symbologies inside a fixed region of a
larger image? Give me the exact class and property names, and quote the lines
you took them from in https://ironsoftware.com/barcode/csharp/llms-full.txt.
Text
If the agent cannot quote a page for the API it suggested, verify before building on it.
Tips: This works for any unfamiliar class. With the file in context, BarcodeReaderOptions is something you interrogate rather than scroll, and the answer cites the API reference page it came from.
How do you write project rules that encode your IronBarcode conventions?
Project rules go in a .cursor/rules folder at the repository root. They are under version control, committed with the code, so every developer gets the same behavior with zero setup.
Each rule is an .mdc file, which is markdown with YAML frontmatter that sets description, globs, and alwaysApply. Cursor searches the folder recursively, so subfolders work. A plain .md file there is ignored, because it has no frontmatter to activate it. An IronBarcode rule looks like this.
---description: IronBarcode conventions for barcode reading and writing in this projectglobs: ["**/Services/**/*.cs", "**/Barcodes/**/*.cs"]alwaysApply: false---# IronBarcode conventionsApplies to the barcode code in this folder only.- IronBarcode (package BarCode, namespace IronBarCode) writes and reads every barcode here. Never reach for a second barcode package.- Reader options are explicit: set ExpectBarcodeTypes to the formats this feature really reads, and reuse one BarcodeReaderOptions per format set rather than allocating per call.- Reads on a request path are async.- CropArea takes IronSoftware.Drawing.Rectangle, not System.Drawing.- Verified recipes: https://ironsoftware.com/barcode/csharp/skill.md- If you are unsure a member exists, say so and cite the page. Do not guess a method name that sounds plausible.
---
description: IronBarcode conventions for barcode reading and writing in this project
globs: ["**/Services/**/*.cs", "**/Barcodes/**/*.cs"]
alwaysApply: false
---
# IronBarcode conventions
Applies to the barcode code in this folder only.
- IronBarcode (package BarCode, namespace IronBarCode) writes and reads every
barcode here. Never reach for a second barcode package.
- Reader options are explicit: set ExpectBarcodeTypes to the formats this
feature really reads, and reuse one BarcodeReaderOptions per format set
rather than allocating per call.
- Reads on a request path are async.
- CropArea takes IronSoftware.Drawing.Rectangle, not System.Drawing.
- Verified recipes: https://ironsoftware.com/barcode/csharp/skill.md
- If you are unsure a member exists, say so and cite the page. Do not guess a
method name that sounds plausible.
Text
Telling the model that uncertainty is acceptable is what stops the invented API, and a rule says it once for every session that follows.
Copy the globs line on purpose. A rule with alwaysApply: true loads into every request and spends context on work that has no barcodes in it. Scoping it to the folders that hold barcode code keeps it where it belongs.
Please note: Cursor also reads a plain AGENTS.md, the same file ChatGPT Codex and Google Antigravity use. It carries no frontmatter and therefore no globs, and Cursor reads it in the project root and in subdirectories, so nesting is the only scoping it offers. Use .cursor/rules when you want glob patterns, and AGENTS.md when you want one instructions file for several tools.
Which mode fits the change?
Cursor offers more ways to edit than any other tool in this series. Pick by size, from a single line to the whole repository:
Mode
Use it when
Barcode example
Tab
The next edit is predictable
Repeating a reader option
Inline edit
One file, one sentence
Narrowing a read to two formats
Agent
Work spans files and needs a build loop
A label endpoint and a scan endpoint
Plan mode
The rewrite is too big to review afterwards
Migrating off another barcode library
Cloud agent
It can run unattended
Round-trip tests across every format
What does an @ mention change?
An @ mention hands the agent the thing to read, which can be a file, a folder, a terminal, an earlier chat, a Git diff, or the browser. Referencing the file that reads barcodes beats describing it, because a description loses the detail that the bug lives in.
@Services/ScanService.cs @TestData/depot/Read https://ironsoftware.com/barcode/csharp/llms-full.txt for the options.Half the photos in TestData/depot/ come back empty. The reader options arewhere this gets fixed, not the label generator. Name the setting that wasmissing, and give me a decode rate for the folder before your change and afterit.
@Services/ScanService.cs @TestData/depot/
Read https://ironsoftware.com/barcode/csharp/llms-full.txt for the options.
Half the photos in TestData/depot/ come back empty. The reader options are
where this gets fixed, not the label generator. Name the setting that was
missing, and give me a decode rate for the folder before your change and after
it.
Text
A folder mention suits module-wide work, and the whole codebase is there when you cannot say which file matters. Pairing the code with the documentation covers both halves of the question: the file shows what your code does now, and the page shows what the library actually provides.
Which setting rescues a batch of photos depends on how they are damaged, and no description substitutes for the agent running against the images. The reading speed and image correction pages cover the individual settings.
How do you plan and run a migration to IronBarcode?
An unreviewed rewrite across many files gets expensive during a migration, because undoing it is harder than writing it. Plan mode exists for this. Press Shift+Tab from the chat input, or pick it from the mode dropdown, and the agent asks clarifying questions, reads the codebase, and produces a plan you edit in chat or as markdown before any code appears. Plans save to your home directory, and "Save to workspace" moves one into the repository for the team to review.
The barcode code in @Labels/ belongs to another library. Usinghttps://ironsoftware.com/barcode/csharp/llms-full.txt, work out what replacingit with IronBarcode would actually involve. Which files change, what theequivalent call is for each thing the folder does today, and where thedocumentation says no clean equivalent exists.Public method signatures are fixed. If the plan needs one to change, say so inthe plan rather than changing it.
The barcode code in @Labels/ belongs to another library. Using
https://ironsoftware.com/barcode/csharp/llms-full.txt, work out what replacing
it with IronBarcode would actually involve. Which files change, what the
equivalent call is for each thing the folder does today, and where the
documentation says no clean equivalent exists.
Public method signatures are fixed. If the plan needs one to change, say so in
the plan rather than changing it.
Text
Read the plan, fix it with a sentence or two, and send it back to build. Agent mode then reads the code, edits across files, runs commands, checks the output, and iterates, so the next prompt can be short.
Carry out the plan we agreed. Compile it, clear whatever errors come up, andsatisfy yourself that every symbology the folder handles still comes back outthe same as it went in. Show me the diff at the end. BarCode is the only packagethat may appear in the .csproj.
Carry out the plan we agreed. Compile it, clear whatever errors come up, and
satisfy yourself that every symbology the folder handles still comes back out
the same as it went in. Show me the diff at the end. BarCode is the only package
that may appear in the .csproj.
Text
Drop those two limits and agents redesign the calling pattern while they migrate.
Work that needs no supervision can go to a cloud agent, formerly the background agent, while you keep the editor. A round-trip test suite suits that, because its assertions are decoded values rather than implementation details, so writing them does not wait on the migration.
@Services/Send this to a cloud agent while I keep working on the reader options.Cover the migrated service with xUnit. Use a [Theory] over the symbologies itsupports rather than one [Fact] per format, so adding a format later costs oneline. Each case writes a sample value and reads it back, and the assertion is onthe decoded string and the decoded format together.Then three edge cases as their own facts: an empty image returns no resultsinstead of throwing, a letters-only value is refused as EAN-13, and a missingpath fails with a readable message. Image bytes are off limits as an assertiontarget.
@Services/
Send this to a cloud agent while I keep working on the reader options.
Cover the migrated service with xUnit. Use a [Theory] over the symbologies it
supports rather than one [Fact] per format, so adding a format later costs one
line. Each case writes a sample value and reads it back, and the assertion is on
the decoded string and the decoded format together.
Then three edge cases as their own facts: an empty image returns no results
instead of throwing, a letters-only value is refused as EAN-13, and a missing
path fails with a readable message. Image bytes are off limits as an assertion
target.
Text
Ruling out byte comparisons is what keeps the suite stable across platforms.
Where do reading problems live?
Unreadable barcodes are the most frequent IronBarcode question, and the answer almost always lives in the reader options rather than in the label. What Cursor adds is that you do not have to describe the failure. Mention the service and the folder of failing images, and the editor works from both.
Photos of returns labels read fine on a handheld scanner but come back emptyfrom @Services/ScanService.cs, and a few product photos carrying no barcode atall return a value. Samples of both are in @TestData/returns/.Explain the cause of each before changing anything, then fix both in the readeroptions.
Photos of returns labels read fine on a handheld scanner but come back empty
from @Services/ScanService.cs, and a few product photos carrying no barcode at
all return a value. Samples of both are in @TestData/returns/.
Explain the cause of each before changing anything, then fix both in the reader
options.
Text
Insisting on the explanation first leaves you with an argument to check instead of a change to reverse-engineer. Here the two symptoms need opposite fixes. Missed reads want a narrower format list, a crop area, and the right image filter, which the Barcode Not Recognized guide works through. Phantom values want RemoveFalsePositive and a confidence threshold, covered in the false positives guide.
A deployment failure usually traces back to the .csproj or the container image, not to any C# file, and an agent with terminal access can read both and run the build itself.
@Dockerfile @LabelScan.csproj @TerminalsReading works on Windows but fails in our Linux container. The failing build isin the terminal output above, so read it there rather than asking me to paste it.Check which BarCode package the project references and whether the image hasthe native dependencies IronBarcode needs on Linux. Explain the cause, thenpropose the change. Don't modify C# code unless the cause is there.
@Dockerfile @LabelScan.csproj @Terminals
Reading works on Windows but fails in our Linux container. The failing build is
in the terminal output above, so read it there rather than asking me to paste it.
Check which BarCode package the project references and whether the image has
the native dependencies IronBarcode needs on Linux. Explain the cause, then
propose the change. Don't modify C# code unless the cause is there.
Text
Say explicitly that the C# is not to be touched. Given a failing call and no boundary, an agent will reach for a try/catch and report the problem as solved. The Docker on Linux guide lists what the image actually needs.
What should you set up first?
The skill file and one scoped rule take about fifteen minutes, and they apply to every session after that. Pasting the documentation link stays a per-prompt habit, and it costs one line.
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.