testing-course-samples

testing-course-samples is a skill for Claude Code, Codex from microsoft/ai-agents-for-beginners. It costs 86 tokens per session (1,116 once invoked), scanned A, original, MIT.

A testing guide for checking that a course’s Jupyter notebooks and Python examples run locally against Microsoft Foundry or Azure OpenAI, Microsoft’s cloud AI services.

In plain words
What is it for?
Use it to set up the required environment, run every notebook with the provided PowerShell script, and understand its PASS/FAIL results.
Why use it?
It helps find broken lessons after changing packages or AI model settings, and separates local notebook checks from tests of deployed agents.

Skill for Claude CodeCodex

About the project

AI Agents for Beginners is a course that teaches the fundamentals of building AI agents through a sequence of lessons. People learning generative AI and agent development use it to study topics and frameworks including AutoGen and Semantic Kernel. The catalogue entries provide skills, instructions, and an agent related to the course.

microsoft/ai-agents-for-beginners · 73,847 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/microsoft/ai-agents-for-beginners/testing-course-samples
Any agent
npx skills add microsoft/ai-agents-for-beginners --skill testing-course-samples
Clone the repo
git clone --depth 1 https://github.com/microsoft/ai-agents-for-beginners

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for testing-course-samples

README.md
[![agentmods](https://agentmods.dev/badge/skills/microsoft/ai-agents-for-beginners/testing-course-samples.svg)](https://agentmods.dev/skills/microsoft/ai-agents-for-beginners/testing-course-samples)
Your own site
<a href="https://agentmods.dev/skills/microsoft/ai-agents-for-beginners/testing-course-samples"><img src="https://agentmods.dev/badge/skills/microsoft/ai-agents-for-beginners/testing-course-samples.svg" alt="Measured on agentmods" height="20"></a>
Per session 86 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,116 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00086 $0.01116
Opus 5 $0.00043 $0.00558
Sonnet 5 $0.00017 $0.00223
Haiku 4.5 $0.00009 $0.00112

Measured 5d ago against content hash 838ef21b9163, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

testing-course-samples scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/testing-course-samples/SKILL.md · 80 lines

How it starts

The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Testing the Course Samples

Validate that the lesson notebooks and code samples run against a live Microsoft Foundry / Azure OpenAI setup. The repo ships a runner at scripts/validate-notebooks.ps1 that executes every Python notebook headlessly and prints a PASS/FAIL matrix.

When to use

  • "Validate all the notebooks / samples against my Azure subscription."
  • "Smoke-test the course after upgrading packages or changing models."
  • "Which lessons still pass / fail live?"

Do not use this for the AI Smoke Test GitHub Action (that validates deployed hosted agents — see tests/README.md). This skill runs the notebooks locally.

Prerequisites (check first)

  1. Python 3.12+ with course deps: python -m pip install -r requirements.txt plus the executor: python -m pip install nbconvert ipykernel.
  2. .env at the repo root (copy from .env.example) with at least:
    • AZURE_AI_PROJECT_ENDPOINT — Foundry project endpoint (https://<account>.services.ai.azure.com/api/projects/<project>)
    • AZURE_AI_MODEL_DEPLOYMENT_NAME — a non-deprecated deployment (e.g. gpt-5-mini)
    • AZURE_OPENAI_ENDPOINT (https://<account>.openai.azure.com) and AZURE_OPENAI_DEPLOYMENT for lessons that call Azure OpenAI directly (Lesson 06, 02-azure-openai, 14 handoff/human-loop).
  3. az login completed — samples authenticate with AzureCliCredential (Entra ID, keyless).
  4. Verify the model deployment exists: az cognitiveservices account deployment list -g <rg> -n <account> -o table.

Running the validation

# All Python notebooks (skips .NET, .venv, site-packages, translations, skill assets)
pwsh scripts/validate-notebooks.ps1

# A single lesson, with a longer per-cell timeout
pwsh scripts/validate-notebooks.ps1 -Filter '08-*' -Timeout 600

# Just list what would run (no execution)
pwsh scripts/validate-notebooks.ps1 -List

# Explicit interpreter (if `python` is not on PATH, e.g. Windows Store alias)
pwsh scripts/validate-notebooks.ps1 -Python "C:/path/to/python.exe"

The script writes executed copies, per-notebook logs, and results.json to $env:TEMP\aiab-nbval and exits with the number of failures.

Read the full file on GitHub · 80 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 80 lines · 86 tokens per session scan A 838ef21b9163

Subscribe to this mod's changes

testing-course-samples is a skill published in the GitHub repository microsoft/ai-agents-for-beginners (73,847 stars, last pushed 8d ago), licensed MIT. It adds 86 tokens to every session and 1,116 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.