moai-adk 0.4.5__py3-none-any.whl → 0.4.8__py3-none-any.whl

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.

Potentially problematic release.


This version of moai-adk might be problematic. Click here for more details.

Files changed (229) hide show
  1. moai_adk/__init__.py +1 -1
  2. moai_adk/core/project/initializer.py +12 -5
  3. moai_adk/templates/.claude/agents/alfred/cc-manager.md +188 -954
  4. moai_adk/templates/.claude/agents/alfred/debug-helper.md +4 -5
  5. moai_adk/templates/.claude/agents/alfred/doc-syncer.md +2 -2
  6. moai_adk/templates/.claude/agents/alfred/git-manager.md +2 -2
  7. moai_adk/templates/.claude/agents/alfred/implementation-planner.md +3 -3
  8. moai_adk/templates/.claude/agents/alfred/project-manager.md +6 -6
  9. moai_adk/templates/.claude/agents/alfred/quality-gate.md +4 -6
  10. moai_adk/templates/.claude/agents/alfred/skill-factory.md +829 -0
  11. moai_adk/templates/.claude/agents/alfred/spec-builder.md +2 -2
  12. moai_adk/templates/.claude/agents/alfred/tag-agent.md +2 -2
  13. moai_adk/templates/.claude/agents/alfred/tdd-implementer.md +3 -3
  14. moai_adk/templates/.claude/agents/alfred/trust-checker.md +5 -5
  15. moai_adk/templates/.claude/commands/alfred/0-project.md +98 -42
  16. moai_adk/templates/.claude/commands/alfred/1-plan.md +7 -7
  17. moai_adk/templates/.claude/commands/alfred/2-run.md +36 -36
  18. moai_adk/templates/.claude/commands/alfred/3-sync.md +10 -10
  19. moai_adk/templates/.claude/hooks/alfred/alfred_hooks.py +14 -1
  20. moai_adk/templates/.claude/hooks/alfred/core/__init__.py +115 -33
  21. moai_adk/templates/.claude/hooks/alfred/handlers/session.py +8 -9
  22. moai_adk/templates/.claude/hooks/alfred/handlers/tool.py +6 -6
  23. moai_adk/templates/.claude/hooks/alfred/handlers/user.py +5 -4
  24. moai_adk/templates/.claude/output-styles/alfred/agentic-coding.md +1 -1
  25. moai_adk/templates/.claude/output-styles/alfred/moai-adk-learning.md +1 -1
  26. moai_adk/templates/.claude/output-styles/alfred/study-with-alfred.md +1 -1
  27. moai_adk/templates/.claude/settings.json +42 -2
  28. moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/SKILL.md +76 -66
  29. moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/examples.md +29 -0
  30. moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/reference.md +28 -0
  31. moai_adk/templates/.claude/skills/moai-alfred-git-workflow/SKILL.md +86 -59
  32. moai_adk/templates/.claude/skills/moai-alfred-git-workflow/examples.md +29 -0
  33. moai_adk/templates/.claude/skills/moai-alfred-git-workflow/reference.md +29 -0
  34. moai_adk/templates/.claude/skills/moai-alfred-interactive-questions/SKILL.md +480 -0
  35. moai_adk/templates/.claude/skills/moai-alfred-interactive-questions/examples.md +257 -0
  36. moai_adk/templates/.claude/skills/moai-alfred-interactive-questions/reference.md +120 -0
  37. moai_adk/templates/.claude/skills/moai-alfred-language-detection/SKILL.md +87 -73
  38. moai_adk/templates/.claude/skills/moai-alfred-language-detection/examples.md +29 -0
  39. moai_adk/templates/.claude/skills/moai-alfred-language-detection/reference.md +28 -0
  40. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/SKILL.md +78 -62
  41. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/examples.md +29 -0
  42. moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/reference.md +28 -0
  43. moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/SKILL.md +78 -55
  44. moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/examples.md +29 -0
  45. moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/reference.md +28 -0
  46. moai_adk/templates/.claude/skills/moai-alfred-trust-validation/SKILL.md +78 -64
  47. moai_adk/templates/.claude/skills/moai-alfred-trust-validation/examples.md +29 -0
  48. moai_adk/templates/.claude/skills/moai-alfred-trust-validation/reference.md +28 -0
  49. moai_adk/templates/.claude/skills/moai-cc-agents/SKILL.md +249 -0
  50. moai_adk/templates/.claude/skills/moai-cc-agents/templates/agent-template.md +32 -0
  51. moai_adk/templates/.claude/skills/moai-cc-claude-md/SKILL.md +278 -0
  52. moai_adk/templates/.claude/skills/moai-cc-claude-md/templates/CLAUDE-template.md +26 -0
  53. moai_adk/templates/.claude/skills/moai-cc-commands/SKILL.md +287 -0
  54. moai_adk/templates/.claude/skills/moai-cc-commands/templates/command-template.md +21 -0
  55. moai_adk/templates/.claude/skills/moai-cc-hooks/SKILL.md +232 -0
  56. moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/pre-bash-check.sh +19 -0
  57. moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/preserve-permissions.sh +19 -0
  58. moai_adk/templates/.claude/skills/moai-cc-hooks/scripts/validate-bash-command.py +24 -0
  59. moai_adk/templates/.claude/skills/moai-cc-mcp-plugins/SKILL.md +179 -0
  60. moai_adk/templates/.claude/skills/moai-cc-mcp-plugins/templates/settings-mcp-template.json +39 -0
  61. moai_adk/templates/.claude/skills/moai-cc-memory/SKILL.md +296 -0
  62. moai_adk/templates/.claude/skills/moai-cc-memory/templates/session-summary-template.md +18 -0
  63. moai_adk/templates/.claude/skills/moai-cc-settings/SKILL.md +243 -0
  64. moai_adk/templates/.claude/skills/moai-cc-settings/templates/settings-complete-template.json +30 -0
  65. moai_adk/templates/.claude/skills/moai-cc-skills/SKILL.md +271 -0
  66. moai_adk/templates/.claude/skills/moai-cc-skills/templates/SKILL-template.md +15 -0
  67. moai_adk/templates/.claude/skills/moai-domain-backend/SKILL.md +234 -43
  68. moai_adk/templates/.claude/skills/moai-domain-backend/examples.md +1633 -0
  69. moai_adk/templates/.claude/skills/moai-domain-backend/reference.md +660 -0
  70. moai_adk/templates/.claude/skills/moai-domain-cli-tool/SKILL.md +97 -69
  71. moai_adk/templates/.claude/skills/moai-domain-cli-tool/examples.md +29 -0
  72. moai_adk/templates/.claude/skills/moai-domain-cli-tool/reference.md +30 -0
  73. moai_adk/templates/.claude/skills/moai-domain-data-science/SKILL.md +97 -72
  74. moai_adk/templates/.claude/skills/moai-domain-data-science/examples.md +29 -0
  75. moai_adk/templates/.claude/skills/moai-domain-data-science/reference.md +30 -0
  76. moai_adk/templates/.claude/skills/moai-domain-database/SKILL.md +97 -74
  77. moai_adk/templates/.claude/skills/moai-domain-database/examples.md +29 -0
  78. moai_adk/templates/.claude/skills/moai-domain-database/reference.md +30 -0
  79. moai_adk/templates/.claude/skills/moai-domain-devops/SKILL.md +98 -74
  80. moai_adk/templates/.claude/skills/moai-domain-devops/examples.md +29 -0
  81. moai_adk/templates/.claude/skills/moai-domain-devops/reference.md +31 -0
  82. moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +98 -73
  83. moai_adk/templates/.claude/skills/moai-domain-frontend/examples.md +29 -0
  84. moai_adk/templates/.claude/skills/moai-domain-frontend/reference.md +31 -0
  85. moai_adk/templates/.claude/skills/moai-domain-ml/SKILL.md +97 -73
  86. moai_adk/templates/.claude/skills/moai-domain-ml/examples.md +29 -0
  87. moai_adk/templates/.claude/skills/moai-domain-ml/reference.md +30 -0
  88. moai_adk/templates/.claude/skills/moai-domain-mobile-app/SKILL.md +97 -67
  89. moai_adk/templates/.claude/skills/moai-domain-mobile-app/examples.md +29 -0
  90. moai_adk/templates/.claude/skills/moai-domain-mobile-app/reference.md +30 -0
  91. moai_adk/templates/.claude/skills/moai-domain-security/SKILL.md +97 -79
  92. moai_adk/templates/.claude/skills/moai-domain-security/examples.md +29 -0
  93. moai_adk/templates/.claude/skills/moai-domain-security/reference.md +30 -0
  94. moai_adk/templates/.claude/skills/moai-domain-web-api/SKILL.md +97 -71
  95. moai_adk/templates/.claude/skills/moai-domain-web-api/examples.md +29 -0
  96. moai_adk/templates/.claude/skills/moai-domain-web-api/reference.md +30 -0
  97. moai_adk/templates/.claude/skills/moai-essentials-debug/SKILL.md +656 -60
  98. moai_adk/templates/.claude/skills/moai-essentials-debug/examples.md +1107 -0
  99. moai_adk/templates/.claude/skills/moai-essentials-debug/reference.md +1533 -0
  100. moai_adk/templates/.claude/skills/moai-essentials-perf/SKILL.md +87 -78
  101. moai_adk/templates/.claude/skills/moai-essentials-perf/examples.md +29 -0
  102. moai_adk/templates/.claude/skills/moai-essentials-perf/reference.md +28 -0
  103. moai_adk/templates/.claude/skills/moai-essentials-refactor/SKILL.md +87 -70
  104. moai_adk/templates/.claude/skills/moai-essentials-refactor/examples.md +29 -0
  105. moai_adk/templates/.claude/skills/moai-essentials-refactor/reference.md +28 -0
  106. moai_adk/templates/.claude/skills/moai-essentials-review/SKILL.md +87 -86
  107. moai_adk/templates/.claude/skills/moai-essentials-review/examples.md +29 -0
  108. moai_adk/templates/.claude/skills/moai-essentials-review/reference.md +28 -0
  109. moai_adk/templates/.claude/skills/moai-foundation-ears/SKILL.md +77 -62
  110. moai_adk/templates/.claude/skills/moai-foundation-ears/examples.md +29 -0
  111. moai_adk/templates/.claude/skills/moai-foundation-ears/reference.md +28 -0
  112. moai_adk/templates/.claude/skills/moai-foundation-git/SKILL.md +88 -56
  113. moai_adk/templates/.claude/skills/moai-foundation-git/examples.md +29 -0
  114. moai_adk/templates/.claude/skills/moai-foundation-git/reference.md +29 -0
  115. moai_adk/templates/.claude/skills/moai-foundation-langs/SKILL.md +90 -71
  116. moai_adk/templates/.claude/skills/moai-foundation-langs/examples.md +29 -0
  117. moai_adk/templates/.claude/skills/moai-foundation-langs/reference.md +28 -0
  118. moai_adk/templates/.claude/skills/moai-foundation-specs/SKILL.md +78 -58
  119. moai_adk/templates/.claude/skills/moai-foundation-specs/examples.md +29 -0
  120. moai_adk/templates/.claude/skills/moai-foundation-specs/reference.md +28 -0
  121. moai_adk/templates/.claude/skills/moai-foundation-tags/SKILL.md +78 -51
  122. moai_adk/templates/.claude/skills/moai-foundation-tags/examples.md +29 -0
  123. moai_adk/templates/.claude/skills/moai-foundation-tags/reference.md +28 -0
  124. moai_adk/templates/.claude/skills/moai-foundation-trust/SKILL.md +253 -32
  125. moai_adk/templates/.claude/skills/moai-foundation-trust/examples.md +0 -0
  126. moai_adk/templates/.claude/skills/moai-foundation-trust/reference.md +1099 -0
  127. moai_adk/templates/.claude/skills/moai-lang-c/SKILL.md +98 -74
  128. moai_adk/templates/.claude/skills/moai-lang-c/examples.md +29 -0
  129. moai_adk/templates/.claude/skills/moai-lang-c/reference.md +31 -0
  130. moai_adk/templates/.claude/skills/moai-lang-cpp/SKILL.md +98 -76
  131. moai_adk/templates/.claude/skills/moai-lang-cpp/examples.md +29 -0
  132. moai_adk/templates/.claude/skills/moai-lang-cpp/reference.md +31 -0
  133. moai_adk/templates/.claude/skills/moai-lang-csharp/SKILL.md +97 -74
  134. moai_adk/templates/.claude/skills/moai-lang-csharp/examples.md +29 -0
  135. moai_adk/templates/.claude/skills/moai-lang-csharp/reference.md +30 -0
  136. moai_adk/templates/.claude/skills/moai-lang-dart/SKILL.md +86 -61
  137. moai_adk/templates/.claude/skills/moai-lang-dart/examples.md +29 -0
  138. moai_adk/templates/.claude/skills/moai-lang-dart/reference.md +30 -0
  139. moai_adk/templates/.claude/skills/moai-lang-go/SKILL.md +98 -74
  140. moai_adk/templates/.claude/skills/moai-lang-go/examples.md +29 -0
  141. moai_adk/templates/.claude/skills/moai-lang-go/reference.md +31 -0
  142. moai_adk/templates/.claude/skills/moai-lang-java/SKILL.md +87 -61
  143. moai_adk/templates/.claude/skills/moai-lang-java/examples.md +29 -0
  144. moai_adk/templates/.claude/skills/moai-lang-java/reference.md +31 -0
  145. moai_adk/templates/.claude/skills/moai-lang-javascript/SKILL.md +88 -59
  146. moai_adk/templates/.claude/skills/moai-lang-javascript/examples.md +29 -0
  147. moai_adk/templates/.claude/skills/moai-lang-javascript/reference.md +32 -0
  148. moai_adk/templates/.claude/skills/moai-lang-kotlin/SKILL.md +98 -73
  149. moai_adk/templates/.claude/skills/moai-lang-kotlin/examples.md +29 -0
  150. moai_adk/templates/.claude/skills/moai-lang-kotlin/reference.md +31 -0
  151. moai_adk/templates/.claude/skills/moai-lang-php/SKILL.md +86 -61
  152. moai_adk/templates/.claude/skills/moai-lang-php/examples.md +29 -0
  153. moai_adk/templates/.claude/skills/moai-lang-php/reference.md +30 -0
  154. moai_adk/templates/.claude/skills/moai-lang-python/SKILL.md +388 -53
  155. moai_adk/templates/.claude/skills/moai-lang-python/examples.md +624 -0
  156. moai_adk/templates/.claude/skills/moai-lang-python/reference.md +316 -0
  157. moai_adk/templates/.claude/skills/moai-lang-r/SKILL.md +97 -73
  158. moai_adk/templates/.claude/skills/moai-lang-r/examples.md +29 -0
  159. moai_adk/templates/.claude/skills/moai-lang-r/reference.md +30 -0
  160. moai_adk/templates/.claude/skills/moai-lang-ruby/SKILL.md +98 -73
  161. moai_adk/templates/.claude/skills/moai-lang-ruby/examples.md +29 -0
  162. moai_adk/templates/.claude/skills/moai-lang-ruby/reference.md +31 -0
  163. moai_adk/templates/.claude/skills/moai-lang-rust/SKILL.md +98 -74
  164. moai_adk/templates/.claude/skills/moai-lang-rust/examples.md +29 -0
  165. moai_adk/templates/.claude/skills/moai-lang-rust/reference.md +31 -0
  166. moai_adk/templates/.claude/skills/moai-lang-scala/SKILL.md +97 -74
  167. moai_adk/templates/.claude/skills/moai-lang-scala/examples.md +29 -0
  168. moai_adk/templates/.claude/skills/moai-lang-scala/reference.md +30 -0
  169. moai_adk/templates/.claude/skills/moai-lang-shell/SKILL.md +97 -74
  170. moai_adk/templates/.claude/skills/moai-lang-shell/examples.md +29 -0
  171. moai_adk/templates/.claude/skills/moai-lang-shell/reference.md +30 -0
  172. moai_adk/templates/.claude/skills/moai-lang-sql/SKILL.md +98 -74
  173. moai_adk/templates/.claude/skills/moai-lang-sql/examples.md +29 -0
  174. moai_adk/templates/.claude/skills/moai-lang-sql/reference.md +31 -0
  175. moai_adk/templates/.claude/skills/moai-lang-swift/SKILL.md +97 -73
  176. moai_adk/templates/.claude/skills/moai-lang-swift/examples.md +29 -0
  177. moai_adk/templates/.claude/skills/moai-lang-swift/reference.md +30 -0
  178. moai_adk/templates/.claude/skills/moai-lang-typescript/SKILL.md +90 -59
  179. moai_adk/templates/.claude/skills/moai-lang-typescript/examples.md +29 -0
  180. moai_adk/templates/.claude/skills/moai-lang-typescript/reference.md +34 -0
  181. moai_adk/templates/.claude/skills/moai-skill-factory/CHECKLIST.md +482 -0
  182. moai_adk/templates/.claude/skills/moai-skill-factory/EXAMPLES.md +278 -0
  183. moai_adk/templates/.claude/skills/moai-skill-factory/INTERACTIVE-DISCOVERY.md +524 -0
  184. moai_adk/templates/.claude/skills/moai-skill-factory/METADATA.md +477 -0
  185. moai_adk/templates/.claude/skills/moai-skill-factory/PARALLEL-ANALYSIS-REPORT.md +429 -0
  186. moai_adk/templates/.claude/skills/moai-skill-factory/PYTHON-VERSION-MATRIX.md +391 -0
  187. moai_adk/templates/.claude/skills/moai-skill-factory/SKILL-FACTORY-WORKFLOW.md +431 -0
  188. moai_adk/templates/.claude/skills/moai-skill-factory/SKILL-UPDATE-ADVISOR.md +577 -0
  189. moai_adk/templates/.claude/skills/moai-skill-factory/SKILL.md +560 -0
  190. moai_adk/templates/.claude/skills/moai-skill-factory/STEP-BY-STEP-GUIDE.md +466 -0
  191. moai_adk/templates/.claude/skills/moai-skill-factory/STRUCTURE.md +583 -0
  192. moai_adk/templates/.claude/skills/moai-skill-factory/WEB-RESEARCH.md +526 -0
  193. moai_adk/templates/.claude/skills/moai-skill-factory/reference.md +465 -0
  194. moai_adk/templates/.claude/skills/moai-skill-factory/scripts/generate-structure.sh +328 -0
  195. moai_adk/templates/.claude/skills/moai-skill-factory/scripts/validate-skill.sh +312 -0
  196. moai_adk/templates/.claude/skills/moai-skill-factory/templates/SKILL_TEMPLATE.md +245 -0
  197. moai_adk/templates/.claude/skills/moai-skill-factory/templates/examples-template.md +285 -0
  198. moai_adk/templates/.claude/skills/moai-skill-factory/templates/reference-template.md +278 -0
  199. moai_adk/templates/.claude/skills/moai-skill-factory/templates/scripts-template.sh +303 -0
  200. moai_adk/templates/.claude/skills/moai-spec-authoring/README.md +129 -0
  201. moai_adk/templates/.claude/skills/moai-spec-authoring/SKILL.md +1300 -0
  202. moai_adk/templates/.claude/skills/moai-spec-authoring/examples/validate-spec.sh +161 -0
  203. moai_adk/templates/CLAUDE.md +121 -81
  204. moai_adk-0.4.8.dist-info/METADATA +1553 -0
  205. moai_adk-0.4.8.dist-info/RECORD +265 -0
  206. moai_adk/templates/.claude/skills/moai-alfred-code-reviewer/SKILL.md +0 -112
  207. moai_adk/templates/.claude/skills/moai-alfred-debugger-pro/SKILL.md +0 -103
  208. moai_adk/templates/.claude/skills/moai-alfred-performance-optimizer/SKILL.md +0 -105
  209. moai_adk/templates/.claude/skills/moai-alfred-refactoring-coach/SKILL.md +0 -97
  210. moai_adk/templates/.claude/skills/moai-alfred-tui-survey/SKILL.md +0 -87
  211. moai_adk/templates/.claude/skills/moai-alfred-tui-survey/examples.md +0 -62
  212. moai_adk/templates/.claude/skills/moai-claude-code/SKILL.md +0 -94
  213. moai_adk/templates/.claude/skills/moai-claude-code/examples.md +0 -513
  214. moai_adk/templates/.claude/skills/moai-claude-code/reference.md +0 -433
  215. moai_adk/templates/.claude/skills/moai-claude-code/templates/agent-full.md +0 -332
  216. moai_adk/templates/.claude/skills/moai-claude-code/templates/command-full.md +0 -384
  217. moai_adk/templates/.claude/skills/moai-claude-code/templates/plugin-full.json +0 -363
  218. moai_adk/templates/.claude/skills/moai-claude-code/templates/settings-full.json +0 -595
  219. moai_adk/templates/.claude/skills/moai-claude-code/templates/skill-full.md +0 -496
  220. moai_adk/templates/.claude/skills/moai-lang-clojure/SKILL.md +0 -100
  221. moai_adk/templates/.claude/skills/moai-lang-elixir/SKILL.md +0 -99
  222. moai_adk/templates/.claude/skills/moai-lang-haskell/SKILL.md +0 -100
  223. moai_adk/templates/.claude/skills/moai-lang-julia/SKILL.md +0 -98
  224. moai_adk/templates/.claude/skills/moai-lang-lua/SKILL.md +0 -98
  225. moai_adk-0.4.5.dist-info/METADATA +0 -369
  226. moai_adk-0.4.5.dist-info/RECORD +0 -152
  227. {moai_adk-0.4.5.dist-info → moai_adk-0.4.8.dist-info}/WHEEL +0 -0
  228. {moai_adk-0.4.5.dist-info → moai_adk-0.4.8.dist-info}/entry_points.txt +0 -0
  229. {moai_adk-0.4.5.dist-info → moai_adk-0.4.8.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,243 @@
1
+ ---
2
+ name: "Configuring Claude Code settings.json & Security"
3
+ description: "Set up permissions (allow/deny), permission modes, environment variables, tool restrictions. Use when securing Claude Code, restricting tool access, or optimizing session settings."
4
+ allowed-tools: "Read, Write, Edit, Bash"
5
+ ---
6
+
7
+ # Configuring Claude Code settings.json
8
+
9
+ `settings.json` centralizes all Claude Code configuration: permissions, tool access, environment variables, and session behavior.
10
+
11
+ **Location**: `.claude/settings.json`
12
+
13
+ ## Complete Configuration Template
14
+
15
+ ```json
16
+ {
17
+ "permissions": {
18
+ "allowedTools": [
19
+ "Read(**/*.{js,ts,json,md})",
20
+ "Edit(**/*.{js,ts})",
21
+ "Glob(**/*)",
22
+ "Grep(**/*)",
23
+ "Bash(git:*)",
24
+ "Bash(npm:*)",
25
+ "Bash(npm run:*)",
26
+ "Bash(pytest:*)",
27
+ "Bash(python:*)"
28
+ ],
29
+ "deniedTools": [
30
+ "Read(./.env)",
31
+ "Read(./.env.*)",
32
+ "Read(./secrets/**)",
33
+ "Bash(rm -rf:*)",
34
+ "Bash(sudo:*)",
35
+ "Bash(curl:*)"
36
+ ]
37
+ },
38
+ "permissionMode": "ask",
39
+ "spinnerTipsEnabled": true,
40
+ "disableAllHooks": false,
41
+ "env": {
42
+ "ANTHROPIC_API_KEY": "${ANTHROPIC_API_KEY}",
43
+ "GITHUB_TOKEN": "${GITHUB_TOKEN}",
44
+ "CLAUDE_CODE_ENABLE_TELEMETRY": "1"
45
+ },
46
+ "hooks": {
47
+ "PreToolUse": [
48
+ {
49
+ "matcher": "Bash",
50
+ "hooks": [
51
+ {
52
+ "type": "command",
53
+ "command": "bash ~/.claude/hooks/pre-bash-check.sh"
54
+ }
55
+ ]
56
+ }
57
+ ],
58
+ "PostToolUse": [
59
+ {
60
+ "matcher": "Edit",
61
+ "hooks": [
62
+ {
63
+ "type": "command",
64
+ "command": "bash ~/.claude/hooks/post-edit-format.sh"
65
+ }
66
+ ]
67
+ }
68
+ ],
69
+ "SessionStart": [
70
+ {
71
+ "matcher": "*",
72
+ "hooks": [
73
+ {
74
+ "type": "command",
75
+ "command": "bash ~/.claude/hooks/session-init.sh"
76
+ }
77
+ ]
78
+ }
79
+ ]
80
+ },
81
+ "statusLine": {
82
+ "enabled": true,
83
+ "type": "command",
84
+ "command": "~/.claude/statusline.sh"
85
+ },
86
+ "mcpServers": {
87
+ "github": {
88
+ "command": "npx",
89
+ "args": ["-y", "@anthropic-ai/mcp-server-github"],
90
+ "oauth": {
91
+ "clientId": "${GITHUB_CLIENT_ID}",
92
+ "clientSecret": "${GITHUB_CLIENT_SECRET}",
93
+ "scopes": ["repo", "issues"]
94
+ }
95
+ },
96
+ "filesystem": {
97
+ "command": "npx",
98
+ "args": ["-y", "@modelcontextprotocol/server-filesystem", "${CLAUDE_PROJECT_DIR}/.moai", "${CLAUDE_PROJECT_DIR}/src"]
99
+ }
100
+ },
101
+ "extraKnownMarketplaces": [
102
+ {
103
+ "name": "company-plugins",
104
+ "url": "https://github.com/your-org/claude-plugins"
105
+ }
106
+ ]
107
+ }
108
+ ```
109
+
110
+ ## Permission Modes
111
+
112
+ | Mode | Behavior | Use Case |
113
+ |------|----------|----------|
114
+ | **allow** | Execute all allowed tools without asking | Trusted environments |
115
+ | **ask** | Ask before executing each tool | Development (safer) |
116
+ | **deny** | Deny all tools except whitelisted | Restrictive (default) |
117
+
118
+ ```json
119
+ {
120
+ "permissionMode": "ask"
121
+ }
122
+ ```
123
+
124
+ ## Tool Permission Patterns
125
+
126
+ ### Restrictive (Recommended for teams)
127
+ ```json
128
+ {
129
+ "allowedTools": [
130
+ "Read(src/**)",
131
+ "Edit(src/**/*.ts)",
132
+ "Bash(npm run test:*)",
133
+ "Glob(src/**)"
134
+ ],
135
+ "deniedTools": [
136
+ "Bash(rm:*)",
137
+ "Bash(sudo:*)",
138
+ "Read(.env)"
139
+ ]
140
+ }
141
+ ```
142
+
143
+ ### Permissive (Local development only)
144
+ ```json
145
+ {
146
+ "allowedTools": [
147
+ "Read",
148
+ "Write",
149
+ "Edit",
150
+ "Bash(git:*)",
151
+ "Bash(npm:*)",
152
+ "Bash(python:*)",
153
+ "Glob",
154
+ "Grep"
155
+ ]
156
+ }
157
+ ```
158
+
159
+ ## Environment Variables Pattern
160
+
161
+ ```json
162
+ {
163
+ "env": {
164
+ "ANTHROPIC_API_KEY": "${ANTHROPIC_API_KEY}",
165
+ "GITHUB_TOKEN": "${GITHUB_TOKEN}",
166
+ "BRAVE_SEARCH_API_KEY": "${BRAVE_SEARCH_API_KEY}",
167
+ "NODE_ENV": "development"
168
+ }
169
+ }
170
+ ```
171
+
172
+ **Security rule**: Never hardcode secrets; always use `${VAR_NAME}` syntax.
173
+
174
+ ## Dangerous Tools to Deny
175
+
176
+ ```json
177
+ {
178
+ "deniedTools": [
179
+ "Bash(rm -rf:*)", // Recursive delete
180
+ "Bash(sudo:*)", // Privilege escalation
181
+ "Bash(curl.*|.*bash)", // Code injection
182
+ "Read(.env)", // Secrets
183
+ "Read(.ssh/**)", // SSH keys
184
+ "Read(/etc/shadow)", // System secrets
185
+ "Edit(/etc/**)", // System files
186
+ ]
187
+ }
188
+ ```
189
+
190
+ ## Permission Validation
191
+
192
+ ```bash
193
+ # Check current permissions
194
+ cat .claude/settings.json | jq '.permissions'
195
+
196
+ # Validate JSON syntax
197
+ jq . .claude/settings.json
198
+
199
+ # List allowed tools
200
+ jq '.permissions.allowedTools[]' .claude/settings.json
201
+ ```
202
+
203
+ ## Spinner Tips Configuration
204
+
205
+ ```json
206
+ {
207
+ "spinnerTipsEnabled": true
208
+ }
209
+ ```
210
+
211
+ Custom tips can be added for better UX during long operations.
212
+
213
+ ## Best Practices
214
+
215
+ ✅ **DO**:
216
+ - Use `ask` mode for teams
217
+ - Explicitly whitelist paths
218
+ - Environment variables for all secrets
219
+ - Review permissions regularly
220
+ - Document why each denial exists
221
+
222
+ ❌ **DON'T**:
223
+ - Hardcode credentials in settings.json
224
+ - Use `allow` mode for untrusted contexts
225
+ - Grant `Bash(*)` without restrictions
226
+ - Include secrets in version control
227
+ - Mix personal and project settings
228
+
229
+ ## Permission Checklist
230
+
231
+ - [ ] All secrets use `${VAR_NAME}` syntax
232
+ - [ ] Dangerous patterns are denied
233
+ - [ ] File paths are explicit (not wildcards)
234
+ - [ ] Permission mode matches use case (ask/allow/deny)
235
+ - [ ] Hooks are not left in commented state
236
+ - [ ] MCP servers have proper OAuth configuration
237
+ - [ ] No `.env` file is readable
238
+ - [ ] Sudo commands are denied
239
+
240
+ ---
241
+
242
+ **Reference**: Claude Code settings.json documentation
243
+ **Version**: 1.0.0
@@ -0,0 +1,30 @@
1
+ {
2
+ "permissions": {
3
+ "allowedTools": [
4
+ "Read(**/*.{js,ts,json,md})",
5
+ "Edit(**/*.{js,ts})",
6
+ "Glob(**/*)",
7
+ "Grep(**/*)",
8
+ "Bash(git:*)",
9
+ "Bash(npm:*)",
10
+ "Bash(npm run:*)",
11
+ "Bash(pytest:*)",
12
+ "Bash(python:*)"
13
+ ],
14
+ "deniedTools": [
15
+ "Read(./.env)",
16
+ "Read(./.env.*)",
17
+ "Read(./secrets/**)",
18
+ "Bash(rm -rf:*)",
19
+ "Bash(sudo:*)",
20
+ "Bash(curl:*)"
21
+ ]
22
+ },
23
+ "permissionMode": "ask",
24
+ "spinnerTipsEnabled": true,
25
+ "disableAllHooks": false,
26
+ "env": {
27
+ "ANTHROPIC_API_KEY": "${ANTHROPIC_API_KEY}",
28
+ "GITHUB_TOKEN": "${GITHUB_TOKEN}"
29
+ }
30
+ }
@@ -0,0 +1,271 @@
1
+ ---
2
+ name: "Creating and Optimizing Claude Code Skills"
3
+ description: "Design reusable knowledge capsules with progressive disclosure (metadata → content → resources). Apply freedom levels (high/medium/low), create examples, validate YAML. Use when building domain-specific guidance or automating recurring patterns."
4
+ allowed-tools: "Read, Write, Edit, Glob, Bash"
5
+ ---
6
+
7
+ # Creating and Optimizing Claude Code Skills
8
+
9
+ Skills are modular, reusable knowledge capsules that load via Progressive Disclosure. They combine templates, patterns, and best practices without blocking user workflow.
10
+
11
+ ## Skill File Structure
12
+
13
+ **Location**: `.claude/skills/skill-name/`
14
+
15
+ ```
16
+ skill-name/
17
+ ├── SKILL.md # Main instructions (~400 lines)
18
+ ├── reference.md # Detailed reference (optional)
19
+ ├── examples.md # Real-world examples (optional)
20
+ ├── CHECKLIST.md # Validation guide (optional)
21
+ ├── scripts/ # Utility scripts
22
+ │ ├── validator.sh
23
+ │ └── formatter.py
24
+ └── templates/ # Reusable templates
25
+ ├── config.json
26
+ └── main.md
27
+ ```
28
+
29
+ ## YAML Frontmatter
30
+
31
+ ```yaml
32
+ ---
33
+ name: "Skill Name (Gerund + Domain)"
34
+ description: "[Capability]. Use when [trigger 1], [trigger 2], [trigger 3]."
35
+ allowed-tools: "Read, Write, Bash(python:*)"
36
+ ---
37
+ ```
38
+
39
+ ### Field Rules
40
+
41
+ | Field | Max | Format | Example |
42
+ |-------|-----|--------|---------|
43
+ | `name` | 64 chars | Gerund + Domain | "Processing CSV Files with Python" |
44
+ | `description` | 1024 chars | 3rd person, 3+ triggers | "Extract data, validate schema, merge datasets. Use when processing CSV, Excel files, or data cleaning." |
45
+ | `allowed-tools` | — | Comma-separated minimal list | "Read, Bash(python:*), Bash(grep:*)" |
46
+
47
+ ## Freedom Level Framework
48
+
49
+ | Freedom | % | Use Case | Content Style |
50
+ |---------|---|----------|----------------|
51
+ | **High** | 20-30% | Flexible, creative | Principles, trade-offs, decision trees |
52
+ | **Medium** | 50-60% | Standard patterns | Pseudocode, flowcharts, templates |
53
+ | **Low** | 10-20% | Deterministic, error-prone | Scripts, error handling, validation |
54
+
55
+ ### High-Freedom: Architecture Design
56
+
57
+ ```markdown
58
+ ## Architecture Trade-offs
59
+
60
+ | Pattern | Pros | Cons | When |
61
+ |---------|------|------|------|
62
+ | Monolith | Simple, unified | Scales poorly | MVP, <10 people |
63
+ | Microservices | Scalable, independent | Complex, distributed tracing | 10+ teams |
64
+ | Serverless | Zero ops, elastic | Cold starts, vendor lock-in | Event-driven |
65
+
66
+ Choose based on:
67
+ 1. **Team size**: Monolith if <5 devs
68
+ 2. **Scale**: Microservices if >10M requests/month
69
+ 3. **Budget**: Serverless if unpredictable workload
70
+ ```
71
+
72
+ ### Medium-Freedom: Data Validation Pattern
73
+
74
+ ```pseudocode
75
+ ## Validation Workflow
76
+
77
+ 1. Load data source (CSV, JSON, API)
78
+ 2. For each record:
79
+ a. Check required fields exist
80
+ b. Validate data types
81
+ c. Verify constraints (range, format)
82
+ d. Check references (foreign keys)
83
+ 3. Collect errors with row numbers
84
+ 4. Report summary + fix suggestions
85
+ 5. Proceed only if all errors fixed
86
+
87
+ ## Example: CSV Validation
88
+ - Input: data.csv
89
+ - Schema: validators/schema.json
90
+ - Output: validation_report.json
91
+ ```
92
+
93
+ ### Low-Freedom: Security Validator Script
94
+
95
+ ```python
96
+ #!/usr/bin/env python3
97
+ """Validate code for OWASP Top 10 risks"""
98
+ import re
99
+ import sys
100
+
101
+ PATTERNS = [
102
+ (r"eval\(", "OWASP-A1: Code injection risk"),
103
+ (r"SELECT.*\$", "OWASP-A3: SQL injection risk"),
104
+ (r"os\.system\(", "OWASP-A6: Command injection risk"),
105
+ ]
106
+
107
+ def validate_file(filepath):
108
+ with open(filepath) as f:
109
+ content = f.read()
110
+
111
+ issues = []
112
+ for pattern, risk in PATTERNS:
113
+ if re.search(pattern, content):
114
+ issues.append(risk)
115
+
116
+ return issues
117
+
118
+ if __name__ == "__main__":
119
+ for filepath in sys.argv[1:]:
120
+ issues = validate_file(filepath)
121
+ if issues:
122
+ print(f"⚠️ {filepath}:")
123
+ for issue in issues:
124
+ print(f" • {issue}")
125
+ ```
126
+
127
+ ## Progressive Disclosure Pattern
128
+
129
+ **Level 1**: Metadata (always loaded)
130
+ ```yaml
131
+ name: "Database Query Optimization"
132
+ description: "Profile slow queries, analyze execution plans, suggest indexes..."
133
+ allowed-tools: "Read, Bash(sqlite3:*)"
134
+ ```
135
+
136
+ **Level 2**: Main content (on demand)
137
+ - Overview + quick start
138
+ - 3-4 core patterns
139
+ - Decision tree
140
+
141
+ **Level 3**: Resources (when referenced)
142
+ - `reference.md` — Detailed specs
143
+ - `examples.md` — Real-world scenarios
144
+ - `scripts/` — Utility tools
145
+
146
+ ## Skill Discovery Keywords
147
+
148
+ Embed in description for auto-activation:
149
+
150
+ ✅ **DO** include:
151
+ - Problem domain: "CSV", "SQL", "React", "API"
152
+ - Operation: "parsing", "validation", "optimization", "debugging"
153
+ - Tech stack: "Python", "TypeScript", "Go"
154
+
155
+ Example description:
156
+ ```
157
+ "Parse CSV files, validate data schemas, clean datasets.
158
+ Use when processing CSV, Excel, JSON data or when user mentions
159
+ data cleaning, validation, or transformation."
160
+ ```
161
+
162
+ ## Medium-Freedom: Example Skill Template
163
+
164
+ ```yaml
165
+ ---
166
+ name: "Testing React Components with Vitest"
167
+ description: "Write unit tests for React components, mock hooks, test async behavior. Use when testing React components, setting up Vitest, or debugging test failures."
168
+ allowed-tools: "Read, Write, Bash(npm:*), Bash(npm run:*)"
169
+ ---
170
+
171
+ # Testing React Components with Vitest
172
+
173
+ ## Quick Start
174
+
175
+ 1. Install: `npm install -D vitest @testing-library/react`
176
+ 2. Create test: `src/Component.test.tsx`
177
+ 3. Run: `npm run test`
178
+
179
+ ## Core Patterns
180
+
181
+ ### Pattern 1: Basic Component Test
182
+ ```typescript
183
+ import { render, screen } from '@testing-library/react'
184
+ import { Button } from './Button'
185
+
186
+ it('renders button with text', () => {
187
+ render(<Button>Click me</Button>)
188
+ expect(screen.getByText('Click me')).toBeInTheDocument()
189
+ })
190
+ ```
191
+
192
+ ### Pattern 2: Mock Hooks
193
+ ```typescript
194
+ import { useUserStore } from './store'
195
+
196
+ vi.mock('./store', () => ({
197
+ useUserStore: vi.fn(() => ({ user: null }))
198
+ }))
199
+ ```
200
+
201
+ ## Examples
202
+
203
+ See [examples.md](examples.md) for integration with Redux, React Query, form testing.
204
+ ```
205
+
206
+ ## Skill Validation Checklist
207
+
208
+ - [ ] `name` is specific (not "React Helper")
209
+ - [ ] `description` includes 3+ discovery keywords
210
+ - [ ] Main content ≤ 500 lines
211
+ - [ ] At least 2 concrete examples
212
+ - [ ] Progressive Disclosure applied (metadata → content → resources)
213
+ - [ ] Freedom levels mixed appropriately
214
+ - [ ] No hardcoded paths or time-sensitive data
215
+ - [ ] YAML frontmatter is valid
216
+ - [ ] Paths use forward slashes (`/` not `\`)
217
+
218
+ ## Skill Optimization Patterns
219
+
220
+ ### Anti-pattern 1: Too Generic
221
+ ```yaml
222
+ ❌ name: "Python Helper"
223
+ ✅ name: "Testing Python Code with pytest"
224
+ ```
225
+
226
+ ### Anti-pattern 2: No Examples
227
+ ```yaml
228
+ ❌ Only principles, no code samples
229
+ ✅ Each concept has working example
230
+ ```
231
+
232
+ ### Anti-pattern 3: Nested Files
233
+ ```yaml
234
+ ❌ docs/api/v2/reference/security.md
235
+ ✅ reference.md (one level)
236
+ ```
237
+
238
+ ### Anti-pattern 4: Absolute Paths
239
+ ```yaml
240
+ ❌ /Users/name/project/config.json
241
+ ✅ ./config.json or ${PROJECT_DIR}/config.json
242
+ ```
243
+
244
+ ## Best Practices
245
+
246
+ ✅ **DO**:
247
+ - Keep < 500 lines per SKILL.md
248
+ - Use relative paths with forward slashes
249
+ - Provide working code examples
250
+ - Design for reusability across projects
251
+ - Include both success and error paths
252
+
253
+ ❌ **DON'T**:
254
+ - Mix too many domains (split into separate Skills)
255
+ - Explain fundamentals (trust Claude already knows)
256
+ - Create nested directory structures
257
+ - Include time-sensitive info (dates, versions)
258
+ - Use Windows-style paths
259
+
260
+ ## Skill Lifecycle
261
+
262
+ 1. **Create**: Design persona, scope, freedom levels
263
+ 2. **Implement**: Write SKILL.md + examples
264
+ 3. **Test**: Verify with Haiku, Sonnet, Opus
265
+ 4. **Deploy**: Add to `.claude/skills/`
266
+ 5. **Iterate**: Get feedback, update as needed
267
+
268
+ ---
269
+
270
+ **Reference**: Claude Code Skills official documentation
271
+ **Version**: 1.0.0
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: "Skill Name (Gerund + Domain)"
3
+ description: "[Capability]. Use when [trigger 1], [trigger 2], [trigger 3]."
4
+ allowed-tools: "Read, Write, Bash(python:*)"
5
+ ---
6
+
7
+ # Skill Name
8
+
9
+ ## Quick Start
10
+
11
+ ## Core Patterns
12
+
13
+ ## Examples
14
+
15
+ See examples.md for real-world scenarios.