@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.
- package/agents/agents/creative-copywriter.md +212 -0
- package/agents/agents/dario-amodei.md +135 -0
- package/agents/agents/doc-simplifier.md +63 -0
- package/agents/agents/kotlin-pro.md +433 -0
- package/agents/agents/red-team.md +136 -0
- package/agents/agents/sam-altman.md +121 -0
- package/agents/agents/seo-manager.md +184 -0
- package/package.json +1 -1
- package/skills/skillkit-help/SKILL.md +81 -0
- package/skills/skillkit-help/knowledge/application/09-case-studies.md +257 -0
- package/skills/skillkit-help/knowledge/application/12-testing-and-validation.md +276 -0
- package/skills/skillkit-help/knowledge/foundation/01-why-skills-exist.md +246 -0
- package/skills/skillkit-help/knowledge/foundation/02-skills-vs-subagents-comparison.md +312 -0
- package/skills/skillkit-help/knowledge/foundation/03-skills-vs-subagents-decision-tree.md +346 -0
- package/skills/skillkit-help/knowledge/foundation/06-platform-constraints.md +237 -0
- package/skills/skillkit-help/knowledge/foundation/08-when-not-to-use-skills.md +270 -0
- package/skills/skillkit-help/template/SKILL.md +52 -0
- package/skills/skills/adversarial-review/SKILL.md +219 -0
- package/skills/skills/baby-education/SKILL.md +260 -0
- package/skills/skills/baby-education/references/advanced-techniques.md +323 -0
- package/skills/skills/baby-education/references/transformations.md +345 -0
- package/skills/skills/been-there-done-that/SKILL.md +455 -0
- package/skills/skills/been-there-done-that/references/analysis-patterns.md +162 -0
- package/skills/skills/been-there-done-that/references/git-commands.md +132 -0
- package/skills/skills/been-there-done-that/references/tree-insertion-logic.md +145 -0
- package/skills/skills/coolhunter/SKILL.md +270 -0
- package/skills/skills/coolhunter/assets/elicitation-methods.csv +51 -0
- package/skills/skills/coolhunter/knowledge/elicitation-methods.md +312 -0
- package/skills/skills/coolhunter/references/workflow-execution.md +238 -0
- package/skills/skills/coolhunter/workflow-plan-coolhunter.md +232 -0
- package/skills/skills/creative-copywriting/SKILL.md +324 -0
- package/skills/skills/creative-copywriting/databases/README.md +60 -0
- package/skills/skills/creative-copywriting/databases/carousel-structures.csv +16 -0
- package/skills/skills/creative-copywriting/databases/emotional-arcs.csv +11 -0
- package/skills/skills/creative-copywriting/databases/hook-formulas.csv +51 -0
- package/skills/skills/creative-copywriting/databases/power-words.csv +201 -0
- package/skills/skills/creative-copywriting/databases/psychological-triggers.csv +21 -0
- package/skills/skills/creative-copywriting/databases/read-more-patterns.csv +26 -0
- package/skills/skills/creative-copywriting/databases/swipe-triggers.csv +31 -0
- package/skills/skills/creative-copywriting/references/carousel-psychology.md +223 -0
- package/skills/skills/creative-copywriting/references/hook-anatomy.md +169 -0
- package/skills/skills/creative-copywriting/references/power-word-science.md +134 -0
- package/skills/skills/creative-copywriting/references/storytelling-frameworks.md +157 -0
- package/skills/skills/diverse-content-gen/SKILL.md +201 -0
- package/skills/skills/diverse-content-gen/references/advanced-techniques.md +320 -0
- package/skills/skills/diverse-content-gen/references/research-findings.md +379 -0
- package/skills/skills/diverse-content-gen/references/task-workflows.md +241 -0
- package/skills/skills/diverse-content-gen/references/tool-integration.md +419 -0
- package/skills/skills/diverse-content-gen/references/troubleshooting.md +426 -0
- package/skills/skills/diverse-content-gen/references/vs-core-technique.md +240 -0
- package/skills/skills/framework-critical-thinking/SKILL.md +220 -0
- package/skills/skills/framework-critical-thinking/references/bias_detector.md +375 -0
- package/skills/skills/framework-critical-thinking/references/fallback_handler.md +239 -0
- package/skills/skills/framework-critical-thinking/references/memory_curator.md +161 -0
- package/skills/skills/framework-critical-thinking/references/metacognitive_monitor.md +297 -0
- package/skills/skills/framework-critical-thinking/references/producer_critic_orchestrator.md +333 -0
- package/skills/skills/framework-critical-thinking/references/reasoning_router.md +235 -0
- package/skills/skills/framework-critical-thinking/references/reasoning_validator.md +97 -0
- package/skills/skills/framework-critical-thinking/references/reflection_trigger.md +78 -0
- package/skills/skills/framework-critical-thinking/references/self_verification.md +388 -0
- package/skills/skills/framework-critical-thinking/references/uncertainty_quantifier.md +207 -0
- package/skills/skills/framework-initiative/SKILL.md +231 -0
- package/skills/skills/framework-initiative/references/examples.md +150 -0
- package/skills/skills/framework-initiative/references/impact-analysis.md +157 -0
- package/skills/skills/framework-initiative/references/intent-patterns.md +145 -0
- package/skills/skills/framework-initiative/references/star-framework.md +165 -0
- package/skills/skills/humanize-docs/SKILL.md +203 -0
- package/skills/skills/humanize-docs/references/advanced-techniques.md +13 -0
- package/skills/skills/humanize-docs/references/core-transformations.md +368 -0
- package/skills/skills/humanize-docs/references/detection-patterns.md +400 -0
- package/skills/skills/humanize-docs/references/examples-gallery.md +374 -0
- package/skills/skills/imagine/SKILL.md +190 -0
- package/skills/skills/imagine/references/artstyle-corporate-memphis.md +625 -0
- package/skills/skills/imagine/references/artstyle-crewdson-hyperrealism.md +295 -0
- package/skills/skills/imagine/references/artstyle-iphone-social-media.md +426 -0
- package/skills/skills/imagine/references/artstyle-sciencesaru.md +276 -0
- package/skills/skills/pre-deploy-checklist/README.md +26 -0
- package/skills/skills/pre-deploy-checklist/SKILL.md +153 -0
- package/skills/skills/pre-deploy-checklist/references/checklist-categories.md +174 -0
- package/skills/skills/pre-deploy-checklist/references/domain-prompts.md +216 -0
- package/skills/skills/prompt-engineering/SKILL.md +209 -0
- package/skills/skills/prompt-engineering/references/advanced-combinations.md +444 -0
- package/skills/skills/prompt-engineering/references/chain-of-thought.md +140 -0
- package/skills/skills/prompt-engineering/references/decision_matrix.md +220 -0
- package/skills/skills/prompt-engineering/references/few-shot.md +346 -0
- package/skills/skills/prompt-engineering/references/json-format.md +270 -0
- package/skills/skills/prompt-engineering/references/natural-language.md +420 -0
- package/skills/skills/prompt-engineering/references/pitfalls.md +365 -0
- package/skills/skills/prompt-engineering/references/prompt-chaining.md +498 -0
- package/skills/skills/prompt-engineering/references/react.md +108 -0
- package/skills/skills/prompt-engineering/references/self-consistency.md +322 -0
- package/skills/skills/prompt-engineering/references/tree-of-thoughts.md +386 -0
- package/skills/skills/prompt-engineering/references/xml-format.md +220 -0
- package/skills/skills/prompt-engineering/references/yaml-format.md +488 -0
- package/skills/skills/prompt-engineering/references/zero-shot.md +74 -0
- package/skills/skills/quick-spec/SKILL.md +280 -0
- package/skills/skills/quick-spec/assets/tech-spec-template.md +74 -0
- package/skills/skills/quick-spec/references/step-01-understand.md +189 -0
- package/skills/skills/quick-spec/references/step-02-investigate.md +144 -0
- package/skills/skills/quick-spec/references/step-03-generate.md +128 -0
- package/skills/skills/quick-spec/references/step-04-review.md +173 -0
- package/skills/skills/quick-spec/tests/__pycache__/test_skill.cpython-314-pytest-9.0.2.pyc +0 -0
- package/skills/skills/quick-spec/tests/test_scenarios.md +83 -0
- package/skills/skills/quick-spec/tests/test_skill.py +136 -0
- package/skills/skills/readme-expert/SKILL.md +538 -0
- package/skills/skills/readme-expert/knowledge/INDEX.md +192 -0
- package/skills/skills/readme-expert/knowledge/application/quality-standards.md +470 -0
- package/skills/skills/readme-expert/knowledge/application/script-executor.md +604 -0
- package/skills/skills/readme-expert/knowledge/application/template-library.md +822 -0
- package/skills/skills/readme-expert/knowledge/foundation/codebase-scanner.md +361 -0
- package/skills/skills/readme-expert/knowledge/foundation/validation-checklist.md +481 -0
- package/skills/skills/red-teaming/SKILL.md +321 -0
- package/skills/skills/red-teaming/references/ai-llm-redteam.md +517 -0
- package/skills/skills/red-teaming/references/attack-techniques.md +410 -0
- package/skills/skills/red-teaming/references/cybersecurity-redteam.md +383 -0
- package/skills/skills/red-teaming/references/tools-frameworks.md +446 -0
- package/skills/skills/releasing/.skillkit-mode +1 -0
- package/skills/skills/releasing/SKILL.md +225 -0
- package/skills/skills/releasing/references/version-detection.md +108 -0
- package/skills/skills/screenwriter/SKILL.md +273 -0
- package/skills/skills/screenwriter/references/advanced-techniques.md +216 -0
- package/skills/skills/screenwriter/references/pipeline-integration.md +266 -0
- package/skills/skills/skillkit/.claude/settings.local.json +7 -0
- package/skills/skills/skillkit/.claude-plugin/plugin.json +27 -0
- package/skills/skills/skillkit/CHANGELOG.md +484 -0
- package/skills/skills/skillkit/SKILL.md +511 -0
- package/skills/skills/skillkit/commands/skillkit.md +6 -0
- package/skills/skills/skillkit/commands/validate-plan.md +6 -0
- package/skills/skills/skillkit/commands/verify.md +6 -0
- package/skills/skills/skillkit/knowledge/INDEX.md +352 -0
- package/skills/skills/skillkit/knowledge/application/09-case-studies.md +257 -0
- package/skills/skills/skillkit/knowledge/application/10-technical-architecture.md +324 -0
- package/skills/skills/skillkit/knowledge/application/11-adoption-strategy.md +267 -0
- package/skills/skills/skillkit/knowledge/application/12-testing-and-validation.md +276 -0
- package/skills/skills/skillkit/knowledge/application/13-competitive-landscape.md +198 -0
- package/skills/skills/skillkit/knowledge/foundation/01-why-skills-exist.md +246 -0
- package/skills/skills/skillkit/knowledge/foundation/02-skills-vs-subagents-comparison.md +312 -0
- package/skills/skills/skillkit/knowledge/foundation/03-skills-vs-subagents-decision-tree.md +346 -0
- package/skills/skills/skillkit/knowledge/foundation/04-hybrid-patterns.md +308 -0
- package/skills/skills/skillkit/knowledge/foundation/05-token-economics.md +275 -0
- package/skills/skills/skillkit/knowledge/foundation/06-platform-constraints.md +237 -0
- package/skills/skills/skillkit/knowledge/foundation/07-security-concerns.md +322 -0
- package/skills/skills/skillkit/knowledge/foundation/08-when-not-to-use-skills.md +270 -0
- package/skills/skills/skillkit/knowledge/plugin-guide.md +614 -0
- package/skills/skills/skillkit/knowledge/tools/14-validation-tools-guide.md +150 -0
- package/skills/skills/skillkit/knowledge/tools/15-cost-tools-guide.md +157 -0
- package/skills/skills/skillkit/knowledge/tools/16-security-tools-guide.md +122 -0
- package/skills/skills/skillkit/knowledge/tools/17-pattern-tools-guide.md +161 -0
- package/skills/skills/skillkit/knowledge/tools/18-decision-helper-guide.md +243 -0
- package/skills/skills/skillkit/knowledge/tools/19-test-generator-guide.md +275 -0
- package/skills/skills/skillkit/knowledge/tools/20-split-skill-guide.md +149 -0
- package/skills/skills/skillkit/knowledge/tools/21-quality-scorer-guide.md +226 -0
- package/skills/skills/skillkit/knowledge/tools/22-migration-helper-guide.md +356 -0
- package/skills/skills/skillkit/knowledge/tools/23-subagent-creation-guide.md +448 -0
- package/skills/skills/skillkit/knowledge/tools/24-behavioral-testing-guide.md +122 -0
- package/skills/skills/skillkit/references/proposal-generation.md +982 -0
- package/skills/skills/skillkit/references/rationalization-catalog.md +75 -0
- package/skills/skills/skillkit/references/research-methodology.md +661 -0
- package/skills/skills/skillkit/references/section-2-full-creation-workflow.md +452 -0
- package/skills/skills/skillkit/references/section-3-validation-workflow-existing-skill.md +63 -0
- package/skills/skills/skillkit/references/section-4-decision-workflow-skills-vs-subagents.md +64 -0
- package/skills/skills/skillkit/references/section-5-migration-workflow-doc-to-skill.md +58 -0
- package/skills/skills/skillkit/references/section-6-subagent-creation-workflow.md +499 -0
- package/skills/skills/skillkit/references/section-7-knowledge-reference-map.md +72 -0
- package/skills/skills/skillkit/scripts/__pycache__/decision_helper.cpython-314.pyc +0 -0
- package/skills/skills/skillkit/scripts/__pycache__/quick_validate.cpython-312.pyc +0 -0
- package/skills/skills/skillkit/scripts/__pycache__/quick_validate.cpython-314.pyc +0 -0
- package/skills/skills/skillkit/scripts/__pycache__/test_generator.cpython-314-pytest-9.0.2.pyc +0 -0
- package/skills/skills/skillkit/scripts/decision_helper.py +799 -0
- package/skills/skills/skillkit/scripts/init_skill.py +400 -0
- package/skills/skills/skillkit/scripts/init_subagent.py +231 -0
- package/skills/skills/skillkit/scripts/migration_helper.py +669 -0
- package/skills/skills/skillkit/scripts/package_skill.py +211 -0
- package/skills/skills/skillkit/scripts/pattern_detector.py +381 -0
- package/skills/skills/skillkit/scripts/pattern_detector_new.py +382 -0
- package/skills/skills/skillkit/scripts/pressure_tester.py +157 -0
- package/skills/skills/skillkit/scripts/quality_scorer.py +999 -0
- package/skills/skills/skillkit/scripts/quick_validate.py +100 -0
- package/skills/skills/skillkit/scripts/security_scanner.py +474 -0
- package/skills/skills/skillkit/scripts/split_skill.py +540 -0
- package/skills/skills/skillkit/scripts/test_generator.py +695 -0
- package/skills/skills/skillkit/scripts/token_estimator.py +493 -0
- package/skills/skills/skillkit/scripts/utils/__init__.py +49 -0
- package/skills/skills/skillkit/scripts/utils/__pycache__/__init__.cpython-312.pyc +0 -0
- package/skills/skills/skillkit/scripts/utils/__pycache__/__init__.cpython-314.pyc +0 -0
- package/skills/skills/skillkit/scripts/utils/__pycache__/budget_tracker.cpython-312.pyc +0 -0
- package/skills/skills/skillkit/scripts/utils/__pycache__/budget_tracker.cpython-314.pyc +0 -0
- package/skills/skills/skillkit/scripts/utils/__pycache__/output_formatter.cpython-312.pyc +0 -0
- package/skills/skills/skillkit/scripts/utils/__pycache__/output_formatter.cpython-314.pyc +0 -0
- package/skills/skills/skillkit/scripts/utils/__pycache__/reference_validator.cpython-312.pyc +0 -0
- package/skills/skills/skillkit/scripts/utils/__pycache__/reference_validator.cpython-314.pyc +0 -0
- package/skills/skills/skillkit/scripts/utils/budget_tracker.py +388 -0
- package/skills/skills/skillkit/scripts/utils/output_formatter.py +263 -0
- package/skills/skills/skillkit/scripts/utils/reference_validator.py +401 -0
- package/skills/skills/skillkit/scripts/validate_skill.py +594 -0
- package/skills/skills/skillkit/tests/test_behavioral.py +39 -0
- package/skills/skills/skillkit/tests/test_scenarios.md +83 -0
- package/skills/skills/skillkit/tests/test_skill.py +136 -0
- package/skills/skills/skillkit-help/SKILL.md +81 -0
- package/skills/skills/skillkit-help/knowledge/application/09-case-studies.md +257 -0
- package/skills/skills/skillkit-help/knowledge/application/12-testing-and-validation.md +276 -0
- package/skills/skills/skillkit-help/knowledge/foundation/01-why-skills-exist.md +246 -0
- package/skills/skills/skillkit-help/knowledge/foundation/02-skills-vs-subagents-comparison.md +312 -0
- package/skills/skills/skillkit-help/knowledge/foundation/03-skills-vs-subagents-decision-tree.md +346 -0
- package/skills/skills/skillkit-help/knowledge/foundation/06-platform-constraints.md +237 -0
- package/skills/skills/skillkit-help/knowledge/foundation/08-when-not-to-use-skills.md +270 -0
- package/skills/skills/skillkit-help/template/SKILL.md +52 -0
- package/skills/skills/social-media-seo/SKILL.md +278 -0
- package/skills/skills/social-media-seo/databases/caption-styles.csv +31 -0
- package/skills/skills/social-media-seo/databases/engagement-tactics.csv +16 -0
- package/skills/skills/social-media-seo/databases/hashtag-strategies.csv +21 -0
- package/skills/skills/social-media-seo/databases/hook-formulas.csv +26 -0
- package/skills/skills/social-media-seo/databases/keyword-clusters.csv +11 -0
- package/skills/skills/social-media-seo/databases/thread-structures.csv +26 -0
- package/skills/skills/social-media-seo/databases/viral-patterns.csv +21 -0
- package/skills/skills/social-media-seo/references/analytics-guide.md +321 -0
- package/skills/skills/social-media-seo/references/instagram-seo.md +235 -0
- package/skills/skills/social-media-seo/references/threads-seo.md +305 -0
- package/skills/skills/social-media-seo/references/x-twitter-seo.md +337 -0
- package/skills/skills/social-media-seo/scripts/query_database.py +191 -0
- package/skills/skills/storyteller/SKILL.md +241 -0
- package/skills/skills/storyteller/references/transformation-methodology.md +293 -0
- package/skills/skills/storyteller/references/visual-vocabulary.md +177 -0
- package/skills/skills/thread-pro/SKILL.md +162 -0
- package/skills/skills/thread-pro/anti-ai-patterns.md +120 -0
- package/skills/skills/thread-pro/hook-formulas.md +138 -0
- package/skills/skills/thread-pro/references/anti-ai-patterns.md +120 -0
- package/skills/skills/thread-pro/references/hook-formulas.md +138 -0
- package/skills/skills/thread-pro/references/thread-structures.md +240 -0
- package/skills/skills/thread-pro/references/voice-injection.md +130 -0
- package/skills/skills/thread-pro/thread-structures.md +240 -0
- package/skills/skills/thread-pro/voice-injection.md +130 -0
- package/skills/skills/tinkering/SKILL.md +251 -0
- package/skills/skills/tinkering/references/graduation-checklist.md +100 -0
- package/skills/skills/validate-plan/.skillkit-mode +1 -0
- package/skills/skills/validate-plan/SKILL.md +406 -0
- package/skills/skills/validate-plan/references/dry-principles.md +251 -0
- package/skills/skills/validate-plan/references/gap-analysis-guide.md +320 -0
- package/skills/skills/validate-plan/references/tdd-patterns.md +413 -0
- package/skills/skills/validate-plan/references/yagni-checklist.md +330 -0
- package/skills/skills/verify-before-ship/.skillkit-mode +1 -0
- package/skills/skills/verify-before-ship/SKILL.md +116 -0
- package/skills/skills/verify-before-ship/references/anti-rationalization.md +212 -0
- package/skills/skills/verify-before-ship/references/verification-gates.md +305 -0
- package/skills-manifest.json +8 -2
- package/src/picker.js +11 -5
- 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
|