Spring Boot 后台开发套件:EasyExcel 批量导入导出代码生成与 Thymeleaf + LayUI 模板安全守卫。
安装
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:AAAlenwow/dsh-spring-admin-kit
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
面向 Spring Boot + MyBatis Plus + Thymeleaf + LayUI 企业后台开发者的 DSH 技能插件,把两个实战验证过的技能打包为一个可安装的插件,通过 DSH 官方的运行时技能注册 API(ctx.skills.register())注入,模型可自动触发,用户也可在技能目录中手动调用。
内置技能
1. excel-batch-import-export
为后台管理页面实现 EasyExcel 批量导入/导出/模板下载三件套:
- 统一 VO(
@ExcelProperty列头与 index 规范) - Controller 三个端点(downloadTemplate / export / import)
- Service 层按业务唯一键 Upsert(
@Transactional+ 空行过滤) - Thymeleaf + LayUI 前端(
upload.render在 tabledone回调重绑、导出确认弹窗、<a>模板链接) - 附实现后检查清单
触发:批量导入、批量导出、导入模板、Excel导入、EasyExcel。
2. thymeleaf-layui-guard
Thymeleaf + LayUI 模板语法安全守卫,防止 cols: [[...]]、onclick="fn({...})" 等写法被 Thymeleaf 内联解析导致 TemplateInputException。含 6 条强制规则(th:inline="none"/"javascript" 分离、cols 写法、禁内联事件、块注释、变量注入标准写法、页面标准结构)与提交前检查清单。编辑 templates/**/*.html 时应激活。
触发:Thymeleaf、LayUI、模板页面、后台管理、cols、table.render。
安装(本地路径)
node "<DSH app>/node_modules/@deepseek-ai/dsh/lib/bin.js" plugin --profile web add /path/to/dsh-spring-admin-kit
安装后重启 / 刷新 DSH Desktop,在技能目录(或 /skill 列表)中应能看到两个技能;模型在匹配场景下会自动建议加载。
使用示例
- 「给门店列表页加批量导入、批量导出和模板下载」→ 自动匹配
excel-batch-import-export,按模板生成 VO/Controller/Service/前端代码。 - 「新建一个用户管理页面」→ 生成
templates/**.html时按thymeleaf-layui-guard的 6 条规则产出安全模板。 - 手动调用:对话中直接说「用 thymeleaf-layui-guard 检查这个页面」。
设计说明
- 技能注册使用官方通道:插件作为 cordis host 服务加载,
inject: ["skills"]后在apply()中对每个技能调用ctx.skills.register(),SKILL.md的 YAML front matter 提供官方description,正文作为content注入。无需 slash command 或 hook 等替代方案。 - 兼容性对齐
dsh-subagent-sidebar(dsh: 0.1.7-alpha.1,profiles:["web"])。 - 插件内不含任何用户本机路径或密钥;技能正文中出现的项目内相对路径仅为示例项目结构。
License
MIT
dsh-spring-admin-kit (English)
A DSH skill plugin for enterprise admin developers on Spring Boot + MyBatis Plus + Thymeleaf + LayUI. Bundles two battle-tested skills and injects them via DSH's official runtime-skill API (ctx.skills.register()); both are model-invocable automatically and user-invocable from the skill catalog.
Bundled skills
- excel-batch-import-export — EasyExcel batch import / export / template download for admin pages: unified VO, three controller endpoints, service-layer upsert by business key with
@Transactional, Thymeleaf+LayUI frontend wiring, plus a post-implementation checklist. - thymeleaf-layui-guard — Template syntax safety rules preventing
TemplateInputExceptionfromcols: [[...]]/ inline{...}clashes between Thymeleaf inline parsing and LayUI JS. Six mandatory rules and a pre-commit checklist.
Install (local path)
node "<DSH app>/node_modules/@deepseek-ai/dsh/lib/bin.js" plugin --profile web add /path/to/dsh-spring-admin-kit
Restart/refresh DSH Desktop; both skills then appear in the skill catalog and are triggered by their keywords.
Design notes
- Skills register through the official channel: the plugin loads as a cordis host service, injects the
skillsservice, and callsctx.skills.register()once per bundledSKILL.md(front-matterdescription+ markdown body ascontent). No slash-command or hook workaround is needed. - Compatibility mirrors
dsh-subagent-sidebar(dsh: 0.1.7-alpha.1, profiles:["web"]). - No user-specific paths or secrets are hardcoded.
License
MIT
链接
同类插件
tw93/Mole#mole★ 76740
开源磁盘清理工具 Mole CLI(mo,支持 macOS 和 Windows)的官方 skill:按 Mole 的 JSON 输出查看磁盘占用、预览并执行清理、查看已安装应用、读取系统健康状态和清理记录。清理前先用 --dry-run 预览并征得同意,卸载应用和需要管理员权限的步骤留给用户在自己的终端里执行。插件只带 skill,CLI 需另外安装。
zhu1090093659/dsh-web#packages/dsh-skill-explorer★ 10696
技能中心:按来源分级浏览已加载的全部 skill,启用/禁用模型调用、创建新技能、删除进可恢复回收站。
QingYunA/answer-me-with-html★ 6742
把回答做成一页可视化 HTML:模型只写简短的 Markdown 草稿,随包附带的 `am` 命令行生成页面,支持流程图、时序图、树、时间线、ER 图、表格和提示框。
iflytek/skillhub#dsh★ 5514
在 DeepSeek Harness 内浏览、搜索 SkillHub 技能,并管理本地技能的安装、更新和卸载。适配 DSH 0.2.0-rc.2 与 0.2.1-rc.2,暂不兼容 0.2.1-rc.3。
hyhmrright/brooks-lint★ 1595
提供六个代码质量技能,涵盖代码审查、架构审计、技术债、测试质量、健康看板与修复。
GanyuanRan/Aegis★ 1460
面向编码 Agent 的软件工程方法包,提供基线优先规划、系统化调试、提示词卫生、完成前验证,以及修复/退役双轨跟踪技能。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。