Skip to content

Commit f7f7fa8

Browse files
authored
Merge pull request #276 from baoduy/copilot/add-dknet-skills-package
Add GitHub Copilot Agent Skills for DKNet Framework packages
2 parents 0e6458b + f50e7d6 commit f7f7fa8

File tree

9 files changed

+3503
-0
lines changed

9 files changed

+3503
-0
lines changed

Skills/README.md

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
# DKNet Framework - GitHub Copilot Skills
2+
3+
This folder contains GitHub Copilot Agent Skills designed to help developers use DKNet Framework NuGet packages effectively in their applications.
4+
5+
## 📚 What Are Copilot Skills?
6+
7+
Copilot Skills are structured guidance documents that enhance GitHub Copilot's ability to generate code using specific frameworks and libraries. Each skill provides:
8+
9+
- **Pattern recognition** - How to identify when to use specific patterns
10+
- **Code templates** - Pre-built patterns and examples
11+
- **Best practices** - Framework-specific conventions and standards
12+
- **Common pitfalls** - What to avoid and why
13+
- **Quick references** - Fast access to common operations
14+
15+
## 🎯 Available Skills
16+
17+
### Core Skills
18+
19+
- **[dknet-overview](dknet-overview/SKILL.md)** - Framework overview, architecture, and getting started guide
20+
- **[fw-extensions](fw-extensions/SKILL.md)** - Core framework extensions and utilities
21+
22+
### EF Core Skills
23+
24+
- **[efcore-specifications](efcore-specifications/SKILL.md)** - Specification pattern with dynamic predicates
25+
- **[efcore-repos](efcore-repos/SKILL.md)** - Repository pattern implementation
26+
- **[efcore-abstractions](efcore-abstractions/SKILL.md)** - Base entities and common abstractions
27+
28+
### ASP.NET Core Skills
29+
30+
- **[aspcore-idempotency](aspcore-idempotency/SKILL.md)** - Idempotent operations in APIs
31+
32+
### Messaging Skills
33+
34+
- **[slimbus-messaging](slimbus-messaging/SKILL.md)** - Message bus patterns and handlers
35+
36+
## 🚀 How to Use These Skills
37+
38+
### Option 1: Repository-Level (Recommended for DKNet Development)
39+
40+
Skills in this folder are automatically available to GitHub Copilot when working in this repository.
41+
42+
### Option 2: Global Installation (For Applications Using DKNet)
43+
44+
To use these skills across all your projects that consume DKNet NuGet packages:
45+
46+
1. **Copy the Skills folder** to your global Copilot skills directory:
47+
```bash
48+
# For GitHub Copilot
49+
mkdir -p ~/.copilot/skills
50+
cp -r Skills/* ~/.copilot/skills/
51+
52+
# For Claude Code (if using)
53+
mkdir -p ~/.claude/skills
54+
cp -r Skills/* ~/.claude/skills/
55+
```
56+
57+
2. **Or symlink for automatic updates**:
58+
```bash
59+
ln -s /path/to/DKNet/Skills ~/.copilot/skills/dknet
60+
```
61+
62+
3. **Verify installation**:
63+
- Open VS Code with GitHub Copilot
64+
- Type a comment like `// Create a specification for active users`
65+
- Copilot should use DKNet patterns automatically
66+
67+
### Option 3: Per-Project Basis
68+
69+
Copy specific skills to your project's `.github/skills/` folder:
70+
71+
```bash
72+
mkdir -p .github/skills
73+
cp -r /path/to/DKNet/Skills/efcore-specifications .github/skills/
74+
```
75+
76+
## 📖 Skill Structure
77+
78+
Each skill follows the standard GitHub Copilot Agent Skill format:
79+
80+
```
81+
skill-name/
82+
├── SKILL.md # Main skill document with YAML frontmatter
83+
├── examples/ # Optional: Code examples
84+
│ ├── basic.cs
85+
│ └── advanced.cs
86+
└── resources/ # Optional: Additional resources
87+
└── patterns.md
88+
```
89+
90+
## 🎓 Learning Path
91+
92+
**New to DKNet Framework?** Follow this path:
93+
94+
1. Start with **[dknet-overview](dknet-overview/SKILL.md)** for architecture understanding
95+
2. Learn **[fw-extensions](fw-extensions/SKILL.md)** for core utilities
96+
3. Explore EF Core skills based on your needs:
97+
- **[efcore-abstractions](efcore-abstractions/SKILL.md)** - Start here for entities
98+
- **[efcore-specifications](efcore-specifications/SKILL.md)** - Query building
99+
- **[efcore-repos](efcore-repos/SKILL.md)** - Data access layer
100+
4. Add **[aspcore-idempotency](aspcore-idempotency/SKILL.md)** for API development
101+
5. Use **[slimbus-messaging](slimbus-messaging/SKILL.md)** for event-driven architecture
102+
103+
## 🔍 Quick Reference
104+
105+
### When to Use Each Skill
106+
107+
| Task | Skill to Use |
108+
|------|--------------|
109+
| Creating entities | `efcore-abstractions` |
110+
| Building queries | `efcore-specifications` |
111+
| Implementing repositories | `efcore-repos` |
112+
| Making APIs idempotent | `aspcore-idempotency` |
113+
| Using utility extensions | `fw-extensions` |
114+
| Publishing/subscribing events | `slimbus-messaging` |
115+
| Understanding architecture | `dknet-overview` |
116+
117+
### Common Copilot Prompts
118+
119+
```csharp
120+
// Create a specification for active products with a category filter
121+
// (Uses efcore-specifications skill)
122+
123+
// Implement a repository for the User entity
124+
// (Uses efcore-repos skill)
125+
126+
// Add idempotency to this POST endpoint
127+
// (Uses aspcore-idempotency skill)
128+
129+
// Create a message handler for OrderCreated events
130+
// (Uses slimbus-messaging skill)
131+
```
132+
133+
## 📦 Framework Versions
134+
135+
These skills are designed for:
136+
- **.NET**: 9.0+
137+
- **C#**: 13+
138+
- **EF Core**: 9.0+
139+
- **ASP.NET Core**: 9.0+
140+
141+
## 🤝 Contributing
142+
143+
To improve or add skills:
144+
145+
1. Follow the [SKILL.md template](SKILL_TEMPLATE.md)
146+
2. Include real examples from the framework
147+
3. Test with GitHub Copilot to ensure effectiveness
148+
4. Submit a PR with your changes
149+
150+
## 📄 License
151+
152+
MIT License - See [LICENSE](../LICENSE) for details
153+
154+
## 🔗 Additional Resources
155+
156+
- [DKNet Framework Documentation](../docs/README.md)
157+
- [Memory Bank](../src/memory-bank/README.md) - Detailed development guides
158+
- [GitHub Copilot Skills Documentation](https://docs.github.com/en/copilot/concepts/agents/about-agent-skills)
159+
- [NuGet Packages](https://www.nuget.org/packages?q=DKNet)
160+
161+
---
162+
163+
**Version**: 1.0.0
164+
**Last Updated**: February 2026
165+
**Status**: Production Ready

0 commit comments

Comments
 (0)