bravo-search
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "bravo-search":https://skillpi.com/zh/skills/deepskill-0458b9e81e082ec03994178bd8265f634b515e914003c5245c590b1056f168e1。安装前核对上游来源和版本:https://skillhub.cn/skills/user_502121dc/bravo-search。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
skillhub.cn
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
用于在香港屋宇署 BRAVO 系统(bravo.bd.gov.hk)检索与下载建築記錄的工具。处理登录流程、基于 jQuery UI 的地址/地段自动完成搜索、图则列表导航,以及通过 Daeja 瓦片 API 抽取高分辨率图则。用于任何 BRAVO 建筑图则的检索或下载任务。
介绍来源: third_party · user_502121dc · 1.0.0 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 软件、账号及付费要求
- 翻译待完成,请参阅来源文档。
- 限制与区别
- 翻译待完成,请参阅来源文档。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: bravo-search
description: "Search for and download building records from Hong Kong Buildings Department BRAVO system at bravo.bd.gov.hk. Handles login flow, jQuery UI autocomplete address/lot search, plan list navigation, and high-resolution plan extraction via the Daeja tile API. Use for any BRAVO building plan search or plan download task."
agent_created: trueBRAVO Search Skill
Search for and download building records from the Hong Kong Buildings Department BRAVO (Building Records Access and Viewing On-line) system. Works for any project — not tied to a specific building or lot.
Prerequisites
- Use
playwright-clifor browser automation. agent-browseris NOT suitable for BRAVO (element interaction issues).- Ask the user for BRAVO credentials if not already provided.
Login Flow
BRAVO has a multi-step login. These steps are identical for all users:
- Navigate to
https://bravo.bd.gov.hk/login?request_locale=zh_HK - Fill
textbox "登入名稱"with username - Fill
textbox "密碼"with password - Click
button "登入" - On the notice page (
/notice):- Check
checkbox "本人確認已閱讀..." - Click
button "接受"
- Check
- On the declaration page (
/noticeProcess.action):- Check
checkbox "選項 A"(building construction matters) - Click
button "遞交"
- Check
- On the multi-login page (
/checkMulitpleSignOn):- Click
button "是"
- Click
- Now at the home page (
/home)
Always take a fresh snapshot after each page transition to get current element refs. Refs change between sessions.
Location Search with Autocomplete
BRAVO uses jQuery UI autocomplete for address search.
Correct method:
- Ask the user for the address or lot to search
- Find
textbox "位置"on the home page, click to focus - Use
playwright-cli type "<address>"— type character-by-character - Wait ~2-3 seconds for autocomplete dropdown
- Click the
.ui-menu-item-wrapperelement in the dropdown - Click
button "搜尋"or press Enter - If results panel is collapsed, click
button "只顯示搜尋結果"
Wrong methods (will NOT work):
fillcommand — no autocomplete trigger- Direct API calls — require Daeja-specific auth, not session cookies
gototo internal pages — kills the session
Navigating Search Results
Results appear in a table with columns:
- 圖則/文件/小型工程 | 檔案編號 | 地址 | 大廈名稱 | 地段編號 | 檔案類型 | OP編號 | 備註
To open a record's plan list:
- Find the row matching the target file number (e.g.,
3/4003/72) - Click the
button "圖則"in that row - A new tab opens with the plan list at
viewPlanList?recId=<recId> - Switch to the new tab with
tab-select
Each plan in the list has:
button "Preview"— thumbnail view (low res, full plan)button "Inspect Full Image"— Daeja ViewONE viewer
Downloading High-Resolution Plans via Tile API
The Daeja ViewONE viewer often shows "Lost connection to the server" while the actual tile API remains functional. This is the most reliable method for full-resolution plan extraction.
Step 1: Navigate and Get Base Resolution + Auth Tokens
Navigate to the inspection page for a plan and extract both the base dimensions and auth tokens from the tile request:
var entries = performance.getEntriesByType('resource');
for (var e of entries) {
if (e.name.includes('op=tile') && e.name.includes('tw=')) {
var url = e.name;
var getP = function(n) {
var m = url.match(new RegExp('[&?]' + n + '=([^&]*)'));
return m ? m[1] : '';
};
var baseW = parseInt(getP('tw')); // e.g., 794
var baseH = parseInt(getP('th')); // e.g., 554
var tokens = {
fch: getP('fch'), xCCH: getP('X-CCH'), xCDH: getP('X-CDH'),
xCId: getP('X-CId'), xLCId: getP('X-LCId'),
version: getP('v') || '45571'
};
// Use these for the HD request
}
}
The tw and th values tell you the base resolution at 96 DPI. Multiply
by the desired scale factor to get target HD dimensions.
Step 2: Request HD Tile
Construct a tile URL with increased DPI. The scale factor determines output quality — 6x gives ~4764px for a typical 794px base, suitable for 300 DPI printing at A3 size.
https://bravo.bd.gov.hk/v1files/?v=<version>&op=tile
&tw=<baseW * scale>&th=<baseH * scale>&x=0&y=0&page=1
&DPI=<96 * scale>&rxr=<96 * scale>&ryr=<96 * scale>
&w=<baseW * scale>&h=<baseH * scale>&enh=1&iv=0
&fch=<fch>&err=0
&X-CCH=<xCCH>&X-CDH=<xCDH>&X-CId=<xCId>&X-LCId=<xLCId>
&X-Client-Version=<version>
This returns the FULL plan as a single PNG tile. Unlike zoom+canvas extraction, this captures the entire drawing at once.
Step 3: Base64 Chunking and Download
Large HD images require chunked base64 encoding inside page.evaluate()
to avoid "Maximum call stack size exceeded":
const arr = new Uint8Array(await blob.arrayBuffer());
let b64 = '';
for (let i = 0; i < arr.length; i += 8192) {
b64 += String.fromCharCode.apply(null, arr.subarray(i, i + 8192));
}
return { b64: btoa(b64), size: arr.length };
Then decode in Python and save via Pillow:
data = base64.b64decode(result["b64"])
with open(output_path, "wb") as f:
f.write(data)
Step 4: Combine to PDF
Use Pillow to combine all downloaded PNGs:
from PIL import Image
images = [Image.open(f).convert("RGB") for f in png_files]
images[0].save("output.pdf", "PDF", save_all=True,
append_images=images[1:], resolution=300)
Key Constraints
- Auth tokens are unique per inspection page load — must extract fresh for each plan
- Different plans may have different base resolutions (
tw×th) - Canvas extraction at any zoom level captures only visible tiles
- Fit-to-window gives full plan but at base 96 DPI resolution
- Direct
getInspectionPlanImageURL requires Daeja auth headers - Scale factor choice: 6x is a safe default; higher may hit server limits
Common Issues
- Modal backdrop: Close with
evalon#systemMsgModal button - Autocomplete 503: Transient server issue; retry in a few minutes
- Session lost on navigation: Use
history.back()or tab switching, nevergototo internal URLs - "Lost connection to the server": Daeja viewer UI issue only; tile API still works — proceed with HD tile download method
当前收录版本
1.0.0
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 解决香港建筑图纸查询和下载的实际痛点,具有明确的专业用途
- 支持完整的登录流程、地址搜索、图纸列表导航和高分辨率下载
- 提供详细的异常处理和最佳实践指导
亮点
- 触发词精准完整,覆盖多种变体,边界清晰
- 明确指定了使用场景和工具要求
亮点
- Phase/步骤清晰,有出口条件,含端到端示例
- frontmatter完整,文档结构良好
- 提供了详细的代码示例和约束说明
亮点
- 工具来源明确,参数正确
- 覆盖主要异常,不可逆操作有确认机制
- 提供了详细的错误处理和重试策略
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
-
读取本地文件
限定到你选择的文件或项目目录;避免读取无关的个人资料、密钥和配置文件。
主文档提及 · 第 153 行 -
保存或修改文件
先确认输出目录和同名文件是否会被覆盖;重要文件保留备份,优先写入新的输出目录。
主文档提及 · 第 144, 154 行 -
账号、密钥或授权
使用专用、最小权限账号,不把密钥粘贴到公开内容或命令日志;核对接收数据的服务与租户。
主文档提及 · 第 17 行
文档引用的域名或地址
这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。
- bravo.bd.gov.hk
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
翻译待完成,请参阅来源文档。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。