myaiforone 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (315) hide show
  1. package/README.md +113 -0
  2. package/agents/_template/CLAUDE.md +18 -0
  3. package/agents/_template/agent.json +7 -0
  4. package/agents/platform/agentcreator/CLAUDE.md +300 -0
  5. package/agents/platform/appcreator/CLAUDE.md +158 -0
  6. package/agents/platform/gym/CLAUDE.md +486 -0
  7. package/agents/platform/gym/agent.json +40 -0
  8. package/agents/platform/gym/programs/agent-building/program.json +160 -0
  9. package/agents/platform/gym/programs/automations-mastery/program.json +129 -0
  10. package/agents/platform/gym/programs/getting-started/program.json +124 -0
  11. package/agents/platform/gym/programs/mcp-integrations/program.json +116 -0
  12. package/agents/platform/gym/programs/multi-model-strategy/program.json +115 -0
  13. package/agents/platform/gym/programs/prompt-engineering/program.json +136 -0
  14. package/agents/platform/gym/souls/alex.md +12 -0
  15. package/agents/platform/gym/souls/jordan.md +12 -0
  16. package/agents/platform/gym/souls/morgan.md +12 -0
  17. package/agents/platform/gym/souls/riley.md +12 -0
  18. package/agents/platform/gym/souls/sam.md +12 -0
  19. package/agents/platform/hub/CLAUDE.md +372 -0
  20. package/agents/platform/promptcreator/CLAUDE.md +130 -0
  21. package/agents/platform/skillcreator/CLAUDE.md +163 -0
  22. package/bin/cli.js +566 -0
  23. package/config.example.json +310 -0
  24. package/dist/agent-registry.d.ts +32 -0
  25. package/dist/agent-registry.d.ts.map +1 -0
  26. package/dist/agent-registry.js +144 -0
  27. package/dist/agent-registry.js.map +1 -0
  28. package/dist/channels/discord.d.ts +17 -0
  29. package/dist/channels/discord.d.ts.map +1 -0
  30. package/dist/channels/discord.js +114 -0
  31. package/dist/channels/discord.js.map +1 -0
  32. package/dist/channels/imessage.d.ts +23 -0
  33. package/dist/channels/imessage.d.ts.map +1 -0
  34. package/dist/channels/imessage.js +214 -0
  35. package/dist/channels/imessage.js.map +1 -0
  36. package/dist/channels/slack.d.ts +19 -0
  37. package/dist/channels/slack.d.ts.map +1 -0
  38. package/dist/channels/slack.js +167 -0
  39. package/dist/channels/slack.js.map +1 -0
  40. package/dist/channels/telegram.d.ts +19 -0
  41. package/dist/channels/telegram.d.ts.map +1 -0
  42. package/dist/channels/telegram.js +274 -0
  43. package/dist/channels/telegram.js.map +1 -0
  44. package/dist/channels/types.d.ts +44 -0
  45. package/dist/channels/types.d.ts.map +1 -0
  46. package/dist/channels/types.js +18 -0
  47. package/dist/channels/types.js.map +1 -0
  48. package/dist/channels/whatsapp.d.ts +23 -0
  49. package/dist/channels/whatsapp.d.ts.map +1 -0
  50. package/dist/channels/whatsapp.js +189 -0
  51. package/dist/channels/whatsapp.js.map +1 -0
  52. package/dist/config.d.ts +134 -0
  53. package/dist/config.d.ts.map +1 -0
  54. package/dist/config.js +127 -0
  55. package/dist/config.js.map +1 -0
  56. package/dist/cron.d.ts +8 -0
  57. package/dist/cron.d.ts.map +1 -0
  58. package/dist/cron.js +35 -0
  59. package/dist/cron.js.map +1 -0
  60. package/dist/decrypt-keys.d.ts +7 -0
  61. package/dist/decrypt-keys.d.ts.map +1 -0
  62. package/dist/decrypt-keys.js +53 -0
  63. package/dist/decrypt-keys.js.map +1 -0
  64. package/dist/encrypt-keys.d.ts +8 -0
  65. package/dist/encrypt-keys.d.ts.map +1 -0
  66. package/dist/encrypt-keys.js +62 -0
  67. package/dist/encrypt-keys.js.map +1 -0
  68. package/dist/executor.d.ts +31 -0
  69. package/dist/executor.d.ts.map +1 -0
  70. package/dist/executor.js +2009 -0
  71. package/dist/executor.js.map +1 -0
  72. package/dist/gemini-executor.d.ts +27 -0
  73. package/dist/gemini-executor.d.ts.map +1 -0
  74. package/dist/gemini-executor.js +160 -0
  75. package/dist/gemini-executor.js.map +1 -0
  76. package/dist/goals.d.ts +24 -0
  77. package/dist/goals.d.ts.map +1 -0
  78. package/dist/goals.js +189 -0
  79. package/dist/goals.js.map +1 -0
  80. package/dist/gym/activity-digest.d.ts +30 -0
  81. package/dist/gym/activity-digest.d.ts.map +1 -0
  82. package/dist/gym/activity-digest.js +506 -0
  83. package/dist/gym/activity-digest.js.map +1 -0
  84. package/dist/gym/dimension-scorer.d.ts +76 -0
  85. package/dist/gym/dimension-scorer.d.ts.map +1 -0
  86. package/dist/gym/dimension-scorer.js +236 -0
  87. package/dist/gym/dimension-scorer.js.map +1 -0
  88. package/dist/gym/gym-router.d.ts +7 -0
  89. package/dist/gym/gym-router.d.ts.map +1 -0
  90. package/dist/gym/gym-router.js +718 -0
  91. package/dist/gym/gym-router.js.map +1 -0
  92. package/dist/gym/index.d.ts +11 -0
  93. package/dist/gym/index.d.ts.map +1 -0
  94. package/dist/gym/index.js +11 -0
  95. package/dist/gym/index.js.map +1 -0
  96. package/dist/heartbeat.d.ts +21 -0
  97. package/dist/heartbeat.d.ts.map +1 -0
  98. package/dist/heartbeat.js +163 -0
  99. package/dist/heartbeat.js.map +1 -0
  100. package/dist/index.d.ts +2 -0
  101. package/dist/index.d.ts.map +1 -0
  102. package/dist/index.js +254 -0
  103. package/dist/index.js.map +1 -0
  104. package/dist/keystore.d.ts +22 -0
  105. package/dist/keystore.d.ts.map +1 -0
  106. package/dist/keystore.js +178 -0
  107. package/dist/keystore.js.map +1 -0
  108. package/dist/logger.d.ts +9 -0
  109. package/dist/logger.d.ts.map +1 -0
  110. package/dist/logger.js +45 -0
  111. package/dist/logger.js.map +1 -0
  112. package/dist/memory/daily.d.ts +22 -0
  113. package/dist/memory/daily.d.ts.map +1 -0
  114. package/dist/memory/daily.js +82 -0
  115. package/dist/memory/daily.js.map +1 -0
  116. package/dist/memory/embeddings.d.ts +15 -0
  117. package/dist/memory/embeddings.d.ts.map +1 -0
  118. package/dist/memory/embeddings.js +154 -0
  119. package/dist/memory/embeddings.js.map +1 -0
  120. package/dist/memory/index.d.ts +32 -0
  121. package/dist/memory/index.d.ts.map +1 -0
  122. package/dist/memory/index.js +159 -0
  123. package/dist/memory/index.js.map +1 -0
  124. package/dist/memory/search.d.ts +21 -0
  125. package/dist/memory/search.d.ts.map +1 -0
  126. package/dist/memory/search.js +77 -0
  127. package/dist/memory/search.js.map +1 -0
  128. package/dist/memory/store.d.ts +23 -0
  129. package/dist/memory/store.d.ts.map +1 -0
  130. package/dist/memory/store.js +144 -0
  131. package/dist/memory/store.js.map +1 -0
  132. package/dist/ollama-executor.d.ts +17 -0
  133. package/dist/ollama-executor.d.ts.map +1 -0
  134. package/dist/ollama-executor.js +112 -0
  135. package/dist/ollama-executor.js.map +1 -0
  136. package/dist/openai-executor.d.ts +38 -0
  137. package/dist/openai-executor.d.ts.map +1 -0
  138. package/dist/openai-executor.js +197 -0
  139. package/dist/openai-executor.js.map +1 -0
  140. package/dist/router.d.ts +11 -0
  141. package/dist/router.d.ts.map +1 -0
  142. package/dist/router.js +185 -0
  143. package/dist/router.js.map +1 -0
  144. package/dist/test-message.d.ts +2 -0
  145. package/dist/test-message.d.ts.map +1 -0
  146. package/dist/test-message.js +60 -0
  147. package/dist/test-message.js.map +1 -0
  148. package/dist/utils/imsg-db-reader.d.ts +24 -0
  149. package/dist/utils/imsg-db-reader.d.ts.map +1 -0
  150. package/dist/utils/imsg-db-reader.js +92 -0
  151. package/dist/utils/imsg-db-reader.js.map +1 -0
  152. package/dist/utils/imsg-rpc.d.ts +25 -0
  153. package/dist/utils/imsg-rpc.d.ts.map +1 -0
  154. package/dist/utils/imsg-rpc.js +149 -0
  155. package/dist/utils/imsg-rpc.js.map +1 -0
  156. package/dist/utils/message-formatter.d.ts +3 -0
  157. package/dist/utils/message-formatter.d.ts.map +1 -0
  158. package/dist/utils/message-formatter.js +69 -0
  159. package/dist/utils/message-formatter.js.map +1 -0
  160. package/dist/web-ui.d.ts +12 -0
  161. package/dist/web-ui.d.ts.map +1 -0
  162. package/dist/web-ui.js +5784 -0
  163. package/dist/web-ui.js.map +1 -0
  164. package/dist/whatsapp-chats.d.ts +2 -0
  165. package/dist/whatsapp-chats.d.ts.map +1 -0
  166. package/dist/whatsapp-chats.js +76 -0
  167. package/dist/whatsapp-chats.js.map +1 -0
  168. package/dist/whatsapp-login.d.ts +2 -0
  169. package/dist/whatsapp-login.d.ts.map +1 -0
  170. package/dist/whatsapp-login.js +90 -0
  171. package/dist/whatsapp-login.js.map +1 -0
  172. package/dist/wiki-sync.d.ts +21 -0
  173. package/dist/wiki-sync.d.ts.map +1 -0
  174. package/dist/wiki-sync.js +147 -0
  175. package/dist/wiki-sync.js.map +1 -0
  176. package/docs/AddNewAgentGuide.md +100 -0
  177. package/docs/AddNewMcpGuide.md +72 -0
  178. package/docs/Architecture.md +795 -0
  179. package/docs/CLAUDE-AI-SETUP.md +166 -0
  180. package/docs/Setup.md +297 -0
  181. package/docs/ai-gym-architecture.md +1040 -0
  182. package/docs/ai-gym-build-plan.md +343 -0
  183. package/docs/ai-gym-onboarding.md +122 -0
  184. package/docs/appcreator_plan.md +348 -0
  185. package/docs/platform-mcp-audit.md +320 -0
  186. package/docs/server-deployment-plan.md +503 -0
  187. package/docs/superpowers/plans/2026-03-25-marketplace.md +1281 -0
  188. package/docs/superpowers/specs/2026-03-25-marketplace-design.md +287 -0
  189. package/docs/user-guide.md +2016 -0
  190. package/mcp-catalog.json +628 -0
  191. package/package.json +63 -0
  192. package/public/MyAIforOne-logomark-512.svg +16 -0
  193. package/public/MyAIforOne-logomark-transparent.svg +15 -0
  194. package/public/activity.html +314 -0
  195. package/public/admin.html +1674 -0
  196. package/public/agent-dashboard.html +670 -0
  197. package/public/api-docs.html +1106 -0
  198. package/public/automations.html +722 -0
  199. package/public/canvas.css +223 -0
  200. package/public/canvas.js +588 -0
  201. package/public/changelog.html +231 -0
  202. package/public/gym.html +2766 -0
  203. package/public/home.html +1930 -0
  204. package/public/index.html +2809 -0
  205. package/public/lab.html +1643 -0
  206. package/public/library.html +1442 -0
  207. package/public/marketplace.html +1101 -0
  208. package/public/mcp-docs.html +441 -0
  209. package/public/mini.html +390 -0
  210. package/public/monitor.html +584 -0
  211. package/public/org.html +4304 -0
  212. package/public/projects.html +734 -0
  213. package/public/settings.html +645 -0
  214. package/public/tasks.html +932 -0
  215. package/public/trainers/alex.svg +12 -0
  216. package/public/trainers/jordan.svg +12 -0
  217. package/public/trainers/morgan.svg +12 -0
  218. package/public/trainers/riley.svg +12 -0
  219. package/public/trainers/sam.svg +12 -0
  220. package/public/user-guide.html +218 -0
  221. package/registry/agents.json +3 -0
  222. package/registry/apps.json +20 -0
  223. package/registry/installed-drafts.json +3 -0
  224. package/registry/mcps.json +1084 -0
  225. package/registry/prompts/personal/mcp-test-prompt.md +6 -0
  226. package/registry/prompts/personal/memory-recall.md +6 -0
  227. package/registry/prompts/platform/brainstorm.md +15 -0
  228. package/registry/prompts/platform/code-review.md +16 -0
  229. package/registry/prompts/platform/explain.md +16 -0
  230. package/registry/prompts.json +58 -0
  231. package/registry/skills/external/brainstorming.md +5 -0
  232. package/registry/skills/external/code-review.md +40 -0
  233. package/registry/skills/external/frontend-patterns.md +642 -0
  234. package/registry/skills/external/frontend-slides.md +184 -0
  235. package/registry/skills/external/systematic-debugging.md +5 -0
  236. package/registry/skills/external/tdd.md +328 -0
  237. package/registry/skills/external/verification-before-completion.md +5 -0
  238. package/registry/skills/external/writing-plans.md +5 -0
  239. package/registry/skills/platform/ai41_app_build.md +930 -0
  240. package/registry/skills/platform/ai41_app_deploy.md +168 -0
  241. package/registry/skills/platform/ai41_app_orchestrator.md +239 -0
  242. package/registry/skills/platform/ai41_app_patterns.md +359 -0
  243. package/registry/skills/platform/ai41_app_register.md +85 -0
  244. package/registry/skills/platform/ai41_app_scaffold.md +421 -0
  245. package/registry/skills/platform/ai41_app_verify.md +107 -0
  246. package/registry/skills/platform/opProjectCreate.md +239 -0
  247. package/registry/skills/platform/op_devbrowser.md +136 -0
  248. package/registry/skills/platform/sop_brandguidelines.md +103 -0
  249. package/registry/skills/platform/sop_docx.md +117 -0
  250. package/registry/skills/platform/sop_frontenddesign.md +44 -0
  251. package/registry/skills/platform/sop_frontenddesign_v2.md +659 -0
  252. package/registry/skills/platform/sop_mcpbuilder.md +133 -0
  253. package/registry/skills/platform/sop_pdf.md +172 -0
  254. package/registry/skills/platform/sop_pptx.md +133 -0
  255. package/registry/skills/platform/sop_skillcreator.md +104 -0
  256. package/registry/skills/platform/sop_themefactory.md +128 -0
  257. package/registry/skills/platform/sop_webapptesting.md +75 -0
  258. package/registry/skills/platform/sop_webartifactsbuilder.md +97 -0
  259. package/registry/skills/platform/sop_xlsx.md +134 -0
  260. package/registry/skills.json +1055 -0
  261. package/scripts/discover-chats.sh +11 -0
  262. package/scripts/install-service-windows.ps1 +87 -0
  263. package/scripts/install-service.sh +52 -0
  264. package/scripts/seed-registry.ts +195 -0
  265. package/scripts/test-send.sh +5 -0
  266. package/scripts/tray-indicator.ps1 +35 -0
  267. package/scripts/uninstall-service-windows.ps1 +23 -0
  268. package/scripts/uninstall-service.sh +15 -0
  269. package/scripts/xbar-myagent.5s.sh +32 -0
  270. package/server/mcp-server/dist/index.d.ts +11 -0
  271. package/server/mcp-server/dist/index.js +1332 -0
  272. package/server/mcp-server/dist/lib/api-client.d.ts +165 -0
  273. package/server/mcp-server/dist/lib/api-client.js +241 -0
  274. package/server/mcp-server/index.ts +1545 -0
  275. package/server/mcp-server/lib/api-client.ts +366 -0
  276. package/server/mcp-server/tsconfig.json +14 -0
  277. package/src/agent-registry.ts +180 -0
  278. package/src/channels/discord.ts +129 -0
  279. package/src/channels/imessage.ts +261 -0
  280. package/src/channels/slack.ts +208 -0
  281. package/src/channels/telegram.ts +307 -0
  282. package/src/channels/types.ts +62 -0
  283. package/src/channels/whatsapp.ts +227 -0
  284. package/src/config.ts +281 -0
  285. package/src/cron.ts +43 -0
  286. package/src/decrypt-keys.ts +60 -0
  287. package/src/encrypt-keys.ts +70 -0
  288. package/src/executor.ts +2190 -0
  289. package/src/gemini-executor.ts +212 -0
  290. package/src/goals.ts +240 -0
  291. package/src/gym/activity-digest.ts +546 -0
  292. package/src/gym/dimension-scorer.ts +297 -0
  293. package/src/gym/gym-router.ts +801 -0
  294. package/src/gym/index.ts +19 -0
  295. package/src/heartbeat.ts +220 -0
  296. package/src/index.ts +275 -0
  297. package/src/keystore.ts +190 -0
  298. package/src/logger.ts +51 -0
  299. package/src/memory/daily.ts +101 -0
  300. package/src/memory/embeddings.ts +185 -0
  301. package/src/memory/index.ts +218 -0
  302. package/src/memory/search.ts +124 -0
  303. package/src/memory/store.ts +189 -0
  304. package/src/ollama-executor.ts +126 -0
  305. package/src/openai-executor.ts +259 -0
  306. package/src/router.ts +230 -0
  307. package/src/test-message.ts +72 -0
  308. package/src/utils/imsg-db-reader.ts +109 -0
  309. package/src/utils/imsg-rpc.ts +178 -0
  310. package/src/utils/message-formatter.ts +90 -0
  311. package/src/web-ui.ts +5778 -0
  312. package/src/whatsapp-chats.ts +91 -0
  313. package/src/whatsapp-login.ts +110 -0
  314. package/src/wiki-sync.ts +199 -0
  315. package/tsconfig.json +19 -0
