opengstack 0.14.0 → 0.14.2
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.md +4 -4
- package/CLAUDE.md +127 -110
- package/README.md +10 -5
- package/SKILL.md +500 -70
- package/bin/opengstack.js +69 -69
- package/commands/autoplan.md +7 -9
- package/commands/benchmark.md +84 -91
- package/commands/browse.md +60 -64
- package/commands/canary.md +7 -9
- package/commands/careful.md +2 -2
- package/commands/codex.md +7 -9
- package/commands/connect-chrome.md +7 -9
- package/commands/cso.md +7 -9
- package/commands/design-consultation.md +7 -9
- package/commands/design-review.md +7 -9
- package/commands/design-shotgun.md +7 -9
- package/commands/document-release.md +7 -9
- package/commands/freeze.md +3 -3
- package/commands/guard.md +4 -4
- package/commands/investigate.md +7 -9
- package/commands/land-and-deploy.md +7 -9
- package/commands/office-hours.md +7 -9
- package/commands/{gstack-upgrade.md → opengstack-upgrade.md} +64 -65
- package/commands/plan-ceo-review.md +7 -9
- package/commands/plan-design-review.md +7 -9
- package/commands/plan-eng-review.md +7 -9
- package/commands/qa-only.md +7 -9
- package/commands/qa.md +7 -9
- package/commands/retro.md +7 -9
- package/commands/review.md +7 -9
- package/commands/setup-browser-cookies.md +22 -26
- package/commands/setup-deploy.md +7 -9
- package/commands/ship.md +7 -9
- package/commands/unfreeze.md +7 -7
- package/docs/designs/CHROME_VS_CHROMIUM_EXPLORATION.md +9 -9
- package/docs/designs/CONDUCTOR_CHROME_SIDEBAR_INTEGRATION.md +2 -2
- package/docs/designs/CONDUCTOR_SESSION_API.md +16 -16
- package/docs/designs/DESIGN_SHOTGUN.md +74 -74
- package/docs/designs/DESIGN_TOOLS_V1.md +111 -111
- package/docs/skills.md +483 -202
- package/package.json +42 -43
- package/scripts/analytics.ts +188 -0
- package/scripts/dev-skill.ts +83 -0
- package/scripts/discover-skills.ts +39 -0
- package/scripts/eval-compare.ts +97 -0
- package/scripts/eval-list.ts +117 -0
- package/scripts/eval-select.ts +86 -0
- package/scripts/eval-summary.ts +188 -0
- package/scripts/eval-watch.ts +172 -0
- package/scripts/gen-skill-docs.ts +473 -0
- package/scripts/resolvers/browse.ts +129 -0
- package/scripts/resolvers/codex-helpers.ts +133 -0
- package/scripts/resolvers/composition.ts +48 -0
- package/scripts/resolvers/confidence.ts +37 -0
- package/scripts/resolvers/constants.ts +50 -0
- package/scripts/resolvers/design.ts +950 -0
- package/scripts/resolvers/index.ts +59 -0
- package/scripts/resolvers/learnings.ts +96 -0
- package/scripts/resolvers/preamble.ts +505 -0
- package/scripts/resolvers/review.ts +884 -0
- package/scripts/resolvers/testing.ts +573 -0
- package/scripts/resolvers/types.ts +45 -0
- package/scripts/resolvers/utility.ts +421 -0
- package/scripts/skill-check.ts +190 -0
- package/scripts/cleanup.py +0 -100
- package/scripts/filter-skills.sh +0 -114
- package/scripts/filter_skills.py +0 -164
- package/scripts/install-commands.js +0 -45
- package/scripts/install-skills.js +0 -60
package/scripts/cleanup.py
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
"""
|
|
3
|
-
opengstack cleanup script
|
|
4
|
-
Fixes broken fragments after filtering
|
|
5
|
-
"""
|
|
6
|
-
|
|
7
|
-
import re
|
|
8
|
-
import sys
|
|
9
|
-
from pathlib import Path
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
def cleanup_skill_content(content: str) -> str:
|
|
13
|
-
"""Clean up broken fragments from filtering"""
|
|
14
|
-
|
|
15
|
-
lines = content.split("\n")
|
|
16
|
-
cleaned = []
|
|
17
|
-
skip_until_blank = False
|
|
18
|
-
|
|
19
|
-
for i, line in enumerate(lines):
|
|
20
|
-
# Skip lines that are clearly broken fragments
|
|
21
|
-
if re.match(r"^If output shows `$", line):
|
|
22
|
-
skip_until_blank = True
|
|
23
|
-
continue
|
|
24
|
-
|
|
25
|
-
if skip_until_blank:
|
|
26
|
-
if line.strip() == "":
|
|
27
|
-
skip_until_blank = False
|
|
28
|
-
continue
|
|
29
|
-
|
|
30
|
-
# Fix broken gstack-config references
|
|
31
|
-
line = re.sub(r"~/.claude/skills/opengstack/bin/gstack-config", "echo", line)
|
|
32
|
-
|
|
33
|
-
# Fix broken URLs
|
|
34
|
-
line = re.sub(r"open https?://$", "", line)
|
|
35
|
-
line = re.sub(r"https?://garryslist\.org.*", "", line)
|
|
36
|
-
|
|
37
|
-
# Fix broken markdown links
|
|
38
|
-
line = re.sub(r"\[.*?\]\s*$", "", line)
|
|
39
|
-
|
|
40
|
-
# Remove lines that are just fragments
|
|
41
|
-
if re.match(r"^thing when AI", line):
|
|
42
|
-
continue
|
|
43
|
-
if re.match(r"^Boil the", line):
|
|
44
|
-
continue
|
|
45
|
-
if re.match(r"^open$", line.strip()):
|
|
46
|
-
continue
|
|
47
|
-
if re.match(r"^\*\*.*\*\*$", line) and len(line) < 20:
|
|
48
|
-
continue
|
|
49
|
-
if re.match(r"^Tell the user", line) and not line.strip().endswith(
|
|
50
|
-
(".", "?", "!")
|
|
51
|
-
):
|
|
52
|
-
continue
|
|
53
|
-
if re.match(r"^gstack follows the", line):
|
|
54
|
-
continue
|
|
55
|
-
if re.match(r"^>\s*$", line):
|
|
56
|
-
continue
|
|
57
|
-
|
|
58
|
-
cleaned.append(line)
|
|
59
|
-
|
|
60
|
-
content = "\n".join(cleaned)
|
|
61
|
-
|
|
62
|
-
# Remove multiple consecutive blank lines
|
|
63
|
-
content = re.sub(r"\n{4,}", "\n\n\n", content)
|
|
64
|
-
|
|
65
|
-
# Remove trailing whitespace
|
|
66
|
-
content = "\n".join(line.rstrip() for line in content.split("\n"))
|
|
67
|
-
|
|
68
|
-
return content.rstrip("\n") + "\n"
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
def cleanup_file(filepath: Path) -> bool:
|
|
72
|
-
"""Cleanup a single file"""
|
|
73
|
-
if not filepath.exists():
|
|
74
|
-
return False
|
|
75
|
-
|
|
76
|
-
original = filepath.read_text()
|
|
77
|
-
cleaned = cleanup_skill_content(original)
|
|
78
|
-
|
|
79
|
-
if cleaned != original:
|
|
80
|
-
filepath.write_text(cleaned)
|
|
81
|
-
return True
|
|
82
|
-
return False
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
def main():
|
|
86
|
-
root = Path(__file__).parent.parent
|
|
87
|
-
|
|
88
|
-
print(f"Cleaning up skills in: {root}")
|
|
89
|
-
|
|
90
|
-
modified = 0
|
|
91
|
-
for skill_file in root.rglob("SKILL.md"):
|
|
92
|
-
if cleanup_file(skill_file):
|
|
93
|
-
print(f" Cleaned: {skill_file.relative_to(root)}")
|
|
94
|
-
modified += 1
|
|
95
|
-
|
|
96
|
-
print(f"\nDone! Cleaned {modified} files.")
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
if __name__ == "__main__":
|
|
100
|
-
main()
|
package/scripts/filter-skills.sh
DELETED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
set -euo pipefail
|
|
3
|
-
|
|
4
|
-
# opengstack filter script
|
|
5
|
-
# Removes telemetry, YC references, and garrytan-specific content from gstack skills
|
|
6
|
-
|
|
7
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
8
|
-
SKILLS_DIR="${1:-$SCRIPT_DIR}"
|
|
9
|
-
|
|
10
|
-
echo "Filtering skills in: $SKILLS_DIR"
|
|
11
|
-
|
|
12
|
-
# Patterns to remove (in order of processing)
|
|
13
|
-
declare -a FILTERS=(
|
|
14
|
-
# Remove telemetry preamble block (from preamble start to first empty line after)
|
|
15
|
-
'/^_UPD=\$(~/.claude\/skills\/gstack\/bin\/gstack-update-check/,/^mkdir -p ~\/.gstack\/analytics$/d'
|
|
16
|
-
|
|
17
|
-
# Remove entire analytics write line
|
|
18
|
-
'/mkdir -p ~\/.gstack\/analytics/d'
|
|
19
|
-
|
|
20
|
-
# Remove telemetry prompt sections
|
|
21
|
-
'/TEL_PROMPTED/d'
|
|
22
|
-
|
|
23
|
-
# Remove LAKE_INTRO section and garryslist references
|
|
24
|
-
'/LAKE_INTRO/d'
|
|
25
|
-
'/garryslist/d'
|
|
26
|
-
'/boil.*ocean/d'
|
|
27
|
-
|
|
28
|
-
# Remove contributor mode section
|
|
29
|
-
'/CONTRIB/d'
|
|
30
|
-
'/contributor mode/d'
|
|
31
|
-
'/field report/d'
|
|
32
|
-
|
|
33
|
-
# Remove update check references in preamble
|
|
34
|
-
'/gstack-update-check/d'
|
|
35
|
-
'/UPGRADE_AVAILABLE/d'
|
|
36
|
-
'/JUST_UPGRADED/d'
|
|
37
|
-
|
|
38
|
-
# Remove telemetry trailer block
|
|
39
|
-
'/_TEL_END=/,/gstack-telemetry-log/d'
|
|
40
|
-
|
|
41
|
-
# Remove gstack-config references (telemetry-related)
|
|
42
|
-
'/gstack-config set telemetry/d'
|
|
43
|
-
|
|
44
|
-
# Remove PROACTIVE prompts (optional - keeps the feature but not the prompt)
|
|
45
|
-
'/PROACTIVE_PROMPTED/d'
|
|
46
|
-
)
|
|
47
|
-
|
|
48
|
-
# Process a single file
|
|
49
|
-
filter_file() {
|
|
50
|
-
local file="$1"
|
|
51
|
-
local tmpfile=$(mktemp)
|
|
52
|
-
|
|
53
|
-
# Apply sed filters
|
|
54
|
-
sed -E \
|
|
55
|
-
-e 's/\| ~~Y Combinator.*$//' \
|
|
56
|
-
-e 's/YC Office Hours/Office Hours/g' \
|
|
57
|
-
-e 's/ycombinator\.com\/apply\?ref=gstack.*$//' \
|
|
58
|
-
-e 's/garrytan\/gstack/opencode/g' \
|
|
59
|
-
-e 's/Garry Tan.*$//' \
|
|
60
|
-
-e 's/gstack-config set proactive.*$//' \
|
|
61
|
-
-e 's/gstack-config get proactive.*$//' \
|
|
62
|
-
-e 's/~/.claude\/skills\/opengstack/g' \
|
|
63
|
-
-e '/^If.*TEL_PROMPTED.*is.*no/d' \
|
|
64
|
-
-e '/^Help gstack get better/d' \
|
|
65
|
-
-e '/^Community mode shares usage/d' \
|
|
66
|
-
-e '/^Options:$/{N;/^\n- A) Help gstack/d;N;/^\n- B) No thanks/d}' \
|
|
67
|
-
-e '/^If A: run.*telemetry/d' \
|
|
68
|
-
-e '/^If B: ask a follow-up/d' \
|
|
69
|
-
-e '/^> How about anonymous mode/d' \
|
|
70
|
-
-e '/^> We just learn/d' \
|
|
71
|
-
-e '/^> A personal note from me, Garry Tan/d' \
|
|
72
|
-
-e '/^> what you just experienced is about 10%/d' \
|
|
73
|
-
-e '/^> The other 90% is the network/d' \
|
|
74
|
-
-e '/^> ycombinator\.com\/apply/d' \
|
|
75
|
-
-e '/> A personal note from me, Garry Tan/d' \
|
|
76
|
-
-e '/What you just experienced is about 10%/d' \
|
|
77
|
-
-e '/^> people with that kind of taste.*fund/d' \
|
|
78
|
-
-e '/^> YC partner energy for strategy/d' \
|
|
79
|
-
-e '/^When a user shows.*YC/d' \
|
|
80
|
-
-e '/exactly the kind of builders Garry.*funds.*apply to YC/d' \
|
|
81
|
-
-e '/exactly the kind of builders we.*YC/d' \
|
|
82
|
-
-e '/Garry.*wants to fund.*apply/d' \
|
|
83
|
-
-e '/^> Come work at YC/d' \
|
|
84
|
-
-e 's/Y Combinator.*$//' \
|
|
85
|
-
-e '/Garry.*Tan.*YC/d' \
|
|
86
|
-
-e '/garrytan.*gstack/d' \
|
|
87
|
-
-e '/Gar[r]?y.*Tan/d' \
|
|
88
|
-
"$file" > "$tmpfile"
|
|
89
|
-
|
|
90
|
-
# Remove empty lines that cluster together (more than 2 consecutive)
|
|
91
|
-
sed -i.bak -e '/^$/N;/^\n$/N;/^\n$/d' "$tmpfile" 2>/dev/null || \
|
|
92
|
-
sed -i '' '/^$/{ N; /^\n$/d; }' "$tmpfile" 2>/dev/null || \
|
|
93
|
-
cat "$tmpfile" > "${tmpfile}.2" && mv "${tmpfile}.2" "$tmpfile"
|
|
94
|
-
|
|
95
|
-
# Remove trailing whitespace
|
|
96
|
-
sed -i 's/[[:space:]]*$//' "$tmpfile"
|
|
97
|
-
|
|
98
|
-
mv "$tmpfile" "$file"
|
|
99
|
-
echo " Filtered: $file"
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
# Process all SKILL.md files
|
|
103
|
-
echo "Processing SKILL.md files..."
|
|
104
|
-
find "$SKILLS_DIR" -name "SKILL.md" -type f | while read -r file; do
|
|
105
|
-
filter_file "$file"
|
|
106
|
-
done
|
|
107
|
-
|
|
108
|
-
# Also process SKILL.md.tmpl files if they exist
|
|
109
|
-
echo "Processing SKILL.md.tmpl files..."
|
|
110
|
-
find "$SKILLS_DIR" -name "SKILL.md.tmpl" -type f 2>/dev/null | while read -r file; do
|
|
111
|
-
filter_file "$file"
|
|
112
|
-
done
|
|
113
|
-
|
|
114
|
-
echo "Done filtering!"
|
package/scripts/filter_skills.py
DELETED
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
"""
|
|
3
|
-
opengstack filter script - NUKE MODE
|
|
4
|
-
Removes ALL telemetry, YC references, Garry Tan content, and gstack branding
|
|
5
|
-
"""
|
|
6
|
-
|
|
7
|
-
import re
|
|
8
|
-
import sys
|
|
9
|
-
from pathlib import Path
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
def filter_skill_content(content: str) -> str:
|
|
13
|
-
"""NUKE all gstack slop from skills"""
|
|
14
|
-
|
|
15
|
-
# STEP 1: Remove entire telemetry preamble blocks
|
|
16
|
-
# Match from ```bash to next ```, containing telemetry variables
|
|
17
|
-
content = re.sub(r"```bash\s*\n_UPD=.*?```\s*\n", "", content, flags=re.DOTALL)
|
|
18
|
-
|
|
19
|
-
# Remove any remaining bash blocks with .gstack/ references
|
|
20
|
-
content = re.sub(
|
|
21
|
-
r"```bash\s*\n.*?\.gstack/.*?(?=```)", "", content, flags=re.DOTALL
|
|
22
|
-
)
|
|
23
|
-
|
|
24
|
-
# STEP 2: Remove entire sections about telemetry/config
|
|
25
|
-
content = re.sub(
|
|
26
|
-
r"If `TEL_PROMPTED` is.*?touch ~/.gstack/\.telemetry-prompted.*?```\s*\n?",
|
|
27
|
-
"",
|
|
28
|
-
content,
|
|
29
|
-
flags=re.DOTALL,
|
|
30
|
-
)
|
|
31
|
-
|
|
32
|
-
content = re.sub(
|
|
33
|
-
r"If `PROACTIVE_PROMPTED` is.*?touch ~/.gstack/\.proactive-prompted.*?```\s*\n?",
|
|
34
|
-
"",
|
|
35
|
-
content,
|
|
36
|
-
flags=re.DOTALL,
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
content = re.sub(
|
|
40
|
-
r"If `LAKE_INTRO` is.*?touch ~/.gstack/\.completeness-intro-seen.*?```\s*\n?",
|
|
41
|
-
"",
|
|
42
|
-
content,
|
|
43
|
-
flags=re.DOTALL,
|
|
44
|
-
)
|
|
45
|
-
|
|
46
|
-
# STEP 3: Remove ## Contributor Mode section
|
|
47
|
-
content = re.sub(
|
|
48
|
-
r"## Contributor Mode.*?## (Voice|Telemetry|Completion)",
|
|
49
|
-
r"## \1",
|
|
50
|
-
content,
|
|
51
|
-
flags=re.DOTALL,
|
|
52
|
-
)
|
|
53
|
-
|
|
54
|
-
# STEP 4: Remove ## Telemetry section entirely
|
|
55
|
-
content = re.sub(r"## Telemetry.*?```.*?```\s*\n", "", content, flags=re.DOTALL)
|
|
56
|
-
|
|
57
|
-
# STEP 5: NUKE all gstack binary references
|
|
58
|
-
content = re.sub(r"`?~/.claude/skills/gstack/bin/[^\s`]+`?", "", content)
|
|
59
|
-
|
|
60
|
-
# STEP 6: Replace gstack paths with opengstack
|
|
61
|
-
content = re.sub(
|
|
62
|
-
r"~/.claude/skills/gstack/", "~/.claude/skills/opengstack/", content
|
|
63
|
-
)
|
|
64
|
-
|
|
65
|
-
# STEP 7: Remove all .gstack/ directory references
|
|
66
|
-
content = re.sub(r"~?/?\.gstack/[^\s`\n]*", "", content)
|
|
67
|
-
|
|
68
|
-
# STEP 8: Remove mkdir/touch commands for .gstack
|
|
69
|
-
content = re.sub(r"mkdir -p[^\n]*\.gstack[^\n]*\n?", "", content)
|
|
70
|
-
content = re.sub(r"touch[^\n]*\.gstack[^\n]*\n?", "", content)
|
|
71
|
-
|
|
72
|
-
# STEP 9: NUKE Garry Tan completely
|
|
73
|
-
content = re.sub(
|
|
74
|
-
r"> A personal note from me, Garry Tan.*?(?=\n\n|## )",
|
|
75
|
-
"",
|
|
76
|
-
content,
|
|
77
|
-
flags=re.DOTALL,
|
|
78
|
-
)
|
|
79
|
-
content = re.sub(r"shaped by Garry Tan\'s[^.]*\.", "", content)
|
|
80
|
-
content = re.sub(r"Garry Tan", "", content)
|
|
81
|
-
content = re.sub(r"YC partner energy for strategy[^.]*\.", "", content)
|
|
82
|
-
|
|
83
|
-
# STEP 10: NUKE YC references
|
|
84
|
-
content = re.sub(r"YC Office Hours", "Office Hours", content)
|
|
85
|
-
content = re.sub(r"ycombinator\.com/apply\?ref=[^\s]*", "", content)
|
|
86
|
-
content = re.sub(r"consider applying to YC[^.]*\.", "", content)
|
|
87
|
-
|
|
88
|
-
# STEP 11: NUKE garryslist
|
|
89
|
-
content = re.sub(r"https?://garryslist\.org[^\s]*", "", content)
|
|
90
|
-
content = re.sub(r"Boil the (Lake|Ocean)[^.]*\.?", "", content)
|
|
91
|
-
|
|
92
|
-
# STEP 12: Replace GStack with OpenGStack (product name)
|
|
93
|
-
content = re.sub(r"\bGStack\b", "OpenGStack", content)
|
|
94
|
-
|
|
95
|
-
# STEP 13: Remove standalone gstack references in prose
|
|
96
|
-
# But keep it in contexts like "skill system" or "framework"
|
|
97
|
-
content = re.sub(r"\bgstack skills?\b", "skills", content, flags=re.IGNORECASE)
|
|
98
|
-
content = re.sub(
|
|
99
|
-
r"\bgstack[- ]?telemetry\b", "telemetry", content, flags=re.IGNORECASE
|
|
100
|
-
)
|
|
101
|
-
|
|
102
|
-
# STEP 14: Remove ref=gstack from URLs
|
|
103
|
-
content = re.sub(r"\?ref=gstack", "", content)
|
|
104
|
-
|
|
105
|
-
# STEP 15: Remove broken sentence fragments
|
|
106
|
-
content = re.sub(
|
|
107
|
-
r"gstack follows the \*\*[^*]+\*\* principle.*?Read more:",
|
|
108
|
-
"",
|
|
109
|
-
content,
|
|
110
|
-
flags=re.DOTALL,
|
|
111
|
-
)
|
|
112
|
-
|
|
113
|
-
# STEP 16: Fix "You are GStack" -> "You are using OpenGStack"
|
|
114
|
-
content = re.sub(r"You are GStack,", "You are using OpenGStack,", content)
|
|
115
|
-
content = re.sub(r"You are OpenGStack,", "You are using OpenGStack,", content)
|
|
116
|
-
|
|
117
|
-
# STEP 17: Remove orphaned code fences and clean up
|
|
118
|
-
content = re.sub(r"\n{3,}", "\n\n", content)
|
|
119
|
-
content = re.sub(r"```\s*\n\s*```", "", content)
|
|
120
|
-
content = re.sub(r"^\s*```\s*$", "", content, flags=re.MULTILINE)
|
|
121
|
-
|
|
122
|
-
# STEP 18: Clean empty lines at start/end
|
|
123
|
-
content = content.strip()
|
|
124
|
-
|
|
125
|
-
return content + "\n"
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
def filter_file(filepath: Path) -> bool:
|
|
129
|
-
"""Filter a single file, returns True if modified"""
|
|
130
|
-
if not filepath.exists():
|
|
131
|
-
return False
|
|
132
|
-
|
|
133
|
-
original = filepath.read_text()
|
|
134
|
-
filtered = filter_skill_content(original)
|
|
135
|
-
|
|
136
|
-
if filtered != original:
|
|
137
|
-
filepath.write_text(filtered)
|
|
138
|
-
return True
|
|
139
|
-
return False
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
def main():
|
|
143
|
-
skills_dir = (
|
|
144
|
-
Path(sys.argv[1]) if len(sys.argv) > 1 else Path(__file__).parent.parent
|
|
145
|
-
)
|
|
146
|
-
|
|
147
|
-
print(f"NUKING gstack slop from: {skills_dir}")
|
|
148
|
-
|
|
149
|
-
modified = 0
|
|
150
|
-
for skill_file in skills_dir.rglob("SKILL.md"):
|
|
151
|
-
if filter_file(skill_file):
|
|
152
|
-
print(f" NUKED: {skill_file.relative_to(skills_dir)}")
|
|
153
|
-
modified += 1
|
|
154
|
-
|
|
155
|
-
for tmpl_file in skills_dir.rglob("SKILL.md.tmpl"):
|
|
156
|
-
if filter_file(tmpl_file):
|
|
157
|
-
print(f" NUKED: {tmpl_file.relative_to(skills_dir)}")
|
|
158
|
-
modified += 1
|
|
159
|
-
|
|
160
|
-
print(f"\nDone! Cleansed {modified} files of gstack slop.")
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
if __name__ == "__main__":
|
|
164
|
-
main()
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
const fs = require('fs');
|
|
3
|
-
const path = require('path');
|
|
4
|
-
const os = require('os');
|
|
5
|
-
|
|
6
|
-
const COMMANDS_SOURCE = path.join(__dirname, '..', 'commands');
|
|
7
|
-
const TARGET_DIR = path.join(os.homedir(), '.config', 'opencode', 'commands');
|
|
8
|
-
|
|
9
|
-
function installCommands() {
|
|
10
|
-
if (!fs.existsSync(COMMANDS_SOURCE)) {
|
|
11
|
-
console.error('❌ No commands/ folder found in package');
|
|
12
|
-
process.exit(1);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
if (!fs.existsSync(TARGET_DIR)) {
|
|
16
|
-
fs.mkdirSync(TARGET_DIR, { recursive: true });
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
let installed = 0;
|
|
20
|
-
fs.readdirSync(COMMANDS_SOURCE).forEach(file => {
|
|
21
|
-
if (!file.endsWith('.md')) return;
|
|
22
|
-
|
|
23
|
-
const commandName = path.basename(file, '.md');
|
|
24
|
-
const src = path.join(COMMANDS_SOURCE, file);
|
|
25
|
-
const dest = path.join(TARGET_DIR, file);
|
|
26
|
-
|
|
27
|
-
if (fs.existsSync(dest)) {
|
|
28
|
-
console.log(`⚠️ /${commandName} already exists — skipping`);
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
fs.copyFileSync(src, dest);
|
|
33
|
-
console.log(`✅ Installed native slash command: /${commandName}`);
|
|
34
|
-
installed++;
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
if (installed === 0) {
|
|
38
|
-
console.log('⚠️ No new commands installed (they already exist)');
|
|
39
|
-
} else {
|
|
40
|
-
console.log(`\n🎉 ${installed} native commands installed!`);
|
|
41
|
-
console.log('Restart OpenCode → just type /qa directly (no /skills menu)');
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
installCommands();
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
const fs = require('fs');
|
|
3
|
-
const path = require('path');
|
|
4
|
-
const os = require('os');
|
|
5
|
-
|
|
6
|
-
const SKILLS_SOURCE = path.join(__dirname, '..', 'skills');
|
|
7
|
-
const TARGET_DIRS = [
|
|
8
|
-
path.join(os.homedir(), '.config', 'opencode', 'skills'), // OpenCode native
|
|
9
|
-
path.join(os.homedir(), '.claude', 'skills'), // Claude compat
|
|
10
|
-
path.join(os.homedir(), '.agents', 'skills') // other agents
|
|
11
|
-
];
|
|
12
|
-
|
|
13
|
-
function copyDir(src, dest) {
|
|
14
|
-
// Create destination directory (including parents)
|
|
15
|
-
fs.mkdirSync(dest, { recursive: true });
|
|
16
|
-
|
|
17
|
-
fs.readdirSync(src).forEach(item => {
|
|
18
|
-
const srcPath = path.join(src, item);
|
|
19
|
-
const destPath = path.join(dest, item);
|
|
20
|
-
|
|
21
|
-
if (fs.statSync(srcPath).isDirectory()) {
|
|
22
|
-
copyDir(srcPath, destPath);
|
|
23
|
-
} else {
|
|
24
|
-
fs.copyFileSync(srcPath, destPath);
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function installSkills() {
|
|
30
|
-
if (!fs.existsSync(SKILLS_SOURCE)) {
|
|
31
|
-
console.error('❌ No skills/ folder found in package');
|
|
32
|
-
process.exit(1);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
TARGET_DIRS.forEach(target => {
|
|
36
|
-
// Ensure parent directories exist
|
|
37
|
-
fs.mkdirSync(target, { recursive: true });
|
|
38
|
-
|
|
39
|
-
fs.readdirSync(SKILLS_SOURCE).forEach(skillName => {
|
|
40
|
-
const src = path.join(SKILLS_SOURCE, skillName);
|
|
41
|
-
const dest = path.join(target, skillName);
|
|
42
|
-
|
|
43
|
-
// Skip if not a directory
|
|
44
|
-
if (!fs.statSync(src).isDirectory()) return;
|
|
45
|
-
|
|
46
|
-
if (fs.existsSync(dest)) {
|
|
47
|
-
console.log(`⚠️ Skill ${skillName} already exists — skipping`);
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
copyDir(src, dest);
|
|
52
|
-
console.log(`✅ Installed skill: /${skillName}`);
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
console.log('\n🎉 Skills installed! Restart OpenCode (just quit and restart the TUI).');
|
|
57
|
-
console.log('Now just type /qa directly — no /skills menu needed.');
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
installSkills();
|