Coding
PromptBeginner5 minmarkdown
Nano Banana Pro
Agent skill for nano-banana-pro
6
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Sign in to like and favorite skills
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
始终使用中文回复
这是一个基于 DeepSeek AI 的 GitLab 工作周报自动生成工具,支持双模式部署:
npm run dev - 启动开发服务器 (localhost:3000)npm run build - 构建所有版本(Web 应用 + 油猴脚本)npm run build:userscript - 仅构建油猴脚本版本npm run build:web - 仅构建 Web 应用版本npm run check - 运行所有检查(lint + stylelint + type-check)npm run lint - ESLint 检查npm run type-check - TypeScript 类型检查npm run stylelint - Less 样式检查npm run format - Prettier 代码格式化npm run release - 语义化发布npm run release:dry-run - 预览发布内容npm run commitlint - 提交信息检查src/ ├── components/ # React 组件 │ ├── AIPanel/ # AI 周报生成面板 │ ├── MainPanel/ # 主面板(事件列表) │ ├── SettingsPanel/ # 设置面板 │ └── ... # 其他UI组件 ├── hooks/ # 自定义 React Hooks │ ├── useAppState.ts # 主状态管理 Hook │ ├── useEventManagement.ts # 事件管理 │ ├── useThemeManager.ts # 主题管理 │ └── ... # 其他业务 Hooks ├── services/ # API 服务层 │ ├── gitlab-api.ts # GitLab API 封装 │ └── deepseek-api.ts # DeepSeek AI API 封装 ├── stores/ # Zustand 状态管理 │ └── app-store.ts # 全局状态 Store ├── types/ # TypeScript 类型定义 ├── utils/ # 工具函数 ├── constants/ # 常量配置(包含动态配置) ├── styles/ # 全局样式 │ ├── css-variables.ts # CSS 变量定义 │ ├── base.less # 基础样式 │ └── ... # 其他样式文件 ├── main.tsx # Web 应用入口 └── userscript.ts # 油猴脚本入口
src/stores/app-store.ts 导出)useConfig、useTheme、useEvents 等useAppActions 用于状态更新@/ 映射到 src/ 目录anycamelCase 局部类名styles["kebab-case"] 语法isUserscriptEnvironment() 检测环境window.__GITLAB_WEEKLY_REPORT_STYLES__ 注入src/constants/index.ts 的 USERSCRIPT_CONFIG 中createGitLabApiService()DeepSeekApiServicepackage.json 统一管理,通过构建脚本同步到油猴脚本头部src/components/ 下创建组件目录index.tsx 和 index.module.less 文件src/services/ 下的相应服务文件src/types/ 中的类型定义# 测试所有模式构建 npm run build # 验证油猴脚本 # 检查 dist/userscript/gitlab-weekly-report.user.js # 验证 Web 应用 # 检查 dist/web/ 目录
遵循 Conventional Commits:
feat: 新功能fix: 修复 bugrefactor: 代码重构style: 样式调整docs: 文档更新运行提交前检查:
npm run check npm run format
{ComponentName}Props@/ 别名进行绝对路径导入,按特定顺序组织导入语句index.lessuseMemo、useCallback,大型组件使用 React.memo