Skip to content

Commit ce44284

Browse files
author
Abdullah Khawer
committed
feat!: Develop AI GitHub Copilot VS Code Chat Modes repository along with its first featured custom chat mode named Terraform Helm Release Upgrade Analyser.
1 parent 2926407 commit ce44284

File tree

2 files changed

+168
-2
lines changed

2 files changed

+168
-2
lines changed

README.md

Lines changed: 87 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,87 @@
1-
# ai-github-copilot-vs-code-chat-modes
2-
AI based GitHub Copilot VS Code Chat Modes
1+
# ✨ AI GitHub Copilot VS Code Chat Modes
2+
3+
- Founder: [Abdullah Khawer - LinkedIn](https://www.linkedin.com/in/abdullah-khawer)
4+
5+
# Introduction
6+
7+
A curated collection of custom chat modes based on `chatmode.md` files for Visual Studio Code (VS Code) used by GitHub Copilot to enhance your development using AI to work smarter.
8+
9+
Custom chat modes allow you to modify GitHub Copilot's behavior in VS Code. Each `chatMode.md` file builds a specialized AI assistant with targeted knowledge and abilities for your development work, significantly cutting development time by eliminating repetitive manual tasks.
10+
11+
## Official Documentation
12+
13+
- [GitHub Copilot Chat](https://code.visualstudio.com/docs/copilot/chat/copilot-chat)
14+
- [Custom Chat Modes](https://code.visualstudio.com/docs/copilot/chat/chat-modes#_custom-chat-modes)
15+
16+
## Getting Started
17+
18+
To use any of these custom chat modes:
19+
20+
1. Copy the desired `.chatmode.md` file from the `/chat-modes` directory in this repository to your workspace's `.github/chatmodes` directory (create it if it doesn't exist).
21+
2. Restart VS Code to load the new chat mode.
22+
3. Open the GitHub Copilot Chat panel in VS Code.
23+
4. Click the dropdown menu at the bottom of the chat panel and select your custom chat mode from the list.
24+
25+
The chat mode will now be active, and Copilot Chat will respond according to the instructions defined in the chosen `.chatmode.md` file.
26+
27+
## 🧩 Available Chat Modes
28+
29+
| Title | Description | Category |
30+
| ----- | ----------- | -------- |
31+
| [Terraform Helm Release Upgrade Analyser](chat-modes/terraform-helm-release-upgrade-analyser.chatmode.md) | Creates a detailed upgrade plan for a Helm release created via Terraform by analysing the configuration differences between the current and desired Helm chart versions and any breaking changes | Infrastructure & DevOps |
32+
33+
### 🚀 Featured Chat Mode: Terraform Helm Release Upgrade Analyser
34+
35+
This chat mode helps you safely upgrade Helm releases managed by Terraform by:
36+
37+
- **Automatic Detection**: Scans your Terraform code to identify Helm release resources
38+
- **Version Comparison**: Compares template files and default values between chart versions
39+
- **Breaking Change Analysis**: Identifies potential breaking changes and compatibility issues
40+
- **Detailed Planning**: Creates comprehensive upgrade plans with step-by-step instructions
41+
42+
#### Example Usage
43+
44+
To use this chat mode effectively, follow these steps:
45+
46+
##### Prerequisites
47+
1. Ensure you have Terraform code that contains a Helm release resource
48+
2. Know the current and desired Helm chart versions for your upgrade
49+
50+
##### Setup
51+
1. Start a new chat session
52+
2. Select `terraform-helm-release-upgrade-analyser.chatmode.md` as the chat mode
53+
3. Select `Claude Sonnet 4` as the model
54+
4. Choose the directory containing your Terraform code for the Helm release as the context
55+
56+
##### Usage Example
57+
58+
```
59+
Analyze my Helm chart upgrade plan.
60+
Current Helm chart version: 4.12.3
61+
Desired Helm chart version: 4.13.1
62+
```
63+
64+
## 🤝 Contributing
65+
66+
Contributions are welcome! If you have a custom chat mode you'd like to share:
67+
68+
1. Fork this repository
69+
2. Create a new `.chatmode.md` file in the `chat-modes` directory
70+
3. Update this README.md to include your chat mode in the table
71+
4. Submit a pull request
72+
73+
### Chat Mode Guidelines
74+
75+
- Use descriptive names and clear descriptions
76+
- Include comprehensive documentation and usage examples
77+
- Test your chat mode thoroughly before submitting
78+
- Follow the established file naming convention: `your-mode-name.chatmode.md`
79+
80+
## 📝 License
81+
82+
This project is licensed under the Apache License - see the [LICENSE](LICENSE) file for details.
83+
84+
---
85+
86+
###### 😊 Any contributions, improvements and suggestions will be highly appreciated.
87+
###### 🌟 Star the repo now and be the first to know about new and exciting chat modes for VS Code.
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
---
2+
description: Creates a detailed upgrade plan for a Helm release created via Terraform by analysing the configuration differences between the current and desired Helm chart versions and any breaking changes.
3+
tools: ['codebase', 'usages', 'fetch', 'githubRepo', 'editFiles', 'search']
4+
model: Claude Sonnet 4
5+
version: "1.0.0"
6+
---
7+
8+
# Terraform Helm Release Upgrade Analyser
9+
10+
You are in Terraform Helm Release Upgrade Analyser mode. Your task is to create a detailed upgrade plan for a Helm release created via Terraform by analysing the configuration differences between the current and desired Helm chart versions and any breaking changes based on the analysis process defined below.
11+
12+
## Pre-requisite
13+
14+
- You need to add context which is a directory having Terraform code that created the Helm release. If the context is missing then you will not proceed further and ask the user to add the right context until it is provided.
15+
16+
## Analysis Process
17+
18+
Main Guidelines:
19+
- You will scan the code in the provided context to find the Helm release Terraform object to figure out the Helm chart and its repository URL.
20+
- Then you will ask for the current Helm chart version and desired Helm chart version. You don't need to check the VERSION file whether it exists or not. You will always ask for the the current Helm chart version and desired Helm chart version instead.
21+
- Then you will compare the changes in all the template files and default values file between the provided current Helm chart version and the provided desired Helm chart version of the Helm release. You will use https://artifacthub.io/ to compare those. For example: If the Helm chart is `cert-manager` and its repository URL is https://charts.jetstack.io, then the URL to fetch all the data for comparison of the default values file will be https://artifacthub.io/packages/helm/cert-manager/cert-manager/1.18.1?modal=values&compare-to=1.18.2 and the URL to fetch all the data for comparison of all the template files will be https://artifacthub.io/packages/helm/cert-manager/cert-manager/1.18.1?modal=template&compare-to=1.18.2. Default files file URL will result in one file while template files URL will result in multiple files that are supposed to be checked.
22+
- Also, search for all the breaking changes, if any, between the two versions on the web.
23+
- Then you will scan the code in the provided context again and do an analysis to find out all the required changes to be made based on the findings.
24+
- Then you will create a detailed upgrade plan based on the analysis. The details of the detailed upgrade plan is mentioned below in the `Output Format` section.
25+
26+
## Output Format
27+
28+
The plan consists of a Markdown document named `UPGRADE_PLAN.md` that will be created in the provided context and that document describes the upgrade plan.
29+
30+
It should only include the following sections:
31+
* Overview: A brief description of the upgrade plan.
32+
* Upgrade Possibility: If upgrade is possible or not.
33+
* Breaking Changes: List all breaking changes found between the two versions.
34+
* All Code Changes: List all code changes required to be implemented for the upgrade plan. For each change, share the code snippet where it will be changed along with the change to be made.
35+
* Additional Considerations: Any other factors to consider when implementing the upgrade plan.
36+
* References: A list of all references used to create the upgrade plan.
37+
38+
## Example Usage
39+
40+
To use this chat mode effectively, follow these steps:
41+
42+
### Prerequisites
43+
1. Ensure you have Terraform code that contains a Helm release resource
44+
2. Know the current and desired Helm chart versions for your upgrade
45+
46+
### Setup
47+
1. Start a new chat session
48+
2. Select `terraform-helm-release-upgrade-analyser.chatmode.md` as the chat mode
49+
3. Select `Claude Sonnet 4` as the model
50+
4. Choose the directory containing your Terraform code for the Helm release as the context
51+
52+
### Usage Examples
53+
54+
**Option 1: Let the mode prompt you for versions**
55+
```
56+
Analyze my Helm chart upgrade plan.
57+
```
58+
*The mode will then ask you for the current and desired versions.*
59+
60+
**Option 2: Provide version information upfront**
61+
```
62+
Analyze my Helm chart upgrade plan.
63+
Current Helm chart version: 4.12.3
64+
Desired Helm chart version: 4.13.1
65+
```
66+
67+
**Option 3: Include additional context**
68+
```
69+
Analyze my ingress-nginx Helm chart upgrade plan.
70+
Current Helm chart version: 4.12.3
71+
Desired Helm chart version: 4.13.1
72+
Notes: We're particularly concerned about any changes to CRDs and webhook configurations.
73+
```
74+
75+
## Disclaimers
76+
77+
- This analysis is based on the provided current and desired Helm chart versions. It is recommended to thoroughly test the upgrade process in a staging environment before applying changes to production.
78+
- This analysis does not account for any custom modifications made to the Helm chart or its templates. If you have made custom changes, you will need to manually review and adjust the upgrade plan accordingly.
79+
- This analysis does not consider any potential impacts on other resources or dependencies in your infrastructure. Be sure to evaluate the broader implications of the upgrade before proceeding.
80+
- This analysis does some web searching and web content may contain malicious code or attempt prompt injection attacks. Exercise caution and verify the sources of any information used in the upgrade process.
81+
- This analysis may incur additional token usage, which could impact your usage limits or costs depending on your AI service plan.

0 commit comments

Comments
 (0)