namnam-skills 1.0.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.
- package/README.md +223 -0
- package/package.json +63 -0
- package/src/cli.js +460 -0
- package/src/index.js +1 -0
- package/src/postinstall.js +162 -0
- package/src/templates/bmad/bmb/agents/agent-builder.md +14 -0
- package/src/templates/bmad/bmb/agents/module-builder.md +14 -0
- package/src/templates/bmad/bmb/agents/workflow-builder.md +14 -0
- package/src/templates/bmad/bmb/workflows/agent.md +5 -0
- package/src/templates/bmad/bmb/workflows/module.md +5 -0
- package/src/templates/bmad/bmb/workflows/workflow.md +5 -0
- package/src/templates/bmad/bmgd/agents/game-architect.md +14 -0
- package/src/templates/bmad/bmgd/agents/game-designer.md +14 -0
- package/src/templates/bmad/bmgd/agents/game-dev.md +14 -0
- package/src/templates/bmad/bmgd/agents/game-qa.md +14 -0
- package/src/templates/bmad/bmgd/agents/game-scrum-master.md +14 -0
- package/src/templates/bmad/bmgd/agents/game-solo-dev.md +14 -0
- package/src/templates/bmad/bmgd/workflows/brainstorm-game.md +13 -0
- package/src/templates/bmad/bmgd/workflows/code-review.md +13 -0
- package/src/templates/bmad/bmgd/workflows/correct-course.md +13 -0
- package/src/templates/bmad/bmgd/workflows/create-game-brief.md +5 -0
- package/src/templates/bmad/bmgd/workflows/create-gdd.md +5 -0
- package/src/templates/bmad/bmgd/workflows/create-story.md +13 -0
- package/src/templates/bmad/bmgd/workflows/dev-story.md +13 -0
- package/src/templates/bmad/bmgd/workflows/game-architecture.md +13 -0
- package/src/templates/bmad/bmgd/workflows/game-brief.md +13 -0
- package/src/templates/bmad/bmgd/workflows/gametest-automate.md +13 -0
- package/src/templates/bmad/bmgd/workflows/gametest-framework.md +13 -0
- package/src/templates/bmad/bmgd/workflows/gametest-performance.md +13 -0
- package/src/templates/bmad/bmgd/workflows/gametest-playtest-plan.md +13 -0
- package/src/templates/bmad/bmgd/workflows/gametest-test-design.md +13 -0
- package/src/templates/bmad/bmgd/workflows/gametest-test-review.md +13 -0
- package/src/templates/bmad/bmgd/workflows/gdd.md +13 -0
- package/src/templates/bmad/bmgd/workflows/generate-project-context.md +5 -0
- package/src/templates/bmad/bmgd/workflows/narrative.md +13 -0
- package/src/templates/bmad/bmgd/workflows/quick-dev.md +13 -0
- package/src/templates/bmad/bmgd/workflows/quick-prototype.md +13 -0
- package/src/templates/bmad/bmgd/workflows/quick-spec.md +13 -0
- package/src/templates/bmad/bmgd/workflows/retrospective.md +13 -0
- package/src/templates/bmad/bmgd/workflows/sprint-planning.md +13 -0
- package/src/templates/bmad/bmgd/workflows/sprint-status.md +13 -0
- package/src/templates/bmad/bmgd/workflows/workflow-init.md +13 -0
- package/src/templates/bmad/bmgd/workflows/workflow-status.md +13 -0
- package/src/templates/bmad/bmm/agents/analyst.md +14 -0
- package/src/templates/bmad/bmm/agents/architect.md +14 -0
- package/src/templates/bmad/bmm/agents/dev.md +14 -0
- package/src/templates/bmad/bmm/agents/pm.md +14 -0
- package/src/templates/bmad/bmm/agents/quick-flow-solo-dev.md +14 -0
- package/src/templates/bmad/bmm/agents/sm.md +14 -0
- package/src/templates/bmad/bmm/agents/tea.md +14 -0
- package/src/templates/bmad/bmm/agents/tech-writer.md +14 -0
- package/src/templates/bmad/bmm/agents/ux-designer.md +14 -0
- package/src/templates/bmad/bmm/workflows/check-implementation-readiness.md +5 -0
- package/src/templates/bmad/bmm/workflows/code-review.md +13 -0
- package/src/templates/bmad/bmm/workflows/correct-course.md +13 -0
- package/src/templates/bmad/bmm/workflows/create-architecture.md +5 -0
- package/src/templates/bmad/bmm/workflows/create-epics-and-stories.md +5 -0
- package/src/templates/bmad/bmm/workflows/create-excalidraw-dataflow.md +13 -0
- package/src/templates/bmad/bmm/workflows/create-excalidraw-diagram.md +13 -0
- package/src/templates/bmad/bmm/workflows/create-excalidraw-flowchart.md +13 -0
- package/src/templates/bmad/bmm/workflows/create-excalidraw-wireframe.md +13 -0
- package/src/templates/bmad/bmm/workflows/create-product-brief.md +5 -0
- package/src/templates/bmad/bmm/workflows/create-story.md +13 -0
- package/src/templates/bmad/bmm/workflows/create-ux-design.md +5 -0
- package/src/templates/bmad/bmm/workflows/dev-story.md +13 -0
- package/src/templates/bmad/bmm/workflows/document-project.md +13 -0
- package/src/templates/bmad/bmm/workflows/generate-project-context.md +5 -0
- package/src/templates/bmad/bmm/workflows/prd.md +5 -0
- package/src/templates/bmad/bmm/workflows/quick-dev.md +5 -0
- package/src/templates/bmad/bmm/workflows/quick-spec.md +5 -0
- package/src/templates/bmad/bmm/workflows/research.md +5 -0
- package/src/templates/bmad/bmm/workflows/retrospective.md +13 -0
- package/src/templates/bmad/bmm/workflows/sprint-planning.md +13 -0
- package/src/templates/bmad/bmm/workflows/sprint-status.md +13 -0
- package/src/templates/bmad/bmm/workflows/testarch-atdd.md +13 -0
- package/src/templates/bmad/bmm/workflows/testarch-automate.md +13 -0
- package/src/templates/bmad/bmm/workflows/testarch-ci.md +13 -0
- package/src/templates/bmad/bmm/workflows/testarch-framework.md +13 -0
- package/src/templates/bmad/bmm/workflows/testarch-nfr.md +13 -0
- package/src/templates/bmad/bmm/workflows/testarch-test-design.md +13 -0
- package/src/templates/bmad/bmm/workflows/testarch-test-review.md +13 -0
- package/src/templates/bmad/bmm/workflows/testarch-trace.md +13 -0
- package/src/templates/bmad/bmm/workflows/workflow-init.md +13 -0
- package/src/templates/bmad/bmm/workflows/workflow-status.md +13 -0
- package/src/templates/bmad/cis/agents/brainstorming-coach.md +14 -0
- package/src/templates/bmad/cis/agents/creative-problem-solver.md +14 -0
- package/src/templates/bmad/cis/agents/design-thinking-coach.md +14 -0
- package/src/templates/bmad/cis/agents/innovation-strategist.md +14 -0
- package/src/templates/bmad/cis/agents/presentation-master.md +14 -0
- package/src/templates/bmad/cis/agents/storyteller.md +14 -0
- package/src/templates/bmad/cis/workflows/design-thinking.md +13 -0
- package/src/templates/bmad/cis/workflows/innovation-strategy.md +13 -0
- package/src/templates/bmad/cis/workflows/problem-solving.md +13 -0
- package/src/templates/bmad/cis/workflows/storytelling.md +13 -0
- package/src/templates/bmad/core/agents/bmad-master.md +14 -0
- package/src/templates/bmad/core/tasks/index-docs.md +9 -0
- package/src/templates/bmad/core/tasks/shard-doc.md +9 -0
- package/src/templates/bmad/core/workflows/brainstorming.md +5 -0
- package/src/templates/bmad/core/workflows/party-mode.md +5 -0
- package/src/templates/claudekit/agents/ai-sdk-expert.md +135 -0
- package/src/templates/claudekit/agents/cli-expert.md +135 -0
- package/src/templates/claudekit/agents/code-review-expert.md +132 -0
- package/src/templates/claudekit/agents/code-search.md +83 -0
- package/src/templates/claudekit/agents/nestjs-expert.md +128 -0
- package/src/templates/claudekit/agents/oracle.md +120 -0
- package/src/templates/claudekit/agents/research-expert.md +115 -0
- package/src/templates/claudekit/agents/triage-expert.md +116 -0
- package/src/templates/claudekit/commands/checkpoint-create.md +54 -0
- package/src/templates/claudekit/commands/checkpoint-list.md +40 -0
- package/src/templates/claudekit/commands/checkpoint-restore.md +50 -0
- package/src/templates/claudekit/commands/create-command.md +107 -0
- package/src/templates/claudekit/commands/create-subagent.md +96 -0
- package/src/templates/core/code-review.md +70 -0
- package/src/templates/core/git-commit.md +57 -0
- package/src/templates/core/git-push.md +53 -0
- package/src/templates/core/git-status.md +48 -0
- package/src/templates/core/namnam.md +324 -0
- package/src/templates/core/validate-and-fix.md +69 -0
- package/src/templates/cursor-rules/data-science-ml.md +54 -0
- package/src/templates/cursor-rules/devops-infrastructure.md +59 -0
- package/src/templates/cursor-rules/golang-expert.md +61 -0
- package/src/templates/cursor-rules/nestjs-expert.md +60 -0
- package/src/templates/cursor-rules/python-expert.md +53 -0
- package/src/templates/cursor-rules/react-native-expo.md +51 -0
- package/src/templates/cursor-rules/rust-expert.md +61 -0
- package/src/templates/cursor-rules/solidity-web3.md +54 -0
- package/src/templates/cursor-rules/typescript-expert.md +42 -0
- package/src/templates/cursor-rules/vue-nuxt-expert.md +50 -0
- package/src/templates/official-plugins/claude-opus-migration.md +33 -0
- package/src/templates/official-plugins/commit-push-pr.md +55 -0
- package/src/templates/official-plugins/commit.md +60 -0
- package/src/templates/official-plugins/feature-dev.md +65 -0
- package/src/templates/official-plugins/frontend-design.md +53 -0
- package/src/templates/official-plugins/hookify.md +52 -0
- package/src/templates/official-plugins/new-sdk-app.md +45 -0
- package/src/templates/official-plugins/plugin-dev.md +53 -0
- package/src/templates/official-plugins/pr-review-toolkit.md +68 -0
- package/src/templates/official-plugins/ralph-loop.md +51 -0
- package/src/templates/official-plugins/security-guidance.md +36 -0
- package/src/templates/platforms/AGENTS.md +326 -0
- package/src/templates/platforms/aider/aider-template.md +75 -0
- package/src/templates/platforms/cline/clinerules-template.md +205 -0
- package/src/templates/platforms/codex/codex-template.md +74 -0
- package/src/templates/platforms/cursor/cursorrules-template.md +124 -0
- package/src/templates/platforms/gemini/gemini-template.md +93 -0
- package/src/templates/platforms/windsurf/windsurfrules-template.md +166 -0
- package/src/templates/system-prompts/cline-agent-patterns.md +286 -0
- package/src/templates/system-prompts/cursor-agent-patterns.md +177 -0
- package/src/templates/system-prompts/google-antigravity-patterns.md +274 -0
- package/src/templates/system-prompts/industry-best-practices.md +334 -0
- package/src/templates/system-prompts/multi-platform-engineering.md +343 -0
- package/src/templates/system-prompts/vscode-agent-patterns.md +288 -0
- package/src/templates/system-prompts/windsurf-cascade-patterns.md +264 -0
- package/src/templates/vercel-skills/react-best-practices.md +117 -0
- package/src/templates/vercel-skills/web-design-guidelines.md +88 -0
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
# Industry Best Practices - System Prompt Patterns
|
|
2
|
+
|
|
3
|
+
> Curated best practices extracted from 30+ AI coding assistants including Claude Code, Cursor, Windsurf, Cline, VSCode Agent, and more.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
This skill provides consolidated wisdom from production-grade AI coding systems. Use these patterns to enhance your AI assistant's effectiveness.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 1. Tone and Communication
|
|
12
|
+
|
|
13
|
+
### Best Practices (from Claude Code, Cursor, Windsurf)
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
# Communication Style
|
|
17
|
+
|
|
18
|
+
## Conciseness
|
|
19
|
+
- Keep responses short and direct
|
|
20
|
+
- Minimize output tokens while maintaining quality
|
|
21
|
+
- Avoid unnecessary preamble or postamble
|
|
22
|
+
- One word answers when appropriate
|
|
23
|
+
- No filler phrases like "Great", "Certainly", "Sure"
|
|
24
|
+
|
|
25
|
+
## Formatting
|
|
26
|
+
- Use GitHub-flavored markdown
|
|
27
|
+
- Format file paths with backticks: `src/utils.ts`
|
|
28
|
+
- Use code blocks with language tags
|
|
29
|
+
- Use tables for structured data
|
|
30
|
+
|
|
31
|
+
## Technical Focus
|
|
32
|
+
- Be professional and objective
|
|
33
|
+
- Focus on facts and problem-solving
|
|
34
|
+
- Avoid excessive praise or validation
|
|
35
|
+
- Correct mistakes honestly
|
|
36
|
+
- Never guess - investigate first
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## 2. Code Generation Patterns
|
|
42
|
+
|
|
43
|
+
### Best Practices (from Cursor, Windsurf, VSCode Agent)
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
# Code Generation Rules
|
|
47
|
+
|
|
48
|
+
## Always Do
|
|
49
|
+
- Add all necessary imports and dependencies
|
|
50
|
+
- Use proper typing (no `any` types)
|
|
51
|
+
- Handle errors explicitly with try-catch
|
|
52
|
+
- Follow existing code conventions in the project
|
|
53
|
+
- Match the codebase's style and patterns
|
|
54
|
+
|
|
55
|
+
## Never Do
|
|
56
|
+
- Generate console.log in production code
|
|
57
|
+
- Use inline styles (use CSS modules/Tailwind)
|
|
58
|
+
- Use magic numbers (use named constants)
|
|
59
|
+
- Leave TODO comments without context
|
|
60
|
+
- Introduce security vulnerabilities
|
|
61
|
+
|
|
62
|
+
## File Operations
|
|
63
|
+
- ALWAYS use absolute paths
|
|
64
|
+
- Read files before modifying
|
|
65
|
+
- Preserve existing functionality
|
|
66
|
+
- Keep changes minimal and focused
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## 3. Tool Usage Patterns
|
|
72
|
+
|
|
73
|
+
### Best Practices (from Claude Code, Manus, Traycer AI)
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
# Tool Calling Wisdom
|
|
77
|
+
|
|
78
|
+
## Parallel Execution
|
|
79
|
+
- Run independent operations in parallel
|
|
80
|
+
- Batch read operations for efficiency
|
|
81
|
+
- Don't wait unnecessarily between calls
|
|
82
|
+
|
|
83
|
+
## Sequential When Needed
|
|
84
|
+
- Wait for results when outputs are dependencies
|
|
85
|
+
- Verify success before proceeding
|
|
86
|
+
- Don't assume tool success
|
|
87
|
+
|
|
88
|
+
## Research First
|
|
89
|
+
- Gather context before making changes
|
|
90
|
+
- Explore the codebase thoroughly
|
|
91
|
+
- Understand existing patterns
|
|
92
|
+
- Don't modify files you haven't read
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## 4. Task Management
|
|
98
|
+
|
|
99
|
+
### Best Practices (from Claude Code, Cursor, Windsurf)
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
# Task Tracking
|
|
103
|
+
|
|
104
|
+
## Planning
|
|
105
|
+
- Break complex tasks into steps
|
|
106
|
+
- Create todo lists for multi-step work
|
|
107
|
+
- Update status as you progress
|
|
108
|
+
- Mark tasks complete immediately
|
|
109
|
+
|
|
110
|
+
## Execution
|
|
111
|
+
- Focus on one task at a time
|
|
112
|
+
- Complete current tasks before starting new ones
|
|
113
|
+
- Don't batch up completions
|
|
114
|
+
- Handle errors before moving on
|
|
115
|
+
|
|
116
|
+
## Progress Updates
|
|
117
|
+
- Provide brief status updates
|
|
118
|
+
- Keep user informed without being verbose
|
|
119
|
+
- Summarize what was done
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## 5. Agentic Behavior
|
|
125
|
+
|
|
126
|
+
### Best Practices (from Cursor, Windsurf, Cline)
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
# Agent Philosophy
|
|
130
|
+
|
|
131
|
+
## Proactiveness
|
|
132
|
+
- Take actions when appropriate
|
|
133
|
+
- Don't surprise users with unexpected changes
|
|
134
|
+
- Ask when unsure about scope
|
|
135
|
+
- Complete tasks autonomously when possible
|
|
136
|
+
|
|
137
|
+
## Autonomy Balance
|
|
138
|
+
- Continue until task is resolved
|
|
139
|
+
- Stop when genuinely blocked
|
|
140
|
+
- Don't ask unnecessary questions
|
|
141
|
+
- Research before asking user
|
|
142
|
+
|
|
143
|
+
## Error Recovery
|
|
144
|
+
- Fix errors without giving up
|
|
145
|
+
- Try alternative approaches
|
|
146
|
+
- Ask for help only when stuck
|
|
147
|
+
- Document what was tried
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## 6. Mode Separation
|
|
153
|
+
|
|
154
|
+
### Patterns (from Traycer AI, Kiro, Antigravity)
|
|
155
|
+
|
|
156
|
+
```
|
|
157
|
+
# Multi-Mode Systems
|
|
158
|
+
|
|
159
|
+
## Chat Mode
|
|
160
|
+
- Conversational assistance
|
|
161
|
+
- Quick questions and answers
|
|
162
|
+
- No code modifications
|
|
163
|
+
|
|
164
|
+
## Agent Mode
|
|
165
|
+
- Autonomous task execution
|
|
166
|
+
- Full tool access
|
|
167
|
+
- Complete multi-step work
|
|
168
|
+
|
|
169
|
+
## Plan Mode
|
|
170
|
+
- Strategy and design
|
|
171
|
+
- No immediate execution
|
|
172
|
+
- User approval before action
|
|
173
|
+
|
|
174
|
+
## Builder Mode
|
|
175
|
+
- Project scaffolding
|
|
176
|
+
- Creating new codebases
|
|
177
|
+
- Initial setup work
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## 7. Context Management
|
|
183
|
+
|
|
184
|
+
### Best Practices (from Windsurf, VSCode Agent, Antigravity)
|
|
185
|
+
|
|
186
|
+
```
|
|
187
|
+
# Context Handling
|
|
188
|
+
|
|
189
|
+
## Memory
|
|
190
|
+
- Remember project context
|
|
191
|
+
- Store important decisions
|
|
192
|
+
- Track user preferences
|
|
193
|
+
- Recall previous conversations
|
|
194
|
+
|
|
195
|
+
## Knowledge Discovery
|
|
196
|
+
- Check existing documentation first
|
|
197
|
+
- Build on prior analysis
|
|
198
|
+
- Avoid redundant research
|
|
199
|
+
- Reference previous work
|
|
200
|
+
|
|
201
|
+
## File Awareness
|
|
202
|
+
- Track open files
|
|
203
|
+
- Understand git status
|
|
204
|
+
- Know project structure
|
|
205
|
+
- Monitor recent changes
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## 8. Security Practices
|
|
211
|
+
|
|
212
|
+
### Best Practices (All Platforms)
|
|
213
|
+
|
|
214
|
+
```
|
|
215
|
+
# Security Rules
|
|
216
|
+
|
|
217
|
+
## Never
|
|
218
|
+
- Expose API keys in code
|
|
219
|
+
- Log sensitive information
|
|
220
|
+
- Commit secrets to repository
|
|
221
|
+
- Generate malicious code
|
|
222
|
+
- Skip input validation
|
|
223
|
+
|
|
224
|
+
## Always
|
|
225
|
+
- Validate user input
|
|
226
|
+
- Use parameterized queries
|
|
227
|
+
- Sanitize HTML output
|
|
228
|
+
- Follow OWASP guidelines
|
|
229
|
+
- Implement proper authentication
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## 9. Web Development
|
|
235
|
+
|
|
236
|
+
### Patterns (from Windsurf, Antigravity)
|
|
237
|
+
|
|
238
|
+
```
|
|
239
|
+
# Web App Creation
|
|
240
|
+
|
|
241
|
+
## Visual Excellence
|
|
242
|
+
- Use modern design patterns
|
|
243
|
+
- Implement beautiful UIs
|
|
244
|
+
- Add micro-animations
|
|
245
|
+
- Use dark mode support
|
|
246
|
+
- Follow accessibility guidelines
|
|
247
|
+
|
|
248
|
+
## Technology Stack
|
|
249
|
+
- Use modern frameworks (Next.js, Vite)
|
|
250
|
+
- Implement responsive design
|
|
251
|
+
- Optimize for performance
|
|
252
|
+
- Add SEO best practices
|
|
253
|
+
|
|
254
|
+
## Implementation Flow
|
|
255
|
+
1. Plan and understand requirements
|
|
256
|
+
2. Build the design system
|
|
257
|
+
3. Create reusable components
|
|
258
|
+
4. Assemble pages
|
|
259
|
+
5. Polish and optimize
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
## 10. Multi-Step Editing
|
|
265
|
+
|
|
266
|
+
### Patterns (from Cline, Cursor, VSCode)
|
|
267
|
+
|
|
268
|
+
```
|
|
269
|
+
# File Editing Strategy
|
|
270
|
+
|
|
271
|
+
## Small Changes
|
|
272
|
+
- Use targeted replacements
|
|
273
|
+
- Match exact content
|
|
274
|
+
- Include context lines
|
|
275
|
+
- Verify before applying
|
|
276
|
+
|
|
277
|
+
## Large Changes
|
|
278
|
+
- Consider full rewrites
|
|
279
|
+
- Break into multiple edits
|
|
280
|
+
- Keep under size limits
|
|
281
|
+
- Validate after each step
|
|
282
|
+
|
|
283
|
+
## Move/Delete
|
|
284
|
+
- Use two-step process
|
|
285
|
+
- Delete from original
|
|
286
|
+
- Insert at new location
|
|
287
|
+
- Verify completion
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
---
|
|
291
|
+
|
|
292
|
+
## Platform-Specific Insights
|
|
293
|
+
|
|
294
|
+
### Claude Code
|
|
295
|
+
- Focus on conciseness
|
|
296
|
+
- Use TodoWrite tool frequently
|
|
297
|
+
- Strong security stance
|
|
298
|
+
- Parallel tool execution
|
|
299
|
+
|
|
300
|
+
### Cursor
|
|
301
|
+
- Semantic search emphasis
|
|
302
|
+
- Rich code citing format
|
|
303
|
+
- Multi-file awareness
|
|
304
|
+
- Memory system
|
|
305
|
+
|
|
306
|
+
### Windsurf
|
|
307
|
+
- Planning system
|
|
308
|
+
- Memory database
|
|
309
|
+
- Browser preview
|
|
310
|
+
- Web dev focus
|
|
311
|
+
|
|
312
|
+
### Cline
|
|
313
|
+
- Step-by-step tool use
|
|
314
|
+
- User approval model
|
|
315
|
+
- MCP server support
|
|
316
|
+
- Plan/Act modes
|
|
317
|
+
|
|
318
|
+
### VSCode Agent
|
|
319
|
+
- Model-specific adaptation
|
|
320
|
+
- Notebook support
|
|
321
|
+
- Task tracking
|
|
322
|
+
- Multi-agent awareness
|
|
323
|
+
|
|
324
|
+
---
|
|
325
|
+
|
|
326
|
+
## Usage
|
|
327
|
+
|
|
328
|
+
Apply these patterns when:
|
|
329
|
+
- Creating new AI agent prompts
|
|
330
|
+
- Improving existing assistants
|
|
331
|
+
- Debugging AI behavior issues
|
|
332
|
+
- Designing skill architectures
|
|
333
|
+
|
|
334
|
+
**Source**: Analyzed from [x1xhlol/system-prompts-and-models-of-ai-tools](https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools)
|
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
# Multi-Platform Prompt Engineering
|
|
2
|
+
|
|
3
|
+
> How to create prompts that work across Claude Code, Cursor, Windsurf, Cline, and more
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
This guide provides patterns for writing platform-agnostic AI agent instructions that work effectively across all major AI coding assistants.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Universal Prompt Structure
|
|
12
|
+
|
|
13
|
+
```markdown
|
|
14
|
+
# [Your Project/Agent Name]
|
|
15
|
+
|
|
16
|
+
## Identity
|
|
17
|
+
[Who the agent is and its primary purpose]
|
|
18
|
+
|
|
19
|
+
## Core Rules
|
|
20
|
+
[Non-negotiable behaviors]
|
|
21
|
+
|
|
22
|
+
## Code Style
|
|
23
|
+
[Language-specific conventions]
|
|
24
|
+
|
|
25
|
+
## Tool Usage
|
|
26
|
+
[How to use available tools]
|
|
27
|
+
|
|
28
|
+
## Communication
|
|
29
|
+
[How to interact with users]
|
|
30
|
+
|
|
31
|
+
## Forbidden
|
|
32
|
+
[What never to do]
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Platform Compatibility Matrix
|
|
38
|
+
|
|
39
|
+
| Feature | Claude Code | Cursor | Windsurf | Cline | VSCode Agent |
|
|
40
|
+
|---------|-------------|--------|----------|-------|--------------|
|
|
41
|
+
| AGENTS.md | ✅ | ✅ | ✅ | ✅ | ⚠️ |
|
|
42
|
+
| .cursorrules | ❌ | ✅ | ❌ | ❌ | ❌ |
|
|
43
|
+
| .windsurfrules | ❌ | ❌ | ✅ | ❌ | ❌ |
|
|
44
|
+
| .clinerules | ❌ | ❌ | ❌ | ✅ | ❌ |
|
|
45
|
+
| CLAUDE.md | ✅ | ❌ | ❌ | ❌ | ❌ |
|
|
46
|
+
| Todo System | ✅ | ✅ | ✅ | ⚠️ | ✅ |
|
|
47
|
+
| Memory | ⚠️ | ✅ | ✅ | ❌ | ⚠️ |
|
|
48
|
+
| MCP | ✅ | ⚠️ | ⚠️ | ✅ | ❌ |
|
|
49
|
+
|
|
50
|
+
✅ = Full support ⚠️ = Partial/Varies ❌ = Not supported
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Universal Instructions (All Platforms)
|
|
55
|
+
|
|
56
|
+
### 1. Code Style Section
|
|
57
|
+
|
|
58
|
+
```markdown
|
|
59
|
+
## Code Style
|
|
60
|
+
|
|
61
|
+
### Always
|
|
62
|
+
- Use TypeScript with strict mode
|
|
63
|
+
- Prefer functional programming patterns
|
|
64
|
+
- Handle errors explicitly with try-catch
|
|
65
|
+
- Add all necessary imports
|
|
66
|
+
- Follow existing code conventions
|
|
67
|
+
|
|
68
|
+
### Never
|
|
69
|
+
- Use `any` types
|
|
70
|
+
- Leave console.log in production
|
|
71
|
+
- Use inline styles
|
|
72
|
+
- Create security vulnerabilities
|
|
73
|
+
- Introduce magic numbers
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### 2. Communication Section
|
|
77
|
+
|
|
78
|
+
```markdown
|
|
79
|
+
## Communication
|
|
80
|
+
|
|
81
|
+
### Tone
|
|
82
|
+
- Be concise and direct
|
|
83
|
+
- Technical focus
|
|
84
|
+
- No filler phrases ("Great", "Certainly", "Sure")
|
|
85
|
+
- Use markdown formatting
|
|
86
|
+
- Code blocks with language tags
|
|
87
|
+
|
|
88
|
+
### Format
|
|
89
|
+
- File paths in backticks: `src/utils.ts`
|
|
90
|
+
- Tables for structured data
|
|
91
|
+
- Bullet points for lists
|
|
92
|
+
- Headers to organize responses
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### 3. Behavior Section
|
|
96
|
+
|
|
97
|
+
```markdown
|
|
98
|
+
## Behavior
|
|
99
|
+
|
|
100
|
+
### Before Modifying Files
|
|
101
|
+
1. Read the file first
|
|
102
|
+
2. Understand existing patterns
|
|
103
|
+
3. Plan minimal changes
|
|
104
|
+
4. Preserve existing functionality
|
|
105
|
+
|
|
106
|
+
### During Development
|
|
107
|
+
1. Add proper error handling
|
|
108
|
+
2. Include necessary types
|
|
109
|
+
3. Follow project conventions
|
|
110
|
+
4. Test changes when possible
|
|
111
|
+
|
|
112
|
+
### After Changes
|
|
113
|
+
1. Verify the changes work
|
|
114
|
+
2. Update related code if needed
|
|
115
|
+
3. Don't refactor unrelated code
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Platform-Specific Adaptations
|
|
121
|
+
|
|
122
|
+
### Claude Code
|
|
123
|
+
|
|
124
|
+
```markdown
|
|
125
|
+
# CLAUDE.md additions
|
|
126
|
+
|
|
127
|
+
## Claude Code Specific
|
|
128
|
+
- Use TodoWrite tool for complex tasks
|
|
129
|
+
- Use Task tool for specialized agents
|
|
130
|
+
- Prefer parallel tool calls when independent
|
|
131
|
+
- Mark todos complete immediately
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Cursor
|
|
135
|
+
|
|
136
|
+
```markdown
|
|
137
|
+
# .cursorrules additions
|
|
138
|
+
|
|
139
|
+
## Cursor Specific
|
|
140
|
+
- Use semantic search for "how/where/what" queries
|
|
141
|
+
- Use grep for exact text matching
|
|
142
|
+
- Cite code with startLine:endLine:filepath format
|
|
143
|
+
- Maximize context understanding
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Windsurf
|
|
147
|
+
|
|
148
|
+
```markdown
|
|
149
|
+
# .windsurfrules additions
|
|
150
|
+
|
|
151
|
+
## Windsurf Specific
|
|
152
|
+
- Update plan before significant actions
|
|
153
|
+
- Create memories proactively
|
|
154
|
+
- Premium web design aesthetics
|
|
155
|
+
- Browser preview after web changes
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Cline
|
|
159
|
+
|
|
160
|
+
```markdown
|
|
161
|
+
# .clinerules additions
|
|
162
|
+
|
|
163
|
+
## Cline Specific
|
|
164
|
+
- One tool per message
|
|
165
|
+
- Wait for confirmation
|
|
166
|
+
- SEARCH/REPLACE for edits
|
|
167
|
+
- Plan mode for complex tasks
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## Cross-Platform Patterns
|
|
173
|
+
|
|
174
|
+
### 1. Tool Usage Pattern
|
|
175
|
+
|
|
176
|
+
```markdown
|
|
177
|
+
# Works across all platforms
|
|
178
|
+
|
|
179
|
+
## Tool Strategy
|
|
180
|
+
- Research before modifying
|
|
181
|
+
- Read files before editing
|
|
182
|
+
- Verify success before proceeding
|
|
183
|
+
- Handle errors gracefully
|
|
184
|
+
|
|
185
|
+
## Parallel Operations
|
|
186
|
+
When tools are independent:
|
|
187
|
+
- Run file reads in parallel
|
|
188
|
+
- Batch similar operations
|
|
189
|
+
- Don't wait unnecessarily
|
|
190
|
+
|
|
191
|
+
When tools depend on each other:
|
|
192
|
+
- Wait for results
|
|
193
|
+
- Use output as input
|
|
194
|
+
- Validate before proceeding
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### 2. Task Tracking Pattern
|
|
198
|
+
|
|
199
|
+
```markdown
|
|
200
|
+
# Works across all platforms
|
|
201
|
+
|
|
202
|
+
## Task Management
|
|
203
|
+
For complex tasks (3+ steps):
|
|
204
|
+
1. Create a task list
|
|
205
|
+
2. Work through sequentially
|
|
206
|
+
3. Mark complete when done
|
|
207
|
+
4. Update user on progress
|
|
208
|
+
|
|
209
|
+
## Progress Updates
|
|
210
|
+
- Brief status after significant work
|
|
211
|
+
- List completed items
|
|
212
|
+
- Note remaining work
|
|
213
|
+
- State next action
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
### 3. Error Handling Pattern
|
|
217
|
+
|
|
218
|
+
```markdown
|
|
219
|
+
# Works across all platforms
|
|
220
|
+
|
|
221
|
+
## When Errors Occur
|
|
222
|
+
1. Understand the error
|
|
223
|
+
2. Read relevant context
|
|
224
|
+
3. Plan a fix
|
|
225
|
+
4. Implement solution
|
|
226
|
+
5. Verify fix works
|
|
227
|
+
|
|
228
|
+
## Don't
|
|
229
|
+
- Give up immediately
|
|
230
|
+
- Guess at solutions
|
|
231
|
+
- Ignore error messages
|
|
232
|
+
- Skip verification
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
## AGENTS.md Template
|
|
238
|
+
|
|
239
|
+
```markdown
|
|
240
|
+
# AGENTS.md - Universal AI Agent Configuration
|
|
241
|
+
|
|
242
|
+
> Configuration compatible with all AI coding assistants
|
|
243
|
+
|
|
244
|
+
## Project Info
|
|
245
|
+
- **Name**: [Project Name]
|
|
246
|
+
- **Type**: [Web App / API / Library]
|
|
247
|
+
- **Stack**: [TypeScript, React, etc.]
|
|
248
|
+
|
|
249
|
+
## Code Style
|
|
250
|
+
- TypeScript with strict mode
|
|
251
|
+
- Functional patterns preferred
|
|
252
|
+
- Async/await over Promise chains
|
|
253
|
+
- Explicit error handling
|
|
254
|
+
|
|
255
|
+
## Naming Conventions
|
|
256
|
+
| Type | Convention | Example |
|
|
257
|
+
|------|------------|---------|
|
|
258
|
+
| Components | PascalCase | UserProfile |
|
|
259
|
+
| Functions | camelCase | getUserData |
|
|
260
|
+
| Constants | UPPER_SNAKE | API_URL |
|
|
261
|
+
| Files | kebab-case | user-profile.tsx |
|
|
262
|
+
|
|
263
|
+
## Best Practices
|
|
264
|
+
- No `any` types
|
|
265
|
+
- Small, focused functions
|
|
266
|
+
- DRY principle
|
|
267
|
+
- Test critical paths
|
|
268
|
+
|
|
269
|
+
## Forbidden
|
|
270
|
+
- console.log in production
|
|
271
|
+
- Inline styles
|
|
272
|
+
- Magic numbers
|
|
273
|
+
- Direct state mutation
|
|
274
|
+
|
|
275
|
+
## Security
|
|
276
|
+
- No exposed secrets
|
|
277
|
+
- Validate user input
|
|
278
|
+
- Parameterized queries
|
|
279
|
+
- Sanitize HTML output
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
|
|
284
|
+
## Combining Platform Instructions
|
|
285
|
+
|
|
286
|
+
### Option 1: Single AGENTS.md
|
|
287
|
+
|
|
288
|
+
```markdown
|
|
289
|
+
# AGENTS.md
|
|
290
|
+
|
|
291
|
+
## Universal Instructions
|
|
292
|
+
[Common to all platforms]
|
|
293
|
+
|
|
294
|
+
## Platform-Specific
|
|
295
|
+
<!-- Claude Code -->
|
|
296
|
+
[Claude-specific additions]
|
|
297
|
+
|
|
298
|
+
<!-- Cursor -->
|
|
299
|
+
[Cursor-specific additions]
|
|
300
|
+
|
|
301
|
+
<!-- Windsurf -->
|
|
302
|
+
[Windsurf-specific additions]
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
### Option 2: Multiple Files
|
|
306
|
+
|
|
307
|
+
```
|
|
308
|
+
project/
|
|
309
|
+
├── AGENTS.md # Universal
|
|
310
|
+
├── CLAUDE.md # Claude Code specific
|
|
311
|
+
├── .cursorrules # Cursor specific
|
|
312
|
+
├── .windsurfrules # Windsurf specific
|
|
313
|
+
└── .clinerules # Cline specific
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
---
|
|
317
|
+
|
|
318
|
+
## Best Practices Summary
|
|
319
|
+
|
|
320
|
+
| Principle | Implementation |
|
|
321
|
+
|-----------|---------------|
|
|
322
|
+
| Universal Core | Common rules in AGENTS.md |
|
|
323
|
+
| Platform Adapt | Specific files for each |
|
|
324
|
+
| Consistency | Same conventions everywhere |
|
|
325
|
+
| Specificity | Platform features in platform files |
|
|
326
|
+
| Maintenance | Update AGENTS.md first, then sync |
|
|
327
|
+
|
|
328
|
+
---
|
|
329
|
+
|
|
330
|
+
## Using with namnam-skills
|
|
331
|
+
|
|
332
|
+
```bash
|
|
333
|
+
# Install platform configs
|
|
334
|
+
npx namnam-skills platforms
|
|
335
|
+
|
|
336
|
+
# Files generated:
|
|
337
|
+
# - AGENTS.md (universal)
|
|
338
|
+
# - .cursorrules (Cursor)
|
|
339
|
+
# - .windsurfrules (Windsurf)
|
|
340
|
+
# - .clinerules (Cline)
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
**Source**: Analysis of 30+ AI coding assistant system prompts
|