Bc Agent Instructions Debugger logo

Bc Agent Instructions Debugger

Community
fernandoartalf
bc-agent-instructions-debugger

Audits and diagnoses Business Central agent instruction files (InstructionsV1.txt or InstructionsV2.txt) to identify why an agent is not behaving as expected, and produces a structured diagnosis report plus a corrected version of the instructions. Covers pre-publication review (catch issues before deploying) and post-deployment debugging (diagnose a live agent that is failing). Analyzes instruction files against the BC agent runtime keyword contract, the Responsibilities-Guidelines-Instructions framework, and known anti-patterns. Generates severity-classified findings (🔴 blocking / 🟡 degradation / 🔵 improvement) with root cause explanation and minimal targeted fixes. Use whenever an agent produces unexpected output, loses context between pages, ignores a guideline, fails to invoke an action, gets stuck in a loop, or when you want to review instructions before publishing an agent for the first time.

Overview

Publisherfernandoartalf
RepositoryAL-Copilot-Skills-Collection
Skill namebc-agent-instructions-debugger
Stars
28
Forks
8
Bundled files
4
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 4 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by fernandoartalf on GitHub. Read the source before you install it.

Installation

Install the Bc Agent Instructions Debugger AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/fernandoartalf/AL-Copilot-Skills-Collection/tree/main/skills/bc-agent-instructions-debugger
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/fernandoartalf/AL-Copilot-Skills-Collection.git /tmp/AL-Copilot-Skills-Collection
mkdir -p .claude/skills
cp -r /tmp/AL-Copilot-Skills-Collection/skills/bc-agent-instructions-debugger .claude/skills/bc-agent-instructions-debugger
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Bc Agent Instructions Debugger in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Bc Agent Instructions Debugger on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Bc Agent Instructions Debugger is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

BC Agent Instructions Debugger

Audits Business Central agent instruction files to explain why an agent misbehaves and how to fix it — both before first publication and after a live failure.

What this skill does

Given an instruction file (InstructionsV1.txt / InstructionsV2.txt) and an optional symptom description, this skill:

  1. Parses the three-part RGI framework (Responsibility → Guidelines → Instructions)
  2. Simulates the agent runtime's execution path step by step in natural language
  3. Classifies every finding by severity and maps it to its root cause
  4. Produces a structured diagnosis report (markdown)
  5. Produces a corrected instruction file with targeted, minimal changes

Read references/anti-patterns.md for the complete catalogue of known failure modes and their signatures. Read references/runtime-model.md for the BC agent runtime mental model used during simulation.


Input

The user provides one or more of:

  • The instruction file content (pasted or as an uploaded .txt)
  • A symptom description: what the agent does wrong, on which page, after which action
  • The agent's profile page list (optional but improves diagnosis accuracy)
  • Recent task timeline entries (optional, highest diagnostic value)

If the user provides only the instruction file with no symptom, run a pre-publication audit (full static analysis). If the user describes a symptom, run a targeted debug (symptom-first, then full static analysis).


Execution workflow

Step 1 — Parse and structure

Extract the three RGI sections. If any section is missing or malformed, flag it immediately as a 🔴 structural finding before proceeding.

