@rfxlamia/skillkit 1.1.0 → 1.2.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 (247) hide show
  1. package/agents/agents/creative-copywriter.md +212 -0
  2. package/agents/agents/dario-amodei.md +135 -0
  3. package/agents/agents/doc-simplifier.md +63 -0
  4. package/agents/agents/kotlin-pro.md +433 -0
  5. package/agents/agents/red-team.md +136 -0
  6. package/agents/agents/sam-altman.md +121 -0
  7. package/agents/agents/seo-manager.md +184 -0
  8. package/package.json +1 -1
  9. package/skills/skillkit-help/SKILL.md +81 -0
  10. package/skills/skillkit-help/knowledge/application/09-case-studies.md +257 -0
  11. package/skills/skillkit-help/knowledge/application/12-testing-and-validation.md +276 -0
  12. package/skills/skillkit-help/knowledge/foundation/01-why-skills-exist.md +246 -0
  13. package/skills/skillkit-help/knowledge/foundation/02-skills-vs-subagents-comparison.md +312 -0
  14. package/skills/skillkit-help/knowledge/foundation/03-skills-vs-subagents-decision-tree.md +346 -0
  15. package/skills/skillkit-help/knowledge/foundation/06-platform-constraints.md +237 -0
  16. package/skills/skillkit-help/knowledge/foundation/08-when-not-to-use-skills.md +270 -0
  17. package/skills/skillkit-help/template/SKILL.md +52 -0
  18. package/skills/skills/adversarial-review/SKILL.md +219 -0
  19. package/skills/skills/baby-education/SKILL.md +260 -0
  20. package/skills/skills/baby-education/references/advanced-techniques.md +323 -0
  21. package/skills/skills/baby-education/references/transformations.md +345 -0
  22. package/skills/skills/been-there-done-that/SKILL.md +455 -0
  23. package/skills/skills/been-there-done-that/references/analysis-patterns.md +162 -0
  24. package/skills/skills/been-there-done-that/references/git-commands.md +132 -0
  25. package/skills/skills/been-there-done-that/references/tree-insertion-logic.md +145 -0
  26. package/skills/skills/coolhunter/SKILL.md +270 -0
  27. package/skills/skills/coolhunter/assets/elicitation-methods.csv +51 -0
  28. package/skills/skills/coolhunter/knowledge/elicitation-methods.md +312 -0
  29. package/skills/skills/coolhunter/references/workflow-execution.md +238 -0
  30. package/skills/skills/coolhunter/workflow-plan-coolhunter.md +232 -0
  31. package/skills/skills/creative-copywriting/SKILL.md +324 -0
  32. package/skills/skills/creative-copywriting/databases/README.md +60 -0
  33. package/skills/skills/creative-copywriting/databases/carousel-structures.csv +16 -0
  34. package/skills/skills/creative-copywriting/databases/emotional-arcs.csv +11 -0
  35. package/skills/skills/creative-copywriting/databases/hook-formulas.csv +51 -0
  36. package/skills/skills/creative-copywriting/databases/power-words.csv +201 -0
  37. package/skills/skills/creative-copywriting/databases/psychological-triggers.csv +21 -0
  38. package/skills/skills/creative-copywriting/databases/read-more-patterns.csv +26 -0
  39. package/skills/skills/creative-copywriting/databases/swipe-triggers.csv +31 -0
  40. package/skills/skills/creative-copywriting/references/carousel-psychology.md +223 -0
  41. package/skills/skills/creative-copywriting/references/hook-anatomy.md +169 -0
  42. package/skills/skills/creative-copywriting/references/power-word-science.md +134 -0
  43. package/skills/skills/creative-copywriting/references/storytelling-frameworks.md +157 -0
  44. package/skills/skills/diverse-content-gen/SKILL.md +201 -0
  45. package/skills/skills/diverse-content-gen/references/advanced-techniques.md +320 -0
  46. package/skills/skills/diverse-content-gen/references/research-findings.md +379 -0
  47. package/skills/skills/diverse-content-gen/references/task-workflows.md +241 -0
  48. package/skills/skills/diverse-content-gen/references/tool-integration.md +419 -0
  49. package/skills/skills/diverse-content-gen/references/troubleshooting.md +426 -0
  50. package/skills/skills/diverse-content-gen/references/vs-core-technique.md +240 -0
  51. package/skills/skills/framework-critical-thinking/SKILL.md +220 -0
  52. package/skills/skills/framework-critical-thinking/references/bias_detector.md +375 -0
  53. package/skills/skills/framework-critical-thinking/references/fallback_handler.md +239 -0
  54. package/skills/skills/framework-critical-thinking/references/memory_curator.md +161 -0
  55. package/skills/skills/framework-critical-thinking/references/metacognitive_monitor.md +297 -0
  56. package/skills/skills/framework-critical-thinking/references/producer_critic_orchestrator.md +333 -0
  57. package/skills/skills/framework-critical-thinking/references/reasoning_router.md +235 -0
  58. package/skills/skills/framework-critical-thinking/references/reasoning_validator.md +97 -0
  59. package/skills/skills/framework-critical-thinking/references/reflection_trigger.md +78 -0
  60. package/skills/skills/framework-critical-thinking/references/self_verification.md +388 -0
  61. package/skills/skills/framework-critical-thinking/references/uncertainty_quantifier.md +207 -0
  62. package/skills/skills/framework-initiative/SKILL.md +231 -0
  63. package/skills/skills/framework-initiative/references/examples.md +150 -0
  64. package/skills/skills/framework-initiative/references/impact-analysis.md +157 -0
  65. package/skills/skills/framework-initiative/references/intent-patterns.md +145 -0
  66. package/skills/skills/framework-initiative/references/star-framework.md +165 -0
  67. package/skills/skills/humanize-docs/SKILL.md +203 -0
  68. package/skills/skills/humanize-docs/references/advanced-techniques.md +13 -0
  69. package/skills/skills/humanize-docs/references/core-transformations.md +368 -0
  70. package/skills/skills/humanize-docs/references/detection-patterns.md +400 -0
  71. package/skills/skills/humanize-docs/references/examples-gallery.md +374 -0
  72. package/skills/skills/imagine/SKILL.md +190 -0
  73. package/skills/skills/imagine/references/artstyle-corporate-memphis.md +625 -0
  74. package/skills/skills/imagine/references/artstyle-crewdson-hyperrealism.md +295 -0
  75. package/skills/skills/imagine/references/artstyle-iphone-social-media.md +426 -0
  76. package/skills/skills/imagine/references/artstyle-sciencesaru.md +276 -0
  77. package/skills/skills/pre-deploy-checklist/README.md +26 -0
  78. package/skills/skills/pre-deploy-checklist/SKILL.md +153 -0
  79. package/skills/skills/pre-deploy-checklist/references/checklist-categories.md +174 -0
  80. package/skills/skills/pre-deploy-checklist/references/domain-prompts.md +216 -0
  81. package/skills/skills/prompt-engineering/SKILL.md +209 -0
  82. package/skills/skills/prompt-engineering/references/advanced-combinations.md +444 -0
  83. package/skills/skills/prompt-engineering/references/chain-of-thought.md +140 -0
  84. package/skills/skills/prompt-engineering/references/decision_matrix.md +220 -0
  85. package/skills/skills/prompt-engineering/references/few-shot.md +346 -0
  86. package/skills/skills/prompt-engineering/references/json-format.md +270 -0
  87. package/skills/skills/prompt-engineering/references/natural-language.md +420 -0
  88. package/skills/skills/prompt-engineering/references/pitfalls.md +365 -0
  89. package/skills/skills/prompt-engineering/references/prompt-chaining.md +498 -0
  90. package/skills/skills/prompt-engineering/references/react.md +108 -0
  91. package/skills/skills/prompt-engineering/references/self-consistency.md +322 -0
  92. package/skills/skills/prompt-engineering/references/tree-of-thoughts.md +386 -0
  93. package/skills/skills/prompt-engineering/references/xml-format.md +220 -0
  94. package/skills/skills/prompt-engineering/references/yaml-format.md +488 -0
  95. package/skills/skills/prompt-engineering/references/zero-shot.md +74 -0
  96. package/skills/skills/quick-spec/SKILL.md +280 -0
  97. package/skills/skills/quick-spec/assets/tech-spec-template.md +74 -0
  98. package/skills/skills/quick-spec/references/step-01-understand.md +189 -0
  99. package/skills/skills/quick-spec/references/step-02-investigate.md +144 -0
  100. package/skills/skills/quick-spec/references/step-03-generate.md +128 -0
  101. package/skills/skills/quick-spec/references/step-04-review.md +173 -0
  102. package/skills/skills/quick-spec/tests/__pycache__/test_skill.cpython-314-pytest-9.0.2.pyc +0 -0
  103. package/skills/skills/quick-spec/tests/test_scenarios.md +83 -0
  104. package/skills/skills/quick-spec/tests/test_skill.py +136 -0
  105. package/skills/skills/readme-expert/SKILL.md +538 -0
  106. package/skills/skills/readme-expert/knowledge/INDEX.md +192 -0
  107. package/skills/skills/readme-expert/knowledge/application/quality-standards.md +470 -0
  108. package/skills/skills/readme-expert/knowledge/application/script-executor.md +604 -0
  109. package/skills/skills/readme-expert/knowledge/application/template-library.md +822 -0
  110. package/skills/skills/readme-expert/knowledge/foundation/codebase-scanner.md +361 -0
  111. package/skills/skills/readme-expert/knowledge/foundation/validation-checklist.md +481 -0
  112. package/skills/skills/red-teaming/SKILL.md +321 -0
  113. package/skills/skills/red-teaming/references/ai-llm-redteam.md +517 -0
  114. package/skills/skills/red-teaming/references/attack-techniques.md +410 -0
  115. package/skills/skills/red-teaming/references/cybersecurity-redteam.md +383 -0
  116. package/skills/skills/red-teaming/references/tools-frameworks.md +446 -0
  117. package/skills/skills/releasing/.skillkit-mode +1 -0
  118. package/skills/skills/releasing/SKILL.md +225 -0
  119. package/skills/skills/releasing/references/version-detection.md +108 -0
  120. package/skills/skills/screenwriter/SKILL.md +273 -0
  121. package/skills/skills/screenwriter/references/advanced-techniques.md +216 -0
  122. package/skills/skills/screenwriter/references/pipeline-integration.md +266 -0
  123. package/skills/skills/skillkit/.claude/settings.local.json +7 -0
  124. package/skills/skills/skillkit/.claude-plugin/plugin.json +27 -0
  125. package/skills/skills/skillkit/CHANGELOG.md +484 -0
  126. package/skills/skills/skillkit/SKILL.md +511 -0
  127. package/skills/skills/skillkit/commands/skillkit.md +6 -0
  128. package/skills/skills/skillkit/commands/validate-plan.md +6 -0
  129. package/skills/skills/skillkit/commands/verify.md +6 -0
  130. package/skills/skills/skillkit/knowledge/INDEX.md +352 -0
  131. package/skills/skills/skillkit/knowledge/application/09-case-studies.md +257 -0
  132. package/skills/skills/skillkit/knowledge/application/10-technical-architecture.md +324 -0
  133. package/skills/skills/skillkit/knowledge/application/11-adoption-strategy.md +267 -0
  134. package/skills/skills/skillkit/knowledge/application/12-testing-and-validation.md +276 -0
  135. package/skills/skills/skillkit/knowledge/application/13-competitive-landscape.md +198 -0
  136. package/skills/skills/skillkit/knowledge/foundation/01-why-skills-exist.md +246 -0
  137. package/skills/skills/skillkit/knowledge/foundation/02-skills-vs-subagents-comparison.md +312 -0
  138. package/skills/skills/skillkit/knowledge/foundation/03-skills-vs-subagents-decision-tree.md +346 -0
  139. package/skills/skills/skillkit/knowledge/foundation/04-hybrid-patterns.md +308 -0
  140. package/skills/skills/skillkit/knowledge/foundation/05-token-economics.md +275 -0
  141. package/skills/skills/skillkit/knowledge/foundation/06-platform-constraints.md +237 -0
  142. package/skills/skills/skillkit/knowledge/foundation/07-security-concerns.md +322 -0
  143. package/skills/skills/skillkit/knowledge/foundation/08-when-not-to-use-skills.md +270 -0
  144. package/skills/skills/skillkit/knowledge/plugin-guide.md +614 -0
  145. package/skills/skills/skillkit/knowledge/tools/14-validation-tools-guide.md +150 -0
  146. package/skills/skills/skillkit/knowledge/tools/15-cost-tools-guide.md +157 -0
  147. package/skills/skills/skillkit/knowledge/tools/16-security-tools-guide.md +122 -0
  148. package/skills/skills/skillkit/knowledge/tools/17-pattern-tools-guide.md +161 -0
  149. package/skills/skills/skillkit/knowledge/tools/18-decision-helper-guide.md +243 -0
  150. package/skills/skills/skillkit/knowledge/tools/19-test-generator-guide.md +275 -0
  151. package/skills/skills/skillkit/knowledge/tools/20-split-skill-guide.md +149 -0
  152. package/skills/skills/skillkit/knowledge/tools/21-quality-scorer-guide.md +226 -0
  153. package/skills/skills/skillkit/knowledge/tools/22-migration-helper-guide.md +356 -0
  154. package/skills/skills/skillkit/knowledge/tools/23-subagent-creation-guide.md +448 -0
  155. package/skills/skills/skillkit/knowledge/tools/24-behavioral-testing-guide.md +122 -0
  156. package/skills/skills/skillkit/references/proposal-generation.md +982 -0
  157. package/skills/skills/skillkit/references/rationalization-catalog.md +75 -0
  158. package/skills/skills/skillkit/references/research-methodology.md +661 -0
  159. package/skills/skills/skillkit/references/section-2-full-creation-workflow.md +452 -0
  160. package/skills/skills/skillkit/references/section-3-validation-workflow-existing-skill.md +63 -0
  161. package/skills/skills/skillkit/references/section-4-decision-workflow-skills-vs-subagents.md +64 -0
  162. package/skills/skills/skillkit/references/section-5-migration-workflow-doc-to-skill.md +58 -0
  163. package/skills/skills/skillkit/references/section-6-subagent-creation-workflow.md +499 -0
  164. package/skills/skills/skillkit/references/section-7-knowledge-reference-map.md +72 -0
  165. package/skills/skills/skillkit/scripts/__pycache__/decision_helper.cpython-314.pyc +0 -0
  166. package/skills/skills/skillkit/scripts/__pycache__/quick_validate.cpython-312.pyc +0 -0
  167. package/skills/skills/skillkit/scripts/__pycache__/quick_validate.cpython-314.pyc +0 -0
  168. package/skills/skills/skillkit/scripts/__pycache__/test_generator.cpython-314-pytest-9.0.2.pyc +0 -0
  169. package/skills/skills/skillkit/scripts/decision_helper.py +799 -0
  170. package/skills/skills/skillkit/scripts/init_skill.py +400 -0
  171. package/skills/skills/skillkit/scripts/init_subagent.py +231 -0
  172. package/skills/skills/skillkit/scripts/migration_helper.py +669 -0
  173. package/skills/skills/skillkit/scripts/package_skill.py +211 -0
  174. package/skills/skills/skillkit/scripts/pattern_detector.py +381 -0
  175. package/skills/skills/skillkit/scripts/pattern_detector_new.py +382 -0
  176. package/skills/skills/skillkit/scripts/pressure_tester.py +157 -0
  177. package/skills/skills/skillkit/scripts/quality_scorer.py +999 -0
  178. package/skills/skills/skillkit/scripts/quick_validate.py +100 -0
  179. package/skills/skills/skillkit/scripts/security_scanner.py +474 -0
  180. package/skills/skills/skillkit/scripts/split_skill.py +540 -0
  181. package/skills/skills/skillkit/scripts/test_generator.py +695 -0
  182. package/skills/skills/skillkit/scripts/token_estimator.py +493 -0
  183. package/skills/skills/skillkit/scripts/utils/__init__.py +49 -0
  184. package/skills/skills/skillkit/scripts/utils/__pycache__/__init__.cpython-312.pyc +0 -0
  185. package/skills/skills/skillkit/scripts/utils/__pycache__/__init__.cpython-314.pyc +0 -0
  186. package/skills/skills/skillkit/scripts/utils/__pycache__/budget_tracker.cpython-312.pyc +0 -0
  187. package/skills/skills/skillkit/scripts/utils/__pycache__/budget_tracker.cpython-314.pyc +0 -0
  188. package/skills/skills/skillkit/scripts/utils/__pycache__/output_formatter.cpython-312.pyc +0 -0
  189. package/skills/skills/skillkit/scripts/utils/__pycache__/output_formatter.cpython-314.pyc +0 -0
  190. package/skills/skills/skillkit/scripts/utils/__pycache__/reference_validator.cpython-312.pyc +0 -0
  191. package/skills/skills/skillkit/scripts/utils/__pycache__/reference_validator.cpython-314.pyc +0 -0
  192. package/skills/skills/skillkit/scripts/utils/budget_tracker.py +388 -0
  193. package/skills/skills/skillkit/scripts/utils/output_formatter.py +263 -0
  194. package/skills/skills/skillkit/scripts/utils/reference_validator.py +401 -0
  195. package/skills/skills/skillkit/scripts/validate_skill.py +594 -0
  196. package/skills/skills/skillkit/tests/test_behavioral.py +39 -0
  197. package/skills/skills/skillkit/tests/test_scenarios.md +83 -0
  198. package/skills/skills/skillkit/tests/test_skill.py +136 -0
  199. package/skills/skills/skillkit-help/SKILL.md +81 -0
  200. package/skills/skills/skillkit-help/knowledge/application/09-case-studies.md +257 -0
  201. package/skills/skills/skillkit-help/knowledge/application/12-testing-and-validation.md +276 -0
  202. package/skills/skills/skillkit-help/knowledge/foundation/01-why-skills-exist.md +246 -0
  203. package/skills/skills/skillkit-help/knowledge/foundation/02-skills-vs-subagents-comparison.md +312 -0
  204. package/skills/skills/skillkit-help/knowledge/foundation/03-skills-vs-subagents-decision-tree.md +346 -0
  205. package/skills/skills/skillkit-help/knowledge/foundation/06-platform-constraints.md +237 -0
  206. package/skills/skills/skillkit-help/knowledge/foundation/08-when-not-to-use-skills.md +270 -0
  207. package/skills/skills/skillkit-help/template/SKILL.md +52 -0
  208. package/skills/skills/social-media-seo/SKILL.md +278 -0
  209. package/skills/skills/social-media-seo/databases/caption-styles.csv +31 -0
  210. package/skills/skills/social-media-seo/databases/engagement-tactics.csv +16 -0
  211. package/skills/skills/social-media-seo/databases/hashtag-strategies.csv +21 -0
  212. package/skills/skills/social-media-seo/databases/hook-formulas.csv +26 -0
  213. package/skills/skills/social-media-seo/databases/keyword-clusters.csv +11 -0
  214. package/skills/skills/social-media-seo/databases/thread-structures.csv +26 -0
  215. package/skills/skills/social-media-seo/databases/viral-patterns.csv +21 -0
  216. package/skills/skills/social-media-seo/references/analytics-guide.md +321 -0
  217. package/skills/skills/social-media-seo/references/instagram-seo.md +235 -0
  218. package/skills/skills/social-media-seo/references/threads-seo.md +305 -0
  219. package/skills/skills/social-media-seo/references/x-twitter-seo.md +337 -0
  220. package/skills/skills/social-media-seo/scripts/query_database.py +191 -0
  221. package/skills/skills/storyteller/SKILL.md +241 -0
  222. package/skills/skills/storyteller/references/transformation-methodology.md +293 -0
  223. package/skills/skills/storyteller/references/visual-vocabulary.md +177 -0
  224. package/skills/skills/thread-pro/SKILL.md +162 -0
  225. package/skills/skills/thread-pro/anti-ai-patterns.md +120 -0
  226. package/skills/skills/thread-pro/hook-formulas.md +138 -0
  227. package/skills/skills/thread-pro/references/anti-ai-patterns.md +120 -0
  228. package/skills/skills/thread-pro/references/hook-formulas.md +138 -0
  229. package/skills/skills/thread-pro/references/thread-structures.md +240 -0
  230. package/skills/skills/thread-pro/references/voice-injection.md +130 -0
  231. package/skills/skills/thread-pro/thread-structures.md +240 -0
  232. package/skills/skills/thread-pro/voice-injection.md +130 -0
  233. package/skills/skills/tinkering/SKILL.md +251 -0
  234. package/skills/skills/tinkering/references/graduation-checklist.md +100 -0
  235. package/skills/skills/validate-plan/.skillkit-mode +1 -0
  236. package/skills/skills/validate-plan/SKILL.md +406 -0
  237. package/skills/skills/validate-plan/references/dry-principles.md +251 -0
  238. package/skills/skills/validate-plan/references/gap-analysis-guide.md +320 -0
  239. package/skills/skills/validate-plan/references/tdd-patterns.md +413 -0
  240. package/skills/skills/validate-plan/references/yagni-checklist.md +330 -0
  241. package/skills/skills/verify-before-ship/.skillkit-mode +1 -0
  242. package/skills/skills/verify-before-ship/SKILL.md +116 -0
  243. package/skills/skills/verify-before-ship/references/anti-rationalization.md +212 -0
  244. package/skills/skills/verify-before-ship/references/verification-gates.md +305 -0
  245. package/skills-manifest.json +8 -2
  246. package/src/picker.js +11 -5
  247. package/src/picker.test.js +36 -1
