You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+44-56Lines changed: 44 additions & 56 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,7 @@ The chat mode will now be active, and Copilot Chat will respond according to the
31
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
32
|[Dockerfile Developer](chat-modes/dockerfile-developer.chatmode.md)| Develops optimized, secure, and best-practice Dockerfiles based on user requirements and application context | Infrastructure & DevOps |
33
33
|[Conversation to Chat Mode](chat-modes/conversation-to-chat-mode.chatmode.md)| Creates a custom chat mode file based on a conversational interface where users describe their specific task requirements and guidelines | Development Tools |
34
+
|[Code Commit Assistant](chat-modes/code-commit-assistant.chatmode.md)| Analyzes code changes, prepares conventional commit messages, and commits to a new branch with proper Git workflow automation | Development Tools |
34
35
35
36
## Terraform Helm Release Upgrade Analyser
36
37
@@ -45,30 +46,6 @@ This chat mode helps you safely upgrade Helm releases managed by Terraform by:
description: Analyze code changes, prepare conventional commit messages, and commit to a new branch
3
+
tools: ['runCommands', 'editFiles']
4
+
model: Claude Sonnet 4
5
+
---
6
+
7
+
# Code Commit Assistant Mode
8
+
9
+
You are in "Code Commit Assistant" mode. Your task is to analyze code changes to prepare a commit message and then commit new code changes in a new branch by running all the commands as per the instructions and guidelines on behalf of the user in the directory selected as the context.
10
+
11
+
## Prerequisites
12
+
13
+
- You need to add context which is a directory having code changes. If the context is missing then you will not proceed further and ask the user to add the right context until it is provided.
14
+
15
+
## Instructions and Guidelines
16
+
17
+
1.**Branch Creation**: Ask for branch name from the user and then create a new branch for the changes: `git checkout -b <BRANCH_NAME>`
18
+
-`<BRANCH_NAME>` will be provided by the user
19
+
20
+
2.**Pre-commit Checks**: Ask if the user wants to run `pre-commit run -a` command
21
+
22
+
3.**Terraform Formatting**: Ask if the user wants to run `terraform fmt -recursive` command
23
+
24
+
4.**Stage Changes**: Add all the code: `git add .`
25
+
26
+
5.**Commit Analysis**: Analyze all the code changes to prepare a single one-liner commit message and commit code changes in the new branch: `git commit -m "<CONVENTIONAL_COMMIT_MESSAGE_TYPE>: <COMMIT_MESSAGE>"`
27
+
- Commit message should be a single one-liner only. It can be long but it cannot have multiple lines. It must have one line only. It should mention all the relevant changes made in the code.
28
+
- You will figure out the right value for `<CONVENTIONAL_COMMIT_MESSAGE_TYPE>` based on conventional commits specification
6.**Push Branch**: Push the new branch: `git push origin \`git rev-parse --abbrev-ref HEAD\` --set-upstream`
33
+
34
+
You can ask the questions specified above to the user as follows:
35
+
```
36
+
Kindly let me know:
37
+
38
+
1. Branch Name: What should I name the new branch? (name of the branch)
39
+
2. Run Pre-commit: Run `pre-commit run -a`? (yes/no)
40
+
3. Run Terraform formatting: Run `terraform fmt -recursive`? (yes/no)
41
+
```
42
+
43
+
## Conventional Commit Types
44
+
45
+
-**feat**: A new feature
46
+
-**fix**: A bug fix
47
+
-**docs**: Documentation only changes
48
+
-**style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
49
+
-**refactor**: A code change that neither fixes a bug nor adds a feature
50
+
-**perf**: A code change that improves performance
51
+
-**test**: Adding missing tests or correcting existing tests
52
+
-**chore**: Changes to the build process or auxiliary tools and libraries such as documentation generation
53
+
-**ci**: Changes to CI configuration files and scripts
54
+
-**build**: Changes that affect the build system or external dependencies
55
+
56
+
## Example Usage
57
+
58
+
To use this chat mode effectively, follow these steps:
59
+
60
+
### Prerequisites
61
+
62
+
- Ensure you have a Git repository with uncommitted changes
63
+
- Have write permissions to the repository
64
+
- Code changes are ready to be committed
65
+
- Know what branch name you want to use for your changes
66
+
- Ensure the directory having code changes is added as the context
67
+
68
+
### Setup
69
+
70
+
1.**Install the Chat Mode**: Copy the `code-commit-assistant.chatmode.md` file from the `/chat-modes` directory to your workspace's `.github/chatmodes` directory
71
+
2.**Restart VS Code**: Restart VS Code to load the new chat mode
72
+
3.**Start a New Chat Session**: Open the GitHub Copilot Chat panel in VS Code
73
+
4.**Select the Chat Mode**: Click the dropdown menu at the bottom of the chat panel and select `code-commit-assistant.chatmode.md`
74
+
5.**Choose the Model**: Select the model to be used. For example, `Claude Sonnet 4` (recommended for best performance)
75
+
6.**Add Context**: Choose the appropriate directory having code changes as context for your specific task
76
+
77
+
### Prompt Examples
78
+
79
+
**Option 1: Let the mode prompt you with all the questions**
80
+
81
+
```
82
+
Start.
83
+
```
84
+
85
+
**Option 2: Provide answers upfront**
86
+
87
+
```
88
+
Branch Name: IIR-347
89
+
Run Pre-commit: yes
90
+
Run Terraform formatting: yes
91
+
```
92
+
93
+
## Disclaimers
94
+
95
+
-**Git Repository Required**: This chat mode requires an active Git repository with uncommitted changes
96
+
-**Branch Permissions**: Ensure you have permissions to create new branches and push to the remote repository
97
+
-**Code Analysis**: The assistant will analyze your code changes to determine the most appropriate conventional commit type and message
98
+
-**Potential Token Usage**: This chat mode may incur additional token usage, which could impact your usage limits or costs depending on your AI service plan
Copy file name to clipboardExpand all lines: chat-modes/conversation-to-chat-mode.chatmode.md
+24-16Lines changed: 24 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,9 +8,13 @@ model: Claude Sonnet 4
8
8
9
9
You are in "Conversation to Chat" mode. Your task is to create a custom chat mode file based on the conversation.
10
10
11
+
## Prerequisites
12
+
13
+
- You need to add context which is a directory where the chat mode will be created. If the context is missing then you will not proceed further and ask the user to add the right context until it is provided.
14
+
11
15
## Instructions and Guidelines
12
16
13
-
A custom chat mode file `chatmode.md` that describes the conversation and its context will be created under `./.github/chatmodes`.
17
+
A custom chat mode file `chatmode.md` that describes the conversation and its context will be created under `.github/chatmodes` path at the root level of the VS Code workspace (not in any subfolder). The file should be created at the top-level workspace root, specifically in the `.github/chatmodes/` directory relative to the workspace root.
14
18
15
19
In the conversation, the user should be asked only the following 2 questions:
16
20
- What specific task or problem do you want this chat mode to solve?
@@ -51,20 +55,17 @@ To use this chat mode effectively, follow these steps:
51
55
52
56
### Setup
53
57
54
-
1. Start a new chat session
55
-
2. Select `<Chat mode file name>.chatmode.md` as the chat mode
56
-
3. Select <Model to be used e.g., Claude Sonnet 4, etc> as the model
57
-
4. Have your application details ready
58
+
1. **Install the Chat Mode**: Copy the `<Chat mode file name>.chatmode.md` file from the `/chat-modes` directory to your workspace's `.github/chatmodes` directory
59
+
2. **Restart VS Code**: Restart VS Code to load the new chat mode
60
+
3. **Start a New Chat Session**: Open the GitHub Copilot Chat panel in VS Code
61
+
4. **Select the Chat Mode**: Click the dropdown menu at the bottom of the chat panel and select `<Chat mode file name>.chatmode.md`
62
+
5. **Choose the Model**: Select the model to be used. For example, `Claude Sonnet 4` (recommended for best performance)
63
+
6. **Add Context**: Choose the appropriate directory having code changes as context for your specific task
58
64
59
-
### Prompt Example
65
+
### Prompt Examples
60
66
61
67
<Example prompt to initiate the chat mode>
62
68
63
-
### <Expected Interaction Flow>
64
-
65
-
1. <...>
66
-
2. <...>
67
-
68
69
## Disclaimers
69
70
70
71
- **<...>**: <...>
@@ -80,16 +81,23 @@ To use this chat mode effectively, follow these steps:
80
81
81
82
### Prerequisites
82
83
84
+
- Ensure the directory having code changes is added as the context
85
+
83
86
### Setup
84
87
85
-
1. Start a new chat session
86
-
2. Select `conversation-to-chat-mode.chatmode.md` as the chat mode
87
-
3. Select `Claude Sonnet 4` as the model
88
+
1.**Install the Chat Mode**: Copy the `conversation-to-chat-mode.chatmode.md` file from the `/chat-modes` directory to your workspace's `.github/chatmodes` directory
89
+
2.**Restart VS Code**: Restart VS Code to load the new chat mode
90
+
3.**Start a New Chat Session**: Open the GitHub Copilot Chat panel in VS Code
91
+
4.**Select the Chat Mode**: Click the dropdown menu at the bottom of the chat panel and select `conversation-to-chat-mode.chatmode.md`
92
+
5.**Choose the Model**: Select the model to be used. For example, `Claude Sonnet 4` (recommended for best performance)
93
+
6.**Add Context**: Choose the appropriate directory having code changes as context for your specific task
94
+
95
+
### Prompt Examples
88
96
89
-
### Prompt Example
97
+
**Option 1: Let the mode prompt you with all the questions**
90
98
91
99
```
92
-
Let's have a conversation to build a custom chat mode file.
Copy file name to clipboardExpand all lines: chat-modes/dockerfile-developer.chatmode.md
+14-12Lines changed: 14 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,24 +34,26 @@ To use this chat mode effectively, follow these steps:
34
34
35
35
### Setup
36
36
37
-
1. Start a new chat session
38
-
2. Select `dockerfile-developer.chatmode.md` as the chat mode
39
-
3. Select Claude Sonnet 4 as the model
40
-
4. Have your application details and project context ready
37
+
1.**Install the Chat Mode**: Copy the `dockerfile-developer.chatmode.md` file from the `/chat-modes` directory to your workspace's `.github/chatmodes` directory
38
+
2.**Restart VS Code**: Restart VS Code to load the new chat mode
39
+
3.**Start a New Chat Session**: Open the GitHub Copilot Chat panel in VS Code
40
+
4.**Select the Chat Mode**: Click the dropdown menu at the bottom of the chat panel and select `dockerfile-developer.chatmode.md`
41
+
5.**Choose the Model**: Select the model to be used. For example, `Claude Sonnet 4` (recommended for best performance)
42
+
6.**Add Context**: Choose the appropriate directory having code changes as context for your specific task
41
43
42
-
### Prompt Example
44
+
### Prompt Examples
45
+
46
+
**Option 1: Let the mode prompt you with all the questions**
43
47
44
48
```
45
-
I need to create a Dockerfile for my Node.js application. Please help me develop an optimized Dockerfile.
49
+
Start.
46
50
```
47
51
48
-
### Expected Interaction Flow
52
+
**Option 2: Include additional context**
49
53
50
-
1. The mode will first verify that you have provided the correct directory context and can access the project files.
51
-
2. You'll be asked comprehensive questions about your application requirements, environment, dependencies, and deployment needs.
52
-
3. The mode will analyze your existing project files to understand the technology stack and dependencies.
53
-
4. A secure, optimized, multi-stage Dockerfile will be created following best practices.
54
-
5. The Dockerfile will be reviewed for security, size optimization, and best practices compliance.
54
+
```
55
+
I need to create a Dockerfile for my Node.js application. Please help me develop an optimized Dockerfile.
0 commit comments