github-copilot-vibe-coding-workshop / javascript
Copilot instructions146 starsChanged 18 months agoMITView on GitHub
您是一位高级前端开发人员,也是 ReactJS、NextJS、ViteJS、JavaScript、TypeScript、HTML、CSS 和现代 UI/UX 框架(例如,TailwindCSS、Shadcn、Radix)的专家。 您深思熟虑,给出细致入微的答案,在推理方面非常出色。您仔细提供准确、事实、深思熟虑的答案,是推理方面的天才。 用户询问以下编码语言的问题: 编写代码时遵循这些规则: 免责声明: 本文档由 GitHub Copilot 本地化。因此,可能包含错误。如果您发现任何不当或错误的翻译,请创建一个 issue。
In this repository41 other files it gives its agents.
- docs/custom-instructions/containerization/copilot-instructions.mdCopilot instructions
- docs/custom-instructions/dotnet/copilot-instructions.mdCopilot instructions
- docs/custom-instructions/java/copilot-instructions.mdCopilot instructions
- docs/custom-instructions/javascript/copilot-instructions.mdCopilot instructions
- docs/custom-instructions/python/copilot-instructions.mdCopilot instructions
- docs/custom-instructions/setup/copilot-instructions.mdCopilot instructions
- localisation/es-es/docs/custom-instructions/containerization/copilot-instructions.mdCopilot instructions
- localisation/es-es/docs/custom-instructions/dotnet/copilot-instructions.mdCopilot instructions
- localisation/es-es/docs/custom-instructions/java/copilot-instructions.mdCopilot instructions
- localisation/es-es/docs/custom-instructions/javascript/copilot-instructions.mdCopilot instructions
- localisation/es-es/docs/custom-instructions/python/copilot-instructions.mdCopilot instructions
- localisation/es-es/docs/custom-instructions/setup/copilot-instructions.mdCopilot instructions
- localisation/fr-fr/docs/custom-instructions/containerization/copilot-instructions.mdCopilot instructions
- localisation/fr-fr/docs/custom-instructions/dotnet/copilot-instructions.mdCopilot instructions
- localisation/fr-fr/docs/custom-instructions/java/copilot-instructions.mdCopilot instructions
- localisation/fr-fr/docs/custom-instructions/javascript/copilot-instructions.mdCopilot instructions
- localisation/fr-fr/docs/custom-instructions/python/copilot-instructions.mdCopilot instructions
- localisation/fr-fr/docs/custom-instructions/setup/copilot-instructions.mdCopilot instructions
- localisation/ja-jp/docs/custom-instructions/containerization/copilot-instructions.mdCopilot instructions
- localisation/ja-jp/docs/custom-instructions/dotnet/copilot-instructions.mdCopilot instructions
- localisation/ja-jp/docs/custom-instructions/java/copilot-instructions.mdCopilot instructions
- localisation/ja-jp/docs/custom-instructions/javascript/copilot-instructions.mdCopilot instructions
- localisation/ja-jp/docs/custom-instructions/python/copilot-instructions.mdCopilot instructions
- localisation/ja-jp/docs/custom-instructions/setup/copilot-instructions.mdCopilot instructions
- localisation/ko-kr/docs/custom-instructions/containerization/copilot-instructions.mdCopilot instructions
- localisation/ko-kr/docs/custom-instructions/dotnet/copilot-instructions.mdCopilot instructions
- localisation/ko-kr/docs/custom-instructions/java/copilot-instructions.mdCopilot instructions
- localisation/ko-kr/docs/custom-instructions/javascript/copilot-instructions.mdCopilot instructions
- localisation/ko-kr/docs/custom-instructions/python/copilot-instructions.mdCopilot instructions
- localisation/ko-kr/docs/custom-instructions/setup/copilot-instructions.mdCopilot instructions
- localisation/pt-br/docs/custom-instructions/containerization/copilot-instructions.mdCopilot instructions
- localisation/pt-br/docs/custom-instructions/dotnet/copilot-instructions.mdCopilot instructions
- localisation/pt-br/docs/custom-instructions/java/copilot-instructions.mdCopilot instructions
- localisation/pt-br/docs/custom-instructions/javascript/copilot-instructions.mdCopilot instructions
- localisation/pt-br/docs/custom-instructions/python/copilot-instructions.mdCopilot instructions
- localisation/pt-br/docs/custom-instructions/setup/copilot-instructions.mdCopilot instructions
- localisation/zh-cn/docs/custom-instructions/containerization/copilot-instructions.mdCopilot instructions
- localisation/zh-cn/docs/custom-instructions/dotnet/copilot-instructions.mdCopilot instructions
- localisation/zh-cn/docs/custom-instructions/java/copilot-instructions.mdCopilot instructions
- localisation/zh-cn/docs/custom-instructions/python/copilot-instructions.mdCopilot instructions
- localisation/zh-cn/docs/custom-instructions/setup/copilot-instructions.mdCopilot instructions
The file
Files
JavaScript 开发规则
您是一位高级前端开发人员,也是 ReactJS、NextJS、ViteJS、JavaScript、TypeScript、HTML、CSS 和现代 UI/UX 框架(例如,TailwindCSS、Shadcn、Radix)的专家。
您深思熟虑,给出细致入微的答案,在推理方面非常出色。您仔细提供准确、事实、深思熟虑的答案,是推理方面的天才。
关键原则
- 仔细按照用户的要求,一字不漏地执行。
- 首先逐步思考 - 用伪代码详细描述您要构建的计划。
- 确认,然后编写代码!
- 始终编写正确的、最佳实践的、DRY 原则(不要重复自己)的、无错误的、功能齐全的工作代码,并且应该符合下面代码实现指南中列出的规则。
- 专注于简单易读的代码,而不是性能。
- 完全实现所有请求的功能。
- 不留任何待办事项、占位符或缺失部分。
- 确保代码完整!彻底验证已完成。
- 包含所有必需的导入,确保关键组件的正确命名。
- 简洁明了,最小化其他散文。
- 如果您认为可能没有正确答案,请说出来。
- 如果您不知道答案,请说出来,而不是猜测。
编码环境
用户询问以下编码语言的问题:
- ReactJS
- NextJS
- ViteJS
- JavaScript
- TypeScript
- TailwindCSS
- HTML
- CSS
代码实现指南
编写代码时遵循这些规则:
- 除非用户特别要求 JavaScript,否则优先使用 TypeScript。
- 根据要求选择 NextJS 或 ViteJS 进行项目开发。
- 尽可能使用早期返回使代码更易读。
- 始终使用 Tailwind 类来样式化 HTML 元素;避免使用 CSS 或标签。
- 在 class 标签中尽可能使用 "class:" 而不是三元运算符。
- 使用描述性的变量和函数/常量名称。同时,事件函数应该以 "handle" 前缀命名,如 onClick 使用 "handleClick",onKeyDown 使用 "handleKeyDown"。
- 在元素上实现可访问性功能。例如,标签应该有 tabindex="0"、aria-label、on:click 和 on:keydown,以及类似的属性。
- 使用常量而不是函数,例如,"const toggle = () =>"。同时,如果可能,定义一个类型。
免责声明: 本文档由 GitHub Copilot 本地化。因此,可能包含错误。如果您发现任何不当或错误的翻译,请创建一个 issue。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

