talkops-opscloud 0.3.0b1__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.
Files changed (309) hide show
  1. opscloud/__init__.py +5 -0
  2. opscloud/__main__.py +6 -0
  3. opscloud/_constants.py +53 -0
  4. opscloud/_debug.py +145 -0
  5. opscloud/_debug_buffer.py +250 -0
  6. opscloud/_textual_patches.py +367 -0
  7. opscloud/_version.py +15 -0
  8. opscloud/agent/__init__.py +27 -0
  9. opscloud/agent/config.py +168 -0
  10. opscloud/agent/factory.py +1103 -0
  11. opscloud/approval_mode.py +44 -0
  12. opscloud/backend/__init__.py +49 -0
  13. opscloud/backend/composite.py +89 -0
  14. opscloud/backend/local.py +183 -0
  15. opscloud/backend/registry.py +79 -0
  16. opscloud/backend/sandbox_config.py +107 -0
  17. opscloud/backend/sandbox_factory.py +432 -0
  18. opscloud/built_in_skills/remember/SKILL.md +124 -0
  19. opscloud/built_in_skills/skill-creator/SKILL.md +348 -0
  20. opscloud/built_in_skills/skill-creator/scripts/init_skill.py +371 -0
  21. opscloud/built_in_skills/skill-creator/scripts/quick_validate.py +165 -0
  22. opscloud/cli/__init__.py +1 -0
  23. opscloud/cli/commands/__init__.py +15 -0
  24. opscloud/cli/commands/auth.py +45 -0
  25. opscloud/cli/commands/doctor.py +100 -0
  26. opscloud/cli/commands/mcp.py +137 -0
  27. opscloud/cli/commands/threads.py +51 -0
  28. opscloud/cli/interactive.py +154 -0
  29. opscloud/cli/main.py +903 -0
  30. opscloud/cli/non_interactive.py +425 -0
  31. opscloud/cli/server_manager.py +58 -0
  32. opscloud/commands/__init__.py +19 -0
  33. opscloud/commands/_base.py +110 -0
  34. opscloud/commands/_guards.py +52 -0
  35. opscloud/commands/_router.py +146 -0
  36. opscloud/commands/_types.py +36 -0
  37. opscloud/commands/core/__init__.py +47 -0
  38. opscloud/commands/core/auth.py +94 -0
  39. opscloud/commands/core/bug.py +46 -0
  40. opscloud/commands/core/clear.py +106 -0
  41. opscloud/commands/core/cloud.py +185 -0
  42. opscloud/commands/core/compact.py +128 -0
  43. opscloud/commands/core/config_cmd.py +120 -0
  44. opscloud/commands/core/context.py +220 -0
  45. opscloud/commands/core/cost.py +44 -0
  46. opscloud/commands/core/doctor.py +535 -0
  47. opscloud/commands/core/effort.py +108 -0
  48. opscloud/commands/core/exit_cmd.py +41 -0
  49. opscloud/commands/core/fast.py +148 -0
  50. opscloud/commands/core/help_cmd.py +94 -0
  51. opscloud/commands/core/mcp.py +134 -0
  52. opscloud/commands/core/model.py +109 -0
  53. opscloud/commands/core/permissions.py +196 -0
  54. opscloud/commands/core/plugins.py +92 -0
  55. opscloud/commands/core/pool.py +108 -0
  56. opscloud/commands/core/resume.py +97 -0
  57. opscloud/commands/core/skills.py +178 -0
  58. opscloud/commands/power/__init__.py +51 -0
  59. opscloud/commands/power/agents.py +98 -0
  60. opscloud/commands/power/btw.py +85 -0
  61. opscloud/commands/power/copy.py +97 -0
  62. opscloud/commands/power/goal.py +548 -0
  63. opscloud/commands/power/loop.py +295 -0
  64. opscloud/commands/power/memory.py +287 -0
  65. opscloud/commands/power/review.py +152 -0
  66. opscloud/commands/power/rubric.py +287 -0
  67. opscloud/commands/power/runtime.py +321 -0
  68. opscloud/commands/power/skill_creator.py +70 -0
  69. opscloud/commands/power/skill_invoke.py +165 -0
  70. opscloud/commands/power/tasks.py +209 -0
  71. opscloud/commands/power/trace.py +117 -0
  72. opscloud/commands/power/ui_toggles.py +135 -0
  73. opscloud/commands/power/version.py +52 -0
  74. opscloud/commands/registry.py +176 -0
  75. opscloud/config/__init__.py +114 -0
  76. opscloud/config/adapters/__init__.py +5 -0
  77. opscloud/config/adapters/postgres.py +776 -0
  78. opscloud/config/adapters/sqlite.py +769 -0
  79. opscloud/config/aws.py +248 -0
  80. opscloud/config/cloud_profiles.py +437 -0
  81. opscloud/config/env_vars.py +81 -0
  82. opscloud/config/langsmith.py +319 -0
  83. opscloud/config/manifest.py +817 -0
  84. opscloud/config/metadata.py +205 -0
  85. opscloud/config/paths.py +604 -0
  86. opscloud/config/plugins.py +130 -0
  87. opscloud/config/settings.py +834 -0
  88. opscloud/config/store.py +453 -0
  89. opscloud/config/store_factory.py +97 -0
  90. opscloud/config/toml_config.py +562 -0
  91. opscloud/editor.py +173 -0
  92. opscloud/exceptions.py +65 -0
  93. opscloud/file_ops.py +217 -0
  94. opscloud/hooks/__init__.py +139 -0
  95. opscloud/hooks/env.py +44 -0
  96. opscloud/hooks/interrupt.py +121 -0
  97. opscloud/hooks/models/__init__.py +109 -0
  98. opscloud/hooks/models/adapters.py +19 -0
  99. opscloud/hooks/models/config.py +79 -0
  100. opscloud/hooks/models/domain.py +434 -0
  101. opscloud/hooks/models/transport.py +37 -0
  102. opscloud/hooks/tools.py +231 -0
  103. opscloud/input.py +48 -0
  104. opscloud/integrations/__init__.py +80 -0
  105. opscloud/integrations/base.py +153 -0
  106. opscloud/integrations/content_filter.py +119 -0
  107. opscloud/integrations/event_bus.py +480 -0
  108. opscloud/integrations/hooks.py +238 -0
  109. opscloud/integrations/identity.py +181 -0
  110. opscloud/integrations/notifications.py +134 -0
  111. opscloud/integrations/stream_bridge.py +397 -0
  112. opscloud/integrations/thread_store.py +81 -0
  113. opscloud/json_types.py +20 -0
  114. opscloud/mcp/__init__.py +57 -0
  115. opscloud/mcp/config.py +203 -0
  116. opscloud/mcp/discovery.py +229 -0
  117. opscloud/mcp/mcp_info.py +109 -0
  118. opscloud/mcp/middleware.py +102 -0
  119. opscloud/mcp/preload.py +505 -0
  120. opscloud/mcp/raw_config.py +149 -0
  121. opscloud/mcp/semantic_profiler.py +305 -0
  122. opscloud/mcp/session_manager.py +727 -0
  123. opscloud/mcp/trust.py +105 -0
  124. opscloud/memory/__init__.py +27 -0
  125. opscloud/memory/branch.py +61 -0
  126. opscloud/memory/guard.py +19 -0
  127. opscloud/memory/onboarding.py +120 -0
  128. opscloud/memory/registry.py +134 -0
  129. opscloud/memory/store.py +223 -0
  130. opscloud/middleware/__init__.py +106 -0
  131. opscloud/middleware/_repository_bounds.py +459 -0
  132. opscloud/middleware/ask_user.py +152 -0
  133. opscloud/middleware/auto_mode.py +60 -0
  134. opscloud/middleware/auto_mode_hitl.py +2434 -0
  135. opscloud/middleware/compaction.py +566 -0
  136. opscloud/middleware/configurable_model.py +233 -0
  137. opscloud/middleware/cost_tracking.py +1021 -0
  138. opscloud/middleware/glm_stall_recovery.py +109 -0
  139. opscloud/middleware/goal_criteria.py +1234 -0
  140. opscloud/middleware/goal_state_notice.py +712 -0
  141. opscloud/middleware/goal_tools.py +407 -0
  142. opscloud/middleware/headless_mcp_guard.py +88 -0
  143. opscloud/middleware/jev_model_router.py +1018 -0
  144. opscloud/middleware/local_context.py +460 -0
  145. opscloud/middleware/mcp_context.py +151 -0
  146. opscloud/middleware/mcp_middleware.py +146 -0
  147. opscloud/middleware/memory_guard.py +393 -0
  148. opscloud/middleware/model_retry.py +205 -0
  149. opscloud/middleware/registry.py +137 -0
  150. opscloud/middleware/reliable_rubric.py +709 -0
  151. opscloud/middleware/resume_state.py +91 -0
  152. opscloud/middleware/server_hooks.py +1189 -0
  153. opscloud/middleware/shell_allow_list.py +90 -0
  154. opscloud/middleware/skills.py +382 -0
  155. opscloud/middleware/subagent_artifacts.py +84 -0
  156. opscloud/middleware/subagent_telemetry.py +261 -0
  157. opscloud/middleware/subagents.py +243 -0
  158. opscloud/middleware/tool_filter.py +384 -0
  159. opscloud/middleware/unified_system_message.py +62 -0
  160. opscloud/model/__init__.py +37 -0
  161. opscloud/model/config.py +2992 -0
  162. opscloud/model/factory.py +477 -0
  163. opscloud/model/pool.py +459 -0
  164. opscloud/model/reasoning.py +282 -0
  165. opscloud/offload.py +173 -0
  166. opscloud/output.py +64 -0
  167. opscloud/plugins/__init__.py +189 -0
  168. opscloud/plugins/_json.py +22 -0
  169. opscloud/plugins/adapters/__init__.py +13 -0
  170. opscloud/plugins/adapters/agents.py +112 -0
  171. opscloud/plugins/adapters/commands.py +190 -0
  172. opscloud/plugins/adapters/mcp.py +363 -0
  173. opscloud/plugins/adapters/skills.py +132 -0
  174. opscloud/plugins/commands_cli.py +541 -0
  175. opscloud/plugins/discovery.py +512 -0
  176. opscloud/plugins/manifest.py +335 -0
  177. opscloud/plugins/marketplace.py +893 -0
  178. opscloud/plugins/models.py +334 -0
  179. opscloud/plugins/project_plugins.py +317 -0
  180. opscloud/plugins/protocol.py +31 -0
  181. opscloud/plugins/store.py +905 -0
  182. opscloud/plugins/substitution.py +122 -0
  183. opscloud/project_utils.py +145 -0
  184. opscloud/prompts/__init__.py +37 -0
  185. opscloud/prompts/system.py +483 -0
  186. opscloud/prompts/templates/system_prompt.md +166 -0
  187. opscloud/prompts/types.py +54 -0
  188. opscloud/rubrics/__init__.py +42 -0
  189. opscloud/rubrics/evaluator.py +404 -0
  190. opscloud/rubrics/evidence_extractor.py +229 -0
  191. opscloud/rubrics/generator.py +239 -0
  192. opscloud/rubrics/jev_compiler.py +175 -0
  193. opscloud/rubrics/jev_grader.py +297 -0
  194. opscloud/rubrics/middleware.py +8 -0
  195. opscloud/schema/__init__.py +107 -0
  196. opscloud/schema/interrupts.py +981 -0
  197. opscloud/security/__init__.py +91 -0
  198. opscloud/security/approval_mode.py +528 -0
  199. opscloud/security/approval_mode_source.py +230 -0
  200. opscloud/security/cli_ast_evaluator.py +552 -0
  201. opscloud/security/jev_classifier.py +651 -0
  202. opscloud/security/shell_safety.py +340 -0
  203. opscloud/security/unicode_security.py +439 -0
  204. opscloud/security/url_validation.py +160 -0
  205. opscloud/server/__init__.py +13 -0
  206. opscloud/server/_server_config.py +158 -0
  207. opscloud/server/server.py +242 -0
  208. opscloud/server/server_graph.py +93 -0
  209. opscloud/skills/__init__.py +91 -0
  210. opscloud/skills/commands.py +1099 -0
  211. opscloud/skills/invocation.py +200 -0
  212. opscloud/skills/load.py +388 -0
  213. opscloud/skills/loader.py +23 -0
  214. opscloud/skills/merge.py +65 -0
  215. opscloud/skills/registry.py +263 -0
  216. opscloud/skills/sources.py +174 -0
  217. opscloud/skills/trust.py +417 -0
  218. opscloud/state/__init__.py +142 -0
  219. opscloud/state/base.py +154 -0
  220. opscloud/state/cloud_context.py +262 -0
  221. opscloud/state/goal_channels.py +124 -0
  222. opscloud/state/goal_state_limits.py +175 -0
  223. opscloud/state/resume_state.py +58 -0
  224. opscloud/state/service_context.py +281 -0
  225. opscloud/state/session.py +957 -0
  226. opscloud/state/state_migration.py +86 -0
  227. opscloud/subagents/__init__.py +30 -0
  228. opscloud/subagents/loader.py +331 -0
  229. opscloud/subagents/subagents_parser.py +117 -0
  230. opscloud/subagents/types.py +25 -0
  231. opscloud/tools/__init__.py +36 -0
  232. opscloud/tools/catalog.py +37 -0
  233. opscloud/tools/display.py +24 -0
  234. opscloud/tools/fetch_url.py +176 -0
  235. opscloud/tools/goal_tools.py +423 -0
  236. opscloud/tools/registry.py +105 -0
  237. opscloud/tools/thread.py +32 -0
  238. opscloud/tools/web_search.py +215 -0
  239. opscloud/ui/__init__.py +119 -0
  240. opscloud/ui/app.py +5400 -0
  241. opscloud/ui/app.tcss +479 -0
  242. opscloud/ui/clipboard.py +147 -0
  243. opscloud/ui/command_registry.py +482 -0
  244. opscloud/ui/message_store.py +152 -0
  245. opscloud/ui/permission_store.py +360 -0
  246. opscloud/ui/preferences.py +113 -0
  247. opscloud/ui/prompt_manager.py +96 -0
  248. opscloud/ui/remote_client.py +505 -0
  249. opscloud/ui/textual_adapter.py +1269 -0
  250. opscloud/ui/theme.py +728 -0
  251. opscloud/ui/ui_help.py +415 -0
  252. opscloud/ui/widgets/__init__.py +383 -0
  253. opscloud/ui/widgets/_ask_user_types.py +81 -0
  254. opscloud/ui/widgets/_copy_spans.py +52 -0
  255. opscloud/ui/widgets/_inline_prompt.py +290 -0
  256. opscloud/ui/widgets/_js_eval_display.py +139 -0
  257. opscloud/ui/widgets/_links.py +175 -0
  258. opscloud/ui/widgets/_tool_stream.py +308 -0
  259. opscloud/ui/widgets/agent_selector.py +297 -0
  260. opscloud/ui/widgets/approval.py +741 -0
  261. opscloud/ui/widgets/ask_user.py +539 -0
  262. opscloud/ui/widgets/auth.py +695 -0
  263. opscloud/ui/widgets/auth_manager.py +214 -0
  264. opscloud/ui/widgets/auto_mode_notice.py +146 -0
  265. opscloud/ui/widgets/autocomplete.py +709 -0
  266. opscloud/ui/widgets/chat_input.py +805 -0
  267. opscloud/ui/widgets/cloud_selector.py +528 -0
  268. opscloud/ui/widgets/config_manager.py +652 -0
  269. opscloud/ui/widgets/debug_console.py +1269 -0
  270. opscloud/ui/widgets/devops_renderers.py +184 -0
  271. opscloud/ui/widgets/diff.py +237 -0
  272. opscloud/ui/widgets/effort_selector.py +166 -0
  273. opscloud/ui/widgets/goal_review.py +612 -0
  274. opscloud/ui/widgets/goal_status.py +57 -0
  275. opscloud/ui/widgets/infra_panel.py +141 -0
  276. opscloud/ui/widgets/install_confirm.py +114 -0
  277. opscloud/ui/widgets/loading.py +170 -0
  278. opscloud/ui/widgets/mcp_viewer.py +1204 -0
  279. opscloud/ui/widgets/messages.py +4461 -0
  280. opscloud/ui/widgets/model_selector.py +863 -0
  281. opscloud/ui/widgets/notification_center.py +108 -0
  282. opscloud/ui/widgets/notification_settings.py +119 -0
  283. opscloud/ui/widgets/operation_card.py +106 -0
  284. opscloud/ui/widgets/permissions_manager.py +667 -0
  285. opscloud/ui/widgets/plugin_manager.py +1212 -0
  286. opscloud/ui/widgets/pool_selector.py +376 -0
  287. opscloud/ui/widgets/preamble.py +53 -0
  288. opscloud/ui/widgets/skills_viewer.py +432 -0
  289. opscloud/ui/widgets/status.py +1037 -0
  290. opscloud/ui/widgets/subagent_panel.py +927 -0
  291. opscloud/ui/widgets/theme_selector.py +232 -0
  292. opscloud/ui/widgets/thread_selector.py +358 -0
  293. opscloud/ui/widgets/toast.py +31 -0
  294. opscloud/ui/widgets/tool_display.py +325 -0
  295. opscloud/ui/widgets/tool_renderers.py +234 -0
  296. opscloud/ui/widgets/tool_widgets.py +278 -0
  297. opscloud/ui/widgets/welcome.py +421 -0
  298. opscloud/ui/widgets/welcome_popup.py +102 -0
  299. opscloud/utils/__init__.py +24 -0
  300. opscloud/utils/cost_estimation.py +169 -0
  301. opscloud/utils/git.py +390 -0
  302. opscloud/utils/logger.py +571 -0
  303. opscloud/utils/session_stats.py +115 -0
  304. opscloud/utils/startup_error.py +37 -0
  305. talkops_opscloud-0.3.0b1.dist-info/METADATA +449 -0
  306. talkops_opscloud-0.3.0b1.dist-info/RECORD +309 -0
  307. talkops_opscloud-0.3.0b1.dist-info/WHEEL +4 -0
  308. talkops_opscloud-0.3.0b1.dist-info/entry_points.txt +2 -0
  309. talkops_opscloud-0.3.0b1.dist-info/licenses/LICENSE +175 -0