Identify all:

  • Keyword usages (Navigate to, Set field, **Memorize**, **Reply**, Invoke action, etc.)
  • Guideline count and pattern (ALWAYS / DO NOT)
  • Task sections (## Task:)
  • Error handling sections

Step 2 — Simulate execution (per task)

For each ## Task: section, walk through the steps as the BC agent runtime would:

  • Which page does the agent start on?
  • Which fields/values are READ before being used elsewhere?
  • Where is Memorize placed relative to where the value is needed?
  • Are page names, field names, and action names stated exactly as they would appear in the agent's profile?
  • Where could the agent get stuck, lose context, or produce wrong output?

Be explicit: "At step 3b, the agent reads Credit Limit (LCY) but this value is never Memorized before navigating away at step 4. When the agent reaches step 6, the value is gone."

Step 3 — Classify findings

Assign every finding a severity:

SeveritySymbolMeaning
Blocking🔴Agent cannot complete the task or will loop/crash
Degradation🟡Agent completes the task but with wrong output, missing data, or unsafe behaviour
Improvement🔵Agent works but style, safety, or performance could be better

Map each finding to one of the root cause categories in references/anti-patterns.md.

Step 4 — Generate diagnosis report

Use the exact report template below. Do not add extra sections or reorder.

Step 5 — Generate corrected instructions

Produce a corrected version of the full instruction file. Apply only the fixes needed for 🔴 and 🟡 findings. Mark every changed line with an inline comment:

   a. Read "Credit Limit (LCY)" field          ← unchanged
   b. **Memorize**: "Limit: {Credit Limit (LCY)}"  ← FIXED: moved Memorize here, was missing

For 🔵 findings, list them in the report but do not apply them automatically — ask the user whether to include them.


Report template

markdown
# BC Agent Instructions — Diagnosis Report

**Agent:** {agent name or "unnamed"}
**Date:** {today}
**Mode:** Pre-publication audit | Targeted debug
**Symptom reported:** {symptom or "none — full static audit"}

---

## Executive summary

{2–4 sentences. What is the most likely root cause of the reported symptom?
What is the overall quality of the instruction file?}

---

## Findings

### 🔴 Blocking — {count}

#### [B-01] {Short title}
- **Location:** {Section / Step number}
- **Root cause category:** {from anti-patterns catalogue}
- **What happens:** {What the runtime does and why it fails}
- **Fix:** {Exact corrected text or instruction}

{Repeat for each blocking finding}

---

### 🟡 Degradation — {count}

#### [D-01] {Short title}
- **Location:** {Section / Step number}
- **Root cause category:** {from anti-patterns catalogue}
- **What happens:** {What the runtime does and why it produces wrong output}
- **Fix:** {Exact corrected text or instruction}

{Repeat for each degradation finding}

---

### 🔵 Improvement — {count}

| ID | Location | Issue | Recommendation |
|----|----------|-------|----------------|
| I-01 | {location} | {issue} | {recommendation} |

---

## Execution simulation

{Step-by-step walk of the first failing task. Narrate what the runtime does at each step
and where it goes wrong. Be concrete: quote the instruction text, name the page, name the field.}

---

## Skills Evidencing

| Field | Value |
|---|---|
| Skill loaded | bc-agent-instructions-debugger |
| Input | {file name or "pasted content"}, {symptom or "none"} |
| Mode | Pre-publication audit / Targeted debug |
| Findings | 🔴 {n} / 🟡 {n} / 🔵 {n} |
| Corrected file generated | Yes / No |

Output files

FileContent
{agent-name}-diagnosis.mdFull diagnosis report
{agent-name}-fixed.txtCorrected instruction file

If the agent has no name, use agent-diagnosis.md and agent-fixed.txt.


Behaviour rules

  1. Never guess page names, field names, or action captions — only reference what appears in the instruction file or what the user explicitly confirms exists in the agent's profile. Flag any unverifiable reference as a finding.

  2. The corrected file must preserve the user's intent and writing style. Fix only what is broken; do not rewrite the entire file.

  3. If the symptom the user describes does not match any finding in the static analysis, say so explicitly and ask for the task timeline entries — they are the highest-signal diagnostic source.

  4. If the instruction file has no ## Task: sections, flag it as 🔴 structural and do not proceed with simulation until the user confirms the format is intentional.

  5. Produce the diagnosis report first. Ask the user to confirm before producing the corrected file, unless they explicitly asked for both upfront.


Reference files

  • references/anti-patterns.md — Full catalogue of known failure modes, their signatures, and standard fixes
  • references/runtime-model.md — Mental model of the BC agent runtime: state retention, keyword contract, page navigation constraints

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Bc Agent Instructions Debugger AI skill do?

Audits and diagnoses Business Central agent instruction files (InstructionsV1.txt or InstructionsV2.txt) to identify why an agent is not behaving as expected, and produces a structured diagnosis report plus a corrected version of the instructions. Covers pre-publication review (catch issues before deploying) and post-deployment debugging (diagnose a live agent that is failing). Analyzes instruction files against the BC agent runtime keyword contract, the Responsibilities-Guidelines-Instructions framework, and known anti-patterns. Generates severity-classified findings (🔴 blocking / 🟡 degr...

Why use Bc Agent Instructions Debugger on TypingMind?

Because you install it once and use it with any model. Bc Agent Instructions Debugger is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Bc Agent Instructions Debugger in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/fernandoartalf/AL-Copilot-Skills-Collection/tree/main/skills/bc-agent-instructions-debugger. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Bc Agent Instructions Debugger?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Bc Agent Instructions Debugger?

As many as you like. As long as a model supports skills, you can use Bc Agent Instructions Debugger with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Bc Agent Instructions Debugger AI skill free?

Yes. It is published on GitHub by fernandoartalf under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