@pratikpsl/agent-skills 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/LICENSE +201 -201
  2. package/package.json +2 -2
  3. package/src/templates/dotnet/AgentSkills/README.md +40 -40
  4. package/src/templates/dotnet/AgentSkills/agents/README.md +11 -11
  5. package/src/templates/dotnet/AgentSkills/agents/architect.agent.md +59 -59
  6. package/src/templates/dotnet/AgentSkills/agents/developer.agent.md +88 -88
  7. package/src/templates/dotnet/AgentSkills/memory/index.md +21 -21
  8. package/src/templates/dotnet/AgentSkills/memory/lessons/api.md +3 -3
  9. package/src/templates/dotnet/AgentSkills/memory/lessons/auth.md +3 -3
  10. package/src/templates/dotnet/AgentSkills/memory/lessons/csharp.md +3 -3
  11. package/src/templates/dotnet/AgentSkills/memory/lessons/db.md +3 -3
  12. package/src/templates/dotnet/AgentSkills/memory/lessons/design.md +3 -3
  13. package/src/templates/dotnet/AgentSkills/memory/lessons/infra.md +2 -2
  14. package/src/templates/dotnet/AgentSkills/memory/lessons/mcp.md +3 -3
  15. package/src/templates/dotnet/AgentSkills/memory/lessons/testing.md +3 -3
  16. package/src/templates/dotnet/AgentSkills/memory/schema.md +26 -26
  17. package/src/templates/dotnet/AgentSkills/skills/INDEX.md +8 -8
  18. package/src/templates/dotnet/AgentSkills/skills/code-standards/SKILL.md +122 -122
  19. package/src/templates/dotnet/AgentSkills/skills/core/SKILL.md +23 -23
  20. package/src/templates/dotnet/AgentSkills/skills/csharp-xunit/SKILL.md +67 -67
  21. package/src/templates/dotnet/AgentSkills/skills/design/SKILL.md +108 -108
  22. package/src/templates/dotnet/AgentSkills/skills/dotnet-api/SKILL.md +303 -303
  23. package/src/templates/dotnet/AgentSkills/skills/dotnet-best-practices/SKILL.md +170 -170
  24. package/src/templates/dotnet/AgentSkills/skills/harness/SKILL.md +62 -62
  25. package/src/templates/dotnet/AgentSkills/skills/mcp_dotnet/SKILL.md +54 -54
  26. package/src/templates/dotnet/manifest.json +2 -2
