
Dbs Bridge
- 5.5k installs
- 8.9k repo stars
- Updated July 27, 2026
- dontbesilent2025/dbskill
Acts as a bridge/connector that links the dbskill toolset to a workflow, routing data or commands between components.
About
A Claude Code skill that acts as a bridge within the dbskill toolset, connecting components and routing data or commands between them so they work as one workflow. A solo builder reaches for it when they need the pieces of this toolset to talk to each other rather than run in isolation. Exact behavior is defined by the dbskill package it ships with.
- Bridges toolset components
- Routes data or commands
- Connector for dbskill workflows
- Glue between systems
Dbs Bridge by the numbers
- 5,539 all-time installs (skills.sh)
- +1,785 installs in the week ending Jul 28, 2026 (Skillselion tracking)
- Ranked #60 of 2,742 Automation & Workflows skills by installs in the Skillselion catalog
- Security screen: LOW risk (skills.sh audit)
- Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/dontbesilent2025/dbskill --skill dbs-bridgeAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 5.5k |
|---|---|
| repo stars | ★ 8.9k |
| Security audit | 3 / 3 scanners passed |
| Last updated | July 27, 2026 |
| Repository | dontbesilent2025/dbskill ↗ |
What it does
Acts as a bridge/connector that links the dbskill toolset to a workflow, routing data or commands between components.
Who is it for?
Connecting components in a workflow
Skip if: Standalone use without the dbskill toolset
Files
dbs-bridge:多端 skill 桥接
把任意包含 SKILL.md 的 skill 源目录,或包含多个 skill 子目录的集合目录,用软链同时挂到:
~/.claude/skills/<skill-name>~/.codex/skills/<skill-name>~/.agents/skills/<skill-name>
同时为 Grok 生成薄 bridge:
~/.grok/skills/<skill-name>/SKILL.md
这样 Claude Code、Codex、豆包 Mac App、Trae Solo、Grok 等 Agent 都能通过同一个源目录调用该 skill。源目录改动后,各端自动同步。源目录可以在 dbskill 仓库内,也可以在外部项目、~/.claude/skills / ~/.codex/skills / ~/.agents/skills / ~/.grok/skills 以外的本地目录、iCloud 目录或其他工作区。
---
核心原则
1. Claude / Codex / 通用 Agents 只用软链。 不复制 skill 文件,避免多端出现版本分叉。 2. 源目录可以在任何位置。 桥接目录只指向源目录。 3. 绝不覆盖真实目录。 如果目标位置已有同名真实目录,停下来报告,让用户手动处理。 4. Grok 生成薄 bridge。 Grok bridge 必须包含 user_invocable: true 并指向真源。 5. 拆桥只删派生产物。 取消桥接时只移除 ~/.claude/skills、~/.codex/skills、~/.agents/skills 下的软链和 ~/.grok/skills 下由本工具生成的 bridge,不删除源目录。 6. 优先用脚本执行。 使用本 skill 自带脚本 scripts/bridge-skill.sh,不要临场重写桥接命令。
---
确定源 skill
用户可能给:
- skill 名称:
dbs-hook - 相对路径:
skills/dbs-hook - 绝对路径:
/Users/.../dbskill/skills/dbs-hook - 外部绝对路径:
/Users/.../.agents/skills/lark-doc - skill 集合目录:
/Users/.../dbskill/skills - 当前上下文刚创建或刚修改的 skill
按优先级判断:
1. 用户明确给了绝对路径,直接使用该路径。 2. 用户给了相对路径,先按当前工作目录解析,再按 dbskill 仓库根目录解析。 3. 用户只给 skill 名称,优先查当前工作目录下的同名目录,再查 dbskill 仓库 skills/<name>。 4. 用户只说“这个 skill”,使用当前对话里刚创建、刚改名或刚讨论的 skill。 5. 仍不确定时,查看当前工作目录和仓库 skills/ 下最近修改的 skill。 6. 还是无法确定时,只问一句:桥接哪个 skill?给我 skill 名称或路径。
源目录必须满足其中一种条件:
- 目录本身包含
SKILL.md; - 目录的一级子目录里包含多个
SKILL.md,用于批量桥接。
---
执行桥接
在 dbskill 仓库根目录运行:
skills/dbs-bridge/scripts/bridge-skill.sh link <skill-name-or-path>例子:
skills/dbs-bridge/scripts/bridge-skill.sh link dbs-hook
skills/dbs-bridge/scripts/bridge-skill.sh link skills/dbs-beta-framework-builder
skills/dbs-bridge/scripts/bridge-skill.sh link skills
skills/dbs-bridge/scripts/bridge-skill.sh link "/absolute/path/to/skill"
skills/dbs-bridge/scripts/bridge-skill.sh link "/Users/me/external-skills/my-skill"
skills/dbs-bridge/scripts/bridge-skill.sh link "/Users/me/external-skills"执行后把脚本输出里的各宿主桥接结果回给用户。
---
查看状态
用户问“桥好了没”“查看桥接状态”时运行:
skills/dbs-bridge/scripts/bridge-skill.sh status <skill-name-or-path>输出应说明 Claude Code、Codex、通用 Agents 和 Grok 四个位置分别指向哪里。
---
取消桥接
用户说“取消桥接”“拆桥”“unlink”时运行:
skills/dbs-bridge/scripts/bridge-skill.sh unlink <skill-name-or-path>拆桥完成后告诉用户:源 skill 没有被删除,只移除了各端派生产物。
---
输出规范
桥接完成后,简短回报:
已桥接 `<skill-name>`:
- Claude Code:`~/.claude/skills/<skill-name>` -> `<source-path>`
- Codex:`~/.codex/skills/<skill-name>` -> `<source-path>`
- 通用 Agents:`~/.agents/skills/<skill-name>` -> `<source-path>`
- Grok:`~/.grok/skills/<skill-name>` -> `<source-path>/SKILL.md`如果遇到同名真实目录:
没有覆盖 `<target-path>`,因为那里已经是一个真实目录。需要你先手动确认这个目录能否移走。---
自检
每次执行前确认:
- 源目录存在;
- 源目录含
SKILL.md,或其一级子目录包含SKILL.md; - 外部路径必须使用绝对路径,或能从当前工作目录解析;
- Claude / Codex / 通用 Agents 目标位置如果存在,必须是软链才允许更新;
- Grok 目标位置如果存在,必须是本工具生成的 Grok Bridge 才允许更新;
- 不能删除源目录;
- 不能把
skills/dbs-bridge自身复制到各端;Grok 只能生成薄 bridge。
#!/usr/bin/env bash
set -euo pipefail
usage() {
cat <<'USAGE'
Usage:
bridge-skill.sh link <skill-name-or-path>
bridge-skill.sh unlink <skill-name-or-path>
bridge-skill.sh status <skill-name-or-path>
Examples:
bridge-skill.sh link dbs-hook
bridge-skill.sh link skills/dbs-hook
bridge-skill.sh link skills
bridge-skill.sh status /absolute/path/to/skill
USAGE
}
die() {
echo "✗ $*" >&2
exit 1
}
repo_root() {
local script_dir
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$script_dir/../../.." && pwd
}
resolve_candidate() {
local input="$1"
local root="$2"
local candidate
if [[ "$input" = /* ]]; then
candidate="$input"
elif [[ -d "$PWD/$input" ]]; then
candidate="$PWD/$input"
elif [[ -d "$root/$input" ]]; then
candidate="$root/$input"
elif [[ -d "$root/skills/$input" ]]; then
candidate="$root/skills/$input"
else
die "找不到 skill 或 skill 集合目录:$input"
fi
candidate="$(cd "$candidate" && pwd)"
printf '%s\n' "$candidate"
}
list_skill_sources() {
local candidate="$1"
local found=0
if [[ -f "$candidate/SKILL.md" ]]; then
printf '%s\n' "$candidate"
return 0
fi
while IFS= read -r skill_dir; do
found=1
printf '%s\n' "$(dirname "$skill_dir")"
done < <(find "$candidate" -mindepth 2 -maxdepth 2 -name SKILL.md -type f | sort)
[[ "$found" -eq 1 ]] || die "$candidate 里没有 SKILL.md,也没有包含 SKILL.md 的一级子目录"
}
ensure_target_parent() {
mkdir -p "$HOME/.claude/skills" "$HOME/.codex/skills" "$HOME/.agents/skills" "$HOME/.grok/skills"
}
link_one() {
local src="$1"
local dest_dir="$2"
local name="$3"
local link="$dest_dir/$name"
if [[ -e "$link" && ! -L "$link" ]]; then
echo "✗ $link 是真实目录或文件,已跳过"
return 2
fi
ln -sfn "$src" "$link"
echo "✓ $link -> $(readlink "$link")"
}
unlink_one() {
local dest_dir="$1"
local name="$2"
local link="$dest_dir/$name"
if [[ -L "$link" ]]; then
rm "$link"
echo "✓ 已移除软链 $link"
elif [[ -e "$link" ]]; then
echo "✗ $link 是真实目录或文件,已保留"
return 2
else
echo "· $link 不存在,跳过"
fi
}
status_one() {
local dest_dir="$1"
local name="$2"
local link="$dest_dir/$name"
if [[ -L "$link" ]]; then
echo "✓ $link -> $(readlink "$link")"
elif [[ -e "$link" ]]; then
echo "✗ $link 存在,但不是软链"
return 2
else
echo "· $link 未桥接"
fi
}
link_grok_one() {
local src="$1"
local name="$2"
local dir="$HOME/.grok/skills/$name"
local skill_file="$dir/SKILL.md"
if [[ -L "$dir" ]]; then
rm "$dir"
elif [[ -e "$dir" && ! -d "$dir" ]]; then
echo "✗ $dir 是真实文件,已跳过"
return 2
elif [[ -d "$dir" && -f "$skill_file" ]] && ! grep -q '^## Grok Bridge$' "$skill_file"; then
echo "✗ $dir 是真实 Grok skill,已跳过"
return 2
elif [[ -d "$dir" && ! -f "$skill_file" ]]; then
echo "✗ $dir 是真实目录,已跳过"
return 2
fi
mkdir -p "$dir"
cat > "$skill_file" <<EOF
---
name: $name
user_invocable: true
description: |
$name bridge。在 Grok TUI 中可通过 /$name 触发;触发后必须先读取项目真源 SKILL.md。
---
# $name
## Grok Bridge
- Source of truth: $src/SKILL.md
- Read the source-of-truth file before executing this skill.
- Follow the source file's workflow, constraints, examples, and output format.
- Treat this file as a thin Grok bridge only; do not maintain long-form logic here.
## 使用说明
1. 在 Grok TUI 中输入 \`/$name\` 即可触发。
2. Grok 会优先使用本 bridge 指向的真源。
3. 如需更新,直接修改真源。
EOF
echo "✓ $dir -> $src"
}
unlink_grok_one() {
local name="$1"
local dir="$HOME/.grok/skills/$name"
local skill_file="$dir/SKILL.md"
if [[ -L "$dir" ]]; then
rm "$dir"
echo "✓ 已移除软链 $dir"
elif [[ -d "$dir" && -f "$skill_file" ]] && grep -q '^## Grok Bridge$' "$skill_file"; then
rm -rf "$dir"
echo "✓ 已移除 Grok bridge $dir"
elif [[ -e "$dir" ]]; then
echo "✗ $dir 是真实目录或文件,已保留"
return 2
else
echo "· $dir 不存在,跳过"
fi
}
status_grok_one() {
local name="$1"
local dir="$HOME/.grok/skills/$name"
local skill_file="$dir/SKILL.md"
local source user_invocable
if [[ -L "$dir" ]]; then
echo "✓ $dir -> $(readlink "$dir")"
elif [[ -d "$dir" && -f "$skill_file" ]] && grep -q '^## Grok Bridge$' "$skill_file"; then
source="$(grep -m 1 '^- Source of truth:' "$skill_file" | sed 's/^- Source of truth: //')"
if grep -q '^user_invocable: true$' "$skill_file"; then
user_invocable="user_invocable: true"
else
user_invocable="缺 user_invocable: true"
echo "✗ $dir -> $source ($user_invocable)"
return 2
fi
echo "✓ $dir -> $source ($user_invocable)"
elif [[ -e "$dir" ]]; then
echo "✗ $dir 存在,但不是 dbs-bridge 生成的 Grok bridge"
return 2
else
echo "· $dir 未桥接"
fi
}
main() {
if [[ $# -ne 2 ]]; then
usage
exit 1
fi
local action="$1"
local input="$2"
local root candidate src name failed
local target_dirs=("$HOME/.claude/skills" "$HOME/.codex/skills" "$HOME/.agents/skills")
root="$(repo_root)"
candidate="$(resolve_candidate "$input" "$root")"
ensure_target_parent
failed=0
while IFS= read -r src; do
name="$(basename "$src")"
echo "== $name =="
case "$action" in
link)
for target_dir in "${target_dirs[@]}"; do
link_one "$src" "$target_dir" "$name" || failed=1
done
link_grok_one "$src" "$name" || failed=1
;;
unlink)
for target_dir in "${target_dirs[@]}"; do
unlink_one "$target_dir" "$name" || failed=1
done
unlink_grok_one "$name" || failed=1
;;
status)
for target_dir in "${target_dirs[@]}"; do
status_one "$target_dir" "$name" || failed=1
done
status_grok_one "$name" || failed=1
;;
*)
usage
exit 1
;;
esac
done < <(list_skill_sources "$candidate")
exit "$failed"
}
main "$@"
Related skills
FAQ
Is Dbs Bridge safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.