@@ -0,0 +1,348 @@
1
+ ---
2
+ name: skill-creator
3
+ description: "Guide for creating effective skills that extend agent capabilities with specialized knowledge, workflows, or tool integrations. Use this skill when the user asks to: (1) create a new skill, (2) make a skill, (3) build a skill, (4) set up a skill, (5) initialize a skill, (6) scaffold a skill, (7) update or modify an existing skill, (8) validate a skill, (9) learn about skill structure, (10) understand how skills work, or (11) get guidance on skill design patterns. Trigger on phrases like \"create a skill\", \"new skill\", \"make a skill\", \"skill for X\", \"how do I create a skill\", or \"help me build a skill\"."
4
+ license: MIT
5
+ compatibility: designed for opscloud
6
+ ---
7
+
8
+ # Skill Creator
9
+
10
+ ### Skill Location for OpsCloud
11
+
12
+ The opscloud CLI loads skills from five sources, listed here from lowest to highest precedence:
13
+
14
+ | # | Directory | Scope | Notes |
15
+ |---|-----------|-------|-------|
16
+ | 0 | `<package>/built_in_skills/` | Built-in | Ships with opscloud CLI |
17
+ | 1 | `$OPSCLOUD_HOME/<agent>/skills/` | User (opscloud default) | Default for `opscloud skills create` (`~/.opscloud/skills/`) |
18
+ | 2 | `~/.agents/skills/` | User | Shared across agent tools |
19
+ | 3 | `.opscloud/skills/` | Project (opscloud default) | Default for `opscloud skills create --project` |
20
+ | 4 | `.agents/skills/` | Project | Shared across agent tools |
21
+
22
+ `<agent>` is the agent configuration name (default: `opscloud`). When two directories contain a skill with the same name, the higher-precedence version wins — project skills override user skills, and any user or project skill overrides built-in skills.
23
+
24
+ Example directory layout:
25
+
26
+ ```
27
+ $OPSCLOUD_HOME/skills/ # user skills (~/.opscloud/skills/)
28
+ ├── skill-name-1/
29
+ │ └── SKILL.md
30
+ └── ...
31
+
32
+ <project-root>/.opscloud/skills/ # project skills (higher precedence)
33
+ ├── skill-name-2/
34
+ │ └── SKILL.md
35
+ └── ...
36
+ ```
37
+
38
+ ## Core Principles
39
+
40
+ ### Concise is Key
41
+
42
+ The context window is a public good. Skills share the context window with everything else the agent needs: system prompt, conversation history, other Skills' metadata, and the actual user request.
43
+
44
+ **Default assumption: The agent is already very capable.** Only add context the agent doesn't already have. Challenge each piece of information: "Does the agent really need this explanation?" and "Does this paragraph justify its token cost?"
45
+
46
+ Prefer concise examples over verbose explanations.
47
+
48
+ ### Set Appropriate Degrees of Freedom
49
+
50
+ Match the level of specificity to the task's fragility and variability:
51
+
52
+ **High freedom (text-based instructions)**: Use when multiple approaches are valid, decisions depend on context, or heuristics guide the approach.
53
+
54
+ **Medium freedom (pseudocode or scripts with parameters)**: Use when a preferred pattern exists, some variation is acceptable, or configuration affects behavior.
55
+
56
+ **Low freedom (specific scripts, few parameters)**: Use when operations are fragile and error-prone, consistency is critical, or a specific sequence must be followed.
57
+
58
+ Think of the agent as exploring a path: a narrow bridge with cliffs needs specific guardrails (low freedom), while an open field allows many routes (high freedom).
59
+
60
+ ### Anatomy of a Skill
61
+
62
+ Every skill consists of a required SKILL.md file and optional bundled resources:
63
+
64
+ ```
65
+ skill-name/
66
+ ├── SKILL.md (required)
67
+ │ ├── YAML frontmatter metadata (required)
68
+ │ │ ├── name: (required)
69
+ │ │ └── description: (required)
70
+ │ └── Markdown instructions (required)
71
+ └── Bundled Resources (optional)
72
+ ├── scripts/ - Executable code (Python/Bash/etc.)
73
+ ├── references/ - Documentation intended to be loaded into context as needed
74
+ └── assets/ - Files used in output (templates, icons, fonts, etc.)
75
+ ```
76
+
77
+ #### SKILL.md (required)
78
+
79
+ Every SKILL.md consists of:
80
+
81
+ - **Frontmatter** (YAML): Contains `name` and `description` fields. These are the only fields that the agent reads to determine when the skill gets used, thus it is very important to be clear and comprehensive in describing what the skill is, and when it should be used.
82
+ - **Body** (Markdown): Instructions and guidance for using the skill. Only loaded AFTER the skill triggers (if at all).
83
+
84
+ #### Bundled Resources (optional)
85
+
86
+ ##### Scripts (`scripts/`)
87
+
88
+ Executable code (Python/Bash/etc.) for tasks that require deterministic reliability or are repeatedly rewritten.
89
+
90
+ - **When to include**: When the same code is being rewritten repeatedly or deterministic reliability is needed
91
+ - **Example**: `scripts/rotate_pdf.py` for PDF rotation tasks, or `scripts/check_ec2_drift.py` for cloud auditing
92
+ - **Benefits**: Token efficient, deterministic, may be executed without loading into context
93
+ - **Note**: Scripts may still need to be read by the agent for patching or environment-specific adjustments
94
+
95
+ ##### References (`references/`)
96
+
97
+ Documentation and reference material intended to be loaded as needed into context to inform the agent's process and thinking.
98
+
99
+ - **When to include**: For documentation that the agent should reference while working
100
+ - **Examples**: `references/terraform_standards.md` for infrastructure schemas, `references/iam_policies.md` for organizational security baselines, `references/api_docs.md` for cloud API specifications
101
+ - **Use cases**: Cloud schemas, API documentation, domain knowledge, organizational policies, detailed workflow guides
102
+ - **Benefits**: Keeps SKILL.md lean, loaded only when the agent determines it's needed
103
+ - **Best practice**: If files are large (>10k words), include search patterns in SKILL.md
104
+ - **Avoid duplication**: Information should live in either SKILL.md or references files, not both. Prefer references files for detailed information unless it's truly core to the skill—this keeps SKILL.md lean while making information discoverable without hogging the context window. Keep only essential procedural instructions and workflow guidance in SKILL.md; move detailed reference material, schemas, and examples to references files.
105
+
106
+ ##### Assets (`assets/`)
107
+
108
+ Files not intended to be loaded into context, but rather used within the output the agent produces.
109
+
110
+ - **When to include**: When the skill needs files that will be used in the final output
111
+ - **Examples**: `assets/terraform-starter/` for boilerplate Terraform code, `assets/docker-compose.yml` for service templates, `assets/k8s-manifest.yaml` for Kubernetes manifests
112
+ - **Use cases**: Templates, boilerplate code, images, icons, sample configurations that get copied or modified
113
+ - **Benefits**: Separates output resources from documentation, enables the agent to use files without loading them into context
114
+
115
+ #### What to Not Include in a Skill
116
+
117
+ A skill should only contain essential files that directly support its functionality. Do NOT create extraneous documentation or auxiliary files, including:
118
+
119
+ - README.md
120
+ - INSTALLATION_GUIDE.md
121
+ - QUICK_REFERENCE.md
122
+ - CHANGELOG.md
123
+ - etc.
124
+
125
+ The skill should only contain the information needed for an AI agent to do the job at hand. It should not contain auxiliary context about the process that went into creating it, setup and testing procedures, user-facing documentation, etc. Creating additional documentation files just adds clutter and confusion.
126
+
127
+ ### Progressive Disclosure Design Principle
128
+
129
+ Skills use a three-level loading system to manage context efficiently:
130
+
131
+ 1. **Metadata (name + description)** - Always in context (~100 words)
132
+ 2. **SKILL.md body** - When skill triggers (<5k words)
133
+ 3. **Bundled resources** - As needed by the agent (Unlimited because scripts can be executed without reading into context window)
134
+
135
+ #### Progressive Disclosure Patterns
136
+
137
+ Keep SKILL.md body to the essentials and under 500 lines to minimize context bloat. SKILL.md files exceeding 10 MB are silently skipped by the agent runtime. Split content into separate files when approaching the line limit. When splitting out content into other files, it is very important to reference them from SKILL.md and describe clearly when to read them, to ensure the reader of the skill knows they exist and when to use them.
138
+
139
+ **Key principle:** When a skill supports multiple variations, frameworks, or options, keep only the core workflow and selection guidance in SKILL.md. Move variant-specific details (patterns, examples, configuration) into separate reference files.
140
+
141
+ **Pattern 1: High-level guide with references**
142
+
143
+ ```markdown
144
+ # Infrastructure Provisioning
145
+
146
+ ## Quick start
147
+
148
+ Deploy base resources with Terraform:
149
+ [code example]
150
+
151
+ ## Advanced features
152
+
153
+ - **State management**: See [STATE.md](references/STATE.md) for state locking and migration
154
+ - **Multi-region setup**: See [MULTI_REGION.md](references/MULTI_REGION.md) for cross-region disaster recovery
155
+ - **Examples**: See [EXAMPLES.md](references/EXAMPLES.md) for common architectural patterns
156
+ ```
157
+
158
+ The agent loads STATE.md, MULTI_REGION.md, or EXAMPLES.md only when needed.
159
+
160
+ **Pattern 2: Domain-specific organization**
161
+
162
+ For Skills with multiple domains or providers, organize content by domain/provider to avoid loading irrelevant context:
163
+
164
+ ```
165
+ cloud-deploy/
166
+ ├── SKILL.md (workflow + provider selection)
167
+ └── references/
168
+ ├── aws.md (AWS deployment patterns)
169
+ ├── gcp.md (GCP deployment patterns)
170
+ └── azure.md (Azure deployment patterns)
171
+ ```
172
+
173
+ When the user chooses AWS, the agent only reads `aws.md`.
174
+
175
+ **Pattern 3: Conditional details**
176
+
177
+ Show basic content, link to advanced content:
178
+
179
+ ```markdown
180
+ # Kubernetes Service Mesh
181
+
182
+ ## Quick Setup
183
+
184
+ Install default Linkerd mesh profile.
185
+
186
+ **For Istio multi-cluster**: See [ISTIO.md](references/ISTIO.md)
187
+ **For mutual TLS tuning**: See [MTLS.md](references/MTLS.md)
188
+ ```
189
+
190
+ The agent reads `ISTIO.md` or `MTLS.md` only when the user needs those features.
191
+
192
+ **Important guidelines:**
193
+
194
+ - **Avoid deeply nested references** - Keep references one level deep from SKILL.md. All reference files should link directly from SKILL.md.
195
+ - **Structure longer reference files** - For files longer than 100 lines, include a table of contents at the top so the agent can see the full scope when previewing.
196
+
197
+ ## Skill Creation Process
198
+
199
+ Skill creation involves these steps:
200
+
201
+ 1. Understand the skill with concrete examples
202
+ 2. Plan reusable skill contents (scripts, references, assets)
203
+ 3. Initialize the skill (run init_skill.py)
204
+ 4. Edit the skill (implement resources and write SKILL.md)
205
+ 5. Validate the skill (run quick_validate.py)
206
+ 6. Iterate based on real usage
207
+
208
+ Follow these steps in order, skipping only if there is a clear reason why they are not applicable.
209
+
210
+ ### Step 1: Understanding the Skill with Concrete Examples
211
+
212
+ Skip this step only when the skill's usage patterns are already clearly understood. It remains valuable even when working with an existing skill.
213
+
214
+ To create an effective skill, clearly understand concrete examples of how the skill will be used. This understanding can come from either direct user examples or generated examples that are validated with user feedback.
215
+
216
+ Relevant questions include:
217
+ 1. **Skill purpose**: What should the skill do?
218
+ 2. **Triggers/Use cases**: When should it be invoked? What user phrases or tasks trigger it?
219
+ 3. **Scope**: User-level (`~/.opscloud/skills/`) or project-level (`.opscloud/skills/`)?
220
+
221
+ To avoid overwhelming users, avoid asking too many questions in a single message. Start with the most important questions and follow up as needed for better effectiveness.
222
+
223
+ Conclude this step when there is a clear sense of the functionality the skill should support.
224
+
225
+ ### Step 2: Planning the Reusable Skill Contents
226
+
227
+ To turn concrete examples into an effective skill, analyze each example by:
228
+
229
+ 1. Considering how to execute on the example from scratch
230
+ 2. Identifying what scripts, references, and assets would be helpful when executing these workflows repeatedly
231
+
232
+ Example: When building an `ecs-deploy` skill to handle queries like "Deploy this container to ECS":
233
+ 1. Deploying to ECS requires re-writing task definition JSON and service updates each time
234
+ 2. A `scripts/deploy_service.py` script would be helpful to store in the skill
235
+ 3. A `references/task_def_template.json` asset would provide reliable starter configuration
236
+
237
+ To establish the skill's contents, analyze each concrete example to create a list of the reusable resources to include: scripts, references, and assets.
238
+
239
+ ### Step 3: Initializing the Skill
240
+
241
+ At this point, it is time to actually create the skill.
242
+
243
+ Skip this step only if the skill being developed already exists, and iteration or packaging is needed. In this case, continue to the next step.
244
+
245
+ There are two ways to create a new skill:
246
+
247
+ #### Option A: `init_skill.py` (recommended for rich skills)
248
+
249
+ When creating a new skill from scratch, run the `init_skill.py` script located in this skill's `scripts/` directory:
250
+
251
+ ```bash
252
+ python <skill-directory>/scripts/init_skill.py <skill-name> --path <output-directory>
253
+ ```
254
+
255
+ For opscloud CLI, use any of the skill directories listed in "Skill Location for OpsCloud" above:
256
+
257
+ ```bash
258
+ # User skills (default)
259
+ python <skill-directory>/scripts/init_skill.py <skill-name> --path "${OPSCLOUD_HOME:-$HOME/.opscloud}/skills"
260
+
261
+ # Project skills
262
+ python <skill-directory>/scripts/init_skill.py <skill-name> --path .opscloud/skills
263
+ ```
264
+
265
+ The script:
266
+ - Creates the skill directory at the specified path
267
+ - Generates a SKILL.md template with proper frontmatter and TODO placeholders
268
+ - Creates example resource directories: `scripts/`, `references/`, and `assets/`
269
+ - Adds example files in each directory that can be customized or deleted
270
+
271
+ After initialization, customize or remove the generated SKILL.md and example files as needed.
272
+
273
+ #### Option B: `opscloud skills create` (quick start)
274
+
275
+ The built-in CLI command creates a minimal skill with just a `SKILL.md` template — no resource directories. Use this for simple skills that only need instructions and no bundled scripts, references, or assets.
276
+
277
+ ```bash
278
+ # Create in user skills directory
279
+ opscloud skills create <skill-name>
280
+
281
+ # Create in project skills directory
282
+ opscloud skills create <skill-name> --project
283
+ ```
284
+
285
+ Use `init_skill.py` when the skill will include bundled resources (`scripts/`, `references/`, `assets/`). Use `opscloud skills create` for a quick, minimal starting point.
286
+
287
+ ### Step 4: Edit the Skill
288
+
289
+ When editing the (newly-generated or existing) skill, remember that the skill is being created for an agent to use. Include information that would be beneficial and non-obvious to the agent. Consider what procedural knowledge, domain-specific details, or reusable assets would help the agent execute these tasks more effectively.
290
+
291
+ #### Learn Proven Design Patterns
292
+
293
+ Refer to the "Progressive Disclosure Design Principle" and "Core Principles" sections above for established patterns around sequential workflows, conditional logic, and output formatting.
294
+
295
+ #### Start with Reusable Skill Contents
296
+
297
+ To begin implementation, start with the reusable resources identified above: `scripts/`, `references/`, and `assets/` files. Note that this step may require user input.
298
+
299
+ Added scripts must be tested by actually running them to ensure there are no bugs and that the output matches what is expected.
300
+
301
+ Any example files and directories not needed for the skill should be deleted. The initialization script creates example files in `scripts/`, `references/`, and `assets/` to demonstrate structure, but most skills won't need all of them.
302
+
303
+ #### Update SKILL.md
304
+
305
+ **Writing Guidelines:** Always use imperative/infinitive form.
306
+
307
+ ##### Frontmatter
308
+
309
+ Write the YAML frontmatter with `name` and `description`:
310
+
311
+ - `name`: The skill name (lowercase alphanumeric with single hyphens, max 64 characters)
312
+ - `description`: This is the primary triggering mechanism for your skill, and helps the agent understand when to use the skill.
313
+ - Include both what the Skill does and specific triggers/contexts for when to use it.
314
+ - Include all "when to use" information here - Not in the body. The body is only loaded after triggering, so "When to Use This Skill" sections in the body are not helpful to the agent.
315
+ - Example description: "Manage and optimize AWS ECS clusters, task definitions, and service deployments. Use when the user asks to: (1) deploy a container to ECS, (2) debug failing task health checks, (3) scale ECS services, or (4) inspect cluster capacity."
316
+
317
+ The only other allowed fields in YAML frontmatter are optional properties per the Agent Skills spec: `license`, `compatibility`, `allowed-tools`, and `metadata`. Do not include any fields beyond these.
318
+
319
+ ##### Body
320
+
321
+ Write instructions for using the skill and its bundled resources.
322
+
323
+ ### Step 5: Validate the Skill
324
+
325
+ Once development of the skill is complete, validate it to ensure it meets all requirements:
326
+
327
+ ```bash
328
+ python <skill-directory>/scripts/quick_validate.py <path/to/skill-folder>
329
+ ```
330
+
331
+ The validation script checks:
332
+ - YAML frontmatter format and required fields
333
+ - Skill naming conventions (Unicode lowercase alphanumeric with hyphens, max 64 characters)
334
+ - Description completeness (no angle brackets, max 1024 characters)
335
+ - Required fields: `name` and `description`
336
+ - Allowed frontmatter properties only: `name`, `description`, `license`, `compatibility`, `allowed-tools`, `metadata`
337
+
338
+ If validation fails, fix the reported errors and run the validation command again.
339
+
340
+ ### Step 6: Iterate
341
+
342
+ After testing the skill, users may request improvements. Often this happens right after using the skill, with fresh context of how the skill performed.
343
+
344
+ **Iteration workflow:**
345
+ 1. Use the skill on real tasks
346
+ 2. Notice struggles or inefficiencies
347
+ 3. Identify how SKILL.md or bundled resources should be updated
348
+ 4. Implement changes and test again