create-dwy 0.11.0 → 0.12.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.
Files changed (93) hide show
  1. package/package.json +1 -1
  2. package/src/sync.js +40 -44
  3. package/templates/claude-global/rules/{dwy-android-core.md → Android/dwy-android-core.md} +0 -1
  4. package/templates/claude-global/rules/{dwy-flutter-core.md → Flutter/dwy-flutter-core.md} +0 -1
  5. package/templates/claude-global/rules/{dwy-flutter-network.md → Flutter/dwy-flutter-network.md} +0 -1
  6. package/templates/claude-global/rules/{dwy-flutter-router.md → Flutter/dwy-flutter-router.md} +0 -1
  7. package/templates/claude-global/rules/{dwy-flutter-testing.md → Flutter/dwy-flutter-testing.md} +0 -1
  8. package/templates/claude-global/rules/{dwy-python-backend.md → Python/dwy-python-backend.md} +0 -1
  9. package/templates/claude-global/rules/{dwy-python-core.md → Python/dwy-python-core.md} +0 -1
  10. package/templates/claude-global/rules/{dwy-python-testing.md → Python/dwy-python-testing.md} +0 -1
  11. package/templates/claude-global/rules/{dwy-vue-core.md → Vue/dwy-vue-core.md} +0 -1
  12. package/templates/claude-global/rules/{dwy-vue-pinia.md → Vue/dwy-vue-pinia.md} +0 -1
  13. package/templates/claude-global/rules/{dwy-vue-testing.md → Vue/dwy-vue-testing.md} +0 -1
  14. package/templates/claude-global/rules/{dwy-tdd-development.md → /345/274/200/345/217/221/346/265/201/347/250/213/dwy-tdd-development.md} +0 -1
  15. package/templates/claude-global/rules/{dwy-db-migration.md → /346/225/260/346/215/256/345/272/223/dwy-db-migration.md} +0 -1
  16. package/templates/claude-global/rules/{dwy-postgres.md → /346/225/260/346/215/256/345/272/223/dwy-postgres.md} +0 -1
  17. package/templates/claude-global/rules/{dwy-redis.md → /346/225/260/346/215/256/345/272/223/dwy-redis.md} +0 -1
  18. package/templates/claude-global/skills/{dwy-eapi → /345/237/272/347/241/200/345/272/223/dwy-eapi}/SKILL.md +0 -1
  19. package/templates/claude-global/skills/{dwy-ekit → /345/237/272/347/241/200/345/272/223/dwy-ekit}/SKILL.md +0 -1
  20. package/templates/claude-global/skills/{dwy-eui → /345/237/272/347/241/200/345/272/223/dwy-eui}/SKILL.md +0 -1
  21. package/templates/claude-global/skills/{dwy-pentest → /345/256/211/345/205/250/dwy-pentest}/SKILL.md +0 -1
  22. package/templates/claude-global/skills/{dwy-dev-qa → /345/274/200/345/217/221/346/265/201/347/250/213/dwy-dev-qa}/SKILL.md +0 -1
  23. package/templates/claude-global/skills/{dwy-git-commit → /345/274/200/345/217/221/346/265/201/347/250/213/dwy-git-commit}/SKILL.md +0 -1
  24. package/templates/claude-global/skills/{dwy-dolphindb → /346/225/260/346/215/256/345/272/223/dwy-dolphindb}/SKILL.md +0 -1
  25. package/templates/claude-global/skills/{dwy-fullstack-scaffold → /350/204/232/346/211/213/346/236/266/dwy-fullstack-scaffold}/SKILL.md +0 -1
  26. package/templates/claude-global/skills/{dwy-tech-stack → /350/204/232/346/211/213/346/236/266/dwy-tech-stack}/SKILL.md +0 -1
  27. package/templates/claude-global/skills/{dwy-cibuildwheel → /350/277/220/347/273/264/345/217/221/345/270/203/dwy-cibuildwheel}/SKILL.md +0 -1
  28. package/templates/claude-global/skills/{dwy-deploy-audit → /350/277/220/347/273/264/345/217/221/345/270/203/dwy-deploy-audit}/SKILL.md +0 -1
  29. package/templates/claude-global/skills/{dwy-docker → /350/277/220/347/273/264/345/217/221/345/270/203/dwy-docker}/SKILL.md +0 -1
  30. package/templates/claude-global/skills/{dwy-mirror-source → /350/277/220/347/273/264/345/217/221/345/270/203/dwy-mirror-source}/SKILL.md +0 -1
  31. package/templates/claude-global/skills/{dwy-publish → /350/277/220/347/273/264/345/217/221/345/270/203/dwy-publish}/SKILL.md +0 -1
  32. /package/templates/claude-global/skills/{dwy-eapi/references/tasks-integration-guide.md → /345/237/272/347/241/200/345/272/223/dwy-eapi/references/tasks-integration-guide.md"} +0 -0
  33. /package/templates/claude-global/skills/{dwy-eui/references/eui-design-guide.md → /345/237/272/347/241/200/345/272/223/dwy-eui/references/eui-design-guide.md"} +0 -0
  34. /package/templates/claude-global/skills/{dwy-eui/references/eui-integration-guide.md → /345/237/272/347/241/200/345/272/223/dwy-eui/references/eui-integration-guide.md"} +0 -0
  35. /package/templates/claude-global/skills/{dwy-eui/references/eui-landing-design-guide.md → /345/237/272/347/241/200/345/272/223/dwy-eui/references/eui-landing-design-guide.md"} +0 -0
  36. /package/templates/claude-global/skills/{dwy-pentest/scripts/.python-version → /345/256/211/345/205/250/dwy-pentest/scripts/.python-version"} +0 -0
  37. /package/templates/claude-global/skills/{dwy-pentest/scripts/lib/__init__.py → /345/256/211/345/205/250/dwy-pentest/scripts/lib/__init__.py"} +0 -0
  38. /package/templates/claude-global/skills/{dwy-pentest/scripts/lib/__pycache__/__init__.cpython-311.pyc → /345/256/211/345/205/250/dwy-pentest/scripts/lib/__pycache__/__init__.cpython-311.pyc"} +0 -0
  39. /package/templates/claude-global/skills/{dwy-pentest/scripts/lib/__pycache__/config.cpython-311.pyc → /345/256/211/345/205/250/dwy-pentest/scripts/lib/__pycache__/config.cpython-311.pyc"} +0 -0
  40. /package/templates/claude-global/skills/{dwy-pentest/scripts/lib/__pycache__/executor.cpython-311.pyc → /345/256/211/345/205/250/dwy-pentest/scripts/lib/__pycache__/executor.cpython-311.pyc"} +0 -0
  41. /package/templates/claude-global/skills/{dwy-pentest/scripts/lib/__pycache__/severity.cpython-311.pyc → /345/256/211/345/205/250/dwy-pentest/scripts/lib/__pycache__/severity.cpython-311.pyc"} +0 -0
  42. /package/templates/claude-global/skills/{dwy-pentest/scripts/lib/__pycache__/validator.cpython-311.pyc → /345/256/211/345/205/250/dwy-pentest/scripts/lib/__pycache__/validator.cpython-311.pyc"} +0 -0
  43. /package/templates/claude-global/skills/{dwy-pentest/scripts/lib/config.py → /345/256/211/345/205/250/dwy-pentest/scripts/lib/config.py"} +0 -0
  44. /package/templates/claude-global/skills/{dwy-pentest/scripts/lib/executor.py → /345/256/211/345/205/250/dwy-pentest/scripts/lib/executor.py"} +0 -0
  45. /package/templates/claude-global/skills/{dwy-pentest/scripts/lib/severity.py → /345/256/211/345/205/250/dwy-pentest/scripts/lib/severity.py"} +0 -0
  46. /package/templates/claude-global/skills/{dwy-pentest/scripts/lib/validator.py → /345/256/211/345/205/250/dwy-pentest/scripts/lib/validator.py"} +0 -0
  47. /package/templates/claude-global/skills/{dwy-pentest/scripts/pentest_auth.py → /345/256/211/345/205/250/dwy-pentest/scripts/pentest_auth.py"} +0 -0
  48. /package/templates/claude-global/skills/{dwy-pentest/scripts/pentest_recon.py → /345/256/211/345/205/250/dwy-pentest/scripts/pentest_recon.py"} +0 -0
  49. /package/templates/claude-global/skills/{dwy-pentest/scripts/pentest_report.py → /345/256/211/345/205/250/dwy-pentest/scripts/pentest_report.py"} +0 -0
  50. /package/templates/claude-global/skills/{dwy-pentest/scripts/pentest_scan.py → /345/256/211/345/205/250/dwy-pentest/scripts/pentest_scan.py"} +0 -0
  51. /package/templates/claude-global/skills/{dwy-pentest/scripts/pentest_ssl.py → /345/256/211/345/205/250/dwy-pentest/scripts/pentest_ssl.py"} +0 -0
  52. /package/templates/claude-global/skills/{dwy-pentest/scripts/pentest_vuln.py → /345/256/211/345/205/250/dwy-pentest/scripts/pentest_vuln.py"} +0 -0
  53. /package/templates/claude-global/skills/{dwy-pentest/scripts/pentest_web.py → /345/256/211/345/205/250/dwy-pentest/scripts/pentest_web.py"} +0 -0
  54. /package/templates/claude-global/skills/{dwy-pentest/scripts/pyproject.toml → /345/256/211/345/205/250/dwy-pentest/scripts/pyproject.toml"} +0 -0
  55. /package/templates/claude-global/skills/{dwy-pentest/scripts/setup_tools.sh → /345/256/211/345/205/250/dwy-pentest/scripts/setup_tools.sh"} +0 -0
  56. /package/templates/claude-global/skills/{dwy-pentest/scripts/uv.lock → /345/256/211/345/205/250/dwy-pentest/scripts/uv.lock"} +0 -0
  57. /package/templates/claude-global/skills/{dwy-dolphindb/references/create-database-table.md → /346/225/260/346/215/256/345/272/223/dwy-dolphindb/references/create-database-table.md"} +0 -0
  58. /package/templates/claude-global/skills/{dwy-dolphindb/references/crud-operations.md → /346/225/260/346/215/256/345/272/223/dwy-dolphindb/references/crud-operations.md"} +0 -0
  59. /package/templates/claude-global/skills/{dwy-dolphindb/references/data-import.md → /346/225/260/346/215/256/345/272/223/dwy-dolphindb/references/data-import.md"} +0 -0
  60. /package/templates/claude-global/skills/{dwy-dolphindb/references/docker-deployment.md → /346/225/260/346/215/256/345/272/223/dwy-dolphindb/references/docker-deployment.md"} +0 -0
  61. /package/templates/claude-global/skills/{dwy-dolphindb/references/performance-tuning.md → /346/225/260/346/215/256/345/272/223/dwy-dolphindb/references/performance-tuning.md"} +0 -0
  62. /package/templates/claude-global/skills/{dwy-dolphindb/references/pitfalls-and-best-practices.md → /346/225/260/346/215/256/345/272/223/dwy-dolphindb/references/pitfalls-and-best-practices.md"} +0 -0
  63. /package/templates/claude-global/skills/{dwy-dolphindb/references/python-api.md → /346/225/260/346/215/256/345/272/223/dwy-dolphindb/references/python-api.md"} +0 -0
  64. /package/templates/claude-global/skills/{dwy-dolphindb/references/setup-and-connection.md → /346/225/260/346/215/256/345/272/223/dwy-dolphindb/references/setup-and-connection.md"} +0 -0
  65. /package/templates/claude-global/skills/{dwy-dolphindb/references/sources.md → /346/225/260/346/215/256/345/272/223/dwy-dolphindb/references/sources.md"} +0 -0
  66. /package/templates/claude-global/skills/{dwy-dolphindb/references/sql-batch-compute.md → /346/225/260/346/215/256/345/272/223/dwy-dolphindb/references/sql-batch-compute.md"} +0 -0
  67. /package/templates/claude-global/skills/{dwy-cibuildwheel/references/release-workflow-template.yml → /350/277/220/347/273/264/345/217/221/345/270/203/dwy-cibuildwheel/references/release-workflow-template.yml"} +0 -0
  68. /package/templates/claude-global/skills/{dwy-deploy-audit/references/checks-data.md → /350/277/220/347/273/264/345/217/221/345/270/203/dwy-deploy-audit/references/checks-data.md"} +0 -0
  69. /package/templates/claude-global/skills/{dwy-deploy-audit/references/checks-network.md → /350/277/220/347/273/264/345/217/221/345/270/203/dwy-deploy-audit/references/checks-network.md"} +0 -0
  70. /package/templates/claude-global/skills/{dwy-deploy-audit/references/checks-runtime.md → /350/277/220/347/273/264/345/217/221/345/270/203/dwy-deploy-audit/references/checks-runtime.md"} +0 -0
  71. /package/templates/claude-global/skills/{dwy-deploy-audit/scripts/check_base.sh → /350/277/220/347/273/264/345/217/221/345/270/203/dwy-deploy-audit/scripts/check_base.sh"} +0 -0
  72. /package/templates/claude-global/skills/{dwy-deploy-audit/scripts/check_capacity.sh → /350/277/220/347/273/264/345/217/221/345/270/203/dwy-deploy-audit/scripts/check_capacity.sh"} +0 -0
  73. /package/templates/claude-global/skills/{dwy-deploy-audit/scripts/check_db.sh → /350/277/220/347/273/264/345/217/221/345/270/203/dwy-deploy-audit/scripts/check_db.sh"} +0 -0
  74. /package/templates/claude-global/skills/{dwy-deploy-audit/scripts/check_docker.sh → /350/277/220/347/273/264/345/217/221/345/270/203/dwy-deploy-audit/scripts/check_docker.sh"} +0 -0
  75. /package/templates/claude-global/skills/{dwy-deploy-audit/scripts/check_env.sh → /350/277/220/347/273/264/345/217/221/345/270/203/dwy-deploy-audit/scripts/check_env.sh"} +0 -0
  76. /package/templates/claude-global/skills/{dwy-deploy-audit/scripts/check_https.sh → /350/277/220/347/273/264/345/217/221/345/270/203/dwy-deploy-audit/scripts/check_https.sh"} +0 -0
  77. /package/templates/claude-global/skills/{dwy-deploy-audit/scripts/check_logs.sh → /350/277/220/347/273/264/345/217/221/345/270/203/dwy-deploy-audit/scripts/check_logs.sh"} +0 -0
  78. /package/templates/claude-global/skills/{dwy-deploy-audit/scripts/check_nginx.sh → /350/277/220/347/273/264/345/217/221/345/270/203/dwy-deploy-audit/scripts/check_nginx.sh"} +0 -0
  79. /package/templates/claude-global/skills/{dwy-deploy-audit/scripts/check_resilience.sh → /350/277/220/347/273/264/345/217/221/345/270/203/dwy-deploy-audit/scripts/check_resilience.sh"} +0 -0
  80. /package/templates/claude-global/skills/{dwy-deploy-audit/scripts/check_secrets.sh → /350/277/220/347/273/264/345/217/221/345/270/203/dwy-deploy-audit/scripts/check_secrets.sh"} +0 -0
  81. /package/templates/claude-global/skills/{dwy-deploy-audit/scripts/check_services.sh → /350/277/220/347/273/264/345/217/221/345/270/203/dwy-deploy-audit/scripts/check_services.sh"} +0 -0
  82. /package/templates/claude-global/skills/{dwy-deploy-audit/scripts/check_ssh.sh → /350/277/220/347/273/264/345/217/221/345/270/203/dwy-deploy-audit/scripts/check_ssh.sh"} +0 -0
  83. /package/templates/claude-global/skills/{dwy-deploy-audit/scripts/run_all.sh → /350/277/220/347/273/264/345/217/221/345/270/203/dwy-deploy-audit/scripts/run_all.sh"} +0 -0
  84. /package/templates/claude-global/skills/{dwy-docker/references/ask-templates.md → /350/277/220/347/273/264/345/217/221/345/270/203/dwy-docker/references/ask-templates.md"} +0 -0
  85. /package/templates/claude-global/skills/{dwy-docker/references/templates.md → /350/277/220/347/273/264/345/217/221/345/270/203/dwy-docker/references/templates.md"} +0 -0
  86. /package/templates/claude-global/skills/{dwy-docker/references/version-rules.md → /350/277/220/347/273/264/345/217/221/345/270/203/dwy-docker/references/version-rules.md"} +0 -0
  87. /package/templates/claude-global/skills/{dwy-docker/scripts/query_dockerhub.py → /350/277/220/347/273/264/345/217/221/345/270/203/dwy-docker/scripts/query_dockerhub.py"} +0 -0
  88. /package/templates/claude-global/skills/{dwy-docker/scripts/scan_images.sh → /350/277/220/347/273/264/345/217/221/345/270/203/dwy-docker/scripts/scan_images.sh"} +0 -0
  89. /package/templates/claude-global/skills/{dwy-mirror-source/references/dockerfile-snippets.md → /350/277/220/347/273/264/345/217/221/345/270/203/dwy-mirror-source/references/dockerfile-snippets.md"} +0 -0
  90. /package/templates/claude-global/skills/{dwy-mirror-source/references/mirror-providers.md → /350/277/220/347/273/264/345/217/221/345/270/203/dwy-mirror-source/references/mirror-providers.md"} +0 -0
  91. /package/templates/claude-global/skills/{dwy-mirror-source/scripts/__pycache__/check_mirrors.cpython-313.pyc → /350/277/220/347/273/264/345/217/221/345/270/203/dwy-mirror-source/scripts/__pycache__/check_mirrors.cpython-313.pyc"} +0 -0
  92. /package/templates/claude-global/skills/{dwy-mirror-source/scripts/apply_mirrors.py → /350/277/220/347/273/264/345/217/221/345/270/203/dwy-mirror-source/scripts/apply_mirrors.py"} +0 -0
  93. /package/templates/claude-global/skills/{dwy-mirror-source/scripts/check_mirrors.py → /350/277/220/347/273/264/345/217/221/345/270/203/dwy-mirror-source/scripts/check_mirrors.py"} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-dwy",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "项目脚手架与 Claude Code 配置同步工具",
5
5
  "type": "module",
6
6
  "bin": {
package/src/sync.js CHANGED
@@ -12,21 +12,16 @@ const CATEGORIES = [
12
12
  { key: 'hooks', label: 'Hooks' },
13
13
  ]
14
14
 
15
- function extractFrontmatter(content) {
15
+ function extractDescription(content) {
16
16
  const match = content.match(/^---\s*\n([\s\S]*?)\n---/)
17
- if (!match) return { description: '', category: '其他' }
17
+ if (!match) return ''
18
18
  const lines = match[1].split('\n')
19
- const result = { description: '', category: '其他' }
20
19
  let i = 0
21
20
  while (i < lines.length) {
22
21
  const kv = lines[i].match(/^([A-Za-z_][A-Za-z0-9_]*)\s*:\s*(.*)$/)
23
22
  if (!kv) { i++; continue }
24
- const [, key, value] = kv
25
- if (key === 'category') {
26
- result.category = value.trim().replace(/^["']|["']$/g, '') || '其他'
27
- i++
28
- } else if (key === 'description') {
29
- const trimmed = value.trim()
23
+ if (kv[1] === 'description') {
24
+ const trimmed = kv[2].trim()
30
25
  if (trimmed === '>' || trimmed === '|') {
31
26
  i++
32
27
  const parts = []
@@ -34,38 +29,37 @@ function extractFrontmatter(content) {
34
29
  parts.push(lines[i].trim())
35
30
  i++
36
31
  }
37
- result.description = parts.filter(Boolean).join(' ')
38
- } else {
39
- result.description = trimmed.replace(/^["']|["']$/g, '')
40
- i++
32
+ return parts.filter(Boolean).join(' ')
41
33
  }
42
- } else {
43
- i++
34
+ return trimmed.replace(/^["']|["']$/g, '')
44
35
  }
36
+ i++
45
37
  }
46
- return result
38
+ return ''
47
39
  }
48
40
 
49
41
  async function scanSkills(sourceDir) {
50
42
  const skillsDir = path.join(sourceDir, 'skills')
51
43
  if (!await fs.pathExists(skillsDir)) return []
52
44
 
53
- const entries = await fs.readdir(skillsDir, { withFileTypes: true })
54
45
  const skills = []
55
- for (const entry of entries) {
56
- if (!entry.isDirectory()) continue
57
- const skillPath = path.join(skillsDir, entry.name)
58
- const skillMd = path.join(skillPath, 'SKILL.md')
59
- if (!await fs.pathExists(skillMd)) continue
60
- const content = await fs.readFile(skillMd, 'utf-8')
61
- const fm = extractFrontmatter(content)
62
- skills.push({
63
- name: entry.name,
64
- description: fm.description || '(无描述)',
65
- category: fm.category,
66
- sourcePath: skillPath,
67
- type: 'skill',
68
- })
46
+ for (const cat of await fs.readdir(skillsDir, { withFileTypes: true })) {
47
+ if (!cat.isDirectory()) continue
48
+ const catDir = path.join(skillsDir, cat.name)
49
+ for (const entry of await fs.readdir(catDir, { withFileTypes: true })) {
50
+ if (!entry.isDirectory()) continue
51
+ const skillPath = path.join(catDir, entry.name)
52
+ const skillMd = path.join(skillPath, 'SKILL.md')
53
+ if (!await fs.pathExists(skillMd)) continue
54
+ const content = await fs.readFile(skillMd, 'utf-8')
55
+ skills.push({
56
+ name: entry.name,
57
+ description: extractDescription(content) || '(无描述)',
58
+ category: cat.name,
59
+ sourcePath: skillPath,
60
+ type: 'skill',
61
+ })
62
+ }
69
63
  }
70
64
  return skills.sort((a, b) => a.name.localeCompare(b.name))
71
65
  }
@@ -74,20 +68,22 @@ async function scanRules(sourceDir) {
74
68
  const rulesDir = path.join(sourceDir, 'rules')
75
69
  if (!await fs.pathExists(rulesDir)) return []
76
70
 
77
- const entries = await fs.readdir(rulesDir, { withFileTypes: true })
78
71
  const rules = []
79
- for (const entry of entries) {
80
- if (!entry.isFile() || !entry.name.endsWith('.md')) continue
81
- const rulePath = path.join(rulesDir, entry.name)
82
- const content = await fs.readFile(rulePath, 'utf-8')
83
- const fm = extractFrontmatter(content)
84
- rules.push({
85
- name: entry.name,
86
- description: fm.description || '(无描述)',
87
- category: fm.category,
88
- sourcePath: rulePath,
89
- type: 'rule',
90
- })
72
+ for (const cat of await fs.readdir(rulesDir, { withFileTypes: true })) {
73
+ if (!cat.isDirectory()) continue
74
+ const catDir = path.join(rulesDir, cat.name)
75
+ for (const entry of await fs.readdir(catDir, { withFileTypes: true })) {
76
+ if (!entry.isFile() || !entry.name.endsWith('.md')) continue
77
+ const rulePath = path.join(catDir, entry.name)
78
+ const content = await fs.readFile(rulePath, 'utf-8')
79
+ rules.push({
80
+ name: entry.name,
81
+ description: extractDescription(content) || '(无描述)',
82
+ category: cat.name,
83
+ sourcePath: rulePath,
84
+ type: 'rule',
85
+ })
86
+ }
91
87
  }
92
88
  return rules.sort((a, b) => a.name.localeCompare(b.name))
93
89
  }
@@ -1,6 +1,5 @@
1
1
  ---
2
2
  description: Android (Java + Kotlin + XML) 代码注释与基础风格规范
3
- category: Android
4
3
  paths:
5
4
  - "**/*.java"
6
5
  - "**/*.kt"
@@ -1,6 +1,5 @@
1
1
  ---
2
2
  description: Flutter + Dart 基础风格(结构/Riverpod/命名/模型/Dart 语言/Lint)
3
- category: Flutter
4
3
  paths:
5
4
  - "**/*.dart"
6
5
  - "**/pubspec.yaml"
@@ -1,6 +1,5 @@
1
1
  ---
2
2
  description: Flutter Dio 网络层 + 拦截器 + 错误处理
3
- category: Flutter
4
3
  paths:
5
4
  - "**/core/network/**/*.dart"
6
5
  - "**/dio_client.dart"
@@ -1,6 +1,5 @@
1
1
  ---
2
2
  description: Flutter GoRouter 路由规范
3
- category: Flutter
4
3
  paths:
5
4
  - "**/app.dart"
6
5
  - "**/router/**/*.dart"
@@ -1,6 +1,5 @@
1
1
  ---
2
2
  description: Flutter / Dart 测试规范(mocktail + ProviderContainer + Widget 测试)
3
- category: Flutter
4
3
  paths:
5
4
  - "**/test/**/*.dart"
6
5
  - "**/*_test.dart"
@@ -1,6 +1,5 @@
1
1
  ---
2
2
  description: Python 后端(FastAPI + SQLAlchemy)应用层开发规范 — 路由 / Schema / 依赖注入 / ORM / 安全编码 / 注入防护 / 限流 / 审计 / 违规检测清单
3
- category: Python
4
3
  paths:
5
4
  - "**/*.py"
6
5
  ---
@@ -1,6 +1,5 @@
1
1
  ---
2
2
  description: Python 通用代码规范
3
- category: Python
4
3
  paths:
5
4
  - "**/*.py"
6
5
  - "**/pyproject.toml"
@@ -1,6 +1,5 @@
1
1
  ---
2
2
  description: Python pytest 测试规范(目录组织、fixture、异步、AAA 结构)
3
- category: Python
4
3
  paths:
5
4
  - "**/tests/**/*.py"
6
5
  - "**/test_*.py"
@@ -1,6 +1,5 @@
1
1
  ---
2
2
  description: Vue 3 + TS + Vite + Tailwind 应用层规范(强制使用 eui/ekit、业务聚合结构、组件 / TS / 路由 / API / 模板 / 样式 / 错误处理 / 注释)
3
- category: Vue
4
3
  paths:
5
4
  - "**/*.vue"
6
5
  - "**/*.ts"
@@ -1,6 +1,5 @@
1
1
  ---
2
2
  description: Pinia Setup Store 状态管理规范(强制 Setup Store、storeToRefs、按业务聚合)
3
- category: Vue
4
3
  paths:
5
4
  - "**/store.ts"
6
5
  - "**/stores/**/*.ts"
@@ -1,6 +1,5 @@
1
1
  ---
2
2
  description: Vue Vitest 测试规范(目录组织、技术栈、AAA 结构、打包隔离)
3
- category: Vue
4
3
  paths:
5
4
  - "**/*.test.ts"
6
5
  - "**/*.spec.ts"
@@ -1,6 +1,5 @@
1
1
  ---
2
2
  description: TDD 开发流程(新功能/bug 修复/重构的测试先行与回归策略)
3
- category: 开发流程
4
3
  ---
5
4
 
6
5
  # TDD 开发规则
@@ -1,6 +1,5 @@
1
1
  ---
2
2
  description: Alembic 数据库迁移规范
3
- category: 数据库
4
3
  paths:
5
4
  - "**/alembic/**"
6
5
  - "**/alembic.ini"
@@ -1,6 +1,5 @@
1
1
  ---
2
2
  description: PostgreSQL 安全与配置规范(参数化查询、应用用户最小权限、连接池上限、SSL、敏感字段加密)
3
- category: 数据库
4
3
  ---
5
4
 
6
5
  # PostgreSQL 安全与配置规范
@@ -1,6 +1,5 @@
1
1
  ---
2
2
  description: Redis 安全与使用规范(必须用 dwyeapi 客户端、密码、绑定、危险命令禁用、key TTL 与前缀、敏感数据禁存)
3
- category: 数据库
4
3
  ---
5
4
 
6
5
  # Redis 安全与使用规范
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: dwy-eapi
3
3
  description: "dwyeapi FastAPI 后端基础设施使用指南。涉及以下任何主题,**必须**使用此 skill(即使用户没有明确说 'dwyeapi' / 'eapi'):FastAPI 项目搭建 / Pydantic Settings 配置 / 异步 SQLAlchemy / Redis 缓存 / JWT 认证 / bcrypt 密码哈希 / 异常体系(AppError / NotFoundError / BusinessError)/ 统一响应信封(ApiResponse / PageData)/ 分页 / 日志(loguru)/ 健康检查 / PII 脱敏 / 时区敏感的时间处理 / 异步任务(ARQ)/ 邮件验证码发送。本 skill 是 @dwydev/eapi 的唯一权威导航来源。"
4
- category: 基础库
5
4
  eapi_baseline_version: "0.9.0"
6
5
  ---
7
6
 
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: dwy-ekit
3
3
  description: "@dwydev/ekit 工具库使用指南。涉及以下任何主题,**必须**使用此 skill(即使用户没有说 'ekit'):HTTP 请求 / axios 封装 / token 刷新 / dwyeapi 响应契约对接 / localStorage / Cookie / useStorage / useCookie / 日期格式化 / 时区处理 / dayjs / 表单校验 / zod schema / vee-validate / PII 脱敏 / 剪贴板 / useClipboard / 文件下载 / Blob / 查询字符串 / qs / Vue composables(debounce / throttle / click-outside / event-listener / window-size / media-query / intersection-observer / resize-observer / useFormPersist)。本 skill 是 @dwydev/ekit 的唯一权威导航来源,禁止绕过 ekit 直接手写底层 API。"
4
- category: 基础库
5
4
  ekit_baseline_version: "0.8.0"
6
5
  ---
7
6
 
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: dwy-eui
3
3
  description: "@dwydev/eui Vue 3 组件库使用指南。当用户在使用 Vue 3 构建页面、选择 UI 组件、查询组件 API、写表单/表格/弹层/导航、配置主题或国际化、使用中后台或落地页设计规范时,**必须**使用此 skill。即使用户没有明确说 'eui',只要涉及 Vue 3 组件选型、页面布局、表单设计、数据展示、弹层交互、主题切换,也应触发。"
4
- category: 基础库
5
4
  eui_baseline_version: "2.1.0"
6
5
  ---
7
6
 
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: dwy-pentest
3
3
  description: "白帽渗透测试:对指定服务器执行全面安全评估。触发条件:用户说'渗透测试'、'pentest'、'安全测试'、'漏洞扫描'、'安全审计' 时。"
4
- category: 安全
5
4
  ---
6
5
 
7
6
  # 白帽渗透测试
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: dwy-dev-qa
3
3
  description: "功能开发完成后的通用质量保障流程。触发条件:完成新功能、修复 bug、重构代码后,准备提交前。"
4
- category: 开发流程
5
4
  ---
6
5
 
7
6
  # 开发完成后质量保障流程
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: dwy-git-commit
3
3
  description: "Git commit 强制规范(敏感数据扫描 + message 格式 + 禁 AI 署名)。触发场景:用户说'提交' / 'commit' / 'git commit' / 'git add';AI 准备执行 `git add` / `git commit` 之前;用户让你帮忙写 commit message;review 已有 commit message。强制:先扫描暂存物是否含 .env / 密钥 / API Key / 连接串等敏感数据;再检查 CLAUDE.md 的 Git Commit Scope 段;subject 用中文动宾短语 ≤72 字符;message 任何位置禁止 Claude / GPT / Copilot / AI / LLM 字样及 Co-Authored-By trailer。"
4
- category: 开发流程
5
4
  ---
6
5
 
7
6
  # Git Commit 强制规范
@@ -10,7 +10,6 @@ description: >
10
10
  dropPartition, DBConnectionPool, tableAppender, PartitionedTableAppender,
11
11
  MultithreadedTableWriter, addRangePartitions, newValuePartitionPolicy, TSDB, OLAP,
12
12
  getClusterPerf, getConsoleJobs, level2 行情, tick 数据, 时序数据库, 8848 端口, .dos 脚本.
13
- category: 数据库
14
13
  ---
15
14
 
16
15
  # DolphinDB 3.0 社区版使用指南
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: dwy-fullstack-scaffold
3
3
  description: "调用 dwy create CLI 生成全栈 Vue 3 + FastAPI monorepo 骨架,并完成 post-create 安装 + health check 编排。触发条件:用户说'创建新项目'、'搭骨架'、'新建全栈项目'、'fullstack monorepo'、'全栈脚手架'、'scaffold'、'开新项目'时。"
4
- category: 脚手架
5
4
  ---
6
5
 
7
6
  # dwy-fullstack-scaffold
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: dwy-tech-stack
3
3
  description: 跨栈技术选型强制约束(FastAPI / Vue 3 / Flutter / UV / pnpm / Docker / S3 / DolphinDB 等)。触发场景:用户提到「用什么 ORM / 缓存 / 状态管理 / 路由 / 包管理 / 组件库」/ 引入新依赖 / 替换现有库 / 调研选型 / 新项目初始化 / 架构评估;AI 准备执行 `pnpm add` / `uv add` / `pip install` / `flutter pub add` / `npm install` 前;讨论涉及后端 Web 框架、ORM、关系数据库、缓存、消息队列、异步任务、JWT / 密码哈希、Linter;前端 Vue 框架、构建工具、组件库、状态管理、样式方案、表单校验、测试;移动端 Flutter、状态管理、HTTP 客户端、路由、本地存储、代码生成;容器化、对象存储、时序数据库时。强制:每个领域只有唯一方案,AI 不得选替代,不得「建议改用 XX」。
4
- category: 脚手架
5
4
  ---
6
5
 
7
6
  # 跨栈技术选型强制约束
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: dwy-cibuildwheel
3
3
  description: "Python Cython SDK 用 GitHub Actions + cibuildwheel 跨平台 build wheel 并通过 PyPI Trusted Publisher (OIDC) 发布到 PyPI 的避坑指南。涵盖 PEP 639 license / cibuildwheel 版本 tag / YAML 冒号转义 / {package} 占位符 / 跨平台 shell 引号 / manylinux 镜像 / 测试阶段 binary 强制 / GitHub runner image 退役(macos-13 已死)等 8 类高频坑。触发条件:编辑或新建 .github/workflows/*.yml 含 cibuildwheel、pyproject.toml 含 Cython、用户说'发 PyPI'/'build wheel'/'cibuildwheel'/'跨平台打包'/'wheel build 失败'/'macos runner 一直 queued'/'发版到 PyPI' 时。"
4
- category: 运维发布
5
4
  ---
6
5
 
7
6
  # dwy-cibuildwheel — Python Cython SDK 跨平台 PyPI 发布避坑
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: dwy-deploy-audit
3
3
  description: "部署后线上环境基础安全巡检:远程 SSH 到目标服务器,逐项核对 SSH/Nginx/数据库/HTTPS/Docker/环境变量等基础环境配置,输出分级安全报告,只报告不修复。触发条件:用户说'部署巡检'、'上线检查'、'基础环境检查'、'部署审计'、'线上安全检查'、'生产环境审计' 时。"
4
- category: 运维发布
5
4
  ---
6
5
 
7
6
  # 部署后基础环境巡检 (deploy-audit)
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: dwy-docker
3
3
  description: "Docker 工程规范检查与镜像版本管理。触发场景:用户编辑/新建/粘贴 Dockerfile / docker-compose / k8s manifest / .github workflow / .gitlab-ci / .dockerignore / dev.sh 时;用户口头提到 docker / 容器 / compose / 镜像版本 / k8s 镜像时;用户说'扫描 latest' / '检查 docker' / '固定镜像版本' / 'docker 规范'。运作方式:问题驱动 — AI 检查合规性,合规则静默放行,违规才用 AskUserQuestion 让用户决策修复,禁止 AI 自行拍板修改。覆盖镜像版本(禁 latest / 浮动 tag、N-1 minor)、Dockerfile 工程(多阶段、non-root、.dockerignore)、compose 工程(dev/prod 分离、healthcheck、restart 策略)、一键启动 dev.sh。"
4
- category: 运维发布
5
4
  ---
6
5
 
7
6
  # Docker 工程规范
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: dwy-mirror-source
3
3
  description: "国内镜像源加速配置检查与修复:扫描 pip/uv/poetry/npm/pnpm/yarn/Docker/Go/Cargo/Maven/Gradle/Homebrew/Flutter 等 13 类工具的用户级和项目级配置,识别使用境外默认源或缺失配置的项,提供阿里云/清华/中科大镜像源切换。触发条件:用户说'检查镜像源'、'配置加速'、'换镜像源'、'mirror 检查'、'安装慢'、'下载慢' 时。"
4
- category: 运维发布
5
4
  ---
6
5
 
7
6
  # 镜像源加速配置(mirror-source)
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: dwy-publish
3
3
  description: "发布版本:测试 → bump → changelog → build → publish → tag。触发条件:用户说'发版'、'发布'、'release'、'bump version' 时。"
4
- category: 运维发布
5
4
  ---
6
5
 
7
6
  # 发布版本流程