mia-code 0.2.0 → 0.3.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 (410) hide show
  1. package/.miette/260321.md +1 -0
  2. package/.miette/260323.md +9 -0
  3. package/.miette/260331.md +2 -0
  4. package/.pde/2604011511--83a2d7f9-24a5-4cf4-98d5-036c82f872e8/2604020008--d3417f2c-df12-4f0f-8a1b-d88e7968f822/d3417f2c-df12-4f0f-8a1b-d88e7968f822.md +63 -0
  5. package/.pde/2604011511--83a2d7f9-24a5-4cf4-98d5-036c82f872e8/2604020008--e6c3fc5d-4a70-4523-ba7d-a3250da4c235/e6c3fc5d-4a70-4523-ba7d-a3250da4c235.md +72 -0
  6. package/.pde/2604011511--83a2d7f9-24a5-4cf4-98d5-036c82f872e8/2604020008--efeb00a2-b17a-4d32-b1f0-b90c37a8d24e/efeb00a2-b17a-4d32-b1f0-b90c37a8d24e.md +62 -0
  7. package/.pde/2604011511--83a2d7f9-24a5-4cf4-98d5-036c82f872e8/83a2d7f9-24a5-4cf4-98d5-036c82f872e8.json +302 -0
  8. package/.pde/2604011511--83a2d7f9-24a5-4cf4-98d5-036c82f872e8/83a2d7f9-24a5-4cf4-98d5-036c82f872e8.md +149 -0
  9. package/.pde/2604011511--83a2d7f9-24a5-4cf4-98d5-036c82f872e8/AGENTS.md +31 -0
  10. package/.pde/2604011511--83a2d7f9-24a5-4cf4-98d5-036c82f872e8/meta-decomposition-3-children.md +67 -0
  11. package/.pde/2604040129--61f9dd4d-7aa6-45e6-a58b-e480b1aa6737/61f9dd4d-7aa6-45e6-a58b-e480b1aa6737--from-mia-openclaw-workspace.md +125 -0
  12. package/.pde/2604040129--61f9dd4d-7aa6-45e6-a58b-e480b1aa6737/STATUS.md +1 -0
  13. package/.pde/4f02ba94-9f52-422e-9389-b16f9b37f358.json +177 -0
  14. package/.pde/4f02ba94-9f52-422e-9389-b16f9b37f358.md +77 -0
  15. package/.pde/6ad9244d-5340-490f-b76c-c86728b9de52.json +222 -0
  16. package/.pde/6ad9244d-5340-490f-b76c-c86728b9de52.md +99 -0
  17. package/.pde/8b566792-ed15-4606-96f9-2b6f593d7e6b.json +111 -0
  18. package/.pde/8b566792-ed15-4606-96f9-2b6f593d7e6b.md +67 -0
  19. package/.pde/c7f1e74b-05a5-40e2-9f01-4cc48d2528f7.json +349 -0
  20. package/.pde/c7f1e74b-05a5-40e2-9f01-4cc48d2528f7.md +147 -0
  21. package/.pde/dfc00a78-1da0-4c09-8a16-c6982644051b.json +118 -0
  22. package/.pde/dfc00a78-1da0-4c09-8a16-c6982644051b.md +64 -0
  23. package/GUILLAUME.md +8 -0
  24. package/KINSHIP.md +9 -0
  25. package/MIA_CODE_ARCHITECTURE_REPORT.md +718 -0
  26. package/contextual_research/260119-MIA-CODE--98090899-8aff-4e11-9dc3-8b99466d1.md +1101 -0
  27. package/contextual_research/MIA.md +38 -0
  28. package/contextual_research/MIAWAPASCONE.md +59 -0
  29. package/contextual_research/MIETTE.md +38 -0
  30. package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/2504.00218v2.pdf +7483 -12
  31. package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/2505.00212v3.pdf +0 -0
  32. package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/CONTENT.md +1014 -0
  33. package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/DESIGN.gemini.md +242 -0
  34. package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/INDEX.md +45 -0
  35. package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/2504.00218v2.md +2025 -0
  36. package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/2504.00218v2.pdf +7483 -12
  37. package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/2505.00212v3.md +1755 -0
  38. package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/2505.00212v3.pdf +0 -0
  39. package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/footnote_1_12_decomposed_prompting.pdf +0 -0
  40. package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/footnote_1_19_hugginggpt_planning.pdf +0 -0
  41. package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/footnote_1_1_coordination_challenges.md +766 -0
  42. package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/footnote_1_1_coordination_challenges.pdf +3431 -4
  43. package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/footnote_1_28_guardrails_multi_agent.md +260 -0
  44. package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/footnote_1_28_guardrails_multi_agent.pdf +0 -0
  45. package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/footnote_1_2_navigating_complexity.md +558 -0
  46. package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/footnote_1_2_navigating_complexity.pdf +0 -0
  47. package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/footnote_1_34_hierarchical_multi_agent.pdf +0 -0
  48. package/contextual_research/PDE-generalization--caefee82-efb1-4dbb-8733-691b01581464--260130/sources/footnote_1_5_open_intent_extraction.pdf +0 -0
  49. package/contextual_research/PODCAST.md +109 -0
  50. package/contextual_research/langchain-principles-roadmap.md +157 -0
  51. package/contextual_research/persona-to-narrative-character-inquiry_260201.md +50 -0
  52. package/dist/cli.js +35 -11
  53. package/dist/geminiHeadless.js +8 -2
  54. package/dist/index.js +2 -1
  55. package/dist/mcp/miaco-server.js +10 -1
  56. package/dist/mcp/miatel-server.js +10 -1
  57. package/dist/mcp/miawa-server.js +10 -1
  58. package/dist/mcp/utils.d.ts +6 -1
  59. package/dist/mcp/utils.js +24 -3
  60. package/dist/sessionStore.d.ts +8 -2
  61. package/dist/sessionStore.js +39 -3
  62. package/dist/types.d.ts +1 -0
  63. package/miaco/README.md +124 -0
  64. package/miaco/dist/commands/chart.d.ts +6 -0
  65. package/miaco/dist/commands/chart.d.ts.map +1 -0
  66. package/miaco/dist/commands/chart.js +222 -0
  67. package/miaco/dist/commands/chart.js.map +1 -0
  68. package/miaco/dist/commands/decompose.d.ts +6 -0
  69. package/miaco/dist/commands/decompose.d.ts.map +1 -0
  70. package/miaco/dist/commands/decompose.js +98 -0
  71. package/miaco/dist/commands/decompose.js.map +1 -0
  72. package/miaco/dist/commands/schema.d.ts +6 -0
  73. package/miaco/dist/commands/schema.d.ts.map +1 -0
  74. package/miaco/dist/commands/schema.js +66 -0
  75. package/miaco/dist/commands/schema.js.map +1 -0
  76. package/miaco/dist/commands/stc.d.ts +11 -0
  77. package/miaco/dist/commands/stc.d.ts.map +1 -0
  78. package/miaco/dist/commands/stc.js +590 -0
  79. package/miaco/dist/commands/stc.js.map +1 -0
  80. package/miaco/dist/commands/trace.d.ts +6 -0
  81. package/miaco/dist/commands/trace.d.ts.map +1 -0
  82. package/miaco/dist/commands/trace.js +83 -0
  83. package/miaco/dist/commands/trace.js.map +1 -0
  84. package/miaco/dist/commands/validate.d.ts +6 -0
  85. package/miaco/dist/commands/validate.d.ts.map +1 -0
  86. package/miaco/dist/commands/validate.js +58 -0
  87. package/miaco/dist/commands/validate.js.map +1 -0
  88. package/miaco/dist/decompose.d.ts +93 -0
  89. package/miaco/dist/decompose.d.ts.map +1 -0
  90. package/miaco/dist/decompose.js +562 -0
  91. package/miaco/dist/decompose.js.map +1 -0
  92. package/miaco/dist/index.d.ts +18 -0
  93. package/miaco/dist/index.d.ts.map +1 -0
  94. package/miaco/dist/index.js +83 -0
  95. package/miaco/dist/index.js.map +1 -0
  96. package/miaco/dist/storage.d.ts +60 -0
  97. package/miaco/dist/storage.d.ts.map +1 -0
  98. package/miaco/dist/storage.js +100 -0
  99. package/miaco/dist/storage.js.map +1 -0
  100. package/miaco/package-lock.json +4103 -0
  101. package/miaco/package.json +40 -0
  102. package/miaco/tsconfig.json +18 -0
  103. package/miaco/version-patch-commit-and-publish.sh +1 -0
  104. package/miatel/MISSION_251231.md +3 -0
  105. package/miatel/README.md +107 -0
  106. package/miatel/dist/commands/analyze.d.ts +6 -0
  107. package/miatel/dist/commands/analyze.d.ts.map +1 -0
  108. package/miatel/dist/commands/analyze.js +100 -0
  109. package/miatel/dist/commands/analyze.js.map +1 -0
  110. package/miatel/dist/commands/arc.d.ts +6 -0
  111. package/miatel/dist/commands/arc.d.ts.map +1 -0
  112. package/miatel/dist/commands/arc.js +71 -0
  113. package/miatel/dist/commands/arc.js.map +1 -0
  114. package/miatel/dist/commands/beat.d.ts +6 -0
  115. package/miatel/dist/commands/beat.d.ts.map +1 -0
  116. package/miatel/dist/commands/beat.js +165 -0
  117. package/miatel/dist/commands/beat.js.map +1 -0
  118. package/miatel/dist/commands/theme.d.ts +6 -0
  119. package/miatel/dist/commands/theme.d.ts.map +1 -0
  120. package/miatel/dist/commands/theme.js +54 -0
  121. package/miatel/dist/commands/theme.js.map +1 -0
  122. package/miatel/dist/index.d.ts +18 -0
  123. package/miatel/dist/index.d.ts.map +1 -0
  124. package/miatel/dist/index.js +80 -0
  125. package/miatel/dist/index.js.map +1 -0
  126. package/miatel/dist/storage.d.ts +55 -0
  127. package/miatel/dist/storage.d.ts.map +1 -0
  128. package/miatel/dist/storage.js +100 -0
  129. package/miatel/dist/storage.js.map +1 -0
  130. package/miatel/package-lock.json +4103 -0
  131. package/miatel/package.json +35 -0
  132. package/miatel/src/commands/analyze.ts +109 -0
  133. package/miatel/src/commands/arc.ts +78 -0
  134. package/miatel/src/commands/beat.ts +176 -0
  135. package/miatel/src/commands/theme.ts +60 -0
  136. package/miatel/src/index.ts +94 -0
  137. package/miatel/src/storage.ts +156 -0
  138. package/miatel/tsconfig.json +18 -0
  139. package/miawa/MISSION_251231.md +144 -0
  140. package/miawa/README.md +133 -0
  141. package/miawa/dist/commands/beat.d.ts +6 -0
  142. package/miawa/dist/commands/beat.d.ts.map +1 -0
  143. package/miawa/dist/commands/beat.js +69 -0
  144. package/miawa/dist/commands/beat.js.map +1 -0
  145. package/miawa/dist/commands/ceremony.d.ts +6 -0
  146. package/miawa/dist/commands/ceremony.d.ts.map +1 -0
  147. package/miawa/dist/commands/ceremony.js +239 -0
  148. package/miawa/dist/commands/ceremony.js.map +1 -0
  149. package/miawa/dist/commands/circle.d.ts +6 -0
  150. package/miawa/dist/commands/circle.d.ts.map +1 -0
  151. package/miawa/dist/commands/circle.js +75 -0
  152. package/miawa/dist/commands/circle.js.map +1 -0
  153. package/miawa/dist/commands/eva.d.ts +6 -0
  154. package/miawa/dist/commands/eva.d.ts.map +1 -0
  155. package/miawa/dist/commands/eva.js +73 -0
  156. package/miawa/dist/commands/eva.js.map +1 -0
  157. package/miawa/dist/commands/wound.d.ts +6 -0
  158. package/miawa/dist/commands/wound.d.ts.map +1 -0
  159. package/miawa/dist/commands/wound.js +74 -0
  160. package/miawa/dist/commands/wound.js.map +1 -0
  161. package/miawa/dist/index.d.ts +19 -0
  162. package/miawa/dist/index.d.ts.map +1 -0
  163. package/miawa/dist/index.js +91 -0
  164. package/miawa/dist/index.js.map +1 -0
  165. package/miawa/dist/storage.d.ts +73 -0
  166. package/miawa/dist/storage.d.ts.map +1 -0
  167. package/miawa/dist/storage.js +100 -0
  168. package/miawa/dist/storage.js.map +1 -0
  169. package/miawa/package-lock.json +4103 -0
  170. package/miawa/package.json +36 -0
  171. package/miawa/src/commands/beat.ts +74 -0
  172. package/miawa/src/commands/ceremony.ts +256 -0
  173. package/miawa/src/commands/circle.ts +83 -0
  174. package/miawa/src/commands/eva.ts +84 -0
  175. package/miawa/src/commands/wound.ts +79 -0
  176. package/miawa/src/index.ts +108 -0
  177. package/miawa/src/storage.ts +179 -0
  178. package/miawa/tsconfig.json +18 -0
  179. package/package.json +7 -5
  180. package/references/acp/CLAUDE.md +7 -0
  181. package/references/acp/agent-plan.md +84 -0
  182. package/references/acp/clients.md +31 -0
  183. package/references/acp/extensibility.md +137 -0
  184. package/references/acp/initialization.md +225 -0
  185. package/references/acp/prompt-turn.md +321 -0
  186. package/references/acp/proxy-chains.md +562 -0
  187. package/references/acp/schema.md +3171 -0
  188. package/references/acp/session-list.md +334 -0
  189. package/references/acp/session-modes.md +170 -0
  190. package/references/acp/slash-commands.md +99 -0
  191. package/references/acp/terminals.md +281 -0
  192. package/references/acp/tool-calls.md +311 -0
  193. package/references/acp/typescript.md +29 -0
  194. package/references/claude/agent-teams.md +399 -0
  195. package/references/claude/chrome.md +231 -0
  196. package/references/claude/headless.md +158 -0
  197. package/references/claude/hooks-guide.md +708 -0
  198. package/references/claude/output-styles.md +112 -0
  199. package/references/claude/plugins.md +432 -0
  200. package/references/claude/skills.md +693 -0
  201. package/references/claude/sub-agents.md +816 -0
  202. package/references/copilot/acp/agents.md +32 -0
  203. package/references/copilot/acp/architecture.md +37 -0
  204. package/references/copilot/acp/clients.md +31 -0
  205. package/references/copilot/acp/introduction.md +42 -0
  206. package/references/copilot/acp/registry.md +339 -0
  207. package/references/copilot/acp-server.md +117 -0
  208. package/references/copilot/create-copilot-instructions.md +840 -0
  209. package/references/langchain/llms.txt +833 -0
  210. package/references/langchain/python/agents.md +677 -0
  211. package/references/langchain/python/context-engineering.md +1195 -0
  212. package/references/langchain/python/human-in-the-loop.md +326 -0
  213. package/references/langchain/python/long-term-memory.md +168 -0
  214. package/references/langchain/python/mcp.md +949 -0
  215. package/references/langchain/python/multi-agents/custom-workflow.md +187 -0
  216. package/references/langchain/python/multi-agents/handoffs.md +436 -0
  217. package/references/langchain/python/multi-agents/overview.md +295 -0
  218. package/references/langchain/python/multi-agents/router.md +150 -0
  219. package/references/langchain/python/multi-agents/skills.md +92 -0
  220. package/references/langchain/python/multi-agents/subagents.md +486 -0
  221. package/references/langchain/python/retrieval.md +320 -0
  222. package/references/langchain/python/runtime.md +141 -0
  223. package/references/langchain/python/short-term-memory.md +658 -0
  224. package/references/langchain/python/structured-output.md +712 -0
  225. package/references/langfuse/llms.txt +148 -0
  226. package/references/langgraph/javascript/llms.txt +275 -0
  227. package/references/skills/home.md +259 -0
  228. package/references/skills/integrate-skills.md +103 -0
  229. package/references/skills/specification.md +254 -0
  230. package/references/skills/what-are-skills.md +74 -0
  231. package/rispecs/README.md +164 -0
  232. package/rispecs/_sync_/miadi-code/SPEC.md +313 -0
  233. package/rispecs/_sync_/miadi-code/STATUS.md +177 -0
  234. package/rispecs/_sync_/miadi-code/dashboard/SPEC.md +465 -0
  235. package/rispecs/_sync_/miadi-code/dashboard/STATUS.md +212 -0
  236. package/rispecs/_sync_/miadi-code/multiline-input/SPEC.md +232 -0
  237. package/rispecs/_sync_/miadi-code/multiline-input/STATUS.md +108 -0
  238. package/rispecs/_sync_/miadi-code/pde/SPEC.md +253 -0
  239. package/rispecs/_sync_/miadi-code/pde/STATUS.md +56 -0
  240. package/rispecs/_sync_/miadi-code/stc/SPEC.md +397 -0
  241. package/rispecs/_sync_/miadi-code/stc/STATUS.md +70 -0
  242. package/rispecs/ava-langstack/inquiry-routing-upgrade.spec.md +119 -0
  243. package/rispecs/borrowed_from_opencode/001-client-server-architecture.rispec.md +98 -0
  244. package/rispecs/borrowed_from_opencode/002-event-bus-system.rispec.md +125 -0
  245. package/rispecs/borrowed_from_opencode/003-instance-state-pattern.rispec.md +136 -0
  246. package/rispecs/borrowed_from_opencode/004-namespace-module-pattern.rispec.md +151 -0
  247. package/rispecs/borrowed_from_opencode/005-zod-schema-validation.rispec.md +139 -0
  248. package/rispecs/borrowed_from_opencode/006-named-error-system.rispec.md +155 -0
  249. package/rispecs/borrowed_from_opencode/007-structured-logging.rispec.md +138 -0
  250. package/rispecs/borrowed_from_opencode/008-lazy-initialization.rispec.md +127 -0
  251. package/rispecs/borrowed_from_opencode/009-multi-agent-system.rispec.md +97 -0
  252. package/rispecs/borrowed_from_opencode/010-agent-definition-config.rispec.md +135 -0
  253. package/rispecs/borrowed_from_opencode/011-agent-permission-rulesets.rispec.md +151 -0
  254. package/rispecs/borrowed_from_opencode/012-agent-prompt-templates.rispec.md +141 -0
  255. package/rispecs/borrowed_from_opencode/013-agent-generation.rispec.md +142 -0
  256. package/rispecs/borrowed_from_opencode/014-plan-build-mode-toggle.rispec.md +155 -0
  257. package/rispecs/borrowed_from_opencode/015-subagent-task-delegation.rispec.md +146 -0
  258. package/rispecs/borrowed_from_opencode/016-agent-model-selection.rispec.md +151 -0
  259. package/rispecs/borrowed_from_opencode/017-compaction-agent.rispec.md +150 -0
  260. package/rispecs/borrowed_from_opencode/018-session-persistence.rispec.md +125 -0
  261. package/rispecs/borrowed_from_opencode/019-session-compaction.rispec.md +132 -0
  262. package/rispecs/borrowed_from_opencode/020-session-forking.rispec.md +134 -0
  263. package/rispecs/borrowed_from_opencode/021-session-revert-snapshot.rispec.md +135 -0
  264. package/rispecs/borrowed_from_opencode/022-session-sharing.rispec.md +165 -0
  265. package/rispecs/borrowed_from_opencode/023-session-summary-diffs.rispec.md +165 -0
  266. package/rispecs/borrowed_from_opencode/024-child-sessions.rispec.md +164 -0
  267. package/rispecs/borrowed_from_opencode/025-session-title-generation.rispec.md +162 -0
  268. package/rispecs/borrowed_from_opencode/026-message-parts-model.rispec.md +201 -0
  269. package/rispecs/borrowed_from_opencode/027-streaming-message-deltas.rispec.md +212 -0
  270. package/rispecs/borrowed_from_opencode/028-multi-provider-architecture.rispec.md +184 -0
  271. package/rispecs/borrowed_from_opencode/029-provider-authentication.rispec.md +225 -0
  272. package/rispecs/borrowed_from_opencode/030-model-registry.rispec.md +222 -0
  273. package/rispecs/borrowed_from_opencode/031-cost-tracking.rispec.md +243 -0
  274. package/rispecs/borrowed_from_opencode/032-provider-transform-pipeline.rispec.md +282 -0
  275. package/rispecs/borrowed_from_opencode/033-provider-sdk-abstraction.rispec.md +338 -0
  276. package/rispecs/borrowed_from_opencode/034-tool-registry.rispec.md +110 -0
  277. package/rispecs/borrowed_from_opencode/035-tool-context-injection.rispec.md +155 -0
  278. package/rispecs/borrowed_from_opencode/036-tool-output-truncation.rispec.md +138 -0
  279. package/rispecs/borrowed_from_opencode/037-batch-tool.rispec.md +129 -0
  280. package/rispecs/borrowed_from_opencode/038-multi-edit-tool.rispec.md +167 -0
  281. package/rispecs/borrowed_from_opencode/039-apply-patch-tool.rispec.md +161 -0
  282. package/rispecs/borrowed_from_opencode/040-code-search-tool.rispec.md +143 -0
  283. package/rispecs/borrowed_from_opencode/041-web-fetch-tool.rispec.md +131 -0
  284. package/rispecs/borrowed_from_opencode/042-web-search-tool.rispec.md +159 -0
  285. package/rispecs/borrowed_from_opencode/043-todo-tool.rispec.md +156 -0
  286. package/rispecs/borrowed_from_opencode/044-plan-mode-tool.rispec.md +139 -0
  287. package/rispecs/borrowed_from_opencode/045-task-tool.rispec.md +146 -0
  288. package/rispecs/borrowed_from_opencode/046-question-tool.rispec.md +170 -0
  289. package/rispecs/borrowed_from_opencode/047-external-directory-tool.rispec.md +166 -0
  290. package/rispecs/borrowed_from_opencode/048-file-read-write-tools.rispec.md +205 -0
  291. package/rispecs/borrowed_from_opencode/049-lsp-server-management.rispec.md +104 -0
  292. package/rispecs/borrowed_from_opencode/050-lsp-hover-completion.rispec.md +102 -0
  293. package/rispecs/borrowed_from_opencode/051-lsp-diagnostics.rispec.md +86 -0
  294. package/rispecs/borrowed_from_opencode/052-lsp-root-detection.rispec.md +109 -0
  295. package/rispecs/borrowed_from_opencode/053-remote-mcp-servers.rispec.md +119 -0
  296. package/rispecs/borrowed_from_opencode/054-mcp-oauth-flow.rispec.md +107 -0
  297. package/rispecs/borrowed_from_opencode/055-mcp-tool-conversion.rispec.md +118 -0
  298. package/rispecs/borrowed_from_opencode/056-mcp-connection-monitoring.rispec.md +106 -0
  299. package/rispecs/borrowed_from_opencode/057-local-mcp-servers.rispec.md +116 -0
  300. package/rispecs/borrowed_from_opencode/058-rich-tui.rispec.md +108 -0
  301. package/rispecs/borrowed_from_opencode/059-streaming-display.rispec.md +116 -0
  302. package/rispecs/borrowed_from_opencode/060-permission-prompts.rispec.md +130 -0
  303. package/rispecs/borrowed_from_opencode/061-session-navigation.rispec.md +155 -0
  304. package/rispecs/borrowed_from_opencode/062-syntax-highlighting.rispec.md +151 -0
  305. package/rispecs/borrowed_from_opencode/063-keybinding-system.rispec.md +181 -0
  306. package/rispecs/borrowed_from_opencode/064-multi-level-config.rispec.md +155 -0
  307. package/rispecs/borrowed_from_opencode/065-jsonc-config.rispec.md +190 -0
  308. package/rispecs/borrowed_from_opencode/066-config-env-variables.rispec.md +153 -0
  309. package/rispecs/borrowed_from_opencode/067-config-deep-merging.rispec.md +178 -0
  310. package/rispecs/borrowed_from_opencode/068-remote-org-config.rispec.md +183 -0
  311. package/rispecs/borrowed_from_opencode/069-config-markdown-frontmatter.rispec.md +206 -0
  312. package/rispecs/borrowed_from_opencode/070-managed-config-directory.rispec.md +232 -0
  313. package/rispecs/borrowed_from_opencode/071-plugin-architecture.rispec.md +104 -0
  314. package/rispecs/borrowed_from_opencode/072-plugin-hooks.rispec.md +123 -0
  315. package/rispecs/borrowed_from_opencode/073-plugin-auto-install.rispec.md +115 -0
  316. package/rispecs/borrowed_from_opencode/074-permission-system.rispec.md +133 -0
  317. package/rispecs/borrowed_from_opencode/075-git-worktree-management.rispec.md +126 -0
  318. package/rispecs/borrowed_from_opencode/076-snapshot-system.rispec.md +124 -0
  319. package/rispecs/borrowed_from_opencode/077-snapshot-diff.rispec.md +117 -0
  320. package/rispecs/borrowed_from_opencode/078-snapshot-restore.rispec.md +128 -0
  321. package/rispecs/borrowed_from_opencode/079-worktree-branch-naming.rispec.md +122 -0
  322. package/rispecs/borrowed_from_opencode/080-sqlite-storage.rispec.md +134 -0
  323. package/rispecs/borrowed_from_opencode/081-database-migrations.rispec.md +148 -0
  324. package/rispecs/borrowed_from_opencode/082-database-transactions.rispec.md +138 -0
  325. package/rispecs/borrowed_from_opencode/083-deferred-effects.rispec.md +148 -0
  326. package/rispecs/borrowed_from_opencode/084-permission-rules.rispec.md +123 -0
  327. package/rispecs/borrowed_from_opencode/085-permission-glob-patterns.rispec.md +113 -0
  328. package/rispecs/borrowed_from_opencode/086-permission-merging.rispec.md +134 -0
  329. package/rispecs/borrowed_from_opencode/087-permission-modes.rispec.md +145 -0
  330. package/rispecs/borrowed_from_opencode/088-http-api-server.rispec.md +165 -0
  331. package/rispecs/borrowed_from_opencode/089-openapi-spec-generation.rispec.md +164 -0
  332. package/rispecs/borrowed_from_opencode/090-websocket-support.rispec.md +136 -0
  333. package/rispecs/borrowed_from_opencode/091-sse-streaming.rispec.md +168 -0
  334. package/rispecs/borrowed_from_opencode/092-mdns-discovery.rispec.md +145 -0
  335. package/rispecs/borrowed_from_opencode/093-javascript-sdk.rispec.md +200 -0
  336. package/rispecs/borrowed_from_opencode/094-skill-system.rispec.md +187 -0
  337. package/rispecs/borrowed_from_opencode/095-skill-discovery.rispec.md +182 -0
  338. package/rispecs/borrowed_from_opencode/096-desktop-remote-driving.rispec.md +175 -0
  339. package/rispecs/borrowed_from_opencode/INDEX.md +255 -0
  340. package/rispecs/core.rispecs.md +261 -0
  341. package/rispecs/engines.rispecs.md +241 -0
  342. package/rispecs/formatting.rispecs.md +252 -0
  343. package/rispecs/living-specifications.rispecs.md +361 -0
  344. package/rispecs/mcp.rispecs.md +197 -0
  345. package/rispecs/pde.rispecs.md +399 -0
  346. package/rispecs/pi-mono-envisionning/ENVISIONING.md +366 -0
  347. package/rispecs/pi-mono-envisionning/storytelling-horizon.rispecs.md +76 -0
  348. package/rispecs/pi-mono-envisionning/widget.rispecs.md +2 -0
  349. package/rispecs/relation-to-mcp-structural-thinking.kin.md +72 -0
  350. package/rispecs/research-for-better-framework/CLAUDE.md +7 -0
  351. package/rispecs/research-for-better-framework/survey-pi-openclaw-opencode-openhands.md +210 -0
  352. package/rispecs/session.rispecs.md +277 -0
  353. package/rispecs/stc.rispecs.md +138 -0
  354. package/rispecs/unifier.rispecs.md +317 -0
  355. package/scripts/LAUNCH--mcp-mia-code--testing--2603141315--ac705a66-2c15-4a1c-a26d-9491018c5ba8.sh +2 -0
  356. package/scripts/RESUME--mia-code--mcps--260313--ac705a66-2c15-4a1c-a26d-9491018c5ba8.sh +1 -0
  357. package/scripts/install-widget-in-home-pi-agent-extensions.sh +4 -0
  358. package/scripts/sample-decompose--2604011535-prompt.sh +1 -0
  359. package/skills/deep-search/AGENTS.md +17 -0
  360. package/skills/deep-search/SKILL.md +281 -0
  361. package/skills/deep-search/agent-templates.md +224 -0
  362. package/skills/deep-search/orchestration-patterns.md +95 -0
  363. package/skills/miaco-pde-inquiry-routing-deep-search/AGENTS.md +13 -0
  364. package/skills/miaco-pde-inquiry-routing-deep-search/SKILL.md +136 -0
  365. package/skills/miaco-pde-inquiry-routing-internal-external-relationship/AGENTS.md +4 -0
  366. package/skills/miaco-pde-inquiry-routing-internal-external-relationship/SKILL.md +157 -0
  367. package/skills/miaco-pde-inquiry-routing-local-qmd/AGENTS.md +42 -0
  368. package/skills/miaco-pde-inquiry-routing-local-qmd/SKILL.md +135 -0
  369. package/skills/qmd/AGENTS.md +3 -0
  370. package/skills/qmd/SKILL.md +144 -0
  371. package/skills/qmd/references/mcp-setup.md +102 -0
  372. package/skills/rise-pde-inquiry-session-multi-agents-v3/SKILL.md +234 -0
  373. package/skills/rise-pde-inquiry-session-multi-agents-v3/agent-templates.md +436 -0
  374. package/skills/rise-pde-inquiry-session-multi-agents-v3/orchestration-patterns.md +197 -0
  375. package/skills/rise-pde-inquiry-session-multi-agents-v3/references/ceremonial-technology.md +102 -0
  376. package/skills/rise-pde-inquiry-session-multi-agents-v3/references/creative-orientation.md +99 -0
  377. package/skills/rise-pde-inquiry-session-multi-agents-v3/references/prompt-decomposition.md +73 -0
  378. package/skills/rise-pde-inquiry-session-multi-agents-v3/references/rise-framework.md +74 -0
  379. package/skills/rise-pde-inquiry-session-multi-agents-v3/references/structural-tension.md +82 -0
  380. package/src/cli.ts +35 -11
  381. package/src/geminiHeadless.ts +7 -2
  382. package/src/index.ts +2 -1
  383. package/src/mcp/miaco-server.ts +13 -1
  384. package/src/mcp/miatel-server.ts +13 -1
  385. package/src/mcp/miawa-server.ts +13 -1
  386. package/src/mcp/utils.ts +41 -8
  387. package/src/sessionStore.ts +44 -4
  388. package/src/types.ts +2 -1
  389. package/widget/mia-ceremony/README.md +36 -0
  390. package/widget/mia-ceremony/index.ts +143 -0
  391. package/widget/mia-interceptor/README.md +39 -0
  392. package/widget/mia-interceptor/index.ts +221 -0
  393. package/widget/mia-tools/README.md +37 -0
  394. package/widget/mia-tools/index.ts +569 -0
  395. package/widget/miette-echo/README.md +44 -0
  396. package/widget/miette-echo/index.ts +164 -0
  397. package/.claude/settings.local.json +0 -9
  398. package/.hch/issue_.env +0 -4
  399. package/.hch/issue_add__2601211715.json +0 -77
  400. package/.hch/issue_add__2601211715.md +0 -4
  401. package/.hch/issue_add__2602242020.json +0 -78
  402. package/.hch/issue_add__2602242020.md +0 -7
  403. package/.hch/issues.json +0 -2312
  404. package/.hch/issues.md +0 -30
  405. package/WS__mia-code__260214__IAIP_PDE.code-workspace +0 -29
  406. package/WS__mia-code__src332__260122.code-workspace +0 -23
  407. package/samples/copilot/session-state/be76abaa-a27f-4725-b2a9-22fb45f7e0f7/checkpoints/index.md +0 -6
  408. package/samples/copilot/session-state/be76abaa-a27f-4725-b2a9-22fb45f7e0f7/events.jsonl +0 -213
  409. package/samples/copilot/session-state/be76abaa-a27f-4725-b2a9-22fb45f7e0f7/plan.md +0 -243
  410. package/samples/copilot/session-state/be76abaa-a27f-4725-b2a9-22fb45f7e0f7/workspace.yaml +0 -5
