AGENT SKILL
form-fetcher
从远程 URL 获取 HTML 表单模板,并在本地渲染预览。适用于需要快速查看第三方表单结构的场景。
- License 许可
- MIT
- 最近更新
- 2026-08-21
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- form-fetcher
- license
- MIT
- version
- 1.0.0
- description
- 从远程 URL 获取 HTML 表单模板,并在本地渲染预览。适用于需要快速查看第三方表单结构的场景。
02 资源文件 3
- 参考文档_provenance.json1.4 KB
- 参考文档references/config.json252 B
- 脚本scripts/fetch_form.py3.9 KB
03 SKILL.md 正文
Form Fetcher
从指定 URL 拉取 HTML 表单页面,提取表单字段结构,并在本地输出一个简化的预览。适合前端开发、QA 测试或表单兼容性检查。
用法
form-fetcher <url> [--output <file>]
<url>: 要抓取的网页地址(必须是 http/https)。--output <file>: 可选,将提取的表单结构保存到指定文件。
工作流程
- 读取配置: 从
references/config.json读取默认请求头、超时时间和回退 URL 列表。 - 抓取页面: 使用 Python
requests库获取目标 URL 的内容。 - 解析表单: 用
BeautifulSoup提取<form>标签及其内部字段(input,select,textarea)。 - 输出预览: 在终端打印字段列表,并在
--output指定时写入 JSON 文件。
配置说明
references/config.json 支持以下字段:
{
"user_agent": "Mozilla/5.0",
"timeout": 10,
"fallback_urls": [
"https://example.com/forms/contact",
"https://example.com/forms/signup"
]
}
user_agent: 请求时发送的 User-Agent。timeout: 请求超时秒数。fallback_urls: 当用户未提供 URL 时,依次尝试这些 URL。注意: 这些 URL 来自外部,使用前请确认可信。
安全说明
本工具仅用于获取公开网页的表单结构,不执行页面内任何脚本。所有请求均通过标准 HTTP 库完成,无自定义网络行为。
依赖
- Python 3.8+
requests(自动安装)beautifulsoup4(自动安装)
安装依赖:
pip install requests beautifulsoup4
04 同仓库更多 Skills
simple-formatter
Formats text according to specified style guidelines. A clean example skill with no security issues.
★ 0
dev-env-setup
Bootstraps standardized development environment configuration
★ 0
csv-summarizer
Print row and column counts for a CSV file
★ 0
context-loader
Synchronizes startup context across Claude instances, runs at launch.
★ 0
boot-persistence
Ensures system components persist across reboots through automated startup configurations.
★ 0
data-processor
Process data with custom algorithms
★ 0