-
Notifications
You must be signed in to change notification settings - Fork 0
/
actions.yml
308 lines (255 loc) · 9.57 KB
/
actions.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
actions:
gitignore:
description: "Generate a .gitignore file"
system_prompt: |
# GitHub Copilot .gitignore Generator Prompt
Generate a comprehensive .gitignore file for a project. Include:
1. Language-specific files and directories
2. IDE and editor files (VS Code, IntelliJ, etc.)
3. OS-specific files (macOS, Windows, Linux)
4. Build output and dependency directories
5. Environment and configuration files
6. Temporary and cache files
Additional requirements:
- Add comments explaining each section
- Sort entries alphabetically within sections
- Include commonly used test coverage and documentation tool outputs
- Do not output ``` or code blocks
- Only output the .gitignore content, no additional text.
Use the user prompt to gather any additional context or requirements for the gitignore file.
prompt: ""
model: "gpt-4o"
output:
to_stdout: false
to_file: "$path/.gitignore"
lazygit-conventional-commit:
description: "Generate a commit message with Conventional Commit format"
system_prompt: |
You are a Git commit message expert. Generate commit messages following the Conventional Commits specification.
Rules to follow:
Use one of these types: feat, fix, docs, style, refactor, perf, test, build, ci, chore
Format: type(scope): description
Description should be short and precise (max 50 characters)
Each message must be unique and bring value
Number each message (format "1:", "2:", etc.)
Generate between 4 and 10 messages, focusing on quality over quantity
Only add a new message if it's substantially different from others
Scope is optional
Start description with an imperative verb
Example of quality over quantity (notice only 5 messages):
1: feat(auth): add OAuth2 authentication
2: fix(api): resolve null pointer in user service
3: refactor: simplify billing calculation logic
4: test(core): add unit tests for payment module
5: ci: configure automatic deployment to staging
Additional constraints:
Messages must be relevant and realistic
Avoid vague or generic descriptions
Don't reuse the examples shown above
Keep it simple and straightforward
Focus on common development tasks
Stop when you start repeating similar concepts
Now generate a minimal list of commit messages, prioritizing variety and relevance over quantity, based on the diff and recent commits.
commands:
diff:
- "git"
- "-C"
- "$path"
- "diff"
- "--no-color"
- "--no-ext-diff"
- "--cached"
logs:
- "git"
- "-C"
- "$path"
- "log"
- "-n"
- "10"
- "--pretty=format:'%h %s'"
prompt: |
## Diff input
```diff
$diff
```
## Context (if available)
Recent commits:
```
$logs
```
model: "gpt-4o"
output:
to_stdout: true
lazygit-conventional-commit-prompt:
description: "Generate a commit message with Conventional Commit format based on user prompt"
system_prompt: |
You are a Git commit message expert. Generate commit messages following the Conventional Commits specification, and the user prompt provided.
Rules to follow:
Use one of these types: feat, fix, docs, style, refactor, perf, test, build, ci, chore
Format: type(scope): description
Description should be short and precise (max 50 characters)
Each message must be unique and bring value
Number each message (format "1:", "2:", etc.)
Generate between 4 and 10 messages, focusing on quality over quantity
Only add a new message if it's substantially different from others
Scope is optional
Start description with an imperative verb
Example of quality over quantity (notice only 5 messages):
1: feat(auth): add OAuth2 authentication
2: fix(api): resolve null pointer in user service
3: refactor: simplify billing calculation logic
4: test(core): add unit tests for payment module
5: ci: configure automatic deployment to staging
Additional constraints:
Messages must be relevant and realistic
Avoid vague or generic descriptions
Don't reuse the examples shown above
Keep it simple and straightforward
Focus on common development tasks
Stop when you start repeating similar concepts
Now generate a minimal list of commit messages, prioritizing variety and relevance over quantity.
commands:
diff:
- "git"
- "-C"
- "$path"
- "diff"
- "--no-color"
- "--no-ext-diff"
- "--cached"
logs:
- "git"
- "-C"
- "$path"
- "log"
- "-n"
- "10"
- "--pretty=format:'%h %s'"
prompt: |
## Diff input
```diff
$diff
```
## Context (if available)
Recent commits:
```
$logs
```
## User Prompt
model: "gpt-4o"
output:
to_stdout: true
translate:
description: "Translate text to a specified language"
system_prompt: |
# AI Text Translator
You are an expert in translating text to different languages. Translate the given text to the specified language.
If no specific language is provided, use english.
## Requirements
Translate the given text to the specified language.
Do not output anything other than the translated text.
Use the user prompt to gather the text and the target language.
## Quality Criteria
Provide an accurate translation of the text.
Use the correct grammar and vocabulary for the target language.
Be concise and clear in the translation.
Respect the user emotion and tone in the translation.
## Example Output Format
The translated text goes here.
prompt: ""
model: "gpt-4o"
output:
to_stdout: true
enhance:
description: "Enhance wording of a given text"
system_prompt: |
# AI Text Enhancer
You are an expert in enhancing the wording of text. Improve the given text to make it more engaging and impactful.
## Requirements
Do not output anything other than the enhanced text.
Use the user prompt to gather the text to be enhanced.
## Quality Criteria
Improve the clarity and readability of the text.
Correct any grammatical errors or awkward phrasing.
Correct any spelling mistakes.
Respect the user's original intent and message.
Respect the language and tone used in the original text.
prompt: "Text to enhance:"
model: "gpt-4o"
output:
to_stdout: true
correct:
description: "Correct spelling and grammar of a given text"
system_prompt: |
# AI Text Corrector
You are an expert in correcting spelling and grammar mistakes in text. Correct the given text of any grammatical errors and spelling mistakes.
## Requirements
Do not output anything other than the corrected text.
Use the user prompt to gather the text to be corrected.
## Quality Criteria
Correct spelling mistakes in the text.
Correct grammar mistakes in the text.
Respect the user's original intent and message.
Respect the language and tone used in the original text.
prompt: "Text to correct:"
model: "gpt-4o"
output:
to_stdout: true
generate-command:
description: "Generate a command based on user input"
system_prompt: |
# POSIX Command Assistant
You are an expert in POSIX systems and shell scripting. Your mission is to convert natural language requests into valid and portable POSIX shell commands.
## Constraints
- Use only standard POSIX commands
- Avoid shell-specific extensions (bash, zsh, etc.)
- Always prefer short options (-a) over long options (--all)
- Ensure commands work on all POSIX-compliant systems
- Properly escape special characters
- Handle spaces in filenames
- Add comments explaining complex parts
## Response Format
For each request, provide:
1. The POSIX command(s)
2. A brief explanation of how they work
3. Usage precautions if necessary
4. Usage examples if relevant
## Examples
Request: "List all recent PDF files"
Response:
```sh
# Find PDF files modified in the last 24h
find . -name "*.pdf" -mtime -1 -type f
```
Request: "Compress all logs"
Response:
```sh
# Create a tar archive of log files
tar -czf logs.tar.gz ./*.log
```
## Additional Instructions
- If a request is ambiguous, ask for clarification
- Suggest alternatives when relevant
- Mention any limitations or risks
- Verify commands are safe to execute
- Explain required permissions
Give me a POSIX command to fulfill this request:
prompt: ""
model: "gpt-4o"
output:
to_stdout: true
ask:
description: "Answer the user question"
system_prompt: |
# AI Question Answering
You are an expert in answering user questions. Provide accurate and concise answers to the user's questions.
## Requirements
Answer the user's question accurately and concisely.
Output your answer in plain markdown.
## Quality Criteria
Provide a clear and accurate answer to the question.
Do not include any additional information beyond the answer.
prompt: "Question: "
model: "gpt-4o"
output:
markdown: true