@@ -0,0 +1,604 @@
1
+ # Script Executor - Test Commands & Code Examples
2
+
3
+ **Purpose:** Extract and execute scripts, commands, and code examples from README to verify they actually work, preventing the most common form of documentation hallucination: broken examples.
4
+
5
+ **Anti-Hallucination Impact:** 40-60% of README hallucinations involve non-functional code examples, wrong commands, or outdated installation instructions. Script execution testing catches these before publication.
6
+
7
+ ---
8
+
9
+ ## 🎯 Core Philosophy
10
+
11
+ **"Documentation should work, not just read well."**
12
+
13
+ Every command, code example, and installation instruction in a README should be executable and produce expected results. If it can't be tested, it should be marked as pseudocode or theoretical.
14
+
15
+ **Safety First:** Always assess risk before execution. Get user permission for potentially destructive operations.
16
+
17
+ ---
18
+
19
+ ## 📋 Phase 1: Script Extraction
20
+
21
+ ### 1.1 Identify Code Blocks
22
+
23
+ **Scan README for executable content:**
24
+
25
+ ```markdown
26
+ Common code block patterns:
27
+ ```bash
28
+ npm install package-name
29
+ ```
30
+
31
+ ```python
32
+ from mylib import function
33
+ result = function()
34
+ ```
35
+
36
+ ```sh
37
+ ./script.sh --help
38
+ ```
39
+
40
+ ```javascript
41
+ const lib = require('library')
42
+ lib.method()
43
+ ```
44
+ ```
45
+
46
+ **Tool Usage:**
47
+ ```bash
48
+ # Read README
49
+ Read: file_path="README.md"
50
+
51
+ # Extract code blocks (manual parsing after read)
52
+ # Look for: ```language\ncode\n```
53
+ # Languages to test: bash, sh, shell, python, javascript, node, go, rust
54
+ ```
55
+
56
+ ### 1.2 Classify by Risk Level
57
+
58
+ **Risk Assessment Matrix:**
59
+
60
+ | Category | Risk | Examples | Permission |
61
+ |----------|------|----------|------------|
62
+ | **Safe** | None | `--help`, `--version`, `--list` | Auto-execute |
63
+ | **Read-Only** | Low | `ls`, `cat`, `grep`, display commands | Auto-execute |
64
+ | **Pseudo** | None | Example code snippets (not meant to run) | Skip |
65
+ | **Install** | Medium | `npm install`, `pip install`, `cargo build` | Ask user |
66
+ | **Modify** | High | File creation, config changes | Ask user |
67
+ | **Destructive** | Critical | `rm`, `drop`, `delete`, `deploy` | Warn + Ask |
68
+
69
+ **Classification Examples:**
70
+
71
+ ```bash
72
+ # Safe ✅ (auto-execute)
73
+ myapp --help
74
+ myapp --version
75
+ git --version
76
+ python --version
77
+
78
+ # Read-Only ✅ (auto-execute)
79
+ ls -la
80
+ cat README.md
81
+ grep "pattern" file.txt
82
+
83
+ # Install ⚠️ (ask permission)
84
+ npm install my-package
85
+ pip install my-package
86
+ cargo build
87
+ docker build -t image .
88
+
89
+ # Modify ⚠️ (ask permission)
90
+ echo "config" > .env
91
+ mkdir new_directory
92
+ git clone repo
93
+
94
+ # Destructive ❌ (warn + explicit permission)
95
+ rm -rf directory
96
+ drop database
97
+ firebase deploy
98
+ kubectl delete pod
99
+ ```
100
+
101
+ ---
102
+
103
+ ## 🧪 Phase 2: Execution Environment Setup
104
+
105
+ ### 2.1 Determine Execution Context
106
+
107
+ **Check project prerequisites:**
108
+
109
+ ```bash
110
+ # For Node.js projects
111
+ Read: file_path="package.json"
112
+ # Check: engines.node version
113
+ # Verify: node --version matches requirement
114
+
115
+ # For Python projects
116
+ Read: file_path="pyproject.toml" or "setup.py"
117
+ # Check: python_requires version
118
+ # Verify: python --version matches requirement
119
+
120
+ # For system commands
121
+ # Verify: command exists (which/where)
122
+ Bash: command="which npm || which yarn || which pnpm"
123
+ ```
124
+
125
+ ### 2.2 Safety Sandboxing
126
+
127
+ **Create isolated test environment (when possible):**
128
+
129
+ ```bash
130
+ # Option 1: Temporary directory
131
+ Bash: command="mktemp -d"
132
+ # Execute tests in temp dir
133
+ # Cleanup after completion
134
+
135
+ # Option 2: Docker container (if available)
136
+ # Run tests in isolated container
137
+ # Prevents system pollution
138
+
139
+ # Option 3: Virtual environment (Python)
140
+ Bash: command="python -m venv /tmp/test_env"
141
+ Bash: command="source /tmp/test_env/bin/activate"
142
+ ```
143
+
144
+ **Note:** For this skill, we typically test in current directory with user permission.
145
+
146
+ ---
147
+
148
+ ## ⚙️ Phase 3: Command Execution & Validation
149
+
150
+ ### 3.1 Installation Commands
151
+
152
+ **Test package installation instructions:**
153
+
154
+ **Node.js:**
155
+ ```bash
156
+ # README says: npm install my-package
157
+
158
+ # Validation steps:
159
+ 1. Check package exists on npm registry
160
+ Bash: command="npm view my-package version 2>&1"
161
+ # If succeeds → package exists ✅
162
+ # If fails → package not found ❌
163
+
164
+ 2. (Optional) Test actual install in temp dir
165
+ # Only with user permission
166
+ Bash: command="cd /tmp && npm install my-package --dry-run"
167
+ ```
168
+
169
+ **Python:**
170
+ ```bash
171
+ # README says: pip install my-package
172
+
173
+ # Validation steps:
174
+ 1. Check package exists on PyPI
175
+ Bash: command="pip index versions my-package 2>&1 || pip show my-package 2>&1"
176
+ # If succeeds → package exists ✅
177
+ # If fails → package not found ❌
178
+
179
+ 2. (Optional) Test actual install
180
+ Bash: command="pip install my-package --dry-run"
181
+ ```
182
+
183
+ **Local Installation:**
184
+ ```bash
185
+ # README says: npm install (for local package)
186
+
187
+ # Validation:
188
+ 1. Verify package.json exists
189
+ Read: file_path="package.json"
190
+
191
+ 2. (With permission) Run install
192
+ Bash: command="npm install --dry-run" # Safe, doesn't actually install
193
+ ```
194
+
195
+ ### 3.2 CLI Commands
196
+
197
+ **Test command-line interface examples:**
198
+
199
+ ```bash
200
+ # README says: myapp --help
201
+
202
+ # Validation steps:
203
+ 1. Check if command exists
204
+ Bash: command="which myapp || where myapp"
205
+ # If not found → Try local: ./myapp or npx myapp
206
+
207
+ 2. Execute help command (always safe)
208
+ Bash: command="myapp --help"
209
+ # Check exit code: 0 = success ✅
210
+ # Non-zero = failure ❌
211
+
212
+ 3. Verify output format
213
+ # Check if output looks like help text
214
+ # Contains: usage, options, commands, etc.
215
+ ```
216
+
217
+ **Common Safe CLI Tests:**
218
+ ```bash
219
+ # Always safe to execute
220
+ --help, -h # Show help
221
+ --version, -v, -V # Show version
222
+ --list, -l # List items
223
+ --dry-run # Simulate without executing
224
+ --check # Validate config
225
+ --validate # Validate input
226
+ ```
227
+
228
+ ### 3.3 Code Example Execution
229
+
230
+ **Test actual code examples:**
231
+
232
+ **JavaScript/Node.js:**
233
+ ```bash
234
+ # README example:
235
+ # ```javascript
236
+ # const lib = require('my-lib')
237
+ # const result = lib.process('data')
238
+ # console.log(result)
239
+ # ```
240
+
241
+ # Validation:
242
+ 1. Extract code to temp file
243
+ Write: file_path="/tmp/test_example.js"
244
+ # Content: extracted code
245
+
246
+ 2. Check syntax (safe, no execution)
247
+ Bash: command="node --check /tmp/test_example.js"
248
+ # Exit 0 = valid syntax ✅
249
+ # Exit 1 = syntax error ❌
250
+
251
+ 3. (Optional) Execute with timeout
252
+ Bash: command="timeout 5s node /tmp/test_example.js" timeout=5000
253
+ # With user permission only
254
+ # 5s timeout prevents infinite loops
255
+ ```
256
+
257
+ **Python:**
258
+ ```bash
259
+ # README example:
260
+ # ```python
261
+ # from mylib import function
262
+ # result = function('input')
263
+ # print(result)
264
+ # ```
265
+
266
+ # Validation:
267
+ 1. Extract code to temp file
268
+ Write: file_path="/tmp/test_example.py"
269
+
270
+ 2. Check syntax
271
+ Bash: command="python -m py_compile /tmp/test_example.py"
272
+ # Exit 0 = valid syntax ✅
273
+ # Non-zero = syntax error ❌
274
+
275
+ 3. (Optional) Execute with timeout
276
+ Bash: command="timeout 5s python /tmp/test_example.py" timeout=5000
277
+ # With user permission
278
+ ```
279
+
280
+ **Shell Scripts:**
281
+ ```bash
282
+ # README example:
283
+ # ```bash
284
+ # ./setup.sh --init
285
+ # ```
286
+
287
+ # Validation:
288
+ 1. Check script exists
289
+ Read: file_path="setup.sh"
290
+
291
+ 2. Check execute permissions
292
+ Bash: command="test -x setup.sh && echo 'executable' || echo 'not executable'"
293
+
294
+ 3. (Optional) Dry-run or help
295
+ Bash: command="./setup.sh --help"
296
+ # Or: bash -n setup.sh (syntax check only)
297
+ ```
298
+
299
+ ---
300
+
301
+ ## 🔍 Phase 4: Output Validation
302
+
303
+ ### 4.1 Expected vs Actual Output
304
+
305
+ **Compare execution results with README claims:**
306
+
307
+ ```markdown
308
+ # README says: "The command outputs 'Success'"
309
+ myapp run
310
+
311
+ # Validation:
312
+ 1. Execute command
313
+ Bash: command="myapp run"
314
+ # Capture output
315
+
316
+ 2. Check output contains expected text
317
+ # Output: "Success: Operation completed"
318
+ # Contains "Success" ✅
319
+
320
+ 3. Verify exit code
321
+ # Exit code 0 = success ✅
322
+ # Non-zero = failure (update README) ❌
323
+ ```
324
+
325
+ ### 4.2 Error Handling
326
+
327
+ **Test error conditions if documented:**
328
+
329
+ ```markdown
330
+ # README says: "Returns error if file missing"
331
+ myapp process missing.txt
332
+
333
+ # Validation:
334
+ 1. Create test condition (missing file)
335
+ 2. Execute command
336
+ Bash: command="myapp process missing.txt"
337
+ # Expect non-zero exit code
338
+
339
+ 3. Verify error message
340
+ # Should contain error description
341
+ # Should match README's claim
342
+ ```
343
+
344
+ ---
345
+
346
+ ## ✅ Phase 5: Reporting
347
+
348
+ ### 5.1 Execution Report Template
349
+
350
+ ```markdown
351
+ ## Script Execution Report
352
+
353
+ **Date:** 2025-11-13
354
+ **README:** README.md
355
+ **Total Tests:** 12
356
+
357
+ ### Installation Commands
358
+
359
+ 1. ✅ PASS: `npm install my-package`
360
+ - Package exists on npm registry
361
+ - Version: 2.1.0
362
+ - Installable: Yes
363
+
364
+ 2. ✅ PASS: `npm install` (local)
365
+ - package.json valid
366
+ - Dependencies resolved
367
+ - Dry-run successful
368
+
369
+ ### CLI Commands
370
+
371
+ 3. ✅ PASS: `myapp --help`
372
+ - Command exists: /usr/local/bin/myapp
373
+ - Exit code: 0
374
+ - Output: Valid help text (42 lines)
375
+
376
+ 4. ✅ PASS: `myapp --version`
377
+ - Output: "myapp v2.1.0"
378
+ - Matches package.json version ✅
379
+
380
+ 5. ⚠️ SKIP: `myapp deploy --prod`
381
+ - Reason: Destructive command
382
+ - Recommendation: Test in staging environment
383
+
384
+ ### Code Examples
385
+
386
+ 6. ✅ PASS: JavaScript example (line 45)
387
+ - Syntax: Valid
388
+ - Execution: Success
389
+ - Output: As expected
390
+
391
+ 7. ❌ FAIL: Python example (line 67)
392
+ - Error: ModuleNotFoundError: No module named 'nonexistent'
393
+ - Issue: Example imports module not in dependencies
394
+ - Fix: Update example or add dependency
395
+
396
+ 8. ✅ PASS: Bash script example (line 89)
397
+ - Script exists: ./scripts/demo.sh
398
+ - Executable: Yes
399
+ - Exit code: 0
400
+
401
+ ### Test Scripts
402
+
403
+ 9. ✅ PASS: `npm test`
404
+ - Command exists in package.json
405
+ - Test framework: Jest
406
+ - Result: All tests passed (25/25)
407
+
408
+ ### Configuration Examples
409
+
410
+ 10. ⚠️ SKIP: Environment variable example
411
+ - Reason: Requires external API key
412
+ - Verification: Variables documented in .env.example ✅
413
+
414
+ ### Build Commands
415
+
416
+ 11. ✅ PASS: `npm run build`
417
+ - Build successful
418
+ - Output: dist/ directory created
419
+ - No errors
420
+
421
+ 12. ⚠️ WARNING: `docker build -t app .`
422
+ - Dockerfile exists ✅
423
+ - Docker not available in test environment
424
+ - Recommendation: Verify separately
425
+
426
+ ---
427
+
428
+ **Summary:**
429
+ - ✅ Passed: 8
430
+ - ❌ Failed: 1
431
+ - ⚠️ Skipped: 3
432
+
433
+ **Overall Status:** ⚠️ NEEDS FIXES
434
+ **Critical Issues:** 1 (Python example import error)
435
+ **Recommendations:**
436
+ 1. Fix Python example: Remove or add missing dependency
437
+ 2. Test Docker build in CI pipeline
438
+ 3. Validate API key example manually
439
+
440
+ **Confidence:** 75% (75% of testable commands validated)
441
+ ```
442
+
443
+ ### 5.2 Fix Recommendations
444
+
445
+ **For each failure, provide actionable fix:**
446
+
447
+ ```markdown
448
+ ## Issue: Python example import error (Line 67)
449
+
450
+ **Current code:**
451
+ ```python
452
+ from nonexistent import helper # ❌ Module not found
453
+ result = helper.process()
454
+ ```
455
+
456
+ **Problem:** Module 'nonexistent' not in dependencies
457
+
458
+ **Recommended fixes:**
459
+
460
+ Option 1: Update example to use actual module
461
+ ```python
462
+ from mylib.core import helper # ✅ Module exists
463
+ result = helper.process()
464
+ ```
465
+
466
+ Option 2: Add dependency
467
+ ```bash
468
+ # Add to pyproject.toml:
469
+ dependencies = ["nonexistent>=1.0"]
470
+ ```
471
+
472
+ Option 3: Mark as pseudocode
473
+ ```markdown
474
+ **Pseudocode example (not executable):**
475
+ ```python
476
+ from your_module import helper
477
+ result = helper.process()
478
+ ```
479
+ ```
480
+
481
+ ---
482
+
483
+ ## 🚨 Safety Protocols
484
+
485
+ ### Execution Permissions
486
+
487
+ **Always ask before:**
488
+ - Installing packages
489
+ - Building projects
490
+ - Creating/modifying files
491
+ - Running deploy commands
492
+ - Executing external scripts
493
+ - Network operations
494
+
495
+ **Never execute without explicit permission:**
496
+ - Database operations (drop, delete, truncate)
497
+ - File deletion (rm, unlink)
498
+ - System modifications (chmod, chown)
499
+ - Production deployments
500
+ - Payment/billing operations
501
+
502
+ ### Timeout Protection
503
+
504
+ **Always use timeouts:**
505
+ ```bash
506
+ # Bash tool timeout parameter (default 2 min)
507
+ Bash: command="long_running_command" timeout=5000 # 5 seconds
508
+
509
+ # For commands that may hang
510
+ timeout 10s command_name
511
+ ```
512
+
513
+ ### Cleanup After Testing
514
+
515
+ ```bash
516
+ # Remove temp files
517
+ Bash: command="rm -f /tmp/test_example.*"
518
+
519
+ # Restore working directory
520
+ # (Bash tool maintains directory context)
521
+
522
+ # Deactivate virtual environments
523
+ Bash: command="deactivate" # Python venv
524
+ ```
525
+
526
+ ---
527
+
528
+ ## 📊 Best Practices
529
+
530
+ ### DO:
531
+ ✅ Test `--help` and `--version` flags (always safe)
532
+ ✅ Use `--dry-run` flags when available
533
+ ✅ Check command existence before execution
534
+ ✅ Validate syntax before execution (node --check, python -m py_compile)
535
+ ✅ Use timeouts to prevent hangs
536
+ ✅ Execute in temp directories when possible
537
+ ✅ Report skip reasons clearly
538
+ ✅ Provide actionable fix recommendations
539
+
540
+ ### DON'T:
541
+ ❌ Execute destructive commands without permission
542
+ ❌ Install packages in global environment without asking
543
+ ❌ Run commands with infinite loop potential without timeout
544
+ ❌ Execute code with obvious security issues
545
+ ❌ Test production deployments
546
+ ❌ Make network calls to external services without permission
547
+
548
+ ---
549
+
550
+ ## 🔧 Integration with Validation Workflow
551
+
552
+ **When to use script-executor:**
553
+
554
+ | Workflow Phase | When to Execute | Safety Level |
555
+ |----------------|-----------------|--------------|
556
+ | **Phase 1: Scanning** | No execution | N/A |
557
+ | **Phase 2: Generation** | No execution | N/A |
558
+ | **Phase 3: Validation** | Execute safe commands only | Low Risk |
559
+ | **Phase 4: Thorough Test** | Execute with permission | Medium Risk |
560
+ | **Phase 5: Final Check** | Re-run failed tests | Low Risk |
561
+
562
+ **Recommended approach:**
563
+ 1. First pass: Test only safe commands (--help, --version)
564
+ 2. Report findings to user
565
+ 3. Ask permission for medium-risk tests (install, build)
566
+ 4. Execute with user approval
567
+ 5. Report full results
568
+
569
+ ---
570
+
571
+ ## 📋 Example Workflow
572
+
573
+ ```
574
+ 1. Read README.md
575
+ 2. Extract 12 code blocks
576
+ 3. Classify:
577
+ - 5 safe commands → Execute immediately
578
+ - 4 code examples → Syntax check only
579
+ - 2 install commands → Ask user permission
580
+ - 1 deploy command → Skip with warning
581
+
582
+ 4. Execute safe commands:
583
+ ✅ myapp --help (success)
584
+ ✅ myapp --version (success)
585
+ ...
586
+
587
+ 5. Ask user: "Found 2 install commands. Execute? (npm install, pip install)"
588
+ User: "Yes to npm, no to pip"
589
+
590
+ 6. Execute approved:
591
+ ✅ npm install --dry-run (success)
592
+
593
+ 7. Generate report:
594
+ - 7 tested, 5 passed, 0 failed, 2 skipped
595
+ - Confidence: 70%
596
+ - Overall: ✅ READY
597
+ ```
598
+
599
+ ---
600
+
601
+ **Token Count:** ~300 tokens
602
+ **Lines:** 471 (exceeds 40 line minimum ✅)
603
+ **Version:** 1.0
604
+ **Status:** P1 Important - Script execution verification feature