@@ -1,59 +1,59 @@
1
- ---
2
- name: architect
3
- description: >
4
- Load when designing features, planning CQRS structure,
5
- designing SQL schema, or planning MCP server contracts.
6
- Do not write implementation code; output structure only.
7
- ---
8
-
9
- # Architect Agent
10
-
11
- ## Responsibilities
12
-
13
- - Design CQRS command/query split before any code is written.
14
- - Define SQL schema and relationships.
15
- - Define MCP tool contracts including name, input, and output.
16
- - Identify performance-sensitive read/write paths and expected data volume.
17
- - Reject designs that violate SOLID, KISS, or YAGNI.
18
- - Prefer simple, small designs that are easy to delete.
19
-
20
- ## CQRS Rules
21
-
22
- - Commands mutate state and return nothing, an ID, or a small result.
23
- - Queries read state and never mutate.
24
- - Controllers dispatch only; no business logic belongs in controllers.
25
- - Use one handler per command or query.
26
- - Query designs returning collections must specify projection, pagination, and tracking behavior.
27
-
28
- ## Output Format
29
-
30
- Before implementation, produce:
31
-
32
- 1. Command/query split with input and output.
33
- 2. SQL schema if new tables are needed.
34
- 3. MCP tool contract if the MCP surface changes.
35
- 4. Proposed folder structure.
36
-
37
- ## Example Command / Query Split
38
-
39
- | Type | Name | Input | Output |
40
- |---|---|---|---|
41
- | Command | CreateOrderCommand | CreateOrderRequest | OrderId |
42
- | Query | GetOrderByIdQuery | OrderId | OrderDto |
43
-
44
- ## Example Folder Structure
45
-
46
- ```text
47
- Features/
48
- └── Orders/
49
- ├── Commands/
50
- │ └── CreateOrder/
51
- │ ├── CreateOrderCommand.cs
52
- │ ├── CreateOrderHandler.cs
53
- │ └── CreateOrderValidator.cs
54
- └── Queries/
55
- └── GetOrderById/
56
- ├── GetOrderByIdQuery.cs
57
- ├── GetOrderByIdHandler.cs
58
- └── OrderDto.cs
59
- ```
1
+ ---
2
+ name: architect
3
+ description: >
4
+ Load when designing features, planning CQRS structure,
5
+ designing SQL schema, or planning MCP server contracts.
6
+ Do not write implementation code; output structure only.
7
+ ---
8
+
9
+ # Architect Agent
10
+
11
+ ## Responsibilities
12
+
13
+ - Design CQRS command/query split before any code is written.
14
+ - Define SQL schema and relationships.
15
+ - Define MCP tool contracts including name, input, and output.
16
+ - Identify performance-sensitive read/write paths and expected data volume.
17
+ - Reject designs that violate SOLID, KISS, or YAGNI.
18
+ - Prefer simple, small designs that are easy to delete.
19
+
20
+ ## CQRS Rules
21
+
22
+ - Commands mutate state and return nothing, an ID, or a small result.
23
+ - Queries read state and never mutate.
24
+ - Controllers dispatch only; no business logic belongs in controllers.
25
+ - Use one handler per command or query.
26
+ - Query designs returning collections must specify projection, pagination, and tracking behavior.
27
+
28
+ ## Output Format
29
+
30
+ Before implementation, produce:
31
+
32
+ 1. Command/query split with input and output.
33
+ 2. SQL schema if new tables are needed.
34
+ 3. MCP tool contract if the MCP surface changes.
35
+ 4. Proposed folder structure.
36
+
37
+ ## Example Command / Query Split
38
+
39
+ | Type | Name | Input | Output |
40
+ |---|---|---|---|
41
+ | Command | CreateOrderCommand | CreateOrderRequest | OrderId |
42
+ | Query | GetOrderByIdQuery | OrderId | OrderDto |
43
+
44
+ ## Example Folder Structure
45
+
46
+ ```text
47
+ Features/
48
+ └── Orders/
49
+ ├── Commands/
50
+ │ └── CreateOrder/
51
+ │ ├── CreateOrderCommand.cs
52
+ │ ├── CreateOrderHandler.cs
53
+ │ └── CreateOrderValidator.cs
54
+ └── Queries/
55
+ └── GetOrderById/
56
+ ├── GetOrderByIdQuery.cs
57
+ ├── GetOrderByIdHandler.cs
58
+ └── OrderDto.cs
59
+ ```
@@ -1,88 +1,88 @@
1
- ---
2
- name: developer
3
- description: >
4
- Load when implementing features in .NET C# API.
5
- Always load architect guidance first if structure is not defined.
6
- Always follows CQRS and loads code-standards plus dotnet-best-practices.
7
- ---
8
-
9
- # Developer Agent
10
-
11
- ## Stack
12
-
13
- - .NET 10 and modern C#.
14
- - ASP.NET Core Minimal APIs or controllers.
15
- - MediatR for CQRS dispatch.
16
- - FluentValidation for input validation.
17
- - EF Core for persistence.
18
- - MCP Server SDK for AI tool surface.
19
-
20
- ## Implementation Rules
21
-
22
- - Use records for commands, queries, and DTOs when immutability is appropriate.
23
- - Mark classes `sealed` unless inheritance is intentionally supported.
24
- - Keep controllers thin; they should validate transport concerns and dispatch through MediatR.
25
- - Keep business rules in domain entities or domain/application services, not controllers or handlers.
26
- - Use repositories or data access abstractions where the project already follows that convention.
27
- - Use async all the way; never block with `.Result`, `.Wait()`, or `.GetAwaiter().GetResult()`.
28
- - Pass `CancellationToken` through request, handler, EF Core, HTTP, and MCP boundaries.
29
- - Optimize read queries with `.AsNoTracking()`, DTO projection, pagination, and no N+1 queries.
30
- - Keep API payloads small and avoid excessive logging in hot paths.
31
-
32
- ## CQRS Pattern
33
-
34
- ```csharp
35
- public sealed record CreateOrderCommand(Guid CustomerId, IReadOnlyList<OrderItem> Items)
36
- : IRequest<Guid>;
37
-
38
- public sealed class CreateOrderHandler(IOrderRepository repository)
39
- : IRequestHandler<CreateOrderCommand, Guid>
40
- {
41
- public async Task<Guid> Handle(
42
- CreateOrderCommand command,
43
- CancellationToken cancellationToken)
44
- {
45
- var order = Order.Create(command.CustomerId, command.Items);
46
- await repository.AddAsync(order, cancellationToken);
47
- return order.Id;
48
- }
49
- }
50
- ```
51
-
52
- ## Controller Rule
53
-
54
- Controllers dispatch only.
55
-
56
- ```csharp
57
- [HttpPost]
58
- public async Task<IActionResult> Create(
59
- CreateOrderRequest request,
60
- CancellationToken cancellationToken)
61
- {
62
- var orderId = await mediator.Send(
63
- new CreateOrderCommand(request.CustomerId, request.Items),
64
- cancellationToken);
65
-
66
- return CreatedAtAction(nameof(GetById), new { orderId }, null);
67
- }
68
- ```
69
-
70
- ## MCP Tool Rule
71
-
72
- MCP tools should reuse the same command/query handlers as REST endpoints.
73
-
74
- ```csharp
75
- [McpTool("create_order", "Creates a new order")]
76
- public static async Task<CreateOrderResult> CreateOrderAsync(
77
- Guid customerId,
78
- IReadOnlyList<OrderItem> items,
79
- IMediator mediator,
80
- CancellationToken cancellationToken)
81
- {
82
- var orderId = await mediator.Send(
83
- new CreateOrderCommand(customerId, items),
84
- cancellationToken);
85
-
86
- return new CreateOrderResult(orderId);
87
- }
88
- ```
1
+ ---
2
+ name: developer
3
+ description: >
4
+ Load when implementing features in .NET C# API.
5
+ Always load architect guidance first if structure is not defined.
6
+ Always follows CQRS and loads code-standards plus dotnet-best-practices.
7
+ ---
8
+
9
+ # Developer Agent
10
+
11
+ ## Stack
12
+
13
+ - .NET 10 and modern C#.
14
+ - ASP.NET Core Minimal APIs or controllers.
15
+ - MediatR for CQRS dispatch.
16
+ - FluentValidation for input validation.
17
+ - EF Core for persistence.
18
+ - MCP Server SDK for AI tool surface.
19
+
20
+ ## Implementation Rules
21
+
22
+ - Use records for commands, queries, and DTOs when immutability is appropriate.
23
+ - Mark classes `sealed` unless inheritance is intentionally supported.
24
+ - Keep controllers thin; they should validate transport concerns and dispatch through MediatR.
25
+ - Keep business rules in domain entities or domain/application services, not controllers or handlers.
26
+ - Use repositories or data access abstractions where the project already follows that convention.
27
+ - Use async all the way; never block with `.Result`, `.Wait()`, or `.GetAwaiter().GetResult()`.
28
+ - Pass `CancellationToken` through request, handler, EF Core, HTTP, and MCP boundaries.
29
+ - Optimize read queries with `.AsNoTracking()`, DTO projection, pagination, and no N+1 queries.
30
+ - Keep API payloads small and avoid excessive logging in hot paths.
31
+
32
+ ## CQRS Pattern
33
+
34
+ ```csharp
35
+ public sealed record CreateOrderCommand(Guid CustomerId, IReadOnlyList<OrderItem> Items)
36
+ : IRequest<Guid>;
37
+
38
+ public sealed class CreateOrderHandler(IOrderRepository repository)
39
+ : IRequestHandler<CreateOrderCommand, Guid>
40
+ {
41
+ public async Task<Guid> Handle(
42
+ CreateOrderCommand command,
43
+ CancellationToken cancellationToken)
44
+ {
45
+ var order = Order.Create(command.CustomerId, command.Items);
46
+ await repository.AddAsync(order, cancellationToken);
47
+ return order.Id;
48
+ }
49
+ }
50
+ ```
51
+
52
+ ## Controller Rule
53
+
54
+ Controllers dispatch only.
55
+
56
+ ```csharp
57
+ [HttpPost]
58
+ public async Task<IActionResult> Create(
59
+ CreateOrderRequest request,
60
+ CancellationToken cancellationToken)
61
+ {
62
+ var orderId = await mediator.Send(
63
+ new CreateOrderCommand(request.CustomerId, request.Items),
64
+ cancellationToken);
65
+
66
+ return CreatedAtAction(nameof(GetById), new { orderId }, null);
67
+ }
68
+ ```
69
+
70
+ ## MCP Tool Rule
71
+
72
+ MCP tools should reuse the same command/query handlers as REST endpoints.
73
+
74
+ ```csharp
75
+ [McpTool("create_order", "Creates a new order")]
76
+ public static async Task<CreateOrderResult> CreateOrderAsync(
77
+ Guid customerId,
78
+ IReadOnlyList<OrderItem> items,
79
+ IMediator mediator,
80
+ CancellationToken cancellationToken)
81
+ {
82
+ var orderId = await mediator.Send(
83
+ new CreateOrderCommand(customerId, items),
84
+ cancellationToken);
85
+
86
+ return new CreateOrderResult(orderId);
87
+ }
88
+ ```
@@ -1,22 +1,22 @@
1
- # Memory Index
2
-
3
- Always load this file first. Then load **only** the domain file(s) that match your task.
4
- Do NOT load domain files you do not need. Never load all files at once.
5
-
6
- ## Domain Map
7
-
8
- | Domain | Load when | File | Lessons |
9
- |--------|-----------|------|---------|
10
- | api | CQRS, MediatR, commands, queries, controllers, endpoints | [lessons/api.md](lessons/api.md) | 1 |
11
- | db | EF Core, migrations, schema, seeding, repositories | [lessons/db.md](lessons/db.md) | 0 |
1
+ # Memory Index
2
+
3
+ Always load this file first. Then load **only** the domain file(s) that match your task.
4
+ Do NOT load domain files you do not need. Never load all files at once.
5
+
6
+ ## Domain Map
7
+
8
+ | Domain | Load when | File | Lessons |
9
+ |--------|-----------|------|---------|
10
+ | api | CQRS, MediatR, commands, queries, controllers, endpoints | [lessons/api.md](lessons/api.md) | 1 |
11
+ | db | EF Core, migrations, schema, seeding, repositories | [lessons/db.md](lessons/db.md) | 0 |
12
12
  | infra | Build, paths, CI, tooling, portability, AgentSkills setup | [lessons/infra.md](lessons/infra.md) | 5 |
