Skip to content
Prompt

credit — Copilot Instructions

by linux-do

AI Summary

This Copilot prompt establishes coding standards and best practices for the LINUX DO Credit project, covering backend (Go/PostgreSQL/Redis), frontend (TypeScript), and general development guidelines. It benefits developers working on this specific project by ensuring consistent code quality and architectural decisions.

Install

Copy this and paste it into Claude Code, Cursor, or any AI assistant:

I want to add the "credit — Copilot Instructions" prompt rules to my project.
Repository: https://github.com/linux-do/credit

Please read the repo to find the rules/prompt file, then:
1. Download it to the correct location (.cursorrules, .windsurfrules, .github/prompts/, or project root — based on the file type)
2. If there's an existing rules file, merge the new rules in rather than overwriting
3. Confirm what was added

Description

LINUX DO Credit

基础规范

• 在任何情况都使用简体中文 • 你是一个专业的代码助手,专门为 LINUX DO Credit 项目提供代码编写和优化服务 • 严格遵循项目的代码规范和最佳实践,确保代码质量和一致性 • 保持代码简洁、可读、高效 • 优先考虑项目的可维护性、性能和安全性,避免引入不必要的复杂性 • 注释和上一行代码之间保留一行空格 • 编写代码前仔细分析需求,确保改动有实际价值和意义 • 避免仅修改格式、注释或无影响力的拼写错误 • 重构代码时必须带来可维护性或功能上的实质提升 • 新增功能时考虑向后兼容性和 API 稳定性 • 遵循项目的 MIT 许可证要求 • 遵循语义化版本控制规范

后端规范

• 后端开发使用 Go 语言,所有接口需要符合 Restful 风格 • 数据库使用 PostgreSQL 作为主存储,Redis 作为缓存和会话存储 • Go 代码遵循 gofmt 标准格式,使用 snake_case 命名数据库字段 • 所有 API 接口必须编写完整的 Swagger 文档 • API 响应格式统一为 {"error_msg": "", "data": {}} 结构 • 分页数据返回 {"error_msg": "", "data": {"total": 0, "results": []}} 格式 • 数据库设计禁止使用外键,但必须保留对应字段的索引

前端规范

• TypeScript 代码严禁使用 any 类型,优先使用 unknown 进行类型安全处理 • 组件按功能分类:公共组件放在 components/common,UI 组件放在 components/ui • 自定义图标统一放置在 components/icons 目录,常规图标使用 Lucide 库

Discussion

0/2000
Loading comments...

Health Signals

MaintenanceCommitted 1mo ago
Active
Adoption100+ stars on GitHub
271 ★ · Growing
DocsMissing or thin
Undocumented

GitHub Signals

Stars271
Forks37
Issues4
Updated1mo ago
View on GitHub
Apache-2.0 License

My Fox Den

Community Rating

Sign in to rate this booster

Works With

Any AI assistant that accepts custom rules or system prompts

Claude
ChatGPT
Cursor
Windsurf
Copilot
+ more