Auto-sync: 2026-04-21 00:02
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
# copilot -- Copy agents to ~/.github/agents/ and ~/.copilot/agents/
|
||||
# antigravity -- Copy skills to ~/.gemini/antigravity/skills/
|
||||
# gemini-cli -- Install extension to ~/.gemini/extensions/agency-agents/
|
||||
# opencode -- Copy agents to .opencode/agent/ in current directory
|
||||
# opencode -- Copy agents to .opencode/agents/ in current directory
|
||||
# cursor -- Copy rules to .cursor/rules/ in current directory
|
||||
# aider -- Copy CONVENTIONS.md to current directory
|
||||
# windsurf -- Copy .windsurfrules to current directory
|
||||
@@ -103,6 +103,12 @@ INTEGRATIONS="$REPO_ROOT/integrations"
|
||||
|
||||
ALL_TOOLS=(claude-code copilot antigravity gemini-cli opencode openclaw cursor aider windsurf qwen kimi)
|
||||
|
||||
# Standard agent category directories (keep sorted, sync with convert.sh / lint-agents.sh)
|
||||
AGENT_DIRS=(
|
||||
academic design engineering finance game-development marketing paid-media product project-management
|
||||
sales spatial-computing specialized strategy support testing
|
||||
)
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Usage
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -169,7 +175,7 @@ tool_label() {
|
||||
antigravity) printf "%-14s %s" "Antigravity" "(~/.gemini/antigravity)" ;;
|
||||
gemini-cli) printf "%-14s %s" "Gemini CLI" "(gemini extension)" ;;
|
||||
opencode) printf "%-14s %s" "OpenCode" "(opencode.ai)" ;;
|
||||
openclaw) printf "%-14s %s" "OpenClaw" "(~/.openclaw)" ;;
|
||||
openclaw) printf "%-14s %s" "OpenClaw" "(~/.openclaw/agency-agents)" ;;
|
||||
cursor) printf "%-14s %s" "Cursor" "(.cursor/rules)" ;;
|
||||
aider) printf "%-14s %s" "Aider" "(CONVENTIONS.md)" ;;
|
||||
windsurf) printf "%-14s %s" "Windsurf" "(.windsurfrules)" ;;
|
||||
@@ -301,8 +307,7 @@ install_claude_code() {
|
||||
local count=0
|
||||
mkdir -p "$dest"
|
||||
local dir f first_line
|
||||
for dir in academic design engineering game-development marketing paid-media sales product project-management \
|
||||
testing support spatial-computing specialized; do
|
||||
for dir in "${AGENT_DIRS[@]}"; do
|
||||
[[ -d "$REPO_ROOT/$dir" ]] || continue
|
||||
while IFS= read -r -d '' f; do
|
||||
first_line="$(head -1 "$f")"
|
||||
@@ -320,8 +325,7 @@ install_copilot() {
|
||||
local count=0
|
||||
mkdir -p "$dest_github" "$dest_copilot"
|
||||
local dir f first_line
|
||||
for dir in academic design engineering game-development marketing paid-media sales product project-management \
|
||||
testing support spatial-computing specialized; do
|
||||
for dir in "${AGENT_DIRS[@]}"; do
|
||||
[[ -d "$REPO_ROOT/$dir" ]] || continue
|
||||
while IFS= read -r -d '' f; do
|
||||
first_line="$(head -1 "$f")"
|
||||
@@ -333,6 +337,8 @@ install_copilot() {
|
||||
done
|
||||
ok "Copilot: $count agents -> $dest_github"
|
||||
ok "Copilot: $count agents -> $dest_copilot"
|
||||
warn "Copilot: Verify VS Code setting 'chat.agentFilesLocations' includes your install path."
|
||||
dim " Open Settings (Ctrl/Cmd+,) -> search 'chat.agentFilesLocations'"
|
||||
}
|
||||
|
||||
install_antigravity() {
|
||||
@@ -373,16 +379,25 @@ install_gemini_cli() {
|
||||
}
|
||||
|
||||
install_opencode() {
|
||||
local src="$INTEGRATIONS/opencode/agents"
|
||||
local src="$INTEGRATIONS/opencode"
|
||||
local dest="${PWD}/.opencode/agents"
|
||||
local count=0
|
||||
[[ -d "$src" ]] || { err "integrations/opencode missing. Run convert.sh first."; return 1; }
|
||||
# Support both flat layout (integrations/opencode/*.md) and nested (integrations/opencode/agents/*.md)
|
||||
local search_dir="$src"
|
||||
[[ -d "$src/agents" ]] && search_dir="$src/agents"
|
||||
mkdir -p "$dest"
|
||||
local f
|
||||
while IFS= read -r -d '' f; do
|
||||
local base; base="$(basename "$f")"
|
||||
[[ "$base" == "README.md" ]] && continue
|
||||
cp "$f" "$dest/"; (( count++ )) || true
|
||||
done < <(find "$src" -maxdepth 1 -name "*.md" -print0)
|
||||
ok "OpenCode: $count agents -> $dest"
|
||||
done < <(find "$search_dir" -maxdepth 1 -name "*.md" -print0)
|
||||
if (( count == 0 )); then
|
||||
warn "OpenCode: no agent files found in $search_dir. Run convert.sh --tool opencode first."
|
||||
else
|
||||
ok "OpenCode: $count agents -> $dest"
|
||||
fi
|
||||
warn "OpenCode: project-scoped. Run from your project root to install there."
|
||||
}
|
||||
|
||||
@@ -390,21 +405,31 @@ install_openclaw() {
|
||||
local src="$INTEGRATIONS/openclaw"
|
||||
local dest="${HOME}/.openclaw/agency-agents"
|
||||
local count=0
|
||||
local existing_agents=""
|
||||
[[ -d "$src" ]] || { err "integrations/openclaw missing. Run convert.sh first."; return 1; }
|
||||
mkdir -p "$dest"
|
||||
if command -v openclaw >/dev/null 2>&1; then
|
||||
existing_agents=$'\n'"$(openclaw agents list --json 2>/dev/null | sed -n 's/^[[:space:]]*\"id\": \"\\([^\"]*\\)\".*/\\1/p')"$'\n'
|
||||
fi
|
||||
local d
|
||||
while IFS= read -r -d '' d; do
|
||||
local name; name="$(basename "$d")"
|
||||
[[ -f "$d/SOUL.md" && -f "$d/AGENTS.md" && -f "$d/IDENTITY.md" ]] || continue
|
||||
mkdir -p "$dest/$name"
|
||||
cp "$d/SOUL.md" "$dest/$name/SOUL.md"
|
||||
cp "$d/AGENTS.md" "$dest/$name/AGENTS.md"
|
||||
cp "$d/IDENTITY.md" "$dest/$name/IDENTITY.md"
|
||||
# Register with OpenClaw so agents are usable by agentId immediately
|
||||
if command -v openclaw >/dev/null 2>&1; then
|
||||
openclaw agents add "$name" --workspace "$dest/$name" --non-interactive || true
|
||||
if [[ "$existing_agents" != *$'\n'"$name"$'\n'* ]]; then
|
||||
openclaw agents add "$name" --workspace "$dest/$name" --non-interactive || true
|
||||
fi
|
||||
fi
|
||||
(( count++ )) || true
|
||||
done < <(find "$src" -mindepth 1 -maxdepth 1 -type d -print0)
|
||||
if (( count == 0 )); then
|
||||
err "integrations/openclaw contains no generated workspaces. Run ./scripts/convert.sh --tool openclaw first."
|
||||
return 1
|
||||
fi
|
||||
ok "OpenClaw: $count workspaces -> $dest"
|
||||
if command -v openclaw >/dev/null 2>&1; then
|
||||
warn "OpenClaw: run 'openclaw gateway restart' to activate new agents"
|
||||
|
||||
Reference in New Issue
Block a user