
workflow-mastery
Claude Code workflow mastery for .NET developers. Covers parallel execution with git worktrees, plan mode strategy, verification loops, auto-formatting hooks, permission setup for dotnet CLI, prompting techniques, subagent patterns, and context discipline — token budget management, MCP-first navigation, lazy loading, and subagent isolation — all adapted for the .NET ecosystem. Load this skill when setting up Claude Code for a .NET project, optimizing workflows, running parallel sessions, when context is running low or sessions feel sluggish, when exploring a large codebase efficiently, or when the user mentions "productivity", "workflow", "parallel", "worktree", "plan mode", "permissions", "hooks", "10x", "setup Claude Code", "speed up development", "context", "tokens", "budget", "running out of context", "too many files", or "large codebase". Inspired by tips from Boris Cherny (creator of Claude Code) and the Anthropic team.
- Installs
- 2.9K
- Last 24h
- +55
- Trending rank
- #3156
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/codewithmukesh/dotnet-claude-kit --skill workflow-mastery- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads workflow-mastery automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Workflow Mastery for .NET
Core Principles
- Parallel over sequential — Run 3-5 Claude sessions simultaneously using git worktrees. Build a feature in one, fix a bug in another, run tests in a third. The single biggest productivity unlock.
- Plan then execute — For any non-trivial task, start in plan mode, iterate until the plan is bulletproof, then switch to auto-accept. A good plan means Claude 1-shots the implementation.
- Verification closes the loop — Give Claude a way to prove its work:
dotnet build,dotnet test,get_diagnosticsvia MCP. This single practice 2-3x the quality of the output. - Context is a budget, not a dumping ground — The context window fills fast: a typical .cs file is 500-2000 tokens, and 50 file reads can burn a large share of the budget. Spend tokens like sprint capacity — deliberately.
- Automate the repetitive — If you do it more than once a day, make it a hook, a slash command, or a subagent. Pre-allow safe permissions. Eliminate friction.
- Compound your knowledge — Every correction becomes a rule in
MEMORY.md(seeinstinct-systemskill). Every PR review adds a learning. Over time, Claude's mistake rate drops because your project's knowledge base grows.
Patterns
Parallel Sessions with Git Worktrees
The biggest productivity multiplier. Each worktree gets its own Claude session, its own files, zero conflicts.
# Create worktrees for parallel work
git worktree add ../my-project-feature origin/main
git worktree add ../my-project-bugfix origin/main
git worktree add ../my-project-tests origin/main
# Start Claude in each (separate terminal tabs)
cd ../my-project-feature && claude
cd ../my-project-bugfix && claude
cd ../my-project-tests && claude
Practical .NET workflow:
| Worktree | Task | Claude Session |
|---|---|---|
feature | Build new endpoint + handler | Main development |
bugfix | Fix the failing CI test | Autonomous bug fix |
tests | Write integration tests for existing feature | Test generation |
analysis | Query the Roslyn MCP, read logs, review architecture | Read-only research |
Tips:
- Name your terminal tabs by task so you never lose track
- Use shell aliases (
alias zf='cd ../my-project-feature') for one-keystroke switching - Enable terminal notifications so you know when a session needs input
Auto-Format Hook for .NET
Catch formatting issues on every file write — eliminates the "CI failed on formatting" loop.
// .claude/settings.json
{
"hooks": {
"PostToolUse": [
{
"matcher": "Write|Edit",
"hooks": [
{
"type": "command",
"command": "dotnet format --include \"$CLAUDE_FILE_PATH\" --no-restore 2>/dev/null || true"
}
]
}
]
}
}
Why || true: The hook should never block Claude's workflow. If formatting fails (e.g., on a non-C# file), silently continue.
Pre-Allow Safe .NET Permissions
Stop clicking "allow" for every dotnet command. Add these to .claude/settings.json:
{
"permissions": {
"allow": [
"Bash(dotnet build *)",
"Bash(dotnet test *)",
"Bash(dotnet run *)",
"Bash(dotnet ef *)",
"Bash(dotnet format *)",
"Bash(dotnet restore *)",
"Bash(dotnet pack *)",
"Bash(dotnet tool *)"
]
}
}
Check this into git so the whole team gets frictionless workflows.
Plan Mode Strategy
For any task touching 3+ files or involving architecture decisions:
Step 1: Enter plan mode (Shift+Tab twice)
Step 2: Describe the task with full context
Step 3: Iterate on the plan — challenge assumptions, ask "what about edge cases?"
Step 4: Once the plan is solid, switch to normal mode
Step 5: Claude executes with auto-accept — often 1-shots the implementation
Advanced pattern: Have one Claude write the plan, then spin up a second Claude session to review it as a staff engineer:
"Review this plan as a staff .NET engineer. Challenge every assumption.
What could go wrong? What's missing? What would you do differently?"
When things go sideways: The moment implementation deviates from the plan, STOP. Don't push through. Switch back to plan mode, understand what changed, re-plan, then resume.
Verification Loop for .NET
For the full 7-phase verification pipeline (build, diagnostics, anti-patterns, tests, security, format, diff review) with structured PASS/FAIL reporting, see the verify skill.
Boris's #1 tip: "Give Claude a way to verify its work." The short version: always tell Claude to run dotnet build, dotnet test, get_diagnostics, and dotnet format --verify-no-changes before declaring done. The verify skill has the complete pipeline with short-circuit rules and report templates.
Compounding Knowledge via Corrections
For the full correction capture system — detection, generalization, categorized storage, and periodic audits — see the instinct-system skill. The short version: after every correction, capture a generalized rule in MEMORY.md so the same mistake never recurs.
Prompting Techniques for .NET
Challenge Claude's work:
"Grill me on these changes. Would this pass a staff .NET engineer's code review?
Check for: N+1 queries, missing CancellationToken, exposed domain entities,
missing validation, incorrect service lifetimes."
Demand proof:
"Prove this works. Run the tests, show me the output.
Then diff the API response between main and this branch."
After a mediocre fix:
"Knowing everything you know now, scrap this and implement the elegant solution.
No hacks, no workarounds."
For EF Core migrations:
"Generate the migration, then show me the raw SQL it produces.
I want to verify the migration before applying it."
Subagent Patterns for .NET
The kit ships 10 specialist agents — route to them before writing your own:
dotnet-architect, code-reviewer, refactor-cleaner, test-engineer,
security-auditor, build-error-resolver, ef-core-specialist,
api-designer, performance-analyst, devops-engineer. Each carries
pre-loaded skills and domain context a generalist session lacks.
Use them:
"Run the code-reviewer agent on my changes before I create the PR."
"Have refactor-cleaner simplify the files I just modified."
"Send the failing CI log to build-error-resolver."
For workflows the kit does not cover, create project-specific subagents in
.claude/agents/ — a markdown file with a role, a numbered job list, and a
required report format (PASS with summary / FAIL with specifics). Keep one
concern per agent so its output stays reviewable.
When to offload vs. stay in main context: see Context Discipline below — subagents are also your context isolation chambers, not just task runners.
Context Discipline
The rules in .claude/rules/agents.md already mandate MCP-first navigation (find_symbol before file reads, get_diagnostics over builds). This section is the strategy layer on top: how to budget, when to offload, and how to recover.
Token Economics
A Roslyn MCP query costs 30-150 tokens; a file read costs 500-2000+. To understand OrderService, four MCP calls (find_symbol → get_public_api → find_references → get_type_hierarchy) cost ~310 tokens; reading the four related files costs ~2900. Then read only the method you'll modify. Reserve full file reads for files you are about to edit.
Subagent Offloading Decision Matrix
OFFLOAD TO A SUBAGENT WHEN:
- Exploring unfamiliar code (> 3 files to read)
- Research requiring docs or multiple files
- Verbose output (test runs, diagnostics, comparisons)
- Any task where the journey is verbose but the answer is concise
STAY IN MAIN CONTEXT WHEN:
- Modifying a file you've already read
- Quick lookups (1-2 MCP queries)
- Work that builds on the ongoing conversation with the user
Ask subagents for compressed answers: "Trace the auth flow from login to token validation. Return numbered steps with file:line references." You get ~300 tokens of findings instead of 15k tokens of raw files.
File Reading Prioritization
PRIORITY 1 — Files you will modify: read fully (exact content needed for edits)
PRIORITY 2 — Contracts you must satisfy: read the interface, skip implementations
PRIORITY 3 — Reference patterns: get_public_api first, read only if insufficient
PRIORITY 4 — General context: subagent summarizes; never read in main context
NEVER READ: entire directories (get_project_graph), test files for context
(get_test_coverage_map), generated files/migrations, configs unless needed
Budget Planning and Recovery
Before a complex task, sketch the spend: understand ~5k (MCP + subagent), plan ~2k, implement ~15k (read targets + write + iterate), verify ~3k — leaving the bulk of the window for conversation.
WARNING SIGNS: 10+ files read, 50+ exchanges, forgetting earlier details,
re-reading files you already saw
RECOVERY: summarize what you know in 5-10 lines → subagents for remaining
exploration → MCP-only lookups → suggest a fresh session if still degraded
LARGE CODEBASES (50+ projects): get_project_graph → narrow to 2-3 relevant
projects → find_symbol for key types → get_public_api for interfaces →
read ONLY files you'll modify → subagents for cross-cutting concerns
Lazy Skill Loading
Don't front-load skills "just in case" — 15 skills at ~300 tokens each is ~4500 tokens spent before any work starts. Load modern-csharp at session start if relevant; pull ef-core, testing, etc. the moment the topic actually arises.
Anti-patterns
Don't Skip Plan Mode for Complex Tasks
// BAD — dive straight into a multi-file refactor
"Refactor the Orders module to use DDD with aggregates and value objects"
*Claude modifies 15 files, misses half the invariants, tangles the migration*
// GOOD — plan first, execute after
"Enter plan mode. I want to refactor the Orders module to use DDD.
Let's plan which files change, what the aggregate boundary is,
how value objects map to EF Core, and what the migration strategy is."
Don't Work in a Single Session When You Could Parallelize
// BAD — sequential work in one session
1. Build feature (20 min)
2. Write tests (15 min)
3. Fix formatting (5 min)
4. Update docs (10 min)
Total: 50 minutes
// GOOD — parallel worktrees
Worktree 1: Build feature (20 min)
Worktree 2: Write tests (15 min, started simultaneously)
Worktree 3: Update docs (10 min, started simultaneously)
Total: ~20 minutes (wall clock)
Don't Accept the First Solution
// BAD — accept mediocre code
Claude: "Here's the implementation" *generic, works but not great*
You: "Looks good, ship it"
// GOOD — push for quality
Claude: "Here's the implementation"
You: "Would a staff .NET engineer approve this?
What about the service lifetime? Is this N+1 safe?
Is there a more elegant way using C# 14 features?"
Don't Load Everything Because the Window Is Large
// BAD — "the context window is huge, let's load everything"
Read all 30 files in the Orders module, all 15 test files,
docker-compose.yml, every migration
*80k tokens consumed before writing a single line of code*
// GOOD — minimum viable context
MCP: get_project_graph (solution shape) + find_symbol (locate targets)
Read: the 2-3 files you'll actually modify
Subagent: summarize anything else
*~3k tokens consumed, the rest free for actual work*
Decision Guide
| Scenario | Recommendation |
|---|---|
| Task touches 3+ files | Plan mode first |
| Task is a simple bug fix | Just fix it, verify with dotnet test |
| Need to build + test + review | 3 parallel worktrees |
| CI keeps failing on format | Add PostToolUse format hook |
| Tired of permission prompts | Pre-allow dotnet * commands |
| Claude made a mistake | "Update CLAUDE.md so you don't make that mistake again" |
| Code feels hacky | "Knowing everything you know now, implement the elegant solution" |
| Want to verify architecture | Spin up a second session as staff reviewer |
| Repetitive PR workflow | Route to kit agents (code-reviewer, refactor-cleaner) or create a project subagent |
| Learning a new codebase | Use "Explanatory" output style via /config |
| Need a type's API or location | get_public_api / find_symbol — don't read the file |
| Need to modify a file | Read it fully — exact content required |
| Exploring unfamiliar code | Spawn a subagent — keep main context clean |
| 10+ files read in a session | Pause — switch to MCP + subagents |
| Context feels heavy or sluggish | Summarize what you know, subagents going forward |
| Large codebase (50+ projects) | MCP-first, subagent-heavy, read only files you modify |
| New topic mid-session | Load the relevant skill on demand, not in advance |
FAQ
What does the workflow-mastery skill do?
Claude Code workflow mastery for .NET developers. Covers parallel execution with git worktrees, plan mode strategy, verification loops, auto-formatting hooks, permission setup for dotnet CLI, prompting techniques, subagent patterns, and context discipline — token budget management, MCP-first navigation, lazy loading, and subagent isolation — all adapted for the .NET ecosystem. Load this skill when setting up Claude Code for a .NET project, optimizing workflows, running parallel sessions, when context is running low or sessions feel sluggish, when exploring a large codebase efficiently, or when the user mentions "productivity", "workflow", "parallel", "worktree", "plan mode", "permissions", "hooks", "10x", "setup Claude Code", "speed up development", "context", "tokens", "budget", "running out of context", "too many files", or "large codebase". Inspired by tips from Boris Cherny (creator of Claude Code) and the Anthropic team.
How do I install workflow-mastery?
Run npx skills add https://github.com/codewithmukesh/dotnet-claude-kit --skill workflow-mastery in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/workflow-mastery/ (personal) or .claude/skills/workflow-mastery/ (project).
Which AI agents can use workflow-mastery?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is workflow-mastery safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains workflow-mastery?
It is published by codewithmukesh in codewithmukesh/dotnet-claude-kit. It has 2,860 recorded installs.
More from codewithmukesh/dotnet-claude-kit
clean-architecture
codewithmukesh/dotnet-claude-kit
Clean Architecture for .NET applications. Covers the 4-project layout (Domain, Application, Infrastructure, Api), dependency inversion, use case handlers, domain entities with behavior, and infrastructure as a plugin. Load this skill when building a project with Clean Architecture, discussing layered architecture, dependency inversion, use cases, or when the architecture-advisor recommends Clean Architecture.
ddd
codewithmukesh/dotnet-claude-kit
Domain-Driven Design tactical patterns for .NET applications. Covers aggregates, aggregate roots, value objects, domain events, domain services, strongly-typed IDs, and repository patterns for aggregate persistence. Load this skill when implementing DDD, working with aggregates, value objects, domain events, bounded contexts, or when the architecture-advisor recommends DDD + Clean Architecture. Pair with the clean-architecture skill.
modern-csharp
codewithmukesh/dotnet-claude-kit
Modern C language features for .NET 10 and C 14. Covers primary constructors, collection expressions, the field keyword, extension members, records, pattern matching, spans, and raw string literals. Load this skill when writing any new C code, reviewing existing code for modernization, using "modern C", "C 14", "primary constructor", "collection expression", "records", "pattern matching", "span", "field keyword", or "extension members". Always loaded as the baseline for all agents.
vertical-slice
codewithmukesh/dotnet-claude-kit
Vertical Slice Architecture (VSA) for .NET applications — one of several supported architectures in dotnet-claude-kit. Covers feature folders, endpoint grouping, and handler patterns for Mediator, Wolverine, and raw handler classes. Load this skill when the architecture-advisor recommends VSA, when working in an existing VSA codebase, when adding features to a feature-folder project, or when discussing vertical slice patterns, feature folders, or handler patterns.
security-scan
codewithmukesh/dotnet-claude-kit
Deep security scanning for .NET applications across 6 layers: vulnerable packages, secrets detection, OWASP code patterns, auth configuration, CORS policy, and data protection. Produces severity-rated findings with specific remediation steps. Load this skill when: "security scan", "security audit", "check for vulnerabilities", "find secrets", "OWASP", "auth review", "CORS check", "security review", "penetration test prep", "CVE check", "vulnerability scan", "hardcoded password", "data protection", "security posture".
serilog
codewithmukesh/dotnet-claude-kit
Structured logging with Serilog for .NET 10 applications. Covers two-stage bootstrap, appsettings configuration, enrichers, sinks, request logging, destructuring, and Serilog.Expressions. Load this skill when setting up Serilog, configuring log sinks, enrichers, or structured logging, or when the user mentions "Serilog", "structured logging", "log enrichment", "Seq", "LogContext", "UseSerilog", "WriteTo", "message template", "Serilog.Expressions", "request logging", "log sink", "rolling file", or "audit log".
Popular productivity & automation skills
agent-browser
vercel-labs/agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.
lark-doc
open.feishu.cn
飞书云文档(Docx / Wiki)内容操作:读取、创建、编辑文档,插入或下载图片附件,以及操作思维笔记。用户提供文档 URL/token(包括 doubao.com 的 /docx/、/wiki/)时使用;按 URL 路径/token 而非域名路由;/page/ 是妙搭应用,非飞书云文档。文档内嵌资源按读取参考中的统一规则分流。独立评论操作走 lark-drive;随正文读取评论使用 docs +fetch。表格或 Base 内部数据操作不在本 skill。
lark-base
open.feishu.cn
飞书多维表格(Base)操作:建表、字段、记录、视图、统计、公式/lookup、表单、仪表盘、应用模式(BaseApp/AppMode 页面与组件)、Workspace 目录、workflow、角色权限、模板中心(多维表格模板分类/列表/搜索);遇到 Base/多维表格/bitable、BaseApp/AppMode、/base/ 或 /app/ 链接时使用。BaseApp 不走 lark-apps;文件导入/导出转 lark-drive,认证/授权转 lark-shared。
lark-drive
open.feishu.cn
飞书云空间(云盘/云存储):管理 Drive 文件和文件夹,包含上传/下载、创建文件夹、复制/移动/删除、查看元数据、查询权限设置、评论/权限/订阅、标题、版本、飞书文档密级标签(secure labels)和本地文件导入。用户需要整理云盘目录、处理云空间资源 URL/token、判断链接类型/真实 token/标题,或导入 Word/Markdown/Excel/CSV/PPTX/.base 为 docx/sheet/bitable/slides 时使用;doubao.com 云空间 URL/token 也按资源路径和 token 路由,不回退 WebFetch。不负责:文档内容编辑(走 lark-doc)、表格/Base 表内数据操作(走 lark-sheets/lark-base)、知识空间节点/成员管理(走 lark-wiki)、原生 Markdown 文件读写/patch/diff(走 lark-markdown)。
lark-shared
open.feishu.cn
Use for lark-cli setup/auth tasks: auth login/status/logout, user vs bot identity, business-domain permissions (--domain, including all/docs/drive), missing scopes, revoking authorization, or handling notice JSON.
lark-im
open.feishu.cn
飞书即时通讯:收发消息和管理群聊。发送和回复消息、搜索聊天记录、管理群聊成员、上传下载图片和文件、管理表情回复、发送应用内/短信/电话加急、发送和处理交互卡片(Interactive Card)、监听卡片按钮回调(card.action.trigger)。当用户需要发消息、查看或搜索聊天记录、下载聊天中的文件、查看群成员、搜索群、创建群聊或话题群、管理标记数据、管理 Feed 置顶(添加/移除/查询置顶会话)、管理标签数据、处理卡片回调时使用。