13
- | auth | Authentication, authorisation, JWT, policies, claims | [lessons/auth.md](lessons/auth.md) | 0 |
14
- | testing | xUnit, test data, mocking, coverage, assertions | [lessons/testing.md](lessons/testing.md) | 0 |
15
- | csharp | C# language features, async/await, naming, code style | [lessons/csharp.md](lessons/csharp.md) | 0 |
16
- | design | SOLID, CQRS, Repository, patterns, architecture decisions | [lessons/design.md](lessons/design.md) | 0 |
17
- | mcp | MCP server tools, transports, contracts, .NET MCP integration | [lessons/mcp.md](lessons/mcp.md) | 0 |
18
-
19
- ## Writing a lesson?
20
-
21
- Load `memory/schema.md` for the one-line format. Do not inline logging instructions here.
22
- Update the lesson count in this table after appending to the domain file.
13
+ | auth | Authentication, authorisation, JWT, policies, claims | [lessons/auth.md](lessons/auth.md) | 0 |
14
+ | testing | xUnit, test data, mocking, coverage, assertions | [lessons/testing.md](lessons/testing.md) | 0 |
15
+ | csharp | C# language features, async/await, naming, code style | [lessons/csharp.md](lessons/csharp.md) | 0 |
16
+ | design | SOLID, CQRS, Repository, patterns, architecture decisions | [lessons/design.md](lessons/design.md) | 0 |
17
+ | mcp | MCP server tools, transports, contracts, .NET MCP integration | [lessons/mcp.md](lessons/mcp.md) | 0 |
18
+
19
+ ## Writing a lesson?
20
+
21
+ Load `memory/schema.md` for the one-line format. Do not inline logging instructions here.
22
+ Update the lesson count in this table after appending to the domain file.
@@ -1,3 +1,3 @@
1
- # API Lessons
2
-
3
- RULE: Controllers dispatch only via MediatR; all business rules belong in Domain Entities or Domain Services, never in Handlers or Controllers. #cqrs-violation 2026-05-31
1
+ # API Lessons
2
+
3
+ RULE: Controllers dispatch only via MediatR; all business rules belong in Domain Entities or Domain Services, never in Handlers or Controllers. #cqrs-violation 2026-05-31
@@ -1,3 +1,3 @@
1
- # Auth Lessons
2
-
3
- <!-- No lessons yet. Append using the format in memory/schema.md -->
1
+ # Auth Lessons
2
+
3
+ <!-- No lessons yet. Append using the format in memory/schema.md -->
@@ -1,3 +1,3 @@
1
- # C# Lessons
2
-
3
- <!-- No lessons yet. Append using the format in memory/schema.md -->
1
+ # C# Lessons
2
+
3
+ <!-- No lessons yet. Append using the format in memory/schema.md -->
@@ -1,3 +1,3 @@
1
- # DB Lessons
2
-
3
- <!-- No lessons yet. Append using the format in memory/schema.md -->
1
+ # DB Lessons
2
+
3
+ <!-- No lessons yet. Append using the format in memory/schema.md -->
@@ -1,3 +1,3 @@
1
- # Design Lessons
2
-
3
- <!-- No lessons yet. Append using the format in memory/schema.md -->
1
+ # Design Lessons
2
+
3
+ <!-- No lessons yet. Append using the format in memory/schema.md -->
@@ -1,5 +1,5 @@
1
- # Infra Lessons
2
-
1
+ # Infra Lessons
2
+
3
3
  RULE: Never overwrite files in AgentSkills/ without verifying they are backed up; it is the single source of truth and tool-specific entry points must point to it, never duplicate it. #circular-redirect 2026-05-31