@@ -0,0 +1,133 @@
1
+ ---
2
+ name: sop_mcpbuilder
3
+ description: Create MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers for any API or service integration.
4
+ ---
5
+
6
+ # MCP Server Development Guide
7
+
8
+ Create MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. The quality of an MCP server is measured by how well it enables LLMs to accomplish real-world tasks.
9
+
10
+ ## High-Level Workflow
11
+
12
+ Creating a high-quality MCP server involves four main phases:
13
+
14
+ ### Phase 1: Deep Research and Planning
15
+
16
+ #### 1.1 Understand Modern MCP Design
17
+
18
+ **API Coverage vs. Workflow Tools:**
19
+ Balance comprehensive API endpoint coverage with specialized workflow tools. Workflow tools can be more convenient for specific tasks, while comprehensive coverage gives agents flexibility to compose operations. When uncertain, prioritize comprehensive API coverage.
20
+
21
+ **Tool Naming and Discoverability:**
22
+ Clear, descriptive tool names help agents find the right tools quickly. Use consistent prefixes (e.g., `github_create_issue`, `github_list_repos`) and action-oriented naming.
23
+
24
+ **Context Management:**
25
+ Agents benefit from concise tool descriptions and the ability to filter/paginate results. Design tools that return focused, relevant data.
26
+
27
+ **Actionable Error Messages:**
28
+ Error messages should guide agents toward solutions with specific suggestions and next steps.
29
+
30
+ #### 1.2 Study MCP Protocol Documentation
31
+
32
+ **Navigate the MCP specification:**
33
+ Start with the sitemap: `https://modelcontextprotocol.io/sitemap.xml`
34
+ Then fetch specific pages with `.md` suffix for markdown format.
35
+
36
+ Key pages to review:
37
+ - Specification overview and architecture
38
+ - Transport mechanisms (streamable HTTP, stdio)
39
+ - Tool, resource, and prompt definitions
40
+
41
+ #### 1.3 Study Framework Documentation
42
+
43
+ **Recommended stack:**
44
+ - **Language**: TypeScript (high-quality SDK support)
45
+ - **Transport**: Streamable HTTP for remote servers, stdio for local servers
46
+
47
+ **SDK Documentation:**
48
+ - **TypeScript SDK**: `https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/main/README.md`
49
+ - **Python SDK**: `https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/main/README.md`
50
+
51
+ #### 1.4 Plan Your Implementation
52
+
53
+ **Understand the API:**
54
+ Review the service's API documentation to identify key endpoints, authentication requirements, and data models.
55
+
56
+ **Tool Selection:**
57
+ Prioritize comprehensive API coverage. List endpoints to implement, starting with the most common operations.
58
+
59
+ ### Phase 2: Implementation
60
+
61
+ #### 2.1 Set Up Project Structure
62
+
63
+ Create shared utilities:
64
+ - API client with authentication
65
+ - Error handling helpers
66
+ - Response formatting (JSON/Markdown)
67
+ - Pagination support
68
+
69
+ #### 2.2 Implement Tools
70
+
71
+ For each tool:
72
+
73
+ **Input Schema:**
74
+ - Use Zod (TypeScript) or Pydantic (Python)
75
+ - Include constraints and clear descriptions
76
+ - Add examples in field descriptions
77
+
78
+ **Output Schema:**
79
+ - Define `outputSchema` where possible for structured data
80
+ - Use `structuredContent` in tool responses
81
+
82
+ **Tool Description:**
83
+ - Concise summary of functionality
84
+ - Parameter descriptions
85
+ - Return type schema
86
+
87
+ **Implementation:**
88
+ - Async/await for I/O operations
89
+ - Proper error handling with actionable messages
90
+ - Support pagination where applicable
91
+
92
+ **Annotations:**
93
+ - `readOnlyHint`: true/false
94
+ - `destructiveHint`: true/false
95
+ - `idempotentHint`: true/false
96
+ - `openWorldHint`: true/false
97
+
98
+ ### Phase 3: Review and Test
99
+
100
+ #### 3.1 Code Quality
101
+
102
+ Review for:
103
+ - No duplicated code (DRY principle)
104
+ - Consistent error handling
105
+ - Full type coverage
106
+ - Clear tool descriptions
107
+
108
+ #### 3.2 Build and Test
109
+
110
+ **TypeScript:**
111
+ - Run `npm run build` to verify compilation
112
+ - Test with MCP Inspector: `npx @modelcontextprotocol/inspector`
113
+
114
+ **Python:**
115
+ - Verify syntax: `python -m py_compile your_server.py`
116
+ - Test with MCP Inspector
117
+
118
+ ### Phase 4: Create Evaluations
119
+
120
+ Create comprehensive evaluations to test effectiveness:
121
+
122
+ 1. **Tool Inspection**: List available tools and understand their capabilities
123
+ 2. **Content Exploration**: Use READ-ONLY operations to explore available data
124
+ 3. **Question Generation**: Create 10 complex, realistic questions
125
+ 4. **Answer Verification**: Solve each question yourself to verify answers
126
+
127
+ Ensure each question is:
128
+ - **Independent**: Not dependent on other questions
129
+ - **Read-only**: Only non-destructive operations required
130
+ - **Complex**: Requiring multiple tool calls
131
+ - **Realistic**: Based on real use cases
132
+ - **Verifiable**: Single, clear answer
133
+ - **Stable**: Answer won't change over time
@@ -0,0 +1,172 @@
1
+ ---
2
+ name: sop_pdf
3
+ description: Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. Use when processing, generating, or analyzing PDF documents.
4
+ ---
5
+
6
+ # PDF Processing Guide
7
+
8
+ ## Quick Start
9
+
10
+ ```python
11
+ from pypdf import PdfReader, PdfWriter
12
+
13
+ # Read a PDF
14
+ reader = PdfReader("document.pdf")
15
+ print(f"Pages: {len(reader.pages)}")
16
+
17
+ # Extract text
18
+ text = ""
19
+ for page in reader.pages:
20
+ text += page.extract_text()
21
+ ```
22
+
23
+ ## Python Libraries
24
+
25
+ ### pypdf - Basic Operations
26
+
27
+ #### Merge PDFs
28
+ ```python
29
+ from pypdf import PdfWriter, PdfReader
30
+
31
+ writer = PdfWriter()
32
+ for pdf_file in ["doc1.pdf", "doc2.pdf", "doc3.pdf"]:
33
+ reader = PdfReader(pdf_file)
34
+ for page in reader.pages:
35
+ writer.add_page(page)
36
+
37
+ with open("merged.pdf", "wb") as output:
38
+ writer.write(output)
39
+ ```
40
+
41
+ #### Split PDF
42
+ ```python
43
+ reader = PdfReader("input.pdf")
44
+ for i, page in enumerate(reader.pages):
45
+ writer = PdfWriter()
46
+ writer.add_page(page)
47
+ with open(f"page_{i+1}.pdf", "wb") as output:
48
+ writer.write(output)
49
+ ```
50
+
51
+ #### Extract Metadata
52
+ ```python
53
+ reader = PdfReader("document.pdf")
54
+ meta = reader.metadata
55
+ print(f"Title: {meta.title}")
56
+ print(f"Author: {meta.author}")
57
+ ```
58
+
59
+ #### Rotate Pages
60
+ ```python
61
+ reader = PdfReader("input.pdf")
62
+ writer = PdfWriter()
63
+ page = reader.pages[0]
64
+ page.rotate(90) # 90 degrees clockwise
65
+ writer.add_page(page)
66
+ with open("rotated.pdf", "wb") as output:
67
+ writer.write(output)
68
+ ```
69
+
70
+ ### pdfplumber - Text and Table Extraction
71
+
72
+ #### Extract Text with Layout
73
+ ```python
74
+ import pdfplumber
75
+
76
+ with pdfplumber.open("document.pdf") as pdf:
77
+ for page in pdf.pages:
78
+ text = page.extract_text()
79
+ print(text)
80
+ ```
81
+
82
+ #### Extract Tables
83
+ ```python
84
+ import pandas as pd
85
+
86
+ with pdfplumber.open("document.pdf") as pdf:
87
+ all_tables = []
88
+ for page in pdf.pages:
89
+ tables = page.extract_tables()
90
+ for table in tables:
91
+ if table:
92
+ df = pd.DataFrame(table[1:], columns=table[0])
93
+ all_tables.append(df)
94
+
95
+ if all_tables:
96
+ combined_df = pd.concat(all_tables, ignore_index=True)
97
+ combined_df.to_excel("extracted_tables.xlsx", index=False)
98
+ ```
99
+
100
+ ### reportlab - Create PDFs
101
+
102
+ ```python
103
+ from reportlab.lib.pagesizes import letter
104
+ from reportlab.pdfgen import canvas
105
+
106
+ c = canvas.Canvas("hello.pdf", pagesize=letter)
107
+ width, height = letter
108
+ c.drawString(100, height - 100, "Hello World!")
109
+ c.save()
110
+ ```
111
+
112
+ ## Command-Line Tools
113
+
114
+ ### pdftotext (poppler-utils)
115
+ ```bash
116
+ pdftotext input.pdf output.txt # Extract text
117
+ pdftotext -layout input.pdf output.txt # Preserve layout
118
+ pdftotext -f 1 -l 5 input.pdf output.txt # Pages 1-5
119
+ ```
120
+
121
+ ### qpdf
122
+ ```bash
123
+ qpdf --empty --pages file1.pdf file2.pdf -- merged.pdf # Merge
124
+ qpdf input.pdf --pages . 1-5 -- pages1-5.pdf # Split
125
+ qpdf input.pdf output.pdf --rotate=+90:1 # Rotate page 1
126
+ qpdf --password=pwd --decrypt encrypted.pdf decrypted.pdf
127
+ ```
128
+
129
+ ## Common Tasks
130
+
131
+ ### OCR Scanned PDFs
132
+ ```python
133
+ import pytesseract
134
+ from pdf2image import convert_from_path
135
+
136
+ images = convert_from_path('scanned.pdf')
137
+ text = ""
138
+ for i, image in enumerate(images):
139
+ text += pytesseract.image_to_string(image)
140
+ ```
141
+
142
+ ### Add Watermark
143
+ ```python
144
+ watermark = PdfReader("watermark.pdf").pages[0]
145
+ reader = PdfReader("document.pdf")
146
+ writer = PdfWriter()
147
+
148
+ for page in reader.pages:
149
+ page.merge_page(watermark)
150
+ writer.add_page(page)
151
+
152
+ with open("watermarked.pdf", "wb") as output:
153
+ writer.write(output)
154
+ ```
155
+
156
+ ### Password Protection
157
+ ```python
158
+ writer.encrypt("userpassword", "ownerpassword")
159
+ with open("encrypted.pdf", "wb") as output:
160
+ writer.write(output)
161
+ ```
162
+
163
+ ## Quick Reference
164
+
165
+ | Task | Best Tool | Method |
166
+ |------|-----------|--------|
167
+ | Merge PDFs | pypdf | `writer.add_page(page)` |
168
+ | Split PDFs | pypdf | One page per file |
169
+ | Extract text | pdfplumber | `page.extract_text()` |
170
+ | Extract tables | pdfplumber | `page.extract_tables()` |
171
+ | Create PDFs | reportlab | Canvas or Platypus |
172
+ | OCR scanned | pytesseract | Convert to image first |
@@ -0,0 +1,133 @@
1
+ ---
2
+ name: sop_pptx
3
+ description: PowerPoint creation, editing, and analysis toolkit. Use for creating presentations, modifying existing slides, extracting content, and working with templates.
4
+ ---
5
+
6
+ # PPTX Processing Guide
7
+
8
+ ## Reading and Analyzing Content
9
+
10
+ ### Text Extraction
11
+ ```bash
12
+ python -m markitdown presentation.pptx
13
+ ```
14
+
15
+ ### Raw XML Access
16
+ For comments, speaker notes, layouts, animations:
17
+
18
+ ```bash
19
+ python ooxml/scripts/unpack.py presentation.pptx output_dir/
20
+ ```
21
+
22
+ Key file structures:
23
+ - `ppt/presentation.xml` - Main metadata
24
+ - `ppt/slides/slide{N}.xml` - Individual slides
25
+ - `ppt/notesSlides/notesSlide{N}.xml` - Speaker notes
26
+ - `ppt/slideMasters/` - Master templates
27
+ - `ppt/theme/` - Theme and styling
28
+
29
+ ## Creating Presentations (html2pptx)
30
+
31
+ ### Design Principles
32
+
33
+ **CRITICAL**: Before creating, analyze content and choose appropriate design:
34
+ 1. Consider subject matter - tone, industry, mood
35
+ 2. Check for branding requirements
36
+ 3. Match palette to content
37
+ 4. State your approach before writing code
38
+
39
+ **Requirements**:
40
+ - Use web-safe fonts only: Arial, Helvetica, Times New Roman, Georgia, Courier New, Verdana, Tahoma, Trebuchet MS, Impact
41
+ - Create clear visual hierarchy
42
+ - Ensure readability with strong contrast
43
+ - Be consistent across slides
44
+
45
+ ### Color Palette Examples
46
+
47
+ 1. **Classic Blue**: Navy #1C2833, Slate #2E4053, Silver #AAB7B8
48
+ 2. **Teal & Coral**: Teal #5EA8A7, Coral #FE4447
49
+ 3. **Warm Blush**: Mauve #A49393, Blush #EED6D3, Rose #E8B4B8
50
+ 4. **Black & Gold**: Gold #BF9A4A, Black #000000
51
+ 5. **Forest Green**: Green #4E9F3D, Dark Green #1E5128
52
+
53
+ ### Workflow
54
+
55
+ 1. Read `html2pptx.md` completely
56
+ 2. Create HTML file for each slide (720pt x 405pt for 16:9)
57
+ 3. Run JavaScript with html2pptx.js library
58
+ 4. Validate with thumbnails:
59
+ ```bash
60
+ python scripts/thumbnail.py output.pptx workspace/thumbnails --cols 4
61
+ ```
62
+
63
+ ## Editing Existing Presentations (OOXML)
64
+
65
+ ### Workflow
66
+
67
+ 1. Read `ooxml.md` completely
68
+ 2. Unpack: `python ooxml/scripts/unpack.py presentation.pptx output_dir/`
69
+ 3. Edit XML files
70
+ 4. Validate: `python ooxml/scripts/validate.py output_dir/ --original presentation.pptx`
71
+ 5. Pack: `python ooxml/scripts/pack.py output_dir/ edited.pptx`
72
+
73
+ ## Using Templates
74
+
75
+ ### Workflow
76
+
77
+ 1. **Extract and visualize**:
78
+ ```bash
79
+ python -m markitdown template.pptx > template-content.md
80
+ python scripts/thumbnail.py template.pptx
81
+ ```
82
+
83
+ 2. **Create template inventory** - document all slides with indices
84
+
85
+ 3. **Plan outline** - map content to template slides
86
+
87
+ 4. **Rearrange slides**:
88
+ ```bash
89
+ python scripts/rearrange.py template.pptx working.pptx 0,34,34,50,52
90
+ ```
91
+
92
+ 5. **Extract text inventory**:
93
+ ```bash
94
+ python scripts/inventory.py working.pptx text-inventory.json
95
+ ```
96
+
97
+ 6. **Create replacement JSON** with new content
98
+
99
+ 7. **Apply replacements**:
100
+ ```bash
101
+ python scripts/replace.py working.pptx replacement-text.json output.pptx
102
+ ```
103
+
104
+ ## Creating Thumbnails
105
+
106
+ ```bash
107
+ python scripts/thumbnail.py presentation.pptx [output_prefix]
108
+ ```
109
+
110
+ Options:
111
+ - `--cols 4` - Adjust columns (3-6)
112
+ - Custom prefix for output naming
113
+
114
+ ## Converting to Images
115
+
116
+ ```bash
117
+ # PPTX to PDF
118
+ soffice --headless --convert-to pdf presentation.pptx
119
+
120
+ # PDF to JPEG
121
+ pdftoppm -jpeg -r 150 presentation.pdf slide
122
+ ```
123
+
124
+ ## Quick Reference
125
+
126
+ | Task | Tool | Command |
127
+ |------|------|---------|
128
+ | Extract text | markitdown | `python -m markitdown file.pptx` |
129
+ | Create new | html2pptx | HTML -> JS -> PPTX |
130
+ | Edit existing | OOXML | Unpack, edit XML, repack |
131
+ | Use template | rearrange.py | Duplicate/reorder slides |
132
+ | Thumbnails | thumbnail.py | Visual grid of all slides |
133
+ | To images | LibreOffice | PPTX -> PDF -> JPEG |
@@ -0,0 +1,104 @@
1
+ ---
2
+ name: sop_skillcreator
3
+ description: Guide for building modular skill packages that extend Claude's capabilities through specialized knowledge, workflows, and tool integrations. Use when creating new custom skills.
4
+ ---
5
+
6
+ # Skill Creator Guide
7
+
8
+ Build modular packages that extend Claude's capabilities through specialized knowledge, workflows, and tool integrations.
9
+
10
+ ## Key Principles
11
+
12
+ **Concise Design**: The context window is a public good. Only include information Claude doesn't already possess, challenging each piece's necessity.
13
+
14
+ **Appropriate Freedom Levels**: Match specificity to task fragility:
15
+ - High freedom for flexible approaches
16
+ - Low freedom for fragile operations requiring exact sequences
17
+
18
+ **Progressive Disclosure**: Load content in three levels:
19
+ 1. Metadata (always loaded)
20
+ 2. SKILL.md body (on trigger)
21
+ 3. Bundled resources (as needed)
22
+
23
+ ## Skill Structure
24
+
25
+ Every skill requires:
26
+
27
+ ### SKILL.md
28
+ ```markdown
29
+ ---
30
+ name: my-skill
31
+ description: "Description that triggers skill selection - detail functionality AND usage contexts"
32
+ ---
33
+
34
+ # Skill Instructions
35
+
36
+ Your instructions here...
37
+ ```
38
+
39
+ ### Optional Bundled Resources
40
+
41
+ ```
42
+ my-skill/
43
+ ├── SKILL.md # Required - main instructions
44
+ ├── scripts/ # Executable code for deterministic tasks
45
+ ├── references/ # Documentation loaded as needed
46
+ └── assets/ # Output files like templates or icons
47
+ ```
48
+
49
+ ## Creation Process
50
+
51
+ 1. **Understand** - Gather concrete usage examples
52
+ 2. **Plan** - Identify reusable contents (scripts, references, assets)
53
+ 3. **Initialize** - Use `init_skill.py` to scaffold
54
+ 4. **Edit** - Write SKILL.md and create resources
55
+ 5. **Package** - Use `package_skill.py` (validates before creating .skill file)
56
+ 6. **Iterate** - Refine based on real usage feedback
57
+
58
+ ## Best Practices
59
+
60
+ ### Description Field
61
+ The description is critical - it triggers skill selection. Include:
62
+ - What the skill does
63
+ - When to use it (specific contexts)
64
+ - Example use cases
65
+
66
+ ### SKILL.md Content
67
+ - Keep under 500 lines
68
+ - Split complex content into reference files
69
+ - Organize references one level deep from SKILL.md
70
+ - Use clear section headers
71
+
72
+ ### Scripts
73
+ - Make deterministic tasks executable
74
+ - Include error handling
75
+ - Document inputs/outputs
76
+
77
+ ### References
78
+ - Load only when needed
79
+ - Keep focused on single topics
80
+ - Cross-reference sparingly
81
+
82
+ ## Example Skill Structure
83
+
84
+ ```
85
+ code-review/
86
+ ├── SKILL.md
87
+ │ ---
88
+ │ name: code-review
89
+ │ description: Review code for bugs, security issues, and best practices.
90
+ │ Use when asked to review PRs, audit code, or check for issues.
91
+ │ ---
92
+ │ # Code Review Skill
93
+ │ ...instructions...
94
+
95
+ ├── scripts/
96
+ │ └── analyze.py # Static analysis helper
97
+
98
+ ├── references/
99
+ │ ├── security.md # Security checklist
100
+ │ └── patterns.md # Common anti-patterns
101
+
102
+ └── assets/
103
+ └── report-template.md
104
+ ```
@@ -0,0 +1,128 @@
1
+ ---
2
+ name: sop_themefactory
3
+ description: Toolkit for styling artifacts with professional themes. Apply curated color palettes and font pairings to slides, docs, reports, HTML pages, and more. 10 pre-set themes or generate custom themes.
4
+ ---
5
+
6
+ # Theme Factory
7
+
8
+ Apply consistent, professional styling to presentation slide decks and other artifacts with curated themes.
9
+
10
+ ## Usage Instructions
11
+
12
+ 1. **Show theme showcase**: Display `theme-showcase.pdf` for visual reference
13
+ 2. **Ask for choice**: Let user select a theme
14
+ 3. **Wait for selection**: Get explicit confirmation
15
+ 4. **Apply theme**: Apply selected colors and fonts
16
+
17
+ ## Available Themes
18
+
19
+ ### 1. Ocean Depths
20
+ Professional, calming maritime theme
21
+ - Deep blues and teals
22
+ - Clean, corporate feel
23
+
24
+ ### 2. Sunset Boulevard
25
+ Warm and vibrant sunset colors
26
+ - Oranges, pinks, purples
27
+ - Energetic, creative mood
28
+
29
+ ### 3. Forest Canopy
30
+ Natural and grounded earth tones
31
+ - Greens and browns
32
+ - Organic, sustainable feel
33
+
34
+ ### 4. Modern Minimalist
35
+ Clean and contemporary grayscale
36
+ - Black, white, grays
37
+ - Professional, sleek
38
+
39
+ ### 5. Golden Hour
40
+ Rich and warm autumnal palette
41
+ - Golds, ambers, deep reds
42
+ - Luxurious, sophisticated
43
+
44
+ ### 6. Arctic Frost
45
+ Cool and crisp winter-inspired
46
+ - Icy blues and whites
47
+ - Fresh, clean aesthetic
48
+
49
+ ### 7. Desert Rose
50
+ Soft and sophisticated dusty tones
51
+ - Muted pinks, tans, terracotta
52
+ - Elegant, refined
53
+
54
+ ### 8. Tech Innovation
55
+ Bold and modern tech aesthetic
56
+ - Electric blues, neon accents
57
+ - Cutting-edge, dynamic
58
+
59
+ ### 9. Botanical Garden
60
+ Fresh and organic garden colors
61
+ - Leafy greens, floral accents
62
+ - Natural, lively
63
+
64
+ ### 10. Midnight Galaxy
65
+ Dramatic and cosmic deep tones
66
+ - Deep purples, blues, starlight accents
67
+ - Bold, mysterious
68
+
69
+ ## Theme Structure
70
+
71
+ Each theme includes:
72
+ - **Color palette**: Cohesive hex codes
73
+ - **Font pairings**: Header and body fonts
74
+ - **Visual identity**: Specific character/mood
75
+
76
+ ## Application Process
77
+
78
+ After theme selection:
79
+ 1. Read theme file from `themes/` directory
80
+ 2. Apply colors consistently throughout
81
+ 3. Apply font pairings to headers and body
82
+ 4. Ensure proper contrast and readability
83
+ 5. Maintain visual identity across all elements
84
+
85
+ ## Custom Themes
86
+
87
+ When no existing theme fits:
88
+
89
+ 1. Gather requirements (brand colors, mood, industry)
90
+ 2. Generate custom palette with 4-6 colors
91
+ 3. Select complementary font pairing
92
+ 4. Name theme descriptively
93
+ 5. Show for review before applying
94
+
95
+ ### Custom Theme Template
96
+
97
+ ```yaml
98
+ name: "Theme Name"
99
+ description: "What the theme represents"
100
+
101
+ colors:
102
+ primary: "#XXXXXX"
103
+ secondary: "#XXXXXX"
104
+ accent: "#XXXXXX"
105
+ background: "#XXXXXX"
106
+ text: "#XXXXXX"
107
+
108
+ fonts:
109
+ heading: "Font Name"
110
+ body: "Font Name"
111
+
112
+ mood: "Professional | Creative | Playful | Elegant | Bold"
113
+ ```
114
+
115
+ ## Quick Reference
116
+
117
+ | Theme | Mood | Best For |
118
+ |-------|------|----------|
119
+ | Ocean Depths | Professional | Corporate, finance |
120
+ | Sunset Boulevard | Energetic | Creative, marketing |
121
+ | Forest Canopy | Natural | Sustainability, wellness |
122
+ | Modern Minimalist | Sleek | Tech, startups |
123
+ | Golden Hour | Luxurious | Premium brands |
124
+ | Arctic Frost | Fresh | Healthcare, clean tech |
125
+ | Desert Rose | Elegant | Fashion, lifestyle |
126
+ | Tech Innovation | Dynamic | Technology, innovation |
127
+ | Botanical Garden | Lively | Food, nature, organic |
128
+ | Midnight Galaxy | Bold | Entertainment, gaming |