leniu-dev 2.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/.claude/agents/auto-test-generator.md +315 -0
- package/.claude/agents/bug-analyzer.md +103 -0
- package/.claude/agents/code-reviewer.md +122 -0
- package/.claude/agents/code-scanner.md +145 -0
- package/.claude/agents/image-reader.md +154 -0
- package/.claude/agents/loki-runner.md +80 -0
- package/.claude/agents/mysql-runner.md +81 -0
- package/.claude/agents/project-manager.md +159 -0
- package/.claude/agents/requirements-analyzer.md +175 -0
- package/.claude/agents/task-fetcher.md +75 -0
- package/.claude/audio/completed.wav +0 -0
- package/.claude/commands/add-todo.md +255 -0
- package/.claude/commands/auto-test.md +252 -0
- package/.claude/commands/check.md +210 -0
- package/.claude/commands/crud.md +454 -0
- package/.claude/commands/dev.md +532 -0
- package/.claude/commands/init-config.md +154 -0
- package/.claude/commands/init-docs.md +681 -0
- package/.claude/commands/next.md +281 -0
- package/.claude/commands/opsx-apply.md +147 -0
- package/.claude/commands/opsx-archive.md +105 -0
- package/.claude/commands/opsx-bulk-archive.md +237 -0
- package/.claude/commands/opsx-continue.md +109 -0
- package/.claude/commands/opsx-explore.md +281 -0
- package/.claude/commands/opsx-ff.md +92 -0
- package/.claude/commands/opsx-new.md +65 -0
- package/.claude/commands/opsx-onboard.md +397 -0
- package/.claude/commands/opsx-sync.md +129 -0
- package/.claude/commands/opsx-verify.md +159 -0
- package/.claude/commands/progress.md +264 -0
- package/.claude/commands/release.md +109 -0
- package/.claude/commands/start.md +199 -0
- package/.claude/commands/sync.md +307 -0
- package/.claude/commands/update-status.md +428 -0
- package/.claude/docs/Mixin/344/275/277/347/224/250/346/214/207/345/215/227.md +299 -0
- package/.claude/docs/README.md +167 -0
- package/.claude/docs//345/211/215/347/253/257/345/274/200/345/217/221/346/214/207/345/215/227.md +599 -0
- package/.claude/docs//345/220/216/347/253/257/345/274/200/345/217/221/346/214/207/345/215/227.md +726 -0
- package/.claude/docs//345/267/245/344/275/234/346/265/201/345/274/200/345/217/221/346/214/207/345/215/227.md +714 -0
- package/.claude/docs//345/267/245/345/205/267/347/261/273/344/275/277/347/224/250/346/214/207/345/215/227.md +463 -0
- package/.claude/docs//346/225/260/346/215/256/345/272/223/350/256/276/350/256/241/350/247/204/350/214/203.md +390 -0
- package/.claude/docs//346/226/260/345/212/237/350/203/275/345/274/200/345/217/221/346/265/201/347/250/213/350/247/204/350/214/203.md +688 -0
- package/.claude/docs//346/226/260/351/241/271/347/233/256/345/274/200/345/217/221/346/265/201/347/250/213.md +365 -0
- package/.claude/docs//346/241/206/346/236/266/350/257/264/346/230/216.md +393 -0
- package/.claude/docs//350/267/257/347/224/261/351/205/215/347/275/256/346/214/207/345/215/227.md +246 -0
- package/.claude/framework-config.json +73 -0
- package/.claude/hooks/lib/notify.js +310 -0
- package/.claude/hooks/pre-tool-use.js +117 -0
- package/.claude/hooks/skill-forced-eval.js +161 -0
- package/.claude/hooks/stop.js +55 -0
- package/.claude/notify-config.json +9 -0
- package/.claude/settings.json +57 -0
- package/.claude/skills/add-skill/SKILL.md +488 -0
- package/.claude/skills/analyze-requirements/SKILL.md +112 -0
- package/.claude/skills/api-development/SKILL.md +315 -0
- package/.claude/skills/architecture-design/SKILL.md +152 -0
- package/.claude/skills/auto-test/SKILL.md +625 -0
- package/.claude/skills/auto-test/references/api-conventions.md +260 -0
- package/.claude/skills/backend-annotations/SKILL.md +248 -0
- package/.claude/skills/banana-image/CHANGELOG.md +37 -0
- package/.claude/skills/banana-image/README.md +146 -0
- package/.claude/skills/banana-image/SKILL.md +171 -0
- package/.claude/skills/banana-image/assets/logo.png +0 -0
- package/.claude/skills/banana-image/references/advanced-usage.md +189 -0
- package/.claude/skills/banana-image/scripts/apply_template.py +125 -0
- package/.claude/skills/banana-image/scripts/banana_image_exec.ts +412 -0
- package/.claude/skills/banana-image/scripts/batch_prep.py +82 -0
- package/.claude/skills/banana-image/scripts/package-lock.json +1437 -0
- package/.claude/skills/banana-image/scripts/package.json +18 -0
- package/.claude/skills/banana-image/scripts/requirements.txt +10 -0
- package/.claude/skills/banana-image/templates/poster.json +22 -0
- package/.claude/skills/banana-image/templates/product.json +17 -0
- package/.claude/skills/banana-image/templates/social.json +22 -0
- package/.claude/skills/banana-image/templates/thumbnail.json +17 -0
- package/.claude/skills/brainstorm/SKILL.md +216 -0
- package/.claude/skills/bug-detective/SKILL.md +295 -0
- package/.claude/skills/bug-detective/references/error-patterns.md +242 -0
- package/.claude/skills/chrome-cdp/SKILL.md +81 -0
- package/.claude/skills/chrome-cdp/scripts/cdp.mjs +838 -0
- package/.claude/skills/chrome-cdp/scripts/run-cdp.sh +7 -0
- package/.claude/skills/code-patterns/SKILL.md +163 -0
- package/.claude/skills/code-patterns/references/leniu-code-patterns.md +87 -0
- package/.claude/skills/codex-code-review/SKILL.md +327 -0
- package/.claude/skills/collaborating-with-codex/SKILL.md +180 -0
- package/.claude/skills/collaborating-with-codex/scripts/codex_bridge.py +275 -0
- package/.claude/skills/collaborating-with-gemini/SKILL.md +194 -0
- package/.claude/skills/collaborating-with-gemini/scripts/gemini_bridge.py +275 -0
- package/.claude/skills/crud-development/SKILL.md +328 -0
- package/.claude/skills/data-permission/SKILL.md +221 -0
- package/.claude/skills/data-permission/references/custom-data-scope.md +90 -0
- package/.claude/skills/database-ops/SKILL.md +210 -0
- package/.claude/skills/error-handler/SKILL.md +310 -0
- package/.claude/skills/file-oss-management/SKILL.md +260 -0
- package/.claude/skills/file-oss-management/references/entities.md +105 -0
- package/.claude/skills/file-oss-management/references/service-impl.md +104 -0
- package/.claude/skills/fix-bug/SKILL.md +269 -0
- package/.claude/skills/git-workflow/SKILL.md +179 -0
- package/.claude/skills/jenkins-deploy/SKILL.md +134 -0
- package/.claude/skills/jenkins-deploy/assets/env_param.template.json +51 -0
- package/.claude/skills/jenkins-deploy/assets/jk_build.py +400 -0
- package/.claude/skills/json-serialization/SKILL.md +341 -0
- package/.claude/skills/lanhu-design/SKILL.md +99 -0
- package/.claude/skills/leniu-api-development/SKILL.md +319 -0
- package/.claude/skills/leniu-api-development/references/real-examples.md +273 -0
- package/.claude/skills/leniu-architecture-design/SKILL.md +383 -0
- package/.claude/skills/leniu-backend-annotations/SKILL.md +277 -0
- package/.claude/skills/leniu-brainstorm/SKILL.md +242 -0
- package/.claude/skills/leniu-brainstorm/references/business-scenarios.md +162 -0
- package/.claude/skills/leniu-code-patterns/SKILL.md +411 -0
- package/.claude/skills/leniu-crud-development/SKILL.md +404 -0
- package/.claude/skills/leniu-crud-development/references/templates.md +597 -0
- package/.claude/skills/leniu-customization-location/SKILL.md +410 -0
- package/.claude/skills/leniu-data-permission/SKILL.md +341 -0
- package/.claude/skills/leniu-database-ops/SKILL.md +426 -0
- package/.claude/skills/leniu-error-handler/SKILL.md +462 -0
- package/.claude/skills/leniu-java-concurrent/SKILL.md +400 -0
- package/.claude/skills/leniu-java-entity/SKILL.md +237 -0
- package/.claude/skills/leniu-java-entity/references/templates.md +237 -0
- package/.claude/skills/leniu-java-logging/SKILL.md +229 -0
- package/.claude/skills/leniu-java-logging/references/data-mask.md +46 -0
- package/.claude/skills/leniu-java-logging/references/logging-scenarios.md +113 -0
- package/.claude/skills/leniu-java-mq/SKILL.md +338 -0
- package/.claude/skills/leniu-java-mybatis/SKILL.md +267 -0
- package/.claude/skills/leniu-java-mybatis/references/report-mapper.md +88 -0
- package/.claude/skills/leniu-java-task/SKILL.md +367 -0
- package/.claude/skills/leniu-marketing-scenario/SKILL.md +448 -0
- package/.claude/skills/leniu-marketing-scenario/references/pay-meal-rules.md +197 -0
- package/.claude/skills/leniu-marketing-scenario/references/price-rules.md +286 -0
- package/.claude/skills/leniu-marketing-scenario/references/recharge-rules.md +188 -0
- package/.claude/skills/leniu-redis-cache/SKILL.md +331 -0
- package/.claude/skills/leniu-report-scenario/SKILL.md +508 -0
- package/.claude/skills/leniu-report-scenario/references/amount-handling.md +448 -0
- package/.claude/skills/leniu-report-scenario/references/analysis-module.md +64 -0
- package/.claude/skills/leniu-report-scenario/references/customization-table-fields.md +93 -0
- package/.claude/skills/leniu-report-scenario/references/customization.md +356 -0
- package/.claude/skills/leniu-report-scenario/references/data-permission.md +182 -0
- package/.claude/skills/leniu-report-scenario/references/export.md +553 -0
- package/.claude/skills/leniu-report-scenario/references/mealtime.md +197 -0
- package/.claude/skills/leniu-report-scenario/references/query-param.md +274 -0
- package/.claude/skills/leniu-report-scenario/references/report-tables.md +162 -0
- package/.claude/skills/leniu-report-scenario/references/standard-customization.md +112 -0
- package/.claude/skills/leniu-report-scenario/references/standard-table-fields.md +113 -0
- package/.claude/skills/leniu-report-scenario/references/total-line.md +179 -0
- package/.claude/skills/leniu-security-guard/SKILL.md +306 -0
- package/.claude/skills/leniu-utils-toolkit/SKILL.md +380 -0
- package/.claude/skills/loki-log-query/SKILL.md +430 -0
- package/.claude/skills/mysql-debug/SKILL.md +406 -0
- package/.claude/skills/performance-doctor/SKILL.md +297 -0
- package/.claude/skills/project-navigator/SKILL.md +211 -0
- package/.claude/skills/redis-cache/SKILL.md +282 -0
- package/.claude/skills/redis-cache/references/listeners.md +23 -0
- package/.claude/skills/scheduled-jobs/SKILL.md +277 -0
- package/.claude/skills/security-guard/SKILL.md +245 -0
- package/.claude/skills/security-guard/references/encrypt-config.md +103 -0
- package/.claude/skills/security-guard/references/sensitive-strategies.md +42 -0
- package/.claude/skills/sms-mail/SKILL.md +346 -0
- package/.claude/skills/sms-mail/references/mail-config.md +88 -0
- package/.claude/skills/sms-mail/references/sms-config.md +74 -0
- package/.claude/skills/social-login/SKILL.md +328 -0
- package/.claude/skills/social-login/references/provider-configs.md +118 -0
- package/.claude/skills/store-pc/SKILL.md +366 -0
- package/.claude/skills/sync-back-merge/SKILL.md +66 -0
- package/.claude/skills/task-tracker/SKILL.md +307 -0
- package/.claude/skills/tech-decision/SKILL.md +393 -0
- package/.claude/skills/tenant-management/SKILL.md +272 -0
- package/.claude/skills/tenant-management/references/tenant-scenarios.md +91 -0
- package/.claude/skills/test-development/SKILL.md +301 -0
- package/.claude/skills/test-development/references/parameterized-examples.md +119 -0
- package/.claude/skills/ui-pc/SKILL.md +438 -0
- package/.claude/skills/utils-toolkit/SKILL.md +354 -0
- package/.claude/skills/utils-toolkit/references/redis-utils-api.md +56 -0
- package/.claude/skills/websocket-sse/SKILL.md +350 -0
- package/.claude/skills/workflow-engine/SKILL.md +249 -0
- package/.claude/skills/yunxiao-task-management/SKILL.md +401 -0
- package/.claude/skills/yunxiao-task-management/templates//346/217/220/346/265/213/345/215/225/346/250/241/346/235/277.html +17 -0
- package/.claude/templates/env-config.md +27 -0
- package/.claude/templates//345/276/205/345/212/236/346/270/205/345/215/225/346/250/241/346/235/277.md +56 -0
- package/.claude/templates//351/234/200/346/261/202/346/226/207/346/241/243/346/250/241/346/235/277.md +85 -0
- package/.claude/templates//351/241/271/347/233/256/347/212/266/346/200/201/346/250/241/346/235/277.md +43 -0
- package/.codex/skills/add-skill/SKILL.md +488 -0
- package/.codex/skills/add-todo/SKILL.md +269 -0
- package/.codex/skills/analyze-requirements/SKILL.md +112 -0
- package/.codex/skills/api-development/SKILL.md +315 -0
- package/.codex/skills/architecture-design/SKILL.md +152 -0
- package/.codex/skills/auto-test/SKILL.md +453 -0
- package/.codex/skills/auto-test/references/api-conventions.md +260 -0
- package/.codex/skills/backend-annotations/SKILL.md +248 -0
- package/.codex/skills/banana-image/CHANGELOG.md +37 -0
- package/.codex/skills/banana-image/README.md +146 -0
- package/.codex/skills/banana-image/SKILL.md +171 -0
- package/.codex/skills/banana-image/assets/logo.png +0 -0
- package/.codex/skills/banana-image/references/advanced-usage.md +189 -0
- package/.codex/skills/banana-image/scripts/apply_template.py +125 -0
- package/.codex/skills/banana-image/scripts/banana_image_exec.ts +412 -0
- package/.codex/skills/banana-image/scripts/batch_prep.py +82 -0
- package/.codex/skills/banana-image/scripts/package-lock.json +1437 -0
- package/.codex/skills/banana-image/scripts/package.json +18 -0
- package/.codex/skills/banana-image/scripts/requirements.txt +10 -0
- package/.codex/skills/banana-image/templates/poster.json +22 -0
- package/.codex/skills/banana-image/templates/product.json +17 -0
- package/.codex/skills/banana-image/templates/social.json +22 -0
- package/.codex/skills/banana-image/templates/thumbnail.json +17 -0
- package/.codex/skills/brainstorm/SKILL.md +216 -0
- package/.codex/skills/bug-detective/SKILL.md +295 -0
- package/.codex/skills/bug-detective/references/error-patterns.md +242 -0
- package/.codex/skills/check/SKILL.md +367 -0
- package/.codex/skills/code-patterns/SKILL.md +163 -0
- package/.codex/skills/code-patterns/references/leniu-code-patterns.md +87 -0
- package/.codex/skills/collaborating-with-codex/SKILL.md +180 -0
- package/.codex/skills/collaborating-with-codex/scripts/codex_bridge.py +275 -0
- package/.codex/skills/collaborating-with-gemini/SKILL.md +194 -0
- package/.codex/skills/collaborating-with-gemini/scripts/gemini_bridge.py +275 -0
- package/.codex/skills/crud/SKILL.md +265 -0
- package/.codex/skills/crud-development/SKILL.md +328 -0
- package/.codex/skills/data-permission/SKILL.md +221 -0
- package/.codex/skills/data-permission/references/custom-data-scope.md +90 -0
- package/.codex/skills/database-ops/SKILL.md +210 -0
- package/.codex/skills/dev/SKILL.md +187 -0
- package/.codex/skills/error-handler/SKILL.md +310 -0
- package/.codex/skills/file-oss-management/SKILL.md +260 -0
- package/.codex/skills/file-oss-management/references/entities.md +105 -0
- package/.codex/skills/file-oss-management/references/service-impl.md +104 -0
- package/.codex/skills/fix-bug/SKILL.md +269 -0
- package/.codex/skills/git-workflow/SKILL.md +179 -0
- package/.codex/skills/init-docs/SKILL.md +194 -0
- package/.codex/skills/jenkins-deploy/SKILL.md +134 -0
- package/.codex/skills/json-serialization/SKILL.md +341 -0
- package/.codex/skills/lanhu-design/SKILL.md +99 -0
- package/.codex/skills/leniu-api-development/SKILL.md +319 -0
- package/.codex/skills/leniu-api-development/references/real-examples.md +273 -0
- package/.codex/skills/leniu-architecture-design/SKILL.md +383 -0
- package/.codex/skills/leniu-backend-annotations/SKILL.md +277 -0
- package/.codex/skills/leniu-brainstorm/SKILL.md +242 -0
- package/.codex/skills/leniu-brainstorm/references/business-scenarios.md +162 -0
- package/.codex/skills/leniu-code-patterns/SKILL.md +411 -0
- package/.codex/skills/leniu-crud-development/SKILL.md +404 -0
- package/.codex/skills/leniu-crud-development/references/templates.md +597 -0
- package/.codex/skills/leniu-customization-location/SKILL.md +410 -0
- package/.codex/skills/leniu-data-permission/SKILL.md +341 -0
- package/.codex/skills/leniu-database-ops/SKILL.md +426 -0
- package/.codex/skills/leniu-error-handler/SKILL.md +462 -0
- package/.codex/skills/leniu-java-amount-handling/SKILL.md +461 -0
- package/.codex/skills/leniu-java-code-style/SKILL.md +510 -0
- package/.codex/skills/leniu-java-concurrent/SKILL.md +400 -0
- package/.codex/skills/leniu-java-entity/SKILL.md +237 -0
- package/.codex/skills/leniu-java-entity/references/templates.md +237 -0
- package/.codex/skills/leniu-java-logging/SKILL.md +229 -0
- package/.codex/skills/leniu-java-logging/references/data-mask.md +46 -0
- package/.codex/skills/leniu-java-logging/references/logging-scenarios.md +113 -0
- package/.codex/skills/leniu-java-mq/SKILL.md +338 -0
- package/.codex/skills/leniu-java-mybatis/SKILL.md +267 -0
- package/.codex/skills/leniu-java-mybatis/references/report-mapper.md +88 -0
- package/.codex/skills/leniu-java-task/SKILL.md +367 -0
- package/.codex/skills/leniu-marketing-scenario/SKILL.md +448 -0
- package/.codex/skills/leniu-marketing-scenario/references/pay-meal-rules.md +197 -0
- package/.codex/skills/leniu-marketing-scenario/references/price-rules.md +286 -0
- package/.codex/skills/leniu-marketing-scenario/references/recharge-rules.md +188 -0
- package/.codex/skills/leniu-redis-cache/SKILL.md +331 -0
- package/.codex/skills/leniu-report-scenario/SKILL.md +508 -0
- package/.codex/skills/leniu-report-scenario/references/amount-handling.md +448 -0
- package/.codex/skills/leniu-report-scenario/references/analysis-module.md +64 -0
- package/.codex/skills/leniu-report-scenario/references/customization-table-fields.md +93 -0
- package/.codex/skills/leniu-report-scenario/references/customization.md +356 -0
- package/.codex/skills/leniu-report-scenario/references/data-permission.md +182 -0
- package/.codex/skills/leniu-report-scenario/references/export.md +553 -0
- package/.codex/skills/leniu-report-scenario/references/mealtime.md +197 -0
- package/.codex/skills/leniu-report-scenario/references/query-param.md +274 -0
- package/.codex/skills/leniu-report-scenario/references/report-tables.md +162 -0
- package/.codex/skills/leniu-report-scenario/references/standard-customization.md +112 -0
- package/.codex/skills/leniu-report-scenario/references/standard-table-fields.md +113 -0
- package/.codex/skills/leniu-report-scenario/references/total-line.md +179 -0
- package/.codex/skills/leniu-security-guard/SKILL.md +306 -0
- package/.codex/skills/leniu-utils-toolkit/SKILL.md +380 -0
- package/.codex/skills/loki-log-query/SKILL.md +430 -0
- package/.codex/skills/loki-log-query/environments.json +45 -0
- package/.codex/skills/mysql-debug/SKILL.md +406 -0
- package/.codex/skills/next/SKILL.md +137 -0
- package/.codex/skills/openspec-apply-change/SKILL.md +165 -0
- package/.codex/skills/openspec-archive-change/SKILL.md +122 -0
- package/.codex/skills/openspec-bulk-archive-change/SKILL.md +254 -0
- package/.codex/skills/openspec-continue-change/SKILL.md +126 -0
- package/.codex/skills/openspec-explore/SKILL.md +299 -0
- package/.codex/skills/openspec-ff-change/SKILL.md +109 -0
- package/.codex/skills/openspec-new-change/SKILL.md +82 -0
- package/.codex/skills/openspec-onboard/SKILL.md +414 -0
- package/.codex/skills/openspec-sync-specs/SKILL.md +146 -0
- package/.codex/skills/openspec-verify-change/SKILL.md +176 -0
- package/.codex/skills/performance-doctor/SKILL.md +297 -0
- package/.codex/skills/progress/SKILL.md +193 -0
- package/.codex/skills/project-navigator/SKILL.md +211 -0
- package/.codex/skills/redis-cache/SKILL.md +282 -0
- package/.codex/skills/redis-cache/references/listeners.md +23 -0
- package/.codex/skills/scheduled-jobs/SKILL.md +277 -0
- package/.codex/skills/security-guard/SKILL.md +245 -0
- package/.codex/skills/security-guard/references/encrypt-config.md +103 -0
- package/.codex/skills/security-guard/references/sensitive-strategies.md +42 -0
- package/.codex/skills/skill-creator/LICENSE.txt +202 -0
- package/.codex/skills/skill-creator/SKILL.md +479 -0
- package/.codex/skills/skill-creator/agents/analyzer.md +274 -0
- package/.codex/skills/skill-creator/agents/comparator.md +202 -0
- package/.codex/skills/skill-creator/agents/grader.md +223 -0
- package/.codex/skills/skill-creator/assets/eval_review.html +146 -0
- package/.codex/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/.codex/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/.codex/skills/skill-creator/references/schemas.md +430 -0
- package/.codex/skills/skill-creator/scripts/__init__.py +0 -0
- package/.codex/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/.codex/skills/skill-creator/scripts/generate_report.py +326 -0
- package/.codex/skills/skill-creator/scripts/improve_description.py +248 -0
- package/.codex/skills/skill-creator/scripts/package_skill.py +136 -0
- package/.codex/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/.codex/skills/skill-creator/scripts/run_eval.py +310 -0
- package/.codex/skills/skill-creator/scripts/run_loop.py +332 -0
- package/.codex/skills/skill-creator/scripts/utils.py +47 -0
- package/.codex/skills/sms-mail/SKILL.md +346 -0
- package/.codex/skills/sms-mail/references/mail-config.md +88 -0
- package/.codex/skills/sms-mail/references/sms-config.md +74 -0
- package/.codex/skills/social-login/SKILL.md +328 -0
- package/.codex/skills/social-login/references/provider-configs.md +118 -0
- package/.codex/skills/start/SKILL.md +154 -0
- package/.codex/skills/store-pc/SKILL.md +366 -0
- package/.codex/skills/sync/SKILL.md +149 -0
- package/.codex/skills/sync-back-merge/SKILL.md +66 -0
- package/.codex/skills/task-tracker/SKILL.md +307 -0
- package/.codex/skills/tech-decision/SKILL.md +393 -0
- package/.codex/skills/tenant-management/SKILL.md +272 -0
- package/.codex/skills/tenant-management/references/tenant-scenarios.md +91 -0
- package/.codex/skills/test-development/SKILL.md +301 -0
- package/.codex/skills/test-development/references/parameterized-examples.md +119 -0
- package/.codex/skills/ui-pc/SKILL.md +438 -0
- package/.codex/skills/update-status/SKILL.md +159 -0
- package/.codex/skills/utils-toolkit/SKILL.md +354 -0
- package/.codex/skills/utils-toolkit/references/redis-utils-api.md +56 -0
- package/.codex/skills/websocket-sse/SKILL.md +350 -0
- package/.codex/skills/workflow-engine/SKILL.md +249 -0
- package/.codex/skills/yunxiao-task-management/SKILL.md +401 -0
- package/.codex/skills/yunxiao-task-management/templates//346/217/220/346/265/213/345/215/225/346/250/241/346/235/277.html +17 -0
- package/.cursor/agents/bug-analyzer.md +102 -0
- package/.cursor/agents/code-reviewer.md +122 -0
- package/.cursor/agents/code-scanner.md +145 -0
- package/.cursor/agents/image-reader.md +154 -0
- package/.cursor/agents/loki-runner.md +80 -0
- package/.cursor/agents/mysql-runner.md +81 -0
- package/.cursor/agents/project-manager.md +159 -0
- package/.cursor/agents/requirements-analyzer.md +141 -0
- package/.cursor/agents/task-fetcher.md +75 -0
- package/.cursor/audio/completed.wav +0 -0
- package/.cursor/commands/opsx-apply.md +152 -0
- package/.cursor/commands/opsx-archive.md +157 -0
- package/.cursor/commands/opsx-bulk-archive.md +242 -0
- package/.cursor/commands/opsx-continue.md +114 -0
- package/.cursor/commands/opsx-explore.md +174 -0
- package/.cursor/commands/opsx-ff.md +94 -0
- package/.cursor/commands/opsx-new.md +69 -0
- package/.cursor/commands/opsx-onboard.md +525 -0
- package/.cursor/commands/opsx-sync.md +134 -0
- package/.cursor/commands/opsx-verify.md +164 -0
- package/.cursor/hooks/cursor-pre-tool-use.js +122 -0
- package/.cursor/hooks/cursor-skill-eval.js +466 -0
- package/.cursor/hooks/lib/notify.js +310 -0
- package/.cursor/hooks/stop.js +55 -0
- package/.cursor/hooks.json +23 -0
- package/.cursor/mcp.json +22 -0
- package/.cursor/rules/skill-activation.mdc +99 -0
- package/.cursor/skills/add-skill/SKILL.md +488 -0
- package/.cursor/skills/analyze-requirements/SKILL.md +112 -0
- package/.cursor/skills/api-development/SKILL.md +315 -0
- package/.cursor/skills/architecture-design/SKILL.md +152 -0
- package/.cursor/skills/auto-test/SKILL.md +453 -0
- package/.cursor/skills/auto-test/references/api-conventions.md +260 -0
- package/.cursor/skills/backend-annotations/SKILL.md +248 -0
- package/.cursor/skills/banana-image/CHANGELOG.md +37 -0
- package/.cursor/skills/banana-image/README.md +146 -0
- package/.cursor/skills/banana-image/SKILL.md +171 -0
- package/.cursor/skills/banana-image/assets/logo.png +0 -0
- package/.cursor/skills/banana-image/references/advanced-usage.md +189 -0
- package/.cursor/skills/banana-image/scripts/apply_template.py +125 -0
- package/.cursor/skills/banana-image/scripts/banana_image_exec.ts +412 -0
- package/.cursor/skills/banana-image/scripts/batch_prep.py +82 -0
- package/.cursor/skills/banana-image/scripts/package-lock.json +1437 -0
- package/.cursor/skills/banana-image/scripts/package.json +18 -0
- package/.cursor/skills/banana-image/scripts/requirements.txt +10 -0
- package/.cursor/skills/banana-image/templates/poster.json +22 -0
- package/.cursor/skills/banana-image/templates/product.json +17 -0
- package/.cursor/skills/banana-image/templates/social.json +22 -0
- package/.cursor/skills/banana-image/templates/thumbnail.json +17 -0
- package/.cursor/skills/brainstorm/SKILL.md +216 -0
- package/.cursor/skills/bug-detective/SKILL.md +295 -0
- package/.cursor/skills/bug-detective/references/error-patterns.md +242 -0
- package/.cursor/skills/code-patterns/SKILL.md +163 -0
- package/.cursor/skills/code-patterns/references/leniu-code-patterns.md +87 -0
- package/.cursor/skills/collaborating-with-codex/SKILL.md +180 -0
- package/.cursor/skills/collaborating-with-codex/scripts/codex_bridge.py +275 -0
- package/.cursor/skills/collaborating-with-gemini/SKILL.md +194 -0
- package/.cursor/skills/collaborating-with-gemini/scripts/gemini_bridge.py +275 -0
- package/.cursor/skills/crud-development/SKILL.md +328 -0
- package/.cursor/skills/data-permission/SKILL.md +221 -0
- package/.cursor/skills/data-permission/references/custom-data-scope.md +90 -0
- package/.cursor/skills/database-ops/SKILL.md +210 -0
- package/.cursor/skills/error-handler/SKILL.md +310 -0
- package/.cursor/skills/file-oss-management/SKILL.md +260 -0
- package/.cursor/skills/file-oss-management/references/entities.md +105 -0
- package/.cursor/skills/file-oss-management/references/service-impl.md +104 -0
- package/.cursor/skills/fix-bug/SKILL.md +269 -0
- package/.cursor/skills/git-workflow/SKILL.md +179 -0
- package/.cursor/skills/jenkins-deploy/SKILL.md +134 -0
- package/.cursor/skills/json-serialization/SKILL.md +341 -0
- package/.cursor/skills/lanhu-design/SKILL.md +99 -0
- package/.cursor/skills/leniu-api-development/SKILL.md +319 -0
- package/.cursor/skills/leniu-api-development/references/real-examples.md +273 -0
- package/.cursor/skills/leniu-architecture-design/SKILL.md +383 -0
- package/.cursor/skills/leniu-backend-annotations/SKILL.md +277 -0
- package/.cursor/skills/leniu-brainstorm/SKILL.md +242 -0
- package/.cursor/skills/leniu-brainstorm/references/business-scenarios.md +162 -0
- package/.cursor/skills/leniu-code-patterns/SKILL.md +411 -0
- package/.cursor/skills/leniu-crud-development/SKILL.md +404 -0
- package/.cursor/skills/leniu-crud-development/references/templates.md +597 -0
- package/.cursor/skills/leniu-customization-location/SKILL.md +410 -0
- package/.cursor/skills/leniu-data-permission/SKILL.md +341 -0
- package/.cursor/skills/leniu-database-ops/SKILL.md +426 -0
- package/.cursor/skills/leniu-error-handler/SKILL.md +462 -0
- package/.cursor/skills/leniu-java-amount-handling/SKILL.md +461 -0
- package/.cursor/skills/leniu-java-code-style/SKILL.md +510 -0
- package/.cursor/skills/leniu-java-concurrent/SKILL.md +400 -0
- package/.cursor/skills/leniu-java-entity/SKILL.md +237 -0
- package/.cursor/skills/leniu-java-entity/references/templates.md +237 -0
- package/.cursor/skills/leniu-java-logging/SKILL.md +229 -0
- package/.cursor/skills/leniu-java-logging/references/data-mask.md +46 -0
- package/.cursor/skills/leniu-java-logging/references/logging-scenarios.md +113 -0
- package/.cursor/skills/leniu-java-mq/SKILL.md +338 -0
- package/.cursor/skills/leniu-java-mybatis/SKILL.md +267 -0
- package/.cursor/skills/leniu-java-mybatis/references/report-mapper.md +88 -0
- package/.cursor/skills/leniu-java-task/SKILL.md +367 -0
- package/.cursor/skills/leniu-marketing-scenario/SKILL.md +448 -0
- package/.cursor/skills/leniu-marketing-scenario/references/pay-meal-rules.md +197 -0
- package/.cursor/skills/leniu-marketing-scenario/references/price-rules.md +286 -0
- package/.cursor/skills/leniu-marketing-scenario/references/recharge-rules.md +188 -0
- package/.cursor/skills/leniu-redis-cache/SKILL.md +331 -0
- package/.cursor/skills/leniu-report-scenario/SKILL.md +508 -0
- package/.cursor/skills/leniu-report-scenario/references/amount-handling.md +448 -0
- package/.cursor/skills/leniu-report-scenario/references/analysis-module.md +64 -0
- package/.cursor/skills/leniu-report-scenario/references/customization-table-fields.md +93 -0
- package/.cursor/skills/leniu-report-scenario/references/customization.md +356 -0
- package/.cursor/skills/leniu-report-scenario/references/data-permission.md +182 -0
- package/.cursor/skills/leniu-report-scenario/references/export.md +553 -0
- package/.cursor/skills/leniu-report-scenario/references/mealtime.md +197 -0
- package/.cursor/skills/leniu-report-scenario/references/query-param.md +274 -0
- package/.cursor/skills/leniu-report-scenario/references/report-tables.md +162 -0
- package/.cursor/skills/leniu-report-scenario/references/standard-customization.md +112 -0
- package/.cursor/skills/leniu-report-scenario/references/standard-table-fields.md +113 -0
- package/.cursor/skills/leniu-report-scenario/references/total-line.md +179 -0
- package/.cursor/skills/leniu-security-guard/SKILL.md +306 -0
- package/.cursor/skills/leniu-utils-toolkit/SKILL.md +380 -0
- package/.cursor/skills/loki-log-query/SKILL.md +430 -0
- package/.cursor/skills/loki-log-query/environments.json +45 -0
- package/.cursor/skills/mysql-debug/SKILL.md +406 -0
- package/.cursor/skills/openspec-apply-change/SKILL.md +165 -0
- package/.cursor/skills/openspec-archive-change/SKILL.md +122 -0
- package/.cursor/skills/openspec-bulk-archive-change/SKILL.md +254 -0
- package/.cursor/skills/openspec-continue-change/SKILL.md +126 -0
- package/.cursor/skills/openspec-explore/SKILL.md +299 -0
- package/.cursor/skills/openspec-ff-change/SKILL.md +109 -0
- package/.cursor/skills/openspec-new-change/SKILL.md +82 -0
- package/.cursor/skills/openspec-onboard/SKILL.md +414 -0
- package/.cursor/skills/openspec-sync-specs/SKILL.md +146 -0
- package/.cursor/skills/openspec-verify-change/SKILL.md +176 -0
- package/.cursor/skills/performance-doctor/SKILL.md +297 -0
- package/.cursor/skills/project-navigator/SKILL.md +211 -0
- package/.cursor/skills/redis-cache/SKILL.md +282 -0
- package/.cursor/skills/redis-cache/references/listeners.md +23 -0
- package/.cursor/skills/scheduled-jobs/SKILL.md +277 -0
- package/.cursor/skills/security-guard/SKILL.md +245 -0
- package/.cursor/skills/security-guard/references/encrypt-config.md +103 -0
- package/.cursor/skills/security-guard/references/sensitive-strategies.md +42 -0
- package/.cursor/skills/skill-creator/LICENSE.txt +202 -0
- package/.cursor/skills/skill-creator/SKILL.md +479 -0
- package/.cursor/skills/skill-creator/agents/analyzer.md +274 -0
- package/.cursor/skills/skill-creator/agents/comparator.md +202 -0
- package/.cursor/skills/skill-creator/agents/grader.md +223 -0
- package/.cursor/skills/skill-creator/assets/eval_review.html +146 -0
- package/.cursor/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/.cursor/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/.cursor/skills/skill-creator/references/schemas.md +430 -0
- package/.cursor/skills/skill-creator/scripts/__init__.py +0 -0
- package/.cursor/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/.cursor/skills/skill-creator/scripts/generate_report.py +326 -0
- package/.cursor/skills/skill-creator/scripts/improve_description.py +248 -0
- package/.cursor/skills/skill-creator/scripts/package_skill.py +136 -0
- package/.cursor/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/.cursor/skills/skill-creator/scripts/run_eval.py +310 -0
- package/.cursor/skills/skill-creator/scripts/run_loop.py +332 -0
- package/.cursor/skills/skill-creator/scripts/utils.py +47 -0
- package/.cursor/skills/sms-mail/SKILL.md +346 -0
- package/.cursor/skills/sms-mail/references/mail-config.md +88 -0
- package/.cursor/skills/sms-mail/references/sms-config.md +74 -0
- package/.cursor/skills/social-login/SKILL.md +328 -0
- package/.cursor/skills/social-login/references/provider-configs.md +118 -0
- package/.cursor/skills/store-pc/SKILL.md +366 -0
- package/.cursor/skills/sync-back-merge/SKILL.md +66 -0
- package/.cursor/skills/task-tracker/SKILL.md +307 -0
- package/.cursor/skills/tech-decision/SKILL.md +393 -0
- package/.cursor/skills/tenant-management/SKILL.md +272 -0
- package/.cursor/skills/tenant-management/references/tenant-scenarios.md +91 -0
- package/.cursor/skills/test-development/SKILL.md +301 -0
- package/.cursor/skills/test-development/references/parameterized-examples.md +119 -0
- package/.cursor/skills/ui-pc/SKILL.md +438 -0
- package/.cursor/skills/utils-toolkit/SKILL.md +354 -0
- package/.cursor/skills/utils-toolkit/references/redis-utils-api.md +56 -0
- package/.cursor/skills/websocket-sse/SKILL.md +350 -0
- package/.cursor/skills/workflow-engine/SKILL.md +249 -0
- package/.cursor/skills/yunxiao-task-management/SKILL.md +401 -0
- package/.cursor/skills/yunxiao-task-management/templates//346/217/220/346/265/213/345/215/225/346/250/241/346/235/277.html +17 -0
- package/.cursor/templates/env-config.md +27 -0
- package/AGENTS.md +275 -0
- package/CLAUDE.md +285 -0
- package/README.md +104 -0
- package/bin/index.js +3069 -0
- package/init.sh +178 -0
- package/package.json +40 -0
- package/scripts/build-skills.js +180 -0
- package/src/platform-map.json +100 -0
- package/src/skills/add-skill/SKILL.md +488 -0
- package/src/skills/add-todo/SKILL.md +269 -0
- package/src/skills/analyze-requirements/SKILL.md +112 -0
- package/src/skills/api-development/SKILL.md +315 -0
- package/src/skills/architecture-design/SKILL.md +152 -0
- package/src/skills/backend-annotations/SKILL.md +248 -0
- package/src/skills/banana-image/CHANGELOG.md +37 -0
- package/src/skills/banana-image/README.md +146 -0
- package/src/skills/banana-image/SKILL.md +171 -0
- package/src/skills/banana-image/assets/logo.png +0 -0
- package/src/skills/banana-image/references/advanced-usage.md +189 -0
- package/src/skills/banana-image/scripts/apply_template.py +125 -0
- package/src/skills/banana-image/scripts/banana_image_exec.ts +412 -0
- package/src/skills/banana-image/scripts/batch_prep.py +82 -0
- package/src/skills/banana-image/scripts/package-lock.json +1437 -0
- package/src/skills/banana-image/scripts/package.json +18 -0
- package/src/skills/banana-image/scripts/requirements.txt +10 -0
- package/src/skills/banana-image/templates/poster.json +22 -0
- package/src/skills/banana-image/templates/product.json +17 -0
- package/src/skills/banana-image/templates/social.json +22 -0
- package/src/skills/banana-image/templates/thumbnail.json +17 -0
- package/src/skills/brainstorm/SKILL.md +216 -0
- package/src/skills/bug-detective/SKILL.md +295 -0
- package/src/skills/bug-detective/references/error-patterns.md +242 -0
- package/src/skills/check/SKILL.md +367 -0
- package/src/skills/code-patterns/SKILL.md +163 -0
- package/src/skills/code-patterns/references/leniu-code-patterns.md +87 -0
- package/src/skills/codex-code-review/SKILL.md +327 -0
- package/src/skills/collaborating-with-codex/SKILL.md +180 -0
- package/src/skills/collaborating-with-codex/scripts/codex_bridge.py +275 -0
- package/src/skills/collaborating-with-gemini/SKILL.md +194 -0
- package/src/skills/collaborating-with-gemini/scripts/gemini_bridge.py +275 -0
- package/src/skills/crud/SKILL.md +265 -0
- package/src/skills/crud-development/SKILL.md +328 -0
- package/src/skills/data-permission/SKILL.md +221 -0
- package/src/skills/data-permission/references/custom-data-scope.md +90 -0
- package/src/skills/database-ops/SKILL.md +210 -0
- package/src/skills/dev/SKILL.md +187 -0
- package/src/skills/error-handler/SKILL.md +310 -0
- package/src/skills/file-oss-management/SKILL.md +260 -0
- package/src/skills/file-oss-management/references/entities.md +105 -0
- package/src/skills/file-oss-management/references/service-impl.md +104 -0
- package/src/skills/fix-bug/SKILL.md +269 -0
- package/src/skills/git-workflow/SKILL.md +179 -0
- package/src/skills/init-docs/SKILL.md +194 -0
- package/src/skills/json-serialization/SKILL.md +341 -0
- package/src/skills/leniu-api-development/SKILL.md +319 -0
- package/src/skills/leniu-api-development/references/real-examples.md +273 -0
- package/src/skills/leniu-architecture-design/SKILL.md +383 -0
- package/src/skills/leniu-backend-annotations/SKILL.md +277 -0
- package/src/skills/leniu-brainstorm/SKILL.md +242 -0
- package/src/skills/leniu-brainstorm/references/business-scenarios.md +162 -0
- package/src/skills/leniu-code-patterns/SKILL.md +411 -0
- package/src/skills/leniu-crud-development/SKILL.md +404 -0
- package/src/skills/leniu-crud-development/references/templates.md +597 -0
- package/src/skills/leniu-customization-location/SKILL.md +410 -0
- package/src/skills/leniu-data-permission/SKILL.md +341 -0
- package/src/skills/leniu-database-ops/SKILL.md +426 -0
- package/src/skills/leniu-error-handler/SKILL.md +462 -0
- package/src/skills/leniu-java-amount-handling/SKILL.md +461 -0
- package/src/skills/leniu-java-code-style/SKILL.md +510 -0
- package/src/skills/leniu-java-concurrent/SKILL.md +400 -0
- package/src/skills/leniu-java-entity/SKILL.md +237 -0
- package/src/skills/leniu-java-entity/references/templates.md +237 -0
- package/src/skills/leniu-java-export/SKILL.md +570 -0
- package/src/skills/leniu-java-logging/SKILL.md +229 -0
- package/src/skills/leniu-java-logging/references/data-mask.md +46 -0
- package/src/skills/leniu-java-logging/references/logging-scenarios.md +113 -0
- package/src/skills/leniu-java-mq/SKILL.md +338 -0
- package/src/skills/leniu-java-mybatis/SKILL.md +267 -0
- package/src/skills/leniu-java-mybatis/references/report-mapper.md +88 -0
- package/src/skills/leniu-java-report-query-param/SKILL.md +291 -0
- package/src/skills/leniu-java-task/SKILL.md +367 -0
- package/src/skills/leniu-java-total-line/SKILL.md +196 -0
- package/src/skills/leniu-marketing-price-rule-customizer/SKILL.md +301 -0
- package/src/skills/leniu-marketing-recharge-rule-customizer/SKILL.md +285 -0
- package/src/skills/leniu-mealtime/SKILL.md +215 -0
- package/src/skills/leniu-redis-cache/SKILL.md +331 -0
- package/src/skills/leniu-report-customization/SKILL.md +415 -0
- package/src/skills/leniu-report-customization/references/table-fields.md +93 -0
- package/src/skills/leniu-report-standard-customization/SKILL.md +391 -0
- package/src/skills/leniu-report-standard-customization/references/analysis-module.md +64 -0
- package/src/skills/leniu-report-standard-customization/references/table-fields.md +113 -0
- package/src/skills/leniu-security-guard/SKILL.md +306 -0
- package/src/skills/leniu-utils-toolkit/SKILL.md +380 -0
- package/src/skills/loki-log-query/SKILL.md +400 -0
- package/src/skills/loki-log-query/environments.json +45 -0
- package/src/skills/mysql-debug/SKILL.md +400 -0
- package/src/skills/next/SKILL.md +137 -0
- package/src/skills/openspec-apply-change/SKILL.md +165 -0
- package/src/skills/openspec-archive-change/SKILL.md +122 -0
- package/src/skills/openspec-bulk-archive-change/SKILL.md +254 -0
- package/src/skills/openspec-continue-change/SKILL.md +126 -0
- package/src/skills/openspec-explore/SKILL.md +299 -0
- package/src/skills/openspec-ff-change/SKILL.md +109 -0
- package/src/skills/openspec-new-change/SKILL.md +82 -0
- package/src/skills/openspec-onboard/SKILL.md +414 -0
- package/src/skills/openspec-sync-specs/SKILL.md +146 -0
- package/src/skills/openspec-verify-change/SKILL.md +176 -0
- package/src/skills/performance-doctor/SKILL.md +297 -0
- package/src/skills/progress/SKILL.md +193 -0
- package/src/skills/project-navigator/SKILL.md +211 -0
- package/src/skills/redis-cache/SKILL.md +282 -0
- package/src/skills/redis-cache/references/listeners.md +23 -0
- package/src/skills/scheduled-jobs/SKILL.md +277 -0
- package/src/skills/security-guard/SKILL.md +245 -0
- package/src/skills/security-guard/references/encrypt-config.md +103 -0
- package/src/skills/security-guard/references/sensitive-strategies.md +42 -0
- package/src/skills/skill-creator/LICENSE.txt +202 -0
- package/src/skills/skill-creator/SKILL.md +479 -0
- package/src/skills/skill-creator/agents/analyzer.md +274 -0
- package/src/skills/skill-creator/agents/comparator.md +202 -0
- package/src/skills/skill-creator/agents/grader.md +223 -0
- package/src/skills/skill-creator/assets/eval_review.html +146 -0
- package/src/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/src/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/src/skills/skill-creator/references/schemas.md +430 -0
- package/src/skills/skill-creator/scripts/__init__.py +0 -0
- package/src/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/src/skills/skill-creator/scripts/generate_report.py +326 -0
- package/src/skills/skill-creator/scripts/improve_description.py +248 -0
- package/src/skills/skill-creator/scripts/package_skill.py +136 -0
- package/src/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/src/skills/skill-creator/scripts/run_eval.py +310 -0
- package/src/skills/skill-creator/scripts/run_loop.py +332 -0
- package/src/skills/skill-creator/scripts/utils.py +47 -0
- package/src/skills/sms-mail/SKILL.md +346 -0
- package/src/skills/sms-mail/references/mail-config.md +88 -0
- package/src/skills/sms-mail/references/sms-config.md +74 -0
- package/src/skills/social-login/SKILL.md +328 -0
- package/src/skills/social-login/references/provider-configs.md +118 -0
- package/src/skills/start/SKILL.md +154 -0
- package/src/skills/store-pc/SKILL.md +366 -0
- package/src/skills/sync/SKILL.md +149 -0
- package/src/skills/sync-back-merge/SKILL.md +66 -0
- package/src/skills/task-tracker/SKILL.md +307 -0
- package/src/skills/tech-decision/SKILL.md +393 -0
- package/src/skills/tenant-management/SKILL.md +272 -0
- package/src/skills/tenant-management/references/tenant-scenarios.md +91 -0
- package/src/skills/test-development/SKILL.md +301 -0
- package/src/skills/test-development/references/parameterized-examples.md +119 -0
- package/src/skills/ui-pc/SKILL.md +438 -0
- package/src/skills/update-status/SKILL.md +159 -0
- package/src/skills/utils-toolkit/SKILL.md +354 -0
- package/src/skills/utils-toolkit/references/redis-utils-api.md +56 -0
- package/src/skills/websocket-sse/SKILL.md +350 -0
- package/src/skills/workflow-engine/SKILL.md +249 -0
- package/src/skills/yunxiao-task-management/SKILL.md +401 -0
- package/src/skills/yunxiao-task-management/templates//346/217/220/346/265/213/345/215/225/346/250/241/346/235/277.html +17 -0
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: project-navigator
|
|
3
|
+
description: |
|
|
4
|
+
当需要了解项目结构、查找文件、定位代码时自动使用此 Skill。提供 leniu 云食堂项目的精确导航。
|
|
5
|
+
|
|
6
|
+
触发场景:
|
|
7
|
+
- 询问某个功能/文件在哪里
|
|
8
|
+
- 新建模块时需要确认目录位置
|
|
9
|
+
- 查找参考代码(Controller/Service/Mapper/Entity 示例)
|
|
10
|
+
- 了解项目整体结构和模块划分
|
|
11
|
+
- 查找技能、命令、Hook 的位置
|
|
12
|
+
|
|
13
|
+
触发词:项目结构、文件在哪、代码位置、目录结构、模块在哪、参考代码、怎么找、哪个文件、路径、在哪里
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# leniu 项目导航指南
|
|
17
|
+
|
|
18
|
+
## 工程化配置项目
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
ai-engineering-init/ # 当前工作目录(本仓库根目录)
|
|
22
|
+
├── CLAUDE.md # 项目规范(核心约束必读)
|
|
23
|
+
├── AGENTS.md # Agent 配置文档
|
|
24
|
+
├── .claude/
|
|
25
|
+
│ ├── skills/ # 73 个技能模块
|
|
26
|
+
│ ├── commands/ # 10 个快速命令(/dev /crud /check 等)
|
|
27
|
+
│ ├── hooks/ # Hooks(skill-forced-eval.js 强制技能评估)
|
|
28
|
+
│ └── docs/ # 开发文档
|
|
29
|
+
└── .codex/skills/ # Codex CLI 技能同步目录
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## 后端 Java 项目
|
|
35
|
+
|
|
36
|
+
**根路径**:由用户在 `CLAUDE.md` 中配置,各安装者路径不同
|
|
37
|
+
|
|
38
|
+
### 业务模块(25 个 core-* 模块)
|
|
39
|
+
|
|
40
|
+
| 模块 | 职责 |
|
|
41
|
+
|------|------|
|
|
42
|
+
| `core-order` | 订单管理 |
|
|
43
|
+
| `core-menu` | 菜品管理 |
|
|
44
|
+
| `core-marketing` | 营销(充值/优惠) |
|
|
45
|
+
| `core-report` | 报表统计 |
|
|
46
|
+
| `core-pay` | 支付 |
|
|
47
|
+
| `core-account` | 账号管理 |
|
|
48
|
+
| `core-merchant` | 商户配置 |
|
|
49
|
+
| `core-customer` | 用户/员工 |
|
|
50
|
+
| `core-device` | 设备管理 |
|
|
51
|
+
| `core-attendance` | 考勤 |
|
|
52
|
+
| `core-kitchen` / `core-backfield` | 后场厨房 |
|
|
53
|
+
| `core-drp` | 供应链 |
|
|
54
|
+
| `core-dorm` | 宿舍管理 |
|
|
55
|
+
| `core-notice` | 通知消息 |
|
|
56
|
+
| `core-open` | 开放接口 |
|
|
57
|
+
| `core-nutrition` | 营养管理 |
|
|
58
|
+
| `core-supermarket` | 超市 |
|
|
59
|
+
| `core-common` / `core-base` | 公共基础 |
|
|
60
|
+
| `core-auth` / `core-starter` | 认证/启动 |
|
|
61
|
+
|
|
62
|
+
### 标准包结构(四层架构)
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
net.xnzn.core.{module}/
|
|
66
|
+
├── controller/
|
|
67
|
+
│ ├── web/ # Web 管理端(/api/v2/web/{module})
|
|
68
|
+
│ ├── mobile/ # 移动端(/api/v2/mobile/{module})
|
|
69
|
+
│ ├── android/ # 设备端(/api/v2/android/{module})
|
|
70
|
+
│ └── open/ # 开放接口(/api/v2/open/{module})
|
|
71
|
+
├── business/impl/ # Business 层(跨 Service 编排)
|
|
72
|
+
├── service/impl/ # Service 层(单表 CRUD、事务)
|
|
73
|
+
├── mapper/ # Mapper + XML(同目录!非 resources/mapper/)
|
|
74
|
+
├── model/ # Entity
|
|
75
|
+
├── vo/ # 响应对象
|
|
76
|
+
├── dto/ # 请求参数(含 Param)
|
|
77
|
+
├── constants/ # 枚举、常量
|
|
78
|
+
├── mq/ # 消息队列
|
|
79
|
+
└── task/ # 定时任务
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### 参考代码位置
|
|
83
|
+
|
|
84
|
+
| 需要参考 | 路径 |
|
|
85
|
+
|---------|------|
|
|
86
|
+
| Controller 写法 | `core-order/.../order/web/controller/OrderInfoWebController.java` |
|
|
87
|
+
| Business 层写法 | `core-order/.../order/web/business/impl/OrderWebBusiness.java` |
|
|
88
|
+
| Service 写法 | `core-order/.../order/common/service/impl/OrderInfoService.java` |
|
|
89
|
+
| Entity 写法 | `core-order/.../order/common/model/OrderInfo.java` |
|
|
90
|
+
| 枚举写法 | `core-order/.../order/common/constants/OrderStateEnum.java` |
|
|
91
|
+
| 配置文件 | `core-base/src/main/resources/bootstrap.yml` |
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## 前端项目
|
|
96
|
+
|
|
97
|
+
**根路径**:由用户在 `CLAUDE.md` 中配置,各安装者路径不同
|
|
98
|
+
|
|
99
|
+
### src/ 核心目录
|
|
100
|
+
|
|
101
|
+
| 目录 | 说明 | 规模 |
|
|
102
|
+
|------|------|------|
|
|
103
|
+
| `api/` | 接口定义 | 63 个文件 |
|
|
104
|
+
| `leniuview/` | 业务模块页面 | 33 个模块 |
|
|
105
|
+
| `leniu-components/` | 业务组件库 | 12 个组件包 |
|
|
106
|
+
| `components/` | 通用组件 | ~87 个 |
|
|
107
|
+
| `store/` | Vuex 状态管理 | 30+ 个模块 |
|
|
108
|
+
| `utils/` | 工具函数 | 37 个文件 |
|
|
109
|
+
|
|
110
|
+
### 常用前端文件
|
|
111
|
+
|
|
112
|
+
| 需要查找 | 路径 |
|
|
113
|
+
|---------|------|
|
|
114
|
+
| 主入口 | `src/main.js` |
|
|
115
|
+
| 权限路由守卫 | `src/permission.js` |
|
|
116
|
+
| 请求封装 | `src/utils/request.js` |
|
|
117
|
+
| Token/租户工具 | `src/utils/auth.js` |
|
|
118
|
+
| 全局工具 | `src/utils/index.js` |
|
|
119
|
+
| Vuex 根配置 | `src/store/index.js` |
|
|
120
|
+
| 构建配置 | `vue.config.js` |
|
|
121
|
+
|
|
122
|
+
### 前端业务模块(leniuview 33 个)
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
accountCenter、canteenBackcourt、cost、dashboard、dataScreen、
|
|
126
|
+
deviceMange、dormitory、marketing、menudish、orderCenter、
|
|
127
|
+
purchase、reportCenter、stock、supplyChain、attendance、
|
|
128
|
+
campus、approvalManage、noticeV2、personalV2 ...
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## 技能系统导航
|
|
134
|
+
|
|
135
|
+
**技能路径**:`.claude/skills/{技能名}/SKILL.md`
|
|
136
|
+
|
|
137
|
+
### 按开发场景选择技能
|
|
138
|
+
|
|
139
|
+
| 场景 | 技能 |
|
|
140
|
+
|------|------|
|
|
141
|
+
| 新建 CRUD 模块 | `leniu-crud-development` |
|
|
142
|
+
| API 接口设计 | `leniu-api-development` |
|
|
143
|
+
| 建表/SQL | `leniu-database-ops` |
|
|
144
|
+
| Entity/VO/DTO | `leniu-java-entity` |
|
|
145
|
+
| MyBatis/Mapper | `leniu-java-mybatis` |
|
|
146
|
+
| 异常处理 | `leniu-error-handler` |
|
|
147
|
+
| 工具类使用 | `leniu-utils-toolkit` |
|
|
148
|
+
| 注解使用 | `leniu-backend-annotations` |
|
|
149
|
+
| 代码规范 | `leniu-code-patterns` |
|
|
150
|
+
| 数据权限/双库 | `leniu-data-permission` |
|
|
151
|
+
| 定制报表 | `leniu-report-customization` |
|
|
152
|
+
| 标准报表 | `leniu-report-standard-customization` |
|
|
153
|
+
| 金额处理 | `leniu-java-amount-handling` |
|
|
154
|
+
| 并发/异步 | `leniu-java-concurrent` |
|
|
155
|
+
| 导出功能 | `leniu-java-export` |
|
|
156
|
+
| 定时任务 | `leniu-java-task` |
|
|
157
|
+
| 消息队列 | `leniu-java-mq` |
|
|
158
|
+
| Redis 缓存 | `leniu-redis-cache` |
|
|
159
|
+
| 合计行查询 | `leniu-java-total-line` |
|
|
160
|
+
| 报表查询入参 | `leniu-java-report-query-param` |
|
|
161
|
+
| 营销计费规则 | `leniu-marketing-price-rule-customizer` |
|
|
162
|
+
| 营销充值规则 | `leniu-marketing-recharge-rule-customizer` |
|
|
163
|
+
| 餐次处理 | `leniu-mealtime` |
|
|
164
|
+
| 定制开发位置 | `leniu-customization-location` |
|
|
165
|
+
| Bug 排查 | `bug-detective`(数据问题自动联动 `mysql-debug`) |
|
|
166
|
+
| 数据库查询验证 | `mysql-debug` |
|
|
167
|
+
| Codex 代码审查 | `codex-code-review` |
|
|
168
|
+
| 前端组件/权限 | `ui-pc` |
|
|
169
|
+
| 前端 Vuex | `store-pc` |
|
|
170
|
+
| 方案设计 | `leniu-brainstorm` |
|
|
171
|
+
| 架构设计 | `leniu-architecture-design` |
|
|
172
|
+
| 安全认证 | `leniu-security-guard` |
|
|
173
|
+
|
|
174
|
+
### 快速命令
|
|
175
|
+
|
|
176
|
+
| 命令 | 用途 |
|
|
177
|
+
|------|------|
|
|
178
|
+
| `/dev` | 开发新功能 |
|
|
179
|
+
| `/crud` | 快速生成 CRUD |
|
|
180
|
+
| `/check` | 代码规范检查 |
|
|
181
|
+
| `/start` | 项目快速了解 |
|
|
182
|
+
| `/progress` | 查看项目进度 |
|
|
183
|
+
| `/next` | 下一步建议 |
|
|
184
|
+
| `/add-todo` | 添加待办事项 |
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## 常用搜索模式
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
# 查找某模块的 Controller
|
|
192
|
+
Glob core-order/**/*Controller*.java
|
|
193
|
+
|
|
194
|
+
# 查找 Service 实现类
|
|
195
|
+
Glob core-order/**/impl/*Service*.java
|
|
196
|
+
|
|
197
|
+
# 查找 Mapper XML
|
|
198
|
+
Glob core-order/**/*Mapper.xml
|
|
199
|
+
|
|
200
|
+
# 查找 Entity
|
|
201
|
+
Glob core-order/**/model/*.java
|
|
202
|
+
|
|
203
|
+
# 查找某接口路由
|
|
204
|
+
Grep "/api/v2/web/order" --type java
|
|
205
|
+
|
|
206
|
+
# 查找前端某页面
|
|
207
|
+
Glob src/leniuview/**/index.vue
|
|
208
|
+
|
|
209
|
+
# 查找前端接口定义
|
|
210
|
+
Glob src/api/*.js
|
|
211
|
+
```
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: redis-cache
|
|
3
|
+
description: |
|
|
4
|
+
当需要使用Redis缓存、分布式锁、限流等功能时自动使用此Skill。包含 Redisson API、Spring Cache 注解使用规范、分布式锁实现、缓存key命名规范等。
|
|
5
|
+
|
|
6
|
+
触发场景:
|
|
7
|
+
- 使用Redis缓存数据
|
|
8
|
+
- 配置Spring Cache缓存注解
|
|
9
|
+
- 实现分布式锁
|
|
10
|
+
- 实现接口限流
|
|
11
|
+
- Redis发布订阅
|
|
12
|
+
- 缓存key设计和命名
|
|
13
|
+
- 缓存清理和刷新
|
|
14
|
+
|
|
15
|
+
触发词:Redis、缓存、Cache、@Cacheable、@CacheEvict、@CachePut、Redisson、分布式锁、RLock、限流、RateLimiter、发布订阅、缓存key、缓存过期
|
|
16
|
+
|
|
17
|
+
核心警告:
|
|
18
|
+
- @Cacheable返回值不能使用不可变集合(List.of()、Set.of()、Map.of())
|
|
19
|
+
- 分布式锁必须在finally中释放,且需注入RedissonClient
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# Redis 缓存开发指南
|
|
23
|
+
|
|
24
|
+
## 快速索引
|
|
25
|
+
|
|
26
|
+
| 功能 | 工具类/注解 | 说明 |
|
|
27
|
+
|------|-------------|------|
|
|
28
|
+
| 对象缓存 | `RedissonClient` / `[你的RedisUtils]` | 基于 Redisson |
|
|
29
|
+
| Spring Cache | `@Cacheable/@CachePut/@CacheEvict` | 声明式缓存 |
|
|
30
|
+
| 分布式锁 | `redissonClient.getLock()` | 需注入 RedissonClient |
|
|
31
|
+
| 限流控制 | Redisson `RRateLimiter` | 基于 Redisson |
|
|
32
|
+
| 原子操作 | Redisson `RAtomicLong` | 原子递增/递减 |
|
|
33
|
+
| 发布订阅 | Redisson `RTopic` | 消息通信 |
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 一、Redisson 基础操作
|
|
38
|
+
|
|
39
|
+
### 1.1 基础缓存操作
|
|
40
|
+
|
|
41
|
+
```java
|
|
42
|
+
import org.redisson.api.RedissonClient;
|
|
43
|
+
import org.redisson.api.RBucket;
|
|
44
|
+
|
|
45
|
+
@Service
|
|
46
|
+
@RequiredArgsConstructor
|
|
47
|
+
public class CacheService {
|
|
48
|
+
|
|
49
|
+
private final RedissonClient redissonClient;
|
|
50
|
+
|
|
51
|
+
// 设置缓存
|
|
52
|
+
public void set(String key, Object value, Duration ttl) {
|
|
53
|
+
RBucket<Object> bucket = redissonClient.getBucket(key);
|
|
54
|
+
bucket.set(value, ttl);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// 获取缓存
|
|
58
|
+
public <T> T get(String key) {
|
|
59
|
+
RBucket<T> bucket = redissonClient.getBucket(key);
|
|
60
|
+
return bucket.get();
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// 删除缓存
|
|
64
|
+
public boolean delete(String key) {
|
|
65
|
+
return redissonClient.getBucket(key).delete();
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// 判断是否存在
|
|
69
|
+
public boolean exists(String key) {
|
|
70
|
+
return redissonClient.getBucket(key).isExists();
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// 不存在时设置(原子操作)
|
|
74
|
+
public boolean setIfAbsent(String key, Object value, Duration ttl) {
|
|
75
|
+
RBucket<Object> bucket = redissonClient.getBucket(key);
|
|
76
|
+
return bucket.trySet(value, ttl);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### 1.2 集合操作
|
|
82
|
+
|
|
83
|
+
```java
|
|
84
|
+
// List
|
|
85
|
+
RList<String> list = redissonClient.getList("myList");
|
|
86
|
+
list.addAll(dataList);
|
|
87
|
+
List<String> result = list.readAll();
|
|
88
|
+
|
|
89
|
+
// Set
|
|
90
|
+
RSet<String> set = redissonClient.getSet("mySet");
|
|
91
|
+
set.addAll(dataSet);
|
|
92
|
+
Set<String> result = set.readAll();
|
|
93
|
+
|
|
94
|
+
// Map
|
|
95
|
+
RMap<String, Object> map = redissonClient.getMap("myMap");
|
|
96
|
+
map.putAll(dataMap);
|
|
97
|
+
map.put("key3", "value3");
|
|
98
|
+
Object value = map.get("key1");
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### 1.3 发布订阅
|
|
102
|
+
|
|
103
|
+
```java
|
|
104
|
+
// 发布消息
|
|
105
|
+
RTopic topic = redissonClient.getTopic("notification:channel");
|
|
106
|
+
topic.publish(messageObj);
|
|
107
|
+
|
|
108
|
+
// 订阅消息
|
|
109
|
+
RTopic topic = redissonClient.getTopic("notification:channel");
|
|
110
|
+
topic.addListener(MessageDTO.class, (channel, msg) -> {
|
|
111
|
+
// 处理消息
|
|
112
|
+
});
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### 1.4 限流控制
|
|
116
|
+
|
|
117
|
+
```java
|
|
118
|
+
import org.redisson.api.RRateLimiter;
|
|
119
|
+
import org.redisson.api.RateType;
|
|
120
|
+
import org.redisson.api.RateIntervalUnit;
|
|
121
|
+
|
|
122
|
+
RRateLimiter limiter = redissonClient.getRateLimiter("api:limit:user:" + userId);
|
|
123
|
+
// 每10秒最多100个请求
|
|
124
|
+
limiter.trySetRate(RateType.OVERALL, 100, 10, RateIntervalUnit.SECONDS);
|
|
125
|
+
|
|
126
|
+
if (!limiter.tryAcquire()) {
|
|
127
|
+
throw new [你的异常类]("请求过于频繁");
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### 1.5 原子操作
|
|
132
|
+
|
|
133
|
+
```java
|
|
134
|
+
RAtomicLong counter = redissonClient.getAtomicLong("counter:view");
|
|
135
|
+
counter.set(0L);
|
|
136
|
+
long value = counter.get();
|
|
137
|
+
long newVal = counter.incrementAndGet();
|
|
138
|
+
long newVal = counter.decrementAndGet();
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## 二、Spring Cache 注解使用规范
|
|
144
|
+
|
|
145
|
+
### @Cacheable - 查询缓存
|
|
146
|
+
|
|
147
|
+
```java
|
|
148
|
+
@Cacheable(value = "dictData", key = "#dictType")
|
|
149
|
+
@Override
|
|
150
|
+
public List<DictDataVo> listDictDataByType(String dictType) {
|
|
151
|
+
if (dictType == null || dictType.isBlank()) {
|
|
152
|
+
return Collections.emptyList();
|
|
153
|
+
}
|
|
154
|
+
List<DictData> dictDataList = dictDataMapper.selectByType(dictType);
|
|
155
|
+
if (dictDataList.isEmpty()) {
|
|
156
|
+
return Collections.emptyList(); // 返回空列表防止缓存穿透
|
|
157
|
+
}
|
|
158
|
+
return dictDataList.stream()
|
|
159
|
+
.map(d -> BeanUtil.copyProperties(d, DictDataVo.class))
|
|
160
|
+
.toList();
|
|
161
|
+
}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### @CachePut / @CacheEvict
|
|
165
|
+
|
|
166
|
+
```java
|
|
167
|
+
@CachePut(value = "dictData", key = "#bo.dictType")
|
|
168
|
+
public List<DictDataVo> insertDictType(DictTypeBo bo) { ... }
|
|
169
|
+
|
|
170
|
+
@CacheEvict(value = "dictData", key = "#dictType")
|
|
171
|
+
public void deleteDictType(String dictType) { ... }
|
|
172
|
+
|
|
173
|
+
@CacheEvict(value = "dictData", allEntries = true)
|
|
174
|
+
public void clearAllDictCache() { ... }
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### 返回值禁止使用不可变集合
|
|
178
|
+
|
|
179
|
+
```java
|
|
180
|
+
// ❌ 禁止! @Cacheable 返回值序列化失败
|
|
181
|
+
return List.of(data1, data2);
|
|
182
|
+
return Set.of("admin", "user");
|
|
183
|
+
return Map.of("key1", "value1");
|
|
184
|
+
|
|
185
|
+
// ✅ 正确:使用可变集合
|
|
186
|
+
List<DictDataVo> result = new ArrayList<>();
|
|
187
|
+
result.add(data1);
|
|
188
|
+
return result;
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## 三、CacheNames 命名规范
|
|
194
|
+
|
|
195
|
+
### 推荐格式
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
cacheNames#ttl#maxIdleTime#maxSize
|
|
199
|
+
- ttl: 过期时间(0=不过期,默认0)
|
|
200
|
+
- maxIdleTime: 最大空闲时间(0=不检测,默认0)
|
|
201
|
+
- maxSize: 最大条数(0=无限,默认0)
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
```java
|
|
205
|
+
"test#60s" // 60秒过期
|
|
206
|
+
"test#0#60s" // 不过期,60秒空闲清理
|
|
207
|
+
"test#0#1m#1000" // 不过期,1分钟空闲,最大1000条
|
|
208
|
+
"test#1h#0#500" // 1小时过期,最大500条
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### 常量定义示例
|
|
212
|
+
|
|
213
|
+
```java
|
|
214
|
+
public interface CacheNames {
|
|
215
|
+
String SYS_CONFIG = "sys_config";
|
|
216
|
+
String SYS_DICT = "sys_dict";
|
|
217
|
+
String SYS_USER_NAME = "sys_user_name#30d";
|
|
218
|
+
String SYS_DEPT = "sys_dept#30d";
|
|
219
|
+
}
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## 四、分布式锁
|
|
225
|
+
|
|
226
|
+
> 直接注入 `RedissonClient` 使用。
|
|
227
|
+
|
|
228
|
+
```java
|
|
229
|
+
@Service
|
|
230
|
+
@RequiredArgsConstructor
|
|
231
|
+
public class OrderServiceImpl {
|
|
232
|
+
|
|
233
|
+
private final RedissonClient redissonClient;
|
|
234
|
+
|
|
235
|
+
public void submitOrder(OrderBo orderBo) {
|
|
236
|
+
String lockKey = "lock:submit:order:" + orderBo.getUserId();
|
|
237
|
+
RLock lock = redissonClient.getLock(lockKey);
|
|
238
|
+
|
|
239
|
+
try {
|
|
240
|
+
boolean locked = lock.tryLock(3, 10, TimeUnit.SECONDS);
|
|
241
|
+
if (!locked) {
|
|
242
|
+
throw new [你的异常类]("请勿重复提交订单");
|
|
243
|
+
}
|
|
244
|
+
try {
|
|
245
|
+
orderMapper.insert(orderBo);
|
|
246
|
+
} finally {
|
|
247
|
+
if (lock.isLocked() && lock.isHeldByCurrentThread()) {
|
|
248
|
+
lock.unlock(); // 必须在 finally 中释放
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
} catch (InterruptedException e) {
|
|
252
|
+
Thread.currentThread().interrupt();
|
|
253
|
+
throw new [你的异常类]("订单提交被中断");
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## 五、缓存 Key 命名规范
|
|
262
|
+
|
|
263
|
+
```
|
|
264
|
+
格式:{业务模块}:{功能}:{具体标识}
|
|
265
|
+
|
|
266
|
+
示例:
|
|
267
|
+
user:info:123 user:roles:123 user:permissions:123
|
|
268
|
+
dict:data:sys_user_sex order:info:20240101001 order:status:20240101001
|
|
269
|
+
lock:order:20240101001 lock:stock:123 lock:submit:order:456
|
|
270
|
+
limit:api:user:123 limit:sms:18888888888
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## 六、注意事项速查
|
|
276
|
+
|
|
277
|
+
1. **@Cacheable 返回值不能使用不可变集合**(List.of()、Set.of()、Map.of())
|
|
278
|
+
2. **分布式锁必须在 finally 中释放**
|
|
279
|
+
3. **返回空列表而不是 null**,防止缓存穿透
|
|
280
|
+
4. **设置随机过期时间偏移**,避免缓存雪崩
|
|
281
|
+
5. **热点数据用分布式锁 + 双重检查**,防止缓存击穿
|
|
282
|
+
6. **keys() 模式匹配要谨慎**,生产环境避免大范围扫描
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Redis 监听机制
|
|
2
|
+
|
|
3
|
+
## 过期/删除监听器
|
|
4
|
+
|
|
5
|
+
```java
|
|
6
|
+
import org.redisson.api.listener.ExpiredObjectListener;
|
|
7
|
+
import org.redisson.api.listener.DeletedObjectListener;
|
|
8
|
+
|
|
9
|
+
// 注册过期监听器(需要开启Redis的notify-keyspace-events配置)
|
|
10
|
+
RedisUtils.addObjectListener("user:123", (ExpiredObjectListener) name -> {
|
|
11
|
+
log.info("缓存已过期: {}", name);
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
// 注册删除监听器
|
|
15
|
+
RedisUtils.addObjectListener("user:123", (DeletedObjectListener) name -> {
|
|
16
|
+
log.info("缓存已删除: {}", name);
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
// 注册List/Set/Map监听器
|
|
20
|
+
RedisUtils.addListListener("myList", (ExpiredObjectListener) name -> { ... });
|
|
21
|
+
RedisUtils.addSetListener("mySet", (DeletedObjectListener) name -> { ... });
|
|
22
|
+
RedisUtils.addMapListener("myMap", (ExpiredObjectListener) name -> { ... });
|
|
23
|
+
```
|