Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects, and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
wheam
substrate
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
substrate
/
seed.sh
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
executable file
·
36 lines (33 loc) · 1.54 KB
main
Breadcrumbs
substrate
/
seed.sh
Copy path
Top
File metadata and controls
Code
Blame
executable file
·
36 lines (33 loc) · 1.54 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!
/bin/sh
#
substrate seed —— 【LEGACY / 旧机制,新用户用不到】
#
#
新用户请用 init-instance.sh:它把 substrate-* 维护 skill **vendor 进实例**,
#
clone 实例即自带工具、无鸡生蛋问题(见 README「Quick start」)。
#
#
本脚本只为**早于 vendor 模型的旧实例**保留:它一次性把 substrate-bootstrap + substrate-sync
#
从【引擎仓库】拷进某 runtime 的 skill 目录,解决「要 sync 先得有 sync」的鸡生蛋。
#
⚠️ 它从 $ENGINE/skills 取(引擎仓库),而非实例内 vendored skills——与自包含实例模型相反;
#
自包含实例请直接跑实例内的 skills/substrate-sync/sync.py,不要用本脚本。
#
#
用法: ./seed.sh [TARGET_SKILL_DIR] # 默认 ~/.claude/skills
#
幂等: 重跑会覆盖这两个 seed skill,不动其它。
set
-eu
ENGINE=
"
$(
cd
"
$(
dirname
"
$0
"
)
"
&&
pwd
)
"
TARGET=
"
${1
:-
$HOME
/
.claude
/
skills}
"
echo
"
substrate seed
"
echo
"
从:
$ENGINE
/skills/{substrate-bootstrap, substrate-sync}
"
echo
"
到:
$TARGET
"
mkdir -p
"
$TARGET
"
for
s
in
substrate-bootstrap substrate-sync
;
do
src=
"
$ENGINE
/skills/
$s
"
if
[
!
-d
"
$src
"
]
;
then
echo
"
[ERROR] 找不到
$src
(请在引擎仓库根运行本脚本)
"
>&2
exit
1
fi
rm -rf
"
$TARGET
/
$s
"
cp -R
"
$src
"
"
$TARGET
/
$s
"
echo
"
seeded
$s
"
done
echo
"
done。下一步:让 agent 跑 substrate-sync 装其余 skill,例如
"
echo
"
python3
\"
$TARGET
/substrate-sync/sync.py
\"
--src
\"
$ENGINE
/skills
\"
--runtime claude-code # 先 dry-run
"
echo
"
……确认后加 --apply。
"
You can’t perform that action at this time.