Today I’d like to show you how to make your AI agent better at ANY framework or programming language you choose for your project and to get the optimal results by leveraging the tools these AI agents put at our disposal.
Table of Contents
- Introduction
- Context as a substitute for training
- Setup the project
- Prepare instructions for the agent
- Add supplementary documents
- Let’s put it to the test
- Conclusion
Introduction
It’s no doubt that coding is one of the primary targets of leading AI models. Recent iterations of known models such as GPT-5 are significantly more focused on helping developers deliver quality code. However, the knowledge of these models seem to be better when the platform of choice is less complex and requires less “homework”. But what happens when you NEED to take advantage of a powerful but complex cross-platform framework in which a little bit of documentation can make everything easier?
Context as a substitute for training
The reason for the problem described above is simple: AI models are trained with code available in the internet (public repos, posts in community forums, etc.) and for some platforms there’s probably not enough available “examples” to train these models accurately. Fortunately, you can still make your AI model better by providing context. All AI models allow you to add some form of context within a specific project by including custom instructions, which dramatically improve the AI model’s accuracy and write good code the way you expect.
Let’s take the example of Uno Platform - it’s a powerful cross-platform framework that requires a bit of “read-ahead” and you might not get great results from your AI agent for an Uno project by relying on the “vanilla” agent experience. We need to tweak things a bit to get optimal results
Setup the project.
For this example, we’ll be using Visual Studio Code’s agent mode but you can easily replicate this with any agentic code tool (such as Claude Code or Gemini CLI). To follow through this guide, you’ll need to make sure that:
- Visual Studio Code is installed and you’re signed in with a Github account to have access to Agent Mode, more info here.
- Uno Platform is properly set-up
For this example, let’s start with an preconfigured Uno Platform project. To make things a bit more interesting, instead of creating a classic, XAML-based Uno project, we’ll use C# Markup instead (which I personally like more, but it’s certainly a less popular choice), paired with the MVUX design pattern. Choose a directory in your computer to host your project’s code and execute the following command in a terminal inside said directory:
| |
Let the tool do its thing and when finished open the project’s directory in VS Code. I recommend installing the C# Dev Kit and Uno Platform extensions if you haven’t done so.
Run the project in your plaform of choice to make sure everything went well with the initial setup. You should be greeted with a screen asking you to enter your name with a button to navigate to the second page. Do both things and make sure you’re sent to the second page and your name displays in the label in the second page.
Prepare instructions for the agent
So now it’s time to create instructions for the AI agent so it’s able to understand the project, its structure, but more importantly, the whole technology behind it. For VS Code’s Github Copilot, instructions to the AI agents are provided by the means of a file (copilot-instructions.md) that’s included by default in each conversation. You could go ahead and manually create the file and add your instructions by hand, but the VS Code team has made this a lot easier now by leveraging the very same AI agent to create it for you.
Open Github Copilot chat (click the Github Copilot icon at the top center) and open the chat window. Then, click on the cog at the top right corner and click on the “Instructions” menu option (see below).

This will generate an initial set of instructions that will cover things like the project structure, languange and packages used etc. But we can make this even better. The document is created in the form of a markdown document and can be found in .github/copilot-instructions.md. This is easily modifiable, meaning you can add and edit content as neccessary to update the instructions. This file is automatically included in each conversation with Github Copilot and serves as initial context to the agent about the project.
💡 If you’re using other agentic coding tools, instruction files are similar, but they’re usually named differently. For Claude Code, this is usually called
claude.mdand it’s placed in the root of the project. For Gemini CLI, it’s the same, but it’s calledGEMINI.mdinstead.
Add supplementary documents.
Modern AI agents have the ability to browse the web. This is a huge asset because it gives the agent the ability to learn from every piece of documentation already available online. In the case of our Uno Platform C# Markup/MVUX project, the agent could benefit greatly by leveraging the detail documentation the Uno team has already put together, so we can include the links of said documentation as supplementary documentation to provide even more context.
- Create a folder in the root project called
Docs. - Inside the folder, create two additional markdown files,
csharp-markup.csandmvux.md. - Add a bit of context about each of the two different Uno Platform features in each file, like this:
In csharp-markup.md:
| |
In mvux.md:
| |
Note that in each file we’re providing as much context as we can. This is key. The AI agent will use ALL of this during a conversation to provide context about the architecture of the project.
Finally, add a reference to both files to the copilot-instructions.md file so the AI agent picks it up:
| |
Let’s put it to the test
Now that we have a project with proper AI agent instructions, let’s try it out. Open the Github Copilot chat window and start a new conversation (click on the “+” button at the top right). Make sure at the bottom left of the chat window the “Agent” mode is selected (not “Ask” or “Edit”), and select any AI model you’d like to use (I tried this with Claude Sonnet 3.5). Add the following text to the conversation window:
| |
Note that this prompt is detailed enough to tell the AI agent what we want it to do. It’s not a bad idea to add more detail, but even things like “The sign in process should be handled by a user service” can be added as part of the instructions, so you don’t need to specify it every time.
Press “Enter” to begin the conversation. You’ll notice that the following shows up under your message.

This means the agent is correctly picking up our instructions file and adding the entire context to the conversation (including the referenced individual documents and the online documentation).
If everything went expected, you can run the app again and now you should have a working sign in page that uses a user service to initiate the sign in process and redirects you to the main page when clicking in the “Sign in” button. It’s still possible it has made a few mistakes, but they should be easy to fix.
Conclusion
Adding proper instructions to your cross-platform .NET project can turn your AI agent into a true expert in your platform of choice and it should help you speed-up development even further with less errors. You can then concentrate in improving the logic and making the overall experience of the app better. Feel free to experiment with this approach and personalize your instructions as much as you like. The more context you provide, the smarter your AI agent will be.