4
4
  RULE: Use repo-relative paths in all agent and IDE instruction files; never write absolute local drive paths in shared documentation. #wrong-path 2026-06-06
5
5
  RULE: When splitting a monolithic memory file into domain files, grep the whole repo for the old path and update every reference before deleting the original. #stale-reference 2026-06-07
@@ -1,3 +1,3 @@
1
- # MCP Lessons
2
-
3
- <!-- No lessons yet. Append using the format in memory/schema.md -->
1
+ # MCP Lessons
2
+
3
+ <!-- No lessons yet. Append using the format in memory/schema.md -->
@@ -1,3 +1,3 @@
1
- # Testing Lessons
2
-
3
- <!-- No lessons yet. Append using the format in memory/schema.md -->
1
+ # Testing Lessons
2
+
3
+ <!-- No lessons yet. Append using the format in memory/schema.md -->
@@ -1,26 +1,26 @@
1
- # Lesson Logging Schema
2
-
3
- Load this file **only when writing a new lesson** at the end of a task.
4
- Never load at task start — it adds no value during execution.
5
-
6
- ## Format
7
-
8
- Append one line per lesson to the correct domain file in `memory/lessons/`:
9
-
10
- ```
11
- RULE: <imperative sentence — what to always do or never do> #tag YYYY-MM-DD
12
- ```
13
-
14
- ## Rules for a good entry
15
-
16
- - Start with **Always**, **Never**, or an action verb.
17
- - Keep it under 20 words. The rule only — no symptom narrative, no root cause prose.
18
- - Add one `#tag` describing the symptom class (e.g. `#build-fail`, `#wrong-path`, `#cqrs-violation`).
19
- - Pick the correct domain from `memory/index.md`. If unsure, use `infra.md`.
20
- - After appending, **increment the lesson count** for that domain in `memory/index.md`.
21
-
22
- ## Example
23
-
24
- ```
25
- RULE: Never place business logic in MediatR Handlers; delegate to domain entities or services. #cqrs-violation 2026-05-31
26
- ```
1
+ # Lesson Logging Schema
2
+
3
+ Load this file **only when writing a new lesson** at the end of a task.
4
+ Never load at task start — it adds no value during execution.
5
+
6
+ ## Format
7
+
8
+ Append one line per lesson to the correct domain file in `memory/lessons/`:
9
+
10
+ ```
11
+ RULE: <imperative sentence — what to always do or never do> #tag YYYY-MM-DD
12
+ ```
13
+
14
+ ## Rules for a good entry
15
+
16
+ - Start with **Always**, **Never**, or an action verb.
17
+ - Keep it under 20 words. The rule only — no symptom narrative, no root cause prose.
18
+ - Add one `#tag` describing the symptom class (e.g. `#build-fail`, `#wrong-path`, `#cqrs-violation`).
19
+ - Pick the correct domain from `memory/index.md`. If unsure, use `infra.md`.
20
+ - After appending, **increment the lesson count** for that domain in `memory/index.md`.
21
+
22
+ ## Example
23
+
24
+ ```
25
+ RULE: Never place business logic in MediatR Handlers; delegate to domain entities or services. #cqrs-violation 2026-05-31
26
+ ```
@@ -6,14 +6,14 @@ Start with `AgentSkills/OPERATING.md` for the shared prerequisite and completion
6
6
  `AgentSkills/` is the single source of truth for all skills and agents.