@@ -0,0 +1,693 @@
1
+ > ## Documentation Index
2
+ > Fetch the complete documentation index at: https://code.claude.com/docs/llms.txt
3
+ > Use this file to discover all available pages before exploring further.
4
+
5
+ # Extend Claude with skills
6
+
7
+ > Create, manage, and share skills to extend Claude's capabilities in Claude Code. Includes custom commands and bundled skills.
8
+
9
+ Skills extend what Claude can do. Create a `SKILL.md` file with instructions, and Claude adds it to its toolkit. Claude uses skills when relevant, or you can invoke one directly with `/skill-name`.
10
+
11
+ <Note>
12
+ For built-in commands like `/help` and `/compact`, see [interactive mode](/en/interactive-mode#built-in-commands).
13
+
14
+ **Custom commands have been merged into skills.** A file at `.claude/commands/review.md` and a skill at `.claude/skills/review/SKILL.md` both create `/review` and work the same way. Your existing `.claude/commands/` files keep working. Skills add optional features: a directory for supporting files, frontmatter to [control whether you or Claude invokes them](#control-who-invokes-a-skill), and the ability for Claude to load them automatically when relevant.
15
+ </Note>
16
+
17
+ Claude Code skills follow the [Agent Skills](https://agentskills.io) open standard, which works across multiple AI tools. Claude Code extends the standard with additional features like [invocation control](#control-who-invokes-a-skill), [subagent execution](#run-skills-in-a-subagent), and [dynamic context injection](#inject-dynamic-context).
18
+
19
+ ## Bundled skills
20
+
21
+ Bundled skills ship with Claude Code and are available in every session. Unlike [built-in commands](/en/interactive-mode#built-in-commands), which execute fixed logic directly, bundled skills are prompt-based: they give Claude a detailed playbook and let it orchestrate the work using its tools. This means bundled skills can spawn parallel agents, read files, and adapt to your codebase.
22
+
23
+ You invoke bundled skills the same way as any other skill: type `/` followed by the skill name.
24
+
25
+ * **`/simplify`**: reviews your recently changed files for code reuse, quality, and efficiency issues, then fixes them. Run it after implementing a feature or bug fix to clean up your work. It spawns three review agents in parallel (code reuse, code quality, efficiency), aggregates their findings, and applies fixes. Pass optional text to focus on specific concerns: `/simplify focus on memory efficiency`.
26
+
27
+ * **`/batch <instruction>`**: orchestrates large-scale changes across a codebase in parallel. Provide a description of the change and `/batch` researches the codebase, decomposes the work into 5 to 30 independent units, and presents a plan for your approval. Once approved, it spawns one background agent per unit, each in an isolated [git worktree](/en/common-workflows#run-parallel-claude-code-sessions-with-git-worktrees). Each agent implements its unit, runs tests, and opens a pull request. Requires a git repository. Example: `/batch migrate src/ from Solid to React`.
28
+
29
+ * **`/debug [description]`**: troubleshoots your current Claude Code session by reading the session debug log. Optionally describe the issue to focus the analysis.
30
+
31
+ * **`/claude-api`**: loads Claude API reference material for your project's language (Python, TypeScript, Java, Go, Ruby, C#, PHP, or cURL) and Agent SDK reference for Python and TypeScript. Covers tool use, streaming, batches, structured outputs, and common pitfalls. Also activates automatically when your code imports `anthropic`, `@anthropic-ai/sdk`, or `claude_agent_sdk`.
32
+
33
+ ## Getting started
34
+
35
+ ### Create your first skill
36
+
37
+ This example creates a skill that teaches Claude to explain code using visual diagrams and analogies. Since it uses default frontmatter, Claude can load it automatically when you ask how something works, or you can invoke it directly with `/explain-code`.
38
+
39
+ <Steps>
40
+ <Step title="Create the skill directory">
41
+ Create a directory for the skill in your personal skills folder. Personal skills are available across all your projects.
42
+
43
+ ```bash theme={null}
44
+ mkdir -p ~/.claude/skills/explain-code
45
+ ```
46
+ </Step>
47
+
48
+ <Step title="Write SKILL.md">
49
+ Every skill needs a `SKILL.md` file with two parts: YAML frontmatter (between `---` markers) that tells Claude when to use the skill, and markdown content with instructions Claude follows when the skill is invoked. The `name` field becomes the `/slash-command`, and the `description` helps Claude decide when to load it automatically.
50
+
51
+ Create `~/.claude/skills/explain-code/SKILL.md`:
52
+
53
+ ```yaml theme={null}
54
+ ---
55
+ name: explain-code
56
+ description: Explains code with visual diagrams and analogies. Use when explaining how code works, teaching about a codebase, or when the user asks "how does this work?"
57
+ ---
58
+
59
+ When explaining code, always include:
60
+
61
+ 1. **Start with an analogy**: Compare the code to something from everyday life
62
+ 2. **Draw a diagram**: Use ASCII art to show the flow, structure, or relationships
63
+ 3. **Walk through the code**: Explain step-by-step what happens
64
+ 4. **Highlight a gotcha**: What's a common mistake or misconception?
65
+
66
+ Keep explanations conversational. For complex concepts, use multiple analogies.
67
+ ```
68
+ </Step>
69
+
70
+ <Step title="Test the skill">
71
+ You can test it two ways:
72
+
73
+ **Let Claude invoke it automatically** by asking something that matches the description:
74
+
75
+ ```text theme={null}
76
+ How does this code work?
77
+ ```
78
+
79
+ **Or invoke it directly** with the skill name:
80
+
81
+ ```text theme={null}
82
+ /explain-code src/auth/login.ts
83
+ ```
84
+
85
+ Either way, Claude should include an analogy and ASCII diagram in its explanation.
86
+ </Step>
87
+ </Steps>
88
+
89
+ ### Where skills live
90
+
91
+ Where you store a skill determines who can use it:
92
+
93
+ | Location | Path | Applies to |
94
+ | :--------- | :-------------------------------------------------- | :----------------------------- |
95
+ | Enterprise | See [managed settings](/en/settings#settings-files) | All users in your organization |
96
+ | Personal | `~/.claude/skills/<skill-name>/SKILL.md` | All your projects |
97
+ | Project | `.claude/skills/<skill-name>/SKILL.md` | This project only |
98
+ | Plugin | `<plugin>/skills/<skill-name>/SKILL.md` | Where plugin is enabled |
99
+
100
+ When skills share the same name across levels, higher-priority locations win: enterprise > personal > project. Plugin skills use a `plugin-name:skill-name` namespace, so they cannot conflict with other levels. If you have files in `.claude/commands/`, those work the same way, but if a skill and a command share the same name, the skill takes precedence.
101
+
102
+ #### Automatic discovery from nested directories
103
+
104
+ When you work with files in subdirectories, Claude Code automatically discovers skills from nested `.claude/skills/` directories. For example, if you're editing a file in `packages/frontend/`, Claude Code also looks for skills in `packages/frontend/.claude/skills/`. This supports monorepo setups where packages have their own skills.
105
+
106
+ Each skill is a directory with `SKILL.md` as the entrypoint:
107
+
108
+ ```text theme={null}
109
+ my-skill/
110
+ ├── SKILL.md # Main instructions (required)
111
+ ├── template.md # Template for Claude to fill in
112
+ ├── examples/
113
+ │ └── sample.md # Example output showing expected format
114
+ └── scripts/
115
+ └── validate.sh # Script Claude can execute
116
+ ```
117
+
118
+ The `SKILL.md` contains the main instructions and is required. Other files are optional and let you build more powerful skills: templates for Claude to fill in, example outputs showing the expected format, scripts Claude can execute, or detailed reference documentation. Reference these files from your `SKILL.md` so Claude knows what they contain and when to load them. See [Add supporting files](#add-supporting-files) for more details.
119
+
120
+ <Note>
121
+ Files in `.claude/commands/` still work and support the same [frontmatter](#frontmatter-reference). Skills are recommended since they support additional features like supporting files.
122
+ </Note>
123
+
124
+ #### Skills from additional directories
125
+
126
+ Skills defined in `.claude/skills/` within directories added via `--add-dir` are loaded automatically and picked up by live change detection, so you can edit them during a session without restarting.
127
+
128
+ <Note>
129
+ CLAUDE.md files from `--add-dir` directories are not loaded by default. To load them, set `CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1`. See [Load from additional directories](/en/memory#load-from-additional-directories).
130
+ </Note>
131
+
132
+ ## Configure skills
133
+
134
+ Skills are configured through YAML frontmatter at the top of `SKILL.md` and the markdown content that follows.
135
+
136
+ ### Types of skill content
137
+
138
+ Skill files can contain any instructions, but thinking about how you want to invoke them helps guide what to include:
139
+
140
+ **Reference content** adds knowledge Claude applies to your current work. Conventions, patterns, style guides, domain knowledge. This content runs inline so Claude can use it alongside your conversation context.
141
+
142
+ ```yaml theme={null}
143
+ ---
144
+ name: api-conventions
145
+ description: API design patterns for this codebase
146
+ ---
147
+
148
+ When writing API endpoints:
149
+ - Use RESTful naming conventions
150
+ - Return consistent error formats
151
+ - Include request validation
152
+ ```
153
+
154
+ **Task content** gives Claude step-by-step instructions for a specific action, like deployments, commits, or code generation. These are often actions you want to invoke directly with `/skill-name` rather than letting Claude decide when to run them. Add `disable-model-invocation: true` to prevent Claude from triggering it automatically.
155
+
156
+ ```yaml theme={null}
157
+ ---
158
+ name: deploy
159
+ description: Deploy the application to production
160
+ context: fork
161
+ disable-model-invocation: true
162
+ ---
163
+
164
+ Deploy the application:
165
+ 1. Run the test suite
166
+ 2. Build the application
167
+ 3. Push to the deployment target
168
+ ```
169
+
170
+ Your `SKILL.md` can contain anything, but thinking through how you want the skill invoked (by you, by Claude, or both) and where you want it to run (inline or in a subagent) helps guide what to include. For complex skills, you can also [add supporting files](#add-supporting-files) to keep the main skill focused.
171
+
172
+ ### Frontmatter reference
173
+
174
+ Beyond the markdown content, you can configure skill behavior using YAML frontmatter fields between `---` markers at the top of your `SKILL.md` file:
175
+
176
+ ```yaml theme={null}
177
+ ---
178
+ name: my-skill
179
+ description: What this skill does
180
+ disable-model-invocation: true
181
+ allowed-tools: Read, Grep
182
+ ---
183
+
184
+ Your skill instructions here...
185
+ ```
186
+
187
+ All fields are optional. Only `description` is recommended so Claude knows when to use the skill.
188
+
189
+ | Field | Required | Description |
190
+ | :------------------------- | :---------- | :---------------------------------------------------------------------------------------------------------------------------------------------------- |
191
+ | `name` | No | Display name for the skill. If omitted, uses the directory name. Lowercase letters, numbers, and hyphens only (max 64 characters). |
192
+ | `description` | Recommended | What the skill does and when to use it. Claude uses this to decide when to apply the skill. If omitted, uses the first paragraph of markdown content. |
193
+ | `argument-hint` | No | Hint shown during autocomplete to indicate expected arguments. Example: `[issue-number]` or `[filename] [format]`. |
194
+ | `disable-model-invocation` | No | Set to `true` to prevent Claude from automatically loading this skill. Use for workflows you want to trigger manually with `/name`. Default: `false`. |
195
+ | `user-invocable` | No | Set to `false` to hide from the `/` menu. Use for background knowledge users shouldn't invoke directly. Default: `true`. |
196
+ | `allowed-tools` | No | Tools Claude can use without asking permission when this skill is active. |
197
+ | `model` | No | Model to use when this skill is active. |
198
+ | `context` | No | Set to `fork` to run in a forked subagent context. |
199
+ | `agent` | No | Which subagent type to use when `context: fork` is set. |
200
+ | `hooks` | No | Hooks scoped to this skill's lifecycle. See [Hooks in skills and agents](/en/hooks#hooks-in-skills-and-agents) for configuration format. |
201
+
202
+ #### Available string substitutions
203
+
204
+ Skills support string substitution for dynamic values in the skill content:
205
+
206
+ | Variable | Description |
207
+ | :--------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
208
+ | `$ARGUMENTS` | All arguments passed when invoking the skill. If `$ARGUMENTS` is not present in the content, arguments are appended as `ARGUMENTS: <value>`. |
209
+ | `$ARGUMENTS[N]` | Access a specific argument by 0-based index, such as `$ARGUMENTS[0]` for the first argument. |
210
+ | `$N` | Shorthand for `$ARGUMENTS[N]`, such as `$0` for the first argument or `$1` for the second. |
211
+ | `${CLAUDE_SESSION_ID}` | The current session ID. Useful for logging, creating session-specific files, or correlating skill output with sessions. |
212
+ | `${CLAUDE_SKILL_DIR}` | The directory containing the skill's `SKILL.md` file. For plugin skills, this is the skill's subdirectory within the plugin, not the plugin root. Use this in bash injection commands to reference scripts or files bundled with the skill, regardless of the current working directory. |
213
+
214
+ **Example using substitutions:**
215
+
216
+ ```yaml theme={null}
217
+ ---
218
+ name: session-logger
219
+ description: Log activity for this session
220
+ ---
221
+
222
+ Log the following to logs/${CLAUDE_SESSION_ID}.log:
223
+
224
+ $ARGUMENTS
225
+ ```
226
+
227
+ ### Add supporting files
228
+
229
+ Skills can include multiple files in their directory. This keeps `SKILL.md` focused on the essentials while letting Claude access detailed reference material only when needed. Large reference docs, API specifications, or example collections don't need to load into context every time the skill runs.
230
+
231
+ ```text theme={null}
232
+ my-skill/
233
+ ├── SKILL.md (required - overview and navigation)
234
+ ├── reference.md (detailed API docs - loaded when needed)
235
+ ├── examples.md (usage examples - loaded when needed)
236
+ └── scripts/
237
+ └── helper.py (utility script - executed, not loaded)
238
+ ```
239
+
240
+ Reference supporting files from `SKILL.md` so Claude knows what each file contains and when to load it:
241
+
242
+ ```markdown theme={null}
243
+ ## Additional resources
244
+
245
+ - For complete API details, see [reference.md](reference.md)
246
+ - For usage examples, see [examples.md](examples.md)
247
+ ```
248
+
249
+ <Tip>Keep `SKILL.md` under 500 lines. Move detailed reference material to separate files.</Tip>
250
+
251
+ ### Control who invokes a skill
252
+
253
+ By default, both you and Claude can invoke any skill. You can type `/skill-name` to invoke it directly, and Claude can load it automatically when relevant to your conversation. Two frontmatter fields let you restrict this:
254
+
255
+ * **`disable-model-invocation: true`**: Only you can invoke the skill. Use this for workflows with side effects or that you want to control timing, like `/commit`, `/deploy`, or `/send-slack-message`. You don't want Claude deciding to deploy because your code looks ready.
256
+
257
+ * **`user-invocable: false`**: Only Claude can invoke the skill. Use this for background knowledge that isn't actionable as a command. A `legacy-system-context` skill explains how an old system works. Claude should know this when relevant, but `/legacy-system-context` isn't a meaningful action for users to take.
258
+
259
+ This example creates a deploy skill that only you can trigger. The `disable-model-invocation: true` field prevents Claude from running it automatically:
260
+
261
+ ```yaml theme={null}
262
+ ---
263
+ name: deploy
264
+ description: Deploy the application to production
265
+ disable-model-invocation: true
266
+ ---
267
+
268
+ Deploy $ARGUMENTS to production:
269
+
270
+ 1. Run the test suite
271
+ 2. Build the application
272
+ 3. Push to the deployment target
273
+ 4. Verify the deployment succeeded
274
+ ```
275
+
276
+ Here's how the two fields affect invocation and context loading:
277
+
278
+ | Frontmatter | You can invoke | Claude can invoke | When loaded into context |
279
+ | :------------------------------- | :------------- | :---------------- | :----------------------------------------------------------- |
280
+ | (default) | Yes | Yes | Description always in context, full skill loads when invoked |
281
+ | `disable-model-invocation: true` | Yes | No | Description not in context, full skill loads when you invoke |
282
+ | `user-invocable: false` | No | Yes | Description always in context, full skill loads when invoked |
283
+
284
+ <Note>
285
+ In a regular session, skill descriptions are loaded into context so Claude knows what's available, but full skill content only loads when invoked. [Subagents with preloaded skills](/en/sub-agents#preload-skills-into-subagents) work differently: the full skill content is injected at startup.
286
+ </Note>
287
+
288
+ ### Restrict tool access
289
+
290
+ Use the `allowed-tools` field to limit which tools Claude can use when a skill is active. This skill creates a read-only mode where Claude can explore files but not modify them:
291
+
292
+ ```yaml theme={null}
293
+ ---
294
+ name: safe-reader
295
+ description: Read files without making changes
296
+ allowed-tools: Read, Grep, Glob
297
+ ---
298
+ ```
299
+
300
+ ### Pass arguments to skills
301
+
302
+ Both you and Claude can pass arguments when invoking a skill. Arguments are available via the `$ARGUMENTS` placeholder.
303
+
304
+ This skill fixes a GitHub issue by number. The `$ARGUMENTS` placeholder gets replaced with whatever follows the skill name:
305
+
306
+ ```yaml theme={null}
307
+ ---
308
+ name: fix-issue
309
+ description: Fix a GitHub issue
310
+ disable-model-invocation: true
311
+ ---
312
+
313
+ Fix GitHub issue $ARGUMENTS following our coding standards.
314
+
315
+ 1. Read the issue description
316
+ 2. Understand the requirements
317
+ 3. Implement the fix
318
+ 4. Write tests
319
+ 5. Create a commit
320
+ ```
321
+
322
+ When you run `/fix-issue 123`, Claude receives "Fix GitHub issue 123 following our coding standards..."
323
+
324
+ If you invoke a skill with arguments but the skill doesn't include `$ARGUMENTS`, Claude Code appends `ARGUMENTS: <your input>` to the end of the skill content so Claude still sees what you typed.
325
+
326
+ To access individual arguments by position, use `$ARGUMENTS[N]` or the shorter `$N`:
327
+
328
+ ```yaml theme={null}
329
+ ---
330
+ name: migrate-component
331
+ description: Migrate a component from one framework to another
332
+ ---
333
+
334
+ Migrate the $ARGUMENTS[0] component from $ARGUMENTS[1] to $ARGUMENTS[2].
335
+ Preserve all existing behavior and tests.
336
+ ```
337
+
338
+ Running `/migrate-component SearchBar React Vue` replaces `$ARGUMENTS[0]` with `SearchBar`, `$ARGUMENTS[1]` with `React`, and `$ARGUMENTS[2]` with `Vue`. The same skill using the `$N` shorthand:
339
+
340
+ ```yaml theme={null}
341
+ ---
342
+ name: migrate-component
343
+ description: Migrate a component from one framework to another
344
+ ---
345
+
346
+ Migrate the $0 component from $1 to $2.
347
+ Preserve all existing behavior and tests.
348
+ ```
349
+
350
+ ## Advanced patterns
351
+
352
+ ### Inject dynamic context
353
+
354
+ The `!`command\`\` syntax runs shell commands before the skill content is sent to Claude. The command output replaces the placeholder, so Claude receives actual data, not the command itself.
355
+
356
+ This skill summarizes a pull request by fetching live PR data with the GitHub CLI. The `!`gh pr diff\`\` and other commands run first, and their output gets inserted into the prompt:
357
+
358
+ ```yaml theme={null}
359
+ ---
360
+ name: pr-summary
361
+ description: Summarize changes in a pull request
362
+ context: fork
363
+ agent: Explore
364
+ allowed-tools: Bash(gh *)
365
+ ---
366
+
367
+ ## Pull request context
368
+ - PR diff: !`gh pr diff`
369
+ - PR comments: !`gh pr view --comments`
370
+ - Changed files: !`gh pr diff --name-only`
371
+
372
+ ## Your task
373
+ Summarize this pull request...
374
+ ```
375
+
376
+ When this skill runs:
377
+
378
+ 1. Each `!`command\`\` executes immediately (before Claude sees anything)
379
+ 2. The output replaces the placeholder in the skill content
380
+ 3. Claude receives the fully-rendered prompt with actual PR data
381
+
382
+ This is preprocessing, not something Claude executes. Claude only sees the final result.
383
+
384
+ <Tip>
385
+ To enable [extended thinking](/en/common-workflows#use-extended-thinking-thinking-mode) in a skill, include the word "ultrathink" anywhere in your skill content.
386
+ </Tip>
387
+
388
+ ### Run skills in a subagent
389
+
390
+ Add `context: fork` to your frontmatter when you want a skill to run in isolation. The skill content becomes the prompt that drives the subagent. It won't have access to your conversation history.
391
+
392
+ <Warning>
393
+ `context: fork` only makes sense for skills with explicit instructions. If your skill contains guidelines like "use these API conventions" without a task, the subagent receives the guidelines but no actionable prompt, and returns without meaningful output.
394
+ </Warning>
395
+
396
+ Skills and [subagents](/en/sub-agents) work together in two directions:
397
+
398
+ | Approach | System prompt | Task | Also loads |
399
+ | :--------------------------- | :---------------------------------------- | :-------------------------- | :--------------------------- |
400
+ | Skill with `context: fork` | From agent type (`Explore`, `Plan`, etc.) | SKILL.md content | CLAUDE.md |
401
+ | Subagent with `skills` field | Subagent's markdown body | Claude's delegation message | Preloaded skills + CLAUDE.md |
402
+
403
+ With `context: fork`, you write the task in your skill and pick an agent type to execute it. For the inverse (defining a custom subagent that uses skills as reference material), see [Subagents](/en/sub-agents#preload-skills-into-subagents).
404
+
405
+ #### Example: Research skill using Explore agent
406
+
407
+ This skill runs research in a forked Explore agent. The skill content becomes the task, and the agent provides read-only tools optimized for codebase exploration:
408
+
409
+ ```yaml theme={null}
410
+ ---
411
+ name: deep-research
412
+ description: Research a topic thoroughly
413
+ context: fork
414
+ agent: Explore
415
+ ---
416
+
417
+ Research $ARGUMENTS thoroughly:
418
+
419
+ 1. Find relevant files using Glob and Grep
420
+ 2. Read and analyze the code
421
+ 3. Summarize findings with specific file references
422
+ ```
423
+
424
+ When this skill runs:
425
+
426
+ 1. A new isolated context is created
427
+ 2. The subagent receives the skill content as its prompt ("Research \$ARGUMENTS thoroughly...")
428
+ 3. The `agent` field determines the execution environment (model, tools, and permissions)
429
+ 4. Results are summarized and returned to your main conversation
430
+
431
+ The `agent` field specifies which subagent configuration to use. Options include built-in agents (`Explore`, `Plan`, `general-purpose`) or any custom subagent from `.claude/agents/`. If omitted, uses `general-purpose`.
432
+
433
+ ### Restrict Claude's skill access
434
+
435
+ By default, Claude can invoke any skill that doesn't have `disable-model-invocation: true` set. Skills that define `allowed-tools` grant Claude access to those tools without per-use approval when the skill is active. Your [permission settings](/en/permissions) still govern baseline approval behavior for all other tools. Built-in commands like `/compact` and `/init` are not available through the Skill tool.
436
+
437
+ Three ways to control which skills Claude can invoke:
438
+
439
+ **Disable all skills** by denying the Skill tool in `/permissions`:
440
+
441
+ ```text theme={null}
442
+ # Add to deny rules:
443
+ Skill
444
+ ```
445
+
446
+ **Allow or deny specific skills** using [permission rules](/en/permissions):
447
+
448
+ ```text theme={null}
449
+ # Allow only specific skills
450
+ Skill(commit)
451
+ Skill(review-pr *)
452
+
453
+ # Deny specific skills
454
+ Skill(deploy *)
455
+ ```
456
+
457
+ Permission syntax: `Skill(name)` for exact match, `Skill(name *)` for prefix match with any arguments.
458
+
459
+ **Hide individual skills** by adding `disable-model-invocation: true` to their frontmatter. This removes the skill from Claude's context entirely.
460
+
461
+ <Note>
462
+ The `user-invocable` field only controls menu visibility, not Skill tool access. Use `disable-model-invocation: true` to block programmatic invocation.
463
+ </Note>
464
+
465
+ ## Share skills
466
+
467
+ Skills can be distributed at different scopes depending on your audience:
468
+
469
+ * **Project skills**: Commit `.claude/skills/` to version control
470
+ * **Plugins**: Create a `skills/` directory in your [plugin](/en/plugins)
471
+ * **Managed**: Deploy organization-wide through [managed settings](/en/settings#settings-files)
472
+
473
+ ### Generate visual output
474
+
475
+ Skills can bundle and run scripts in any language, giving Claude capabilities beyond what's possible in a single prompt. One powerful pattern is generating visual output: interactive HTML files that open in your browser for exploring data, debugging, or creating reports.
476
+
477
+ This example creates a codebase explorer: an interactive tree view where you can expand and collapse directories, see file sizes at a glance, and identify file types by color.
478
+
479
+ Create the Skill directory:
480
+
481
+ ```bash theme={null}
482
+ mkdir -p ~/.claude/skills/codebase-visualizer/scripts
483
+ ```
484
+
485
+ Create `~/.claude/skills/codebase-visualizer/SKILL.md`. The description tells Claude when to activate this Skill, and the instructions tell Claude to run the bundled script:
486
+
487
+ ````yaml theme={null}
488
+ ---
489
+ name: codebase-visualizer
490
+ description: Generate an interactive collapsible tree visualization of your codebase. Use when exploring a new repo, understanding project structure, or identifying large files.
491
+ allowed-tools: Bash(python *)
492
+ ---
493
+
494
+ # Codebase Visualizer
495
+
496
+ Generate an interactive HTML tree view that shows your project's file structure with collapsible directories.
497
+
498
+ ## Usage
499
+
500
+ Run the visualization script from your project root:
501
+
502
+ ```bash
503
+ python ~/.claude/skills/codebase-visualizer/scripts/visualize.py .
504
+ ```text
505
+
506
+ This creates `codebase-map.html` in the current directory and opens it in your default browser.
507
+
508
+ ## What the visualization shows
509
+
510
+ - **Collapsible directories**: Click folders to expand/collapse
511
+ - **File sizes**: Displayed next to each file
512
+ - **Colors**: Different colors for different file types
513
+ - **Directory totals**: Shows aggregate size of each folder
514
+ ````
515
+
516
+ Create `~/.claude/skills/codebase-visualizer/scripts/visualize.py`. This script scans a directory tree and generates a self-contained HTML file with:
517
+
518
+ * A **summary sidebar** showing file count, directory count, total size, and number of file types
519
+ * A **bar chart** breaking down the codebase by file type (top 8 by size)
520
+ * A **collapsible tree** where you can expand and collapse directories, with color-coded file type indicators
521
+
522
+ The script requires Python but uses only built-in libraries, so there are no packages to install:
523
+
524
+ ```python expandable theme={null}
525
+ #!/usr/bin/env python3
526
+ """Generate an interactive collapsible tree visualization of a codebase."""
527
+
528
+ import json
529
+ import sys
530
+ import webbrowser
531
+ from pathlib import Path
532
+ from collections import Counter
533
+
534
+ IGNORE = {'.git', 'node_modules', '__pycache__', '.venv', 'venv', 'dist', 'build'}
535
+
536
+ def scan(path: Path, stats: dict) -> dict:
537
+ result = {"name": path.name, "children": [], "size": 0}
538
+ try:
539
+ for item in sorted(path.iterdir()):
540
+ if item.name in IGNORE or item.name.startswith('.'):
541
+ continue
542
+ if item.is_file():
543
+ size = item.stat().st_size
544
+ ext = item.suffix.lower() or '(no ext)'
545
+ result["children"].append({"name": item.name, "size": size, "ext": ext})
546
+ result["size"] += size
547
+ stats["files"] += 1
548
+ stats["extensions"][ext] += 1
549
+ stats["ext_sizes"][ext] += size
550
+ elif item.is_dir():
551
+ stats["dirs"] += 1
552
+ child = scan(item, stats)
553
+ if child["children"]:
554
+ result["children"].append(child)
555
+ result["size"] += child["size"]
556
+ except PermissionError:
557
+ pass
558
+ return result
559
+
560
+ def generate_html(data: dict, stats: dict, output: Path) -> None:
561
+ ext_sizes = stats["ext_sizes"]
562
+ total_size = sum(ext_sizes.values()) or 1
563
+ sorted_exts = sorted(ext_sizes.items(), key=lambda x: -x[1])[:8]
564
+ colors = {
565
+ '.js': '#f7df1e', '.ts': '#3178c6', '.py': '#3776ab', '.go': '#00add8',
566
+ '.rs': '#dea584', '.rb': '#cc342d', '.css': '#264de4', '.html': '#e34c26',
567
+ '.json': '#6b7280', '.md': '#083fa1', '.yaml': '#cb171e', '.yml': '#cb171e',
568
+ '.mdx': '#083fa1', '.tsx': '#3178c6', '.jsx': '#61dafb', '.sh': '#4eaa25',
569
+ }
570
+ lang_bars = "".join(
571
+ f'<div class="bar-row"><span class="bar-label">{ext}</span>'
572
+ f'<div class="bar" style="width:{(size/total_size)*100}%;background:{colors.get(ext,"#6b7280")}"></div>'
573
+ f'<span class="bar-pct">{(size/total_size)*100:.1f}%</span></div>'
574
+ for ext, size in sorted_exts
575
+ )
576
+ def fmt(b):
577
+ if b < 1024: return f"{b} B"
578
+ if b < 1048576: return f"{b/1024:.1f} KB"
579
+ return f"{b/1048576:.1f} MB"
580
+
581
+ html = f'''<!DOCTYPE html>
582
+ <html><head>
583
+ <meta charset="utf-8"><title>Codebase Explorer</title>
584
+ <style>
585
+ body {{ font: 14px/1.5 system-ui, sans-serif; margin: 0; background: #1a1a2e; color: #eee; }}
586
+ .container {{ display: flex; height: 100vh; }}
587
+ .sidebar {{ width: 280px; background: #252542; padding: 20px; border-right: 1px solid #3d3d5c; overflow-y: auto; flex-shrink: 0; }}
588
+ .main {{ flex: 1; padding: 20px; overflow-y: auto; }}
589
+ h1 {{ margin: 0 0 10px 0; font-size: 18px; }}
590
+ h2 {{ margin: 20px 0 10px 0; font-size: 14px; color: #888; text-transform: uppercase; }}
591
+ .stat {{ display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #3d3d5c; }}
592
+ .stat-value {{ font-weight: bold; }}
593
+ .bar-row {{ display: flex; align-items: center; margin: 6px 0; }}
594
+ .bar-label {{ width: 55px; font-size: 12px; color: #aaa; }}
595
+ .bar {{ height: 18px; border-radius: 3px; }}
596
+ .bar-pct {{ margin-left: 8px; font-size: 12px; color: #666; }}
597
+ .tree {{ list-style: none; padding-left: 20px; }}
598
+ details {{ cursor: pointer; }}
599
+ summary {{ padding: 4px 8px; border-radius: 4px; }}
600
+ summary:hover {{ background: #2d2d44; }}
601
+ .folder {{ color: #ffd700; }}
602
+ .file {{ display: flex; align-items: center; padding: 4px 8px; border-radius: 4px; }}
603
+ .file:hover {{ background: #2d2d44; }}
604
+ .size {{ color: #888; margin-left: auto; font-size: 12px; }}
605
+ .dot {{ width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; }}
606
+ </style>
607
+ </head><body>
608
+ <div class="container">
609
+ <div class="sidebar">
610
+ <h1>📊 Summary</h1>
611
+ <div class="stat"><span>Files</span><span class="stat-value">{stats["files"]:,}</span></div>
612
+ <div class="stat"><span>Directories</span><span class="stat-value">{stats["dirs"]:,}</span></div>
613
+ <div class="stat"><span>Total size</span><span class="stat-value">{fmt(data["size"])}</span></div>
614
+ <div class="stat"><span>File types</span><span class="stat-value">{len(stats["extensions"])}</span></div>
615
+ <h2>By file type</h2>
616
+ {lang_bars}
617
+ </div>
618
+ <div class="main">
619
+ <h1>📁 {data["name"]}</h1>
620
+ <ul class="tree" id="root"></ul>
621
+ </div>
622
+ </div>
623
+ <script>
624
+ const data = {json.dumps(data)};
625
+ const colors = {json.dumps(colors)};
626
+ function fmt(b) {{ if (b < 1024) return b + ' B'; if (b < 1048576) return (b/1024).toFixed(1) + ' KB'; return (b/1048576).toFixed(1) + ' MB'; }}
627
+ function render(node, parent) {{
628
+ if (node.children) {{
629
+ const det = document.createElement('details');
630
+ det.open = parent === document.getElementById('root');
631
+ det.innerHTML = `<summary><span class="folder">📁 ${{node.name}}</span><span class="size">${{fmt(node.size)}}</span></summary>`;
632
+ const ul = document.createElement('ul'); ul.className = 'tree';
633
+ node.children.sort((a,b) => (b.children?1:0)-(a.children?1:0) || a.name.localeCompare(b.name));
634
+ node.children.forEach(c => render(c, ul));
635
+ det.appendChild(ul);
636
+ const li = document.createElement('li'); li.appendChild(det); parent.appendChild(li);
637
+ }} else {{
638
+ const li = document.createElement('li'); li.className = 'file';
639
+ li.innerHTML = `<span class="dot" style="background:${{colors[node.ext]||'#6b7280'}}"></span>${{node.name}}<span class="size">${{fmt(node.size)}}</span>`;
640
+ parent.appendChild(li);
641
+ }}
642
+ }}
643
+ data.children.forEach(c => render(c, document.getElementById('root')));
644
+ </script>
645
+ </body></html>'''
646
+ output.write_text(html)
647
+
648
+ if __name__ == '__main__':
649
+ target = Path(sys.argv[1] if len(sys.argv) > 1 else '.').resolve()
650
+ stats = {"files": 0, "dirs": 0, "extensions": Counter(), "ext_sizes": Counter()}
651
+ data = scan(target, stats)
652
+ out = Path('codebase-map.html')
653
+ generate_html(data, stats, out)
654
+ print(f'Generated {out.absolute()}')
655
+ webbrowser.open(f'file://{out.absolute()}')
656
+ ```
657
+
658
+ To test, open Claude Code in any project and ask "Visualize this codebase." Claude runs the script, generates `codebase-map.html`, and opens it in your browser.
659
+
660
+ This pattern works for any visual output: dependency graphs, test coverage reports, API documentation, or database schema visualizations. The bundled script does the heavy lifting while Claude handles orchestration.
661
+
662
+ ## Troubleshooting
663
+
664
+ ### Skill not triggering
665
+
666
+ If Claude doesn't use your skill when expected:
667
+
668
+ 1. Check the description includes keywords users would naturally say
669
+ 2. Verify the skill appears in `What skills are available?`
670
+ 3. Try rephrasing your request to match the description more closely
671
+ 4. Invoke it directly with `/skill-name` if the skill is user-invocable
672
+
673
+ ### Skill triggers too often
674
+
675
+ If Claude uses your skill when you don't want it:
676
+
677
+ 1. Make the description more specific
678
+ 2. Add `disable-model-invocation: true` if you only want manual invocation
679
+
680
+ ### Claude doesn't see all my skills
681
+
682
+ Skill descriptions are loaded into context so Claude knows what's available. If you have many skills, they may exceed the character budget. The budget scales dynamically at 2% of the context window, with a fallback of 16,000 characters. Run `/context` to check for a warning about excluded skills.
683
+
684
+ To override the limit, set the `SLASH_COMMAND_TOOL_CHAR_BUDGET` environment variable.
685
+
686
+ ## Related resources
687
+
688
+ * **[Subagents](/en/sub-agents)**: delegate tasks to specialized agents
689
+ * **[Plugins](/en/plugins)**: package and distribute skills with other extensions
690
+ * **[Hooks](/en/hooks)**: automate workflows around tool events
691
+ * **[Memory](/en/memory)**: manage CLAUDE.md files for persistent context
692
+ * **[Interactive mode](/en/interactive-mode#built-in-commands)**: built-in commands and shortcuts
693
+ * **[Permissions](/en/permissions)**: control tool and skill access