cad-todo-cli

Guides learners through building a C# console TODO app with classes, file I/O, and JSON persistence.

2|Updated Jun 1, 2026
One-click install
npx skills add https://github.com/jay-steenbergen/MSSAMentorAgent --skill cad-todo-cli-jay-steenbergen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cad-todo-cli
Source: https://github.com/jay-steenbergen/MSSAMentorAgent/tree/main/.github/skills/tracks/cloud-app-dev/cad-todo-cli
Command: npx skills add https://github.com/jay-steenbergen/MSSAMentorAgent --skill cad-todo-cli-jay-steenbergen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? New C# learners often write all their logic in one Program.cs file and never learn how to structure code across classes or persist data between runs. This Skill provides a phased, mentored walkthrough that turns a blank console project into a working TODO manager while teaching collections, control flow, classes, and separation of concerns. ## Core Features & Use Cases - Five-phase guided build: scaffold a command loop, route commands with switch, implement commands against a List<string>, refactor into Todo and TodoStore classes, then add JSON file persistence. - Concept coaching: each phase names the underlying concepts out loud (generics, local functions, encapsulation, LINQ, lambdas, constructors) with common gotchas and after-action reflection prompts. - Use Case: A career-transitioning learner in a cloud application development curriculum completes project #2 by building a TODO CLI, then carries the same Todo model and store into the next project where it becomes an HTTP API. ## Quick Start Ask the mentor to start the cad-todo-cli project and walk you through building a C# console TODO app step by step.

Frequently Asked Questions about cad-todo-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a TODO console app in C#?

Create a console project with dotnet new console, add a while loop that reads commands, route them with a switch statement, and store items in a List<T>. This Skill walks through five phases ending with a Todo class, a TodoStore class, and JSON file persistence.

How do I save a List of objects to a file in C#?

Use System.Text.Json: JsonSerializer.Serialize converts a List<Todo> to a JSON string, and File.WriteAllText writes it to disk. On startup, check File.Exists, then use JsonSerializer.Deserialize<List<Todo>> to reload the data.

Why does my C# method say the variable does not exist in the current context?

Static methods in top-level statements cannot access local variables like a List declared in Program.cs. Remove the static keyword so the methods become local functions that can capture the surrounding variable.

When should I split C# code into multiple classes and files?

Split when a file mixes distinct concerns: a Todo class models the data, a TodoStore manages the collection and persistence, and Program.cs handles user interaction. This separation lets you swap the console UI for an HTTP API without changing the model.

What are the limitations of saving TODOs to a JSON file?

Saving after every change rewrites the entire file, which does not scale beyond small datasets, and hand-editing the JSON can break deserialization. Real applications use databases for concurrent access, batching, and schema migrations.