7
7
  Do not duplicate skill content under `.github/`, `.copilot/`, `.codex/`, or other tool-specific folders.
8
8
  All AI tools and IDEs should load skills from this folder.
9
-
10
- ## Skills
11
-
12
- | Skill | Load when | Path |
13
- |---|---|---|
14
- | **core** | Every task | [SKILL.md](core/SKILL.md) |
15
- | **code-standards** | Writing, reviewing, or refactoring C# code | [SKILL.md](code-standards/SKILL.md) |
16
- | **design** | Designing, architecting, or implementing patterns | [SKILL.md](design/SKILL.md) |
9
+
10
+ ## Skills
11
+
12
+ | Skill | Load when | Path |
13
+ |---|---|---|
14
+ | **core** | Every task | [SKILL.md](core/SKILL.md) |
15
+ | **code-standards** | Writing, reviewing, or refactoring C# code | [SKILL.md](code-standards/SKILL.md) |
16
+ | **design** | Designing, architecting, or implementing patterns | [SKILL.md](design/SKILL.md) |
17
17
  | **dotnet-best-practices** | Writing, reviewing, refactoring, or optimizing .NET/C# code | [SKILL.md](dotnet-best-practices/SKILL.md) |
18
18
  | **csharp-xunit** | Get best practices for XUnit unit testing, including data-driven tests | [SKILL.md](csharp-xunit/SKILL.md) |
19
19
  | **mcp_dotnet** | Building, reviewing, or extending .NET MCP server tools, transports, and integration points | [SKILL.md](mcp_dotnet/SKILL.md) |