opencode-skills-collection 4.0.0 → 4.0.1

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 (241) hide show
  1. package/bundled-skills/.antigravity-install-manifest.json +24 -1
  2. package/bundled-skills/007/SKILL.md +2 -2
  3. package/bundled-skills/10-andruia-skill-smith/SKILL.md +1 -1
  4. package/bundled-skills/agent-squad/SKILL.md +5 -0
  5. package/bundled-skills/agent-squad/alex/SKILL.md +3 -0
  6. package/bundled-skills/agent-squad/aria/SKILL.md +3 -0
  7. package/bundled-skills/agent-squad/dep/SKILL.md +3 -0
  8. package/bundled-skills/agent-squad/luna/SKILL.md +4 -1
  9. package/bundled-skills/agent-squad/mason/SKILL.md +3 -0
  10. package/bundled-skills/agent-squad/max/SKILL.md +3 -0
  11. package/bundled-skills/agent-squad/quinn/SKILL.md +3 -0
  12. package/bundled-skills/agent-squad/rex/SKILL.md +3 -0
  13. package/bundled-skills/angular/metadata.json +1 -1
  14. package/bundled-skills/angular-best-practices/metadata.json +1 -1
  15. package/bundled-skills/angular-state-management/metadata.json +1 -1
  16. package/bundled-skills/angular-ui-patterns/metadata.json +1 -1
  17. package/bundled-skills/antigravity-skill-orchestrator/SKILL.md +2 -2
  18. package/bundled-skills/apify-actor-development/SKILL.md +2 -2
  19. package/bundled-skills/apple-container/SKILL.md +165 -0
  20. package/bundled-skills/apple-container/references/commands.md +1593 -0
  21. package/bundled-skills/apple-container/references/concepts.md +294 -0
  22. package/bundled-skills/apple-container/references/configuration.md +499 -0
  23. package/bundled-skills/apple-container/references/workflows.md +498 -0
  24. package/bundled-skills/ask-copilot/SKILL.md +112 -0
  25. package/bundled-skills/auto-research/SKILL.md +126 -0
  26. package/bundled-skills/brooks-lint/SKILL.md +1 -1
  27. package/bundled-skills/browser-harness/references/install.md +3 -1
  28. package/bundled-skills/chrome-extension-developer/SKILL.md +1 -1
  29. package/bundled-skills/clean-code-guard/SKILL.md +184 -0
  30. package/bundled-skills/clean-code-guard/references/ai-failure-modes.md +345 -0
  31. package/bundled-skills/clean-code-guard/references/comments-and-formatting.md +115 -0
  32. package/bundled-skills/clean-code-guard/references/dry-kiss-yagni.md +133 -0
  33. package/bundled-skills/clean-code-guard/references/naming-and-functions.md +187 -0
  34. package/bundled-skills/clean-code-guard/references/review-checklist.md +150 -0
  35. package/bundled-skills/clean-code-guard/references/solid.md +280 -0
  36. package/bundled-skills/clean-code-guard/references/sources.md +47 -0
  37. package/bundled-skills/cloudflare-security-audit/SKILL.md +137 -0
  38. package/bundled-skills/cloudflare-security-audit/references/AI-AND-LLM.md +67 -0
  39. package/bundled-skills/cloudflare-security-audit/references/ATTACK-CLASSES.md +116 -0
  40. package/bundled-skills/cloudflare-security-audit/references/CLIENT-SIDE.md +67 -0
  41. package/bundled-skills/cloudflare-security-audit/references/HUNTING.md +110 -0
  42. package/bundled-skills/cloudflare-security-audit/references/MEMORY-SAFETY-AND-BINARY.md +58 -0
  43. package/bundled-skills/cloudflare-security-audit/references/RECONNAISSANCE.md +46 -0
  44. package/bundled-skills/cloudflare-security-audit/references/VALIDATION-AND-REPORTING.md +109 -0
  45. package/bundled-skills/cloudflare-security-audit/references/WEB-PROTOCOL-AND-AUTH.md +85 -0
  46. package/bundled-skills/cloudflare-security-audit/resources/report-schema.json +210 -0
  47. package/bundled-skills/comfyui-gateway/references/troubleshooting.md +1 -1
  48. package/bundled-skills/commit/SKILL.md +2 -1
  49. package/bundled-skills/deepapi/SKILL.md +6 -6
  50. package/bundled-skills/docs/README.md +1 -1
  51. package/bundled-skills/docs/contributors/quality-bar.md +1 -1
  52. package/bundled-skills/docs/contributors/security-guardrails.md +1 -1
  53. package/bundled-skills/docs/integrations/jetski-cortex.md +5 -5
  54. package/bundled-skills/docs/integrations/jetski-gemini-loader/README.md +3 -3
  55. package/bundled-skills/docs/maintainers/ci-drift-fix.md +7 -5
  56. package/bundled-skills/docs/maintainers/merge-batch.md +24 -7
  57. package/bundled-skills/docs/maintainers/pr-autonomy.md +89 -0
  58. package/bundled-skills/docs/maintainers/release-notes-7.2.0.md +1 -1
  59. package/bundled-skills/docs/maintainers/release-process.md +9 -9
  60. package/bundled-skills/docs/maintainers/repo-growth-seo.md +5 -5
  61. package/bundled-skills/docs/maintainers/skills-date-tracking.md +1 -1
  62. package/bundled-skills/docs/maintainers/skills-update-guide.md +2 -2
  63. package/bundled-skills/docs/users/{antigravity-awesome-skills-vs-awesome-claude-skills.md → agentic-awesome-skills-vs-awesome-claude-skills.md} +5 -5
  64. package/bundled-skills/docs/users/ai-agent-skills.md +4 -4
  65. package/bundled-skills/docs/users/best-claude-code-skills-github.md +3 -3
  66. package/bundled-skills/docs/users/best-cursor-skills-github.md +3 -3
  67. package/bundled-skills/docs/users/bundles.md +56 -57
  68. package/bundled-skills/docs/users/claude-code-skills.md +6 -6
  69. package/bundled-skills/docs/users/codex-cli-skills.md +5 -5
  70. package/bundled-skills/docs/users/cursor-skills.md +3 -3
  71. package/bundled-skills/docs/users/faq.md +27 -15
  72. package/bundled-skills/docs/users/gemini-cli-skills.md +4 -4
  73. package/bundled-skills/docs/users/getting-started.md +22 -12
  74. package/bundled-skills/docs/users/kiro-integration.md +7 -7
  75. package/bundled-skills/docs/users/plugins.md +8 -9
  76. package/bundled-skills/docs/users/security-skills.md +1 -1
  77. package/bundled-skills/docs/users/skills-vs-mcp-tools.md +1 -1
  78. package/bundled-skills/docs/users/specialized-plugin-roadmap.md +3 -4
  79. package/bundled-skills/docs/users/usage.md +9 -9
  80. package/bundled-skills/docs/users/visual-guide.md +7 -7
  81. package/bundled-skills/docs/users/windows-truncation-recovery.md +1 -1
  82. package/bundled-skills/docs/users/workflows.md +1 -1
  83. package/bundled-skills/docs/vietnamese/BUNDLES.vi.md +1 -1
  84. package/bundled-skills/docs/vietnamese/FAQ.vi.md +15 -8
  85. package/bundled-skills/docs/vietnamese/GETTING_STARTED.vi.md +12 -5
  86. package/bundled-skills/docs/vietnamese/QUALITY_BAR.vi.md +1 -1
  87. package/bundled-skills/docs/vietnamese/README.vi.md +21 -17
  88. package/bundled-skills/docs/vietnamese/SECURITY_GUARDRAILS.vi.md +1 -1
  89. package/bundled-skills/docs/vietnamese/SKILLS_README.vi.md +2 -2
  90. package/bundled-skills/docs/vietnamese/TRANSLATION_PLAN.vi.md +1 -1
  91. package/bundled-skills/docs/vietnamese/VISUAL_GUIDE.vi.md +8 -8
  92. package/bundled-skills/docs-guard/SKILL.md +109 -0
  93. package/bundled-skills/docs-guard/references/code-samples.md +46 -0
  94. package/bundled-skills/docs-guard/references/docstrings.md +60 -0
  95. package/bundled-skills/docs-guard/references/review-checklist.md +45 -0
  96. package/bundled-skills/docs-guard/references/sources.md +22 -0
  97. package/bundled-skills/docs-guard/references/verification.md +51 -0
  98. package/bundled-skills/efficient-web-research/SKILL.md +4 -0
  99. package/bundled-skills/electron-development/SKILL.md +1 -1
  100. package/bundled-skills/event-staffing-compliance/SKILL.md +3 -0
  101. package/bundled-skills/event-staffing-ordering/SKILL.md +3 -0
  102. package/bundled-skills/feature-tracking/SKILL.md +222 -0
  103. package/bundled-skills/flutter-expert/SKILL.md +6 -1
  104. package/bundled-skills/flutter-expert/resources/implementation-playbook.md +214 -0
  105. package/bundled-skills/gemini-deep-research/README.md +246 -0
  106. package/bundled-skills/gemini-deep-research/SKILL.md +136 -0
  107. package/bundled-skills/gemini-deep-research/requirements.txt +2 -0
  108. package/bundled-skills/gemini-deep-research/scripts/research.py +692 -0
  109. package/bundled-skills/git-pushing/SKILL.md +21 -4
  110. package/bundled-skills/git-pushing/scripts/smart_commit.sh +206 -11
  111. package/bundled-skills/go-in-depth/scripts/workflow-script.js +4 -1
  112. package/bundled-skills/grok-build/SKILL.md +167 -0
  113. package/bundled-skills/grok-build/references/cli.md +99 -0
  114. package/bundled-skills/huggingface-tool-builder/references/find_models_by_paper.sh +1 -1
  115. package/bundled-skills/idea-autopsy/SKILL.md +147 -0
  116. package/bundled-skills/it-manager-hospital/README.md +1 -1
  117. package/bundled-skills/it-manager-pro/README.md +1 -1
  118. package/bundled-skills/itil-expert/README.md +1 -1
  119. package/bundled-skills/langgraph/SKILL.md +1 -1
  120. package/bundled-skills/linkedin-content-generator/SKILL.md +1 -1
  121. package/bundled-skills/lint-and-validate/scripts/lint_runner.py +23 -23
  122. package/bundled-skills/lint-and-validate/scripts/type_coverage.py +30 -30
  123. package/bundled-skills/logic-lens/SKILL.md +1 -1
  124. package/bundled-skills/lore/LICENSE +21 -0
  125. package/bundled-skills/lore/README.md +386 -0
  126. package/bundled-skills/lore/README.zh-CN.md +386 -0
  127. package/bundled-skills/lore/SKILL.md +453 -0
  128. package/bundled-skills/lore/WORKFLOWS.md +216 -0
  129. package/bundled-skills/lore/WORKFLOWS.zh-CN.md +216 -0
  130. package/bundled-skills/lore/references/audit-template.md +60 -0
  131. package/bundled-skills/lore/references/compatibility.md +228 -0
  132. package/bundled-skills/lore/references/config.md +125 -0
  133. package/bundled-skills/lore/references/entry-format.md +70 -0
  134. package/bundled-skills/lore/references/history-command.md +106 -0
  135. package/bundled-skills/lore/references/monorepo-detection.md +78 -0
  136. package/bundled-skills/lore/references/platform-mirrors.md +377 -0
  137. package/bundled-skills/lore/references/stale-new-markers.md +62 -0
  138. package/bundled-skills/lore/references/summary-template.md +98 -0
  139. package/bundled-skills/lore/scripts/README.md +54 -0
  140. package/bundled-skills/lore/scripts/README.zh-CN.md +54 -0
  141. package/bundled-skills/lore/scripts/find_duplicates.py +211 -0
  142. package/bundled-skills/lore/scripts/find_stale.py +116 -0
  143. package/bundled-skills/lore/scripts/history.py +527 -0
  144. package/bundled-skills/lore/scripts/id_hash.py +32 -0
  145. package/bundled-skills/lore/scripts/list_entries.py +183 -0
  146. package/bundled-skills/lovable-cleanup/SKILL.md +3 -3
  147. package/bundled-skills/makepad-splash/SKILL.md +1 -1
  148. package/bundled-skills/mmx-cli/SKILL.md +14 -1
  149. package/bundled-skills/monopoly/SKILL.md +5 -0
  150. package/bundled-skills/monopoly/patterns/SKILL.md +4 -0
  151. package/bundled-skills/monopoly/scale-benchmarks/SKILL.md +4 -0
  152. package/bundled-skills/monopoly/security-checklist/SKILL.md +4 -0
  153. package/bundled-skills/monopoly/tech-matrix/SKILL.md +4 -0
  154. package/bundled-skills/mtls-configuration/SKILL.md +1 -1
  155. package/bundled-skills/network-101/SKILL.md +4 -5
  156. package/bundled-skills/nika/SKILL.md +270 -0
  157. package/bundled-skills/not-a-vibe-coder/SKILL.md +4 -0
  158. package/bundled-skills/ontoly-software-graph/SKILL.md +160 -0
  159. package/bundled-skills/openclaw-github-repo-commander/SKILL.md +1 -1
  160. package/bundled-skills/pilot-protocol/SKILL.md +6 -3
  161. package/bundled-skills/postgres-readonly-queries/README.md +77 -0
  162. package/bundled-skills/postgres-readonly-queries/SKILL.md +152 -0
  163. package/bundled-skills/postgres-readonly-queries/connections.example.json +34 -0
  164. package/bundled-skills/postgres-readonly-queries/requirements.txt +1 -0
  165. package/bundled-skills/postgres-readonly-queries/scripts/query.py +262 -0
  166. package/bundled-skills/pptx-deck-creation/SKILL.md +275 -0
  167. package/bundled-skills/pptx-deck-creation/references/audit-checklist.md +156 -0
  168. package/bundled-skills/pptx-deck-creation/references/design-profiles.md +96 -0
  169. package/bundled-skills/pptx-deck-creation/references/python-snippets.md +150 -0
  170. package/bundled-skills/pptx-deck-creation/references/reference-deck-analysis.md +91 -0
  171. package/bundled-skills/pptx-deck-creation/references/visual-asset-adapters.md +158 -0
  172. package/bundled-skills/privilege-escalation-methods/SKILL.md +1 -1
  173. package/bundled-skills/product-decision-agent/SKILL.md +94 -0
  174. package/bundled-skills/product-decision-agent/agents/openai.yaml +7 -0
  175. package/bundled-skills/product-decision-agent/references/methodology-basis.md +232 -0
  176. package/bundled-skills/product-decision-agent/references/product-playbooks.md +813 -0
  177. package/bundled-skills/product-decision-agent/references/reasoning-engine.md +289 -0
  178. package/bundled-skills/product-decision-agent/references/response-examples.md +279 -0
  179. package/bundled-skills/product-decision-agent/scripts/quality_gate.py +221 -0
  180. package/bundled-skills/product-decision-agent/scripts/test_quality_gate.py +94 -0
  181. package/bundled-skills/pytest-skill/reference/playbook.md +358 -0
  182. package/bundled-skills/quit-sponsor/SKILL.md +96 -0
  183. package/bundled-skills/rclone-cli/references/providers/s3.md +1 -1
  184. package/bundled-skills/security-and-hardening/SKILL.md +1 -1
  185. package/bundled-skills/semgrep-rule-creator/SKILL.md +6 -6
  186. package/bundled-skills/skill-creator/README.md +3 -3
  187. package/bundled-skills/skill-creator/SKILL.md +8 -4
  188. package/bundled-skills/skill-creator/scripts/quick_validate.py +1 -1
  189. package/bundled-skills/sql-injection-testing/SKILL.md +4 -4
  190. package/bundled-skills/subagent-orchestrator/README.md +1 -1
  191. package/bundled-skills/super-code/bash/SKILL.md +3 -0
  192. package/bundled-skills/super-code/c/SKILL.md +3 -0
  193. package/bundled-skills/super-code/cpp/SKILL.md +3 -0
  194. package/bundled-skills/super-code/csharp/SKILL.md +3 -0
  195. package/bundled-skills/super-code/dart/SKILL.md +3 -0
  196. package/bundled-skills/super-code/elixir/SKILL.md +3 -0
  197. package/bundled-skills/super-code/go/SKILL.md +3 -0
  198. package/bundled-skills/super-code/java/SKILL.md +3 -0
  199. package/bundled-skills/super-code/kotlin/SKILL.md +3 -0
  200. package/bundled-skills/super-code/php/SKILL.md +3 -0
  201. package/bundled-skills/super-code/python/SKILL.md +3 -0
  202. package/bundled-skills/super-code/ruby/SKILL.md +3 -0
  203. package/bundled-skills/super-code/rust/SKILL.md +3 -0
  204. package/bundled-skills/super-code/scala/SKILL.md +3 -0
  205. package/bundled-skills/super-code/swift/SKILL.md +3 -0
  206. package/bundled-skills/super-code/typescript/SKILL.md +3 -0
  207. package/bundled-skills/telegram-bot-messaging/README.md +185 -0
  208. package/bundled-skills/telegram-bot-messaging/SKILL.md +101 -0
  209. package/bundled-skills/telegram-bot-messaging/scripts/telegram.sh +420 -0
  210. package/bundled-skills/test-guard/SKILL.md +132 -0
  211. package/bundled-skills/test-guard/references/jest.md +50 -0
  212. package/bundled-skills/test-guard/references/llm-app-testing.md +40 -0
  213. package/bundled-skills/test-guard/references/phpunit.md +56 -0
  214. package/bundled-skills/test-guard/references/pytest.md +65 -0
  215. package/bundled-skills/trading-ledger/SKILL.md +11 -3
  216. package/bundled-skills/uizze-ui-research/SKILL.md +93 -0
  217. package/bundled-skills/vibe-code-auditor/SKILL.md +1 -1
  218. package/bundled-skills/vibecode-production-qa-validator/SKILL.md +1 -1
  219. package/bundled-skills/videodb/scripts/ws_listener.py +29 -15
  220. package/bundled-skills/voice-ai-engine-development/README.md +1 -1
  221. package/bundled-skills/vulnerability-scanner/SKILL.md +1 -1
  222. package/bundled-skills/warehouse/SKILL.md +154 -0
  223. package/bundled-skills/woo-guard/SKILL.md +113 -0
  224. package/bundled-skills/woo-guard/references/checkout-and-money.md +64 -0
  225. package/bundled-skills/woo-guard/references/hpos-and-crud.md +87 -0
  226. package/bundled-skills/woo-guard/references/review-checklist.md +44 -0
  227. package/bundled-skills/woo-guard/references/sources.md +17 -0
  228. package/bundled-skills/wp-guard/SKILL.md +119 -0
  229. package/bundled-skills/wp-guard/references/i18n.md +88 -0
  230. package/bundled-skills/wp-guard/references/performance.md +70 -0
  231. package/bundled-skills/wp-guard/references/review-checklist.md +57 -0
  232. package/bundled-skills/wp-guard/references/security.md +100 -0
  233. package/bundled-skills/wp-guard/references/sources.md +27 -0
  234. package/bundled-skills/writing-skills/gotchas.md +1 -1
  235. package/bundled-skills/writing-skills/references/standards/metadata-standard.md +1 -1
  236. package/bundled-skills/x-twitter-scraper/SKILL.md +14 -32
  237. package/bundled-skills/xss-html-injection/SKILL.md +3 -3
  238. package/bundled-skills/youtube-seo-optimizer/SKILL.md +1 -1
  239. package/bundled-skills/youtube-summarizer/CHANGELOG.md +2 -2
  240. package/package.json +1 -1
  241. package/skills_index.json +273 -0
@@ -0,0 +1,262 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Read-only PostgreSQL query executor.
4
+ Connects to configured databases and executes SELECT queries only.
5
+ """
6
+
7
+ import json
8
+ import os
9
+ import re
10
+ import stat
11
+ import sys
12
+ import argparse
13
+ from pathlib import Path
14
+ from typing import Optional
15
+
16
+ try:
17
+ import psycopg2
18
+ except ImportError:
19
+ print("Error: psycopg2 not installed. Run: pip install psycopg2-binary")
20
+ sys.exit(1)
21
+
22
+ # Constants
23
+ SCRIPT_DIR = Path(__file__).parent.parent
24
+ CONFIG_LOCATIONS = [
25
+ SCRIPT_DIR / "connections.json",
26
+ Path.home() / ".config" / "claude" / "postgres-connections.json",
27
+ ]
28
+ MAX_ROWS = 10000
29
+ MAX_COLUMN_WIDTH = 100
30
+ QUERY_TIMEOUT_MS = 30000
31
+ CONNECTION_TIMEOUT_SEC = 10
32
+ NULL_DISPLAY = "<NULL>"
33
+
34
+
35
+ def is_read_only(query: str) -> bool:
36
+ """Basic client-side check. Primary protection is readonly=True session."""
37
+ query_upper = query.upper().strip()
38
+ safe_starts = ('SELECT', 'SHOW', 'DESCRIBE', 'EXPLAIN', 'WITH', '\\D')
39
+ return any(query_upper.startswith(cmd) for cmd in safe_starts)
40
+
41
+
42
+ def validate_single_statement(query: str) -> bool:
43
+ """Check query contains only one statement."""
44
+ # Remove trailing semicolon and whitespace, then check for remaining semicolons
45
+ clean = query.rstrip().rstrip(';')
46
+ return ';' not in clean
47
+
48
+
49
+ def validate_config_permissions(path: Path) -> None:
50
+ """Warn if config file has insecure permissions (Unix only)."""
51
+ if os.name != 'nt': # Skip on Windows
52
+ mode = path.stat().st_mode
53
+ if bool(mode & stat.S_IRWXG) or bool(mode & stat.S_IRWXO):
54
+ print(f"WARNING: {path} has insecure permissions!")
55
+ print(f"Config contains credentials. Run: chmod 600 {path}")
56
+
57
+
58
+ def validate_db_config(db: dict) -> None:
59
+ """Validate required fields exist in database config."""
60
+ required = ['name', 'host', 'database', 'user', 'password']
61
+ missing = [f for f in required if f not in db]
62
+ if missing:
63
+ print(f"Error: Database config missing fields: {', '.join(missing)}")
64
+ sys.exit(1)
65
+
66
+
67
+ def find_config() -> Optional[Path]:
68
+ """Find config file in supported locations."""
69
+ for path in CONFIG_LOCATIONS:
70
+ if path.exists():
71
+ return path
72
+ return None
73
+
74
+
75
+ def load_config(config_path: Optional[Path] = None) -> dict:
76
+ """Load database connections from JSON config."""
77
+ path = config_path or find_config()
78
+ if not path:
79
+ print("Config not found. Searched:")
80
+ for loc in CONFIG_LOCATIONS:
81
+ print(f" - {loc}")
82
+ print("\nCreate connections.json with format:")
83
+ print(json.dumps({
84
+ "databases": [{
85
+ "name": "mydb",
86
+ "description": "Description of database contents",
87
+ "host": "localhost",
88
+ "port": 5432,
89
+ "database": "mydb",
90
+ "user": "user",
91
+ "password": "password",
92
+ "sslmode": "prefer"
93
+ }]
94
+ }, indent=2))
95
+ sys.exit(1)
96
+
97
+ validate_config_permissions(path)
98
+
99
+ with open(path) as f:
100
+ return json.load(f)
101
+
102
+
103
+ def list_databases(config: dict) -> None:
104
+ """List all configured databases."""
105
+ print("Configured databases:\n")
106
+ for db in config.get("databases", []):
107
+ validate_db_config(db)
108
+ print(f" [{db['name']}]")
109
+ print(f" Host: {db['host']}:{db.get('port', 5432)}")
110
+ print(f" Database: {db['database']}")
111
+ print(f" Description: {db.get('description', 'No description')}")
112
+ print()
113
+
114
+
115
+ def execute_query(db_config: dict, query: str, limit: Optional[int] = None) -> None:
116
+ """Execute a read-only query against the specified database."""
117
+ if not is_read_only(query):
118
+ print("Error: Only read-only queries (SELECT, SHOW, EXPLAIN) are allowed.")
119
+ sys.exit(1)
120
+
121
+ if not validate_single_statement(query):
122
+ print("Error: Multiple statements not allowed. Execute queries separately.")
123
+ sys.exit(1)
124
+
125
+ # Apply limit using regex to avoid false positives from string content
126
+ if limit and not re.search(r'\bLIMIT\s+\d+', query, re.IGNORECASE):
127
+ query = f"{query.rstrip(';')} LIMIT {limit}"
128
+
129
+ conn = None
130
+ try:
131
+ conn = psycopg2.connect(
132
+ host=db_config['host'],
133
+ port=db_config.get('port', 5432),
134
+ database=db_config['database'],
135
+ user=db_config['user'],
136
+ password=db_config['password'],
137
+ sslmode=db_config.get('sslmode', 'prefer'),
138
+ connect_timeout=CONNECTION_TIMEOUT_SEC,
139
+ options=f'-c statement_timeout={QUERY_TIMEOUT_MS}'
140
+ )
141
+ # Primary safety: readonly session prevents any write operations
142
+ conn.set_session(readonly=True, autocommit=True)
143
+
144
+ with conn.cursor() as cur:
145
+ cur.execute(query)
146
+ if cur.description:
147
+ columns = [desc[0] for desc in cur.description]
148
+ rows = cur.fetchmany(MAX_ROWS)
149
+ truncated = len(rows) == MAX_ROWS
150
+
151
+ # Calculate column widths with cap
152
+ widths = [min(len(col), MAX_COLUMN_WIDTH) for col in columns]
153
+ for row in rows:
154
+ for i, val in enumerate(row):
155
+ val_str = str(val) if val is not None else NULL_DISPLAY
156
+ widths[i] = min(max(widths[i], len(val_str)), MAX_COLUMN_WIDTH)
157
+
158
+ # Print header
159
+ header = " | ".join(col[:MAX_COLUMN_WIDTH].ljust(widths[i]) for i, col in enumerate(columns))
160
+ print(header)
161
+ print("-" * len(header))
162
+
163
+ # Print rows
164
+ for row in rows:
165
+ cells = []
166
+ for i, val in enumerate(row):
167
+ val_str = str(val) if val is not None else NULL_DISPLAY
168
+ if len(val_str) > MAX_COLUMN_WIDTH:
169
+ val_str = val_str[:MAX_COLUMN_WIDTH-3] + "..."
170
+ cells.append(val_str.ljust(widths[i]))
171
+ print(" | ".join(cells))
172
+
173
+ msg = f"\n({len(rows)} rows)"
174
+ if truncated:
175
+ msg += f" [truncated at {MAX_ROWS}]"
176
+ print(msg)
177
+ else:
178
+ print("Query executed (no result set returned)")
179
+
180
+ except psycopg2.Error as e:
181
+ error_msg = str(e)
182
+ # Sanitize to avoid leaking credentials
183
+ if 'password' in error_msg.lower() or 'authentication' in error_msg.lower():
184
+ error_msg = "Authentication failed. Check credentials in connections.json"
185
+ print(f"Database error: {error_msg}")
186
+ sys.exit(1)
187
+ finally:
188
+ if conn:
189
+ conn.close()
190
+
191
+
192
+ def find_database(config: dict, name: str) -> dict:
193
+ """Find database config by name (case-insensitive)."""
194
+ for db in config.get("databases", []):
195
+ if db.get('name', '').lower() == name.lower():
196
+ validate_db_config(db)
197
+ return db
198
+ available = [db.get('name', 'unnamed') for db in config.get("databases", [])]
199
+ print(f"Database '{name}' not found.")
200
+ print(f"Available: {', '.join(available)}")
201
+ sys.exit(1)
202
+
203
+
204
+ def main() -> None:
205
+ """Main entry point."""
206
+ parser = argparse.ArgumentParser(
207
+ description="Execute read-only PostgreSQL queries",
208
+ formatter_class=argparse.RawDescriptionHelpFormatter,
209
+ epilog="""
210
+ Examples:
211
+ %(prog)s --list
212
+ %(prog)s --db mydb --tables
213
+ %(prog)s --db mydb --query "SELECT * FROM users" --limit 100
214
+ """
215
+ )
216
+ parser.add_argument("--config", "-c", type=Path, help="Path to config JSON")
217
+ parser.add_argument("--db", "-d", help="Database name to query")
218
+ parser.add_argument("--query", "-q", help="SQL query to execute")
219
+ parser.add_argument("--limit", "-l", type=int, help="Limit rows returned")
220
+ parser.add_argument("--list", action="store_true", help="List configured databases")
221
+ parser.add_argument("--schema", "-s", action="store_true", help="Show database schema")
222
+ parser.add_argument("--tables", "-t", action="store_true", help="List tables")
223
+
224
+ args = parser.parse_args()
225
+ config = load_config(args.config)
226
+
227
+ if args.list:
228
+ list_databases(config)
229
+ return
230
+
231
+ if not args.db:
232
+ print("Error: --db required. Use --list to see available databases.")
233
+ sys.exit(1)
234
+
235
+ db_config = find_database(config, args.db)
236
+
237
+ if args.tables:
238
+ query = """
239
+ SELECT table_schema, table_name, table_type
240
+ FROM information_schema.tables
241
+ WHERE table_schema NOT IN ('pg_catalog', 'information_schema')
242
+ ORDER BY table_schema, table_name
243
+ """
244
+ execute_query(db_config, query, args.limit)
245
+ elif args.schema:
246
+ query = """
247
+ SELECT c.table_schema, c.table_name, c.column_name, c.data_type, c.is_nullable
248
+ FROM information_schema.columns c
249
+ JOIN information_schema.tables t ON c.table_name = t.table_name AND c.table_schema = t.table_schema
250
+ WHERE c.table_schema NOT IN ('pg_catalog', 'information_schema')
251
+ ORDER BY c.table_schema, c.table_name, c.ordinal_position
252
+ """
253
+ execute_query(db_config, query, args.limit)
254
+ elif args.query:
255
+ execute_query(db_config, args.query, args.limit)
256
+ else:
257
+ print("Error: --query, --tables, or --schema required")
258
+ sys.exit(1)
259
+
260
+
261
+ if __name__ == "__main__":
262
+ main()
@@ -0,0 +1,275 @@
1
+ ---
2
+ name: pptx-deck-creation
3
+ description: "Create editable, production-ready PPTX decks with narrative planning, explicit layout specs, asset guidance, and quality checks."
4
+ category: office-productivity
5
+ risk: critical
6
+ source: community
7
+ source_repo: kimtth/agent-pptify-kit
8
+ source_type: community
9
+ date_added: "2026-07-14"
10
+ author: kimtth
11
+ tags: [powerpoint, pptx, presentation, slide-design, document-generation]
12
+ tools: [claude, cursor, gemini, codex, antigravity]
13
+ license: "MIT"
14
+ license_source: "https://github.com/kimtth/agent-pptify-kit/blob/main/LICENSE"
15
+ ---
16
+
17
+ # PPTX Deck Creation
18
+
19
+ ## Overview
20
+
21
+ Create an editable PowerPoint deck from a clear narrative, source evidence, and
22
+ explicit layout decisions. Keep the deck specification and its native
23
+ PowerPoint objects as the source of truth. Images may support a slide, but they
24
+ must not replace editable titles, labels, data, tables, or diagrams.
25
+
26
+ Use the bundled references for design-profile selection, reference-deck
27
+ analysis, visual-asset decisions, and final quality checks. The skill does not
28
+ ship a general-purpose renderer or bundled runtime scripts.
29
+
30
+ ## Scope Boundary
31
+
32
+ Use this skill as the primary workflow for creating a new, editable PPTX deck.
33
+ It owns the path from a deck brief through narrative planning, a
34
+ coordinate-explicit specification, task-specific PPTX generation, and final
35
+ quality assurance. Do not redirect a net-new deck to another skill merely
36
+ because the requested deliverable is a `.pptx` file.
37
+
38
+ Use `@pptx-official` when work starts with an existing PPTX and requires
39
+ package-level operations: raw OOXML editing, template duplication and text
40
+ replacement, speaker notes, comments, animations, or other structural changes
41
+ to that file. It may support a build when those operations are necessary, but
42
+ it is not the default workflow for a net-new deck authored here.
43
+
44
+ ## When to Use This Skill
45
+
46
+ * Use when a user asks to create a new editable PowerPoint or PPTX deck
47
+ * Use as the default workflow when a new deck needs to be delivered as a `.pptx` file
48
+ * Use when a deck needs a narrative framework, a design direction, and final coordinates
49
+ * Use when analyzing a reference PPTX without copying its binary content
50
+ * Use when reviewing a generated PPTX for layout, package, or accessibility defects
51
+
52
+ ## How It Works
53
+
54
+ ### Step 1: Understand the requested deck
55
+
56
+ Collect the audience, decision or purpose, language, slide count, source
57
+ material, brand requirements, and delivery format. Ask the user to select a
58
+ narrative framework if they have not already done so. Do not select one on the
59
+ user's behalf.
60
+
61
+ Use one of these framework spines, or a user-defined alternative:
62
+
63
+ | Framework | Use case |
64
+ |---|---|
65
+ | `mckinsey` | Executive proposals and strategic recommendations |
66
+ | `scqa` | Situation, complication, question, answer narratives |
67
+ | `pyramid` | Main answer followed by supporting arguments |
68
+ | `mece` | Issue decomposition and workstream synthesis |
69
+ | `action-title` | Executive communications with conclusion-led titles |
70
+ | `assertion-evidence` | Technical or research presentations |
71
+ | `exec-summary-first` | Board and leadership briefings |
72
+ | `custom` | User-defined structure or organization playbook |
73
+
74
+ Record the resolved framework, its source, title rules, slide sequence, and
75
+ any approved assumptions in the deck summary.
76
+
77
+ ### Step 2: Establish source and design context
78
+
79
+ Give each factual source a stable ID. Record a source reference for every
80
+ metric, chart value, quotation, and factual claim that appears in the deck.
81
+ Summarize source material into one message per slide rather than pasting long
82
+ documents into the specification.
83
+
84
+ For a reference presentation, inspect it read-only. Extract palette, font,
85
+ slide-size, template, layout-flow, and topic-sequence signals. Re-author target
86
+ slides with their own explicit coordinates. Do not copy, mutate, or use the
87
+ source PPTX as a template for generated content.
88
+
89
+ Select a documented design profile from
90
+ [design profiles](references/design-profiles.md). Use the user's named profile
91
+ first. Use a reference deck when one is available. Otherwise, use Fluent UI
92
+ Design Token Guidance by default, use Primer Primitives for GitHub-focused
93
+ technical decks, and use a broader style catalog only when the user requests
94
+ multiple visual directions. Record the selected profile, source URL, license,
95
+ palette, typography, spacing, and signature visual treatment in
96
+ `summary.design_context`.
97
+
98
+ ### Step 3: Plan the story and visual structure
99
+
100
+ Create one defensible message per slide. Use conclusion-led slide titles when
101
+ the selected framework calls for them. Keep the storyline mutually exclusive
102
+ and collectively exhaustive where appropriate. Include concrete numbers, dates,
103
+ owners, and sources only when supported by the evidence.
104
+
105
+ Every normal content slide needs a visible, style-derived structure such as an
106
+ accent band, card shell, divider, grid, diagram primitive, or image treatment.
107
+ Avoid plain title-and-bullets slides, default theme colors, and Calibri-only
108
+ output unless the user explicitly requests that treatment.
109
+
110
+ ### Step 4: Author a coordinate-explicit specification
111
+
112
+ Create a JSON object with `summary` and `slides`. Every generated slide needs
113
+ an `id`, `title`, and complete `layout_tree`. Use final inch-based bounding
114
+ boxes, z-order, colors, font sizes, and grouping. Do not rely on a renderer to
115
+ make layout decisions.
116
+
117
+ Include this production metadata before building:
118
+
119
+ ```json
120
+ {
121
+ "summary": {
122
+ "layout_policy": {
123
+ "safe_margin": 0.5,
124
+ "content_bottom": 6.7,
125
+ "footer_top": 6.85,
126
+ "minimum_gap": 0.12
127
+ },
128
+ "accessibility": {
129
+ "language": "en-US",
130
+ "presentation_title": "Deck title"
131
+ }
132
+ }
133
+ }
134
+ ```
135
+
136
+ Keep content inside the safe margin and above the footer rail. Use native
137
+ `text`, `shape`, `line`, `table`, and `image` objects. Add alt text to
138
+ meaningful images and a reading order for each production slide. Use images as
139
+ supporting visuals only; recreate essential labels, legend entries, process
140
+ steps, and data values as editable objects.
141
+
142
+ Use the following object constraints:
143
+
144
+ * Keep content text at 9 pt or larger; prefer 10 to 12 pt for body copy
145
+ * Keep every child object inside its parent group bounding box
146
+ * Keep table column widths equal to the table width and split dense tables across slides
147
+ * Keep normal content objects within slide bounds; only decorative full-bleed elements may cross an edge
148
+ * Keep images behind overlapping text and preserve their aspect ratio
149
+ * Store `source_ref` with source ID, locator, claim type, and verification status for sourced claims
150
+
151
+ ### Step 5: Create the PPTX deck when requested
152
+
153
+ Own net-new PPTX creation in this workflow. When a PPTX file is required,
154
+ create a small task-specific builder with the user's approved environment. Start
155
+ slides from a blank layout and create native objects from the final bounding
156
+ boxes. Enable word wrap, disable automatic text resizing, set text insets and
157
+ alignment explicitly, and reject zero or negative bounding boxes before
158
+ building.
159
+
160
+ Save the authored specification, PPTX, build manifest, audit records, and
161
+ source manifest together. Do not add a large shared renderer or copy source
162
+ presentation content. Use `@pptx-official` only when the requested result also
163
+ requires an existing-file or OOXML workflow.
164
+
165
+ ### Step 6: Validate and repair
166
+
167
+ Apply the [manual audit checklist](references/audit-checklist.md) before and
168
+ after building. Check collisions, text capacity, font sizes, safe margins,
169
+ group containment, table fit, object bounds, design context, and native
170
+ editability. Reopen the PPTX to verify slide count, package structure, hidden
171
+ slides, actual geometry, language, image alt text, reading order, and table
172
+ headers.
173
+
174
+ Inspect rendered previews when a compatible renderer is available. Check
175
+ clipping, font fallback, contrast, image crops, and visual hierarchy. Repair
176
+ the specification or the task-specific builder, rebuild, and repeat the audit
177
+ until all deterministic failures are resolved. Report any remaining exception
178
+ with the slide ID, object ID, reason, owner, and review date.
179
+
180
+ ## Reference-Deck Analysis
181
+
182
+ The skill provides a read-only analysis contract, not packaged code. For a
183
+ specific task, use `python-pptx` and the Office Open XML package to inspect a
184
+ presentation. Produce only the context needed for the task:
185
+
186
+ * Compact prompt context with slide count, styles, brands, template, and layout
187
+ * Full extraction with `layout_tree`, summary metrics, and render-aware elements
188
+ * Folder-level diagnostics with one result per deck and a manifest
189
+ * Style-master analysis with colors, fonts, layout usage, and flow patterns
190
+
191
+ Use [reference-deck analysis recipes](references/reference-deck-analysis.md)
192
+ and [Python guidance](references/python-snippets.md) as static implementation
193
+ references. Keep all extraction read-only.
194
+
195
+ ## Visual Assets
196
+
197
+ Use [visual asset guidelines](references/visual-asset-adapters.md) when an icon,
198
+ image, SVG, or user-managed infographic is needed. Confirm image licensing
199
+ before placing it. Record asset provenance, local path, and alt text. Never ask
200
+ users to provide secrets in chat, and never use a placeholder when acquisition
201
+ fails.
202
+
203
+ When a provider, output path, or other required setting is missing, ask for the
204
+ non-secret information before generating an infographic. If no configured
205
+ provider is available, omit the asset and continue with editable native slide
206
+ objects.
207
+
208
+ Before any external generation call, disclose the provider and model, what
209
+ prompt or source material will leave the machine, the likely cost, and the
210
+ output path. Obtain explicit confirmation unless the user already authorized
211
+ that exact operation. Never overwrite an existing output without separate
212
+ confirmation.
213
+
214
+ ## Examples
215
+
216
+ ### Example 1: Executive recommendation deck
217
+
218
+ A user asks for a 10-slide leadership deck based on a project brief. Confirm
219
+ the audience, choose `exec-summary-first`, summarize the brief into one claim
220
+ per slide, and create coordinate-explicit content cards with a documented
221
+ Fluent UI design context. Add source references for each brief-derived metric,
222
+ then build and audit the requested PPTX.
223
+
224
+ ### Example 2: Reference-deck-informed proposal
225
+
226
+ A user supplies a prior PPTX and asks for a new proposal in a similar visual
227
+ language. Extract only the existing deck's palette, typography, layout rhythm,
228
+ and template usage. Use those signals to design a new outline and native layout
229
+ tree. Do not duplicate slides, copy the deck's binary parts, or present the
230
+ reference deck as the new deliverable.
231
+
232
+ ## Best Practices
233
+
234
+ * Keep the business framework and source lineage visible in the deck summary
235
+ * Make each slide title convey the slide's conclusion or narrative role
236
+ * Use source evidence for charts and dashboard-like exhibits
237
+ * Build meaningful content from native editable PowerPoint objects
238
+ * Add a deliberate visual structure to every normal content slide
239
+ * Rebuild and inspect previews after repairing layout or text issues
240
+
241
+ ## Limitations
242
+
243
+ * This skill does not replace a user-provided brand guide, legal asset review, or expert accessibility review
244
+ * It does not include a general renderer, a bundled extraction module, or credentials for external providers
245
+ * It does not own raw OOXML editing, template duplication, or other mutations of an existing PPTX package
246
+ * Stop and ask for clarification when the audience, source evidence, brand requirements, or required output path is missing
247
+
248
+ ## Security and Safety Notes
249
+
250
+ * Keep reference-deck analysis read-only and never overwrite the source deck
251
+ * Request confirmation before any task-specific build or repair overwrites an existing output file
252
+ * Use user-managed providers only and keep credentials outside chat and skill content
253
+ * Omit unlicensed or license-ambiguous visual assets instead of substituting placeholders
254
+
255
+ ## Common Pitfalls
256
+
257
+ ### Problem: A slide has more copy than its bounding box can hold
258
+
259
+ Shorten the copy, enlarge the bounding box, or split the content across slides.
260
+ Do not solve the issue by reducing meaningful content below 9 pt.
261
+
262
+ ### Problem: The deck resembles an unstyled default PowerPoint file
263
+
264
+ Select and record a design profile, then add explicit background, typography,
265
+ accent, card, divider, or grid primitives to the layout tree.
266
+
267
+ ### Problem: A reference deck is used as a source file for the output
268
+
269
+ Treat the reference deck as read-only context. Re-author the target deck with
270
+ its own slide specification and native editable content.
271
+
272
+ ## Related Skills
273
+
274
+ * `@pptx-official` - Use for existing PPTX, OOXML, and template-mutation workflows, not default net-new deck creation
275
+ * `@python-pptx-generator` - Use for focused Python PPTX generation patterns