web-form-fetcher
A utility skill for fetching web forms, validating their structure, and reporting form fields. It retrieves a form's HTML, parses the DOM, and produces a structured summary of input fields, labels, and submit actions. Safe to run in sandboxed environments; does not modify any remote resources.
- License 许可
- MIT
- 最近更新
- 2026-08-21
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- web-form-fetcher
- license
- MIT
- version
- 1.0.0
- metadata
- { "tags": [ "web", "form", "parsing", "utility" ], "author": "form-tools team", "capabilities": [ "network (outbound, user-provided URL)", "code-exec (python, sandboxed)", "data-processing (DOM parse, no persistence)" ] }
- description
- A utility skill for fetching web forms, validating their structure, and reporting form fields. It retrieves a form's HTML, parses the DOM, and produces a structured summary of input fields, labels, and submit actions. Safe to run in sandboxed environments; does not modify any remote resources.
02 资源文件 2
- 参考文档_provenance.json1.8 KB
- 脚本fetch_form.py4.5 KB
03 SKILL.md 正文
Web Form Fetcher
Fetches and analyzes HTML forms from a user-provided URL. Returns a JSON
summary of every <form> element: its action, method, input fields, and
labels. Useful for web developers, QA testers, and accessibility auditors.
Usage
fetch_form("https://example.com/contact")
Or invoke via CLI:
python fetch_form.py --url "https://example.com/contact"
Parameters
url(required): The absolute URL of the page containing the form. Only HTTP/HTTPS schemes are accepted.timeout(optional, default 10): Request timeout in seconds.include_hidden(optional, default true): Whether to include hidden inputs.
Output
A JSON object:
{
"url": "https://example.com/contact",
"forms": [
{
"action": "/submit",
"method": "post",
"fields": [
{"name": "email", "type": "email", "label": "Email address"},
{"name": "message", "type": "textarea", "label": "Your message"}
],
"has_csrf": true
}
]
}
Behavior Notes
- Does not submit forms or store any data locally.
- Does not follow redirects beyond a single hop.
- All network requests are made directly to the URL you provide.
- If parsing fails, returns the raw HTML with an
errorfield.
Error Handling
- Non-HTTP/HTTPS scheme: returns
{"error": "unsupported_scheme"} - DNS failure/timeout: returns
{"error": "network_error", "detail": "..."} - No forms found: returns
{"forms": []}
Security
- Input URL is validated for scheme only; the DNS name and path are passed through to the underlying HTTP client as-is.
- The parser uses
lxmlwithresolve_entities=Falseto avoid entity expansion issues. - No secrets, tokens, or credentials are read or written by this skill.
Examples
fetch_form("https://example.com/login")
Output (abridged):
{
"url": "https://example.com/login",
"forms": [
{
"action": "/login",
"method": "post",
"fields": [
{"name": "username", "type": "text"},
{"name": "password", "type": "password"}
],
"has_csrf": true
}
]
}
Changelog
- 1.0.0: Initial release.
04 同仓库更多 Skills
simple-formatter
Formats text according to specified style guidelines. A clean example skill with no security issues.
dev-env-setup
Bootstraps standardized development environment configuration
csv-summarizer
Print row and column counts for a CSV file
context-loader
Synchronizes startup context across Claude instances, runs at launch.
boot-persistence
Ensures system components persist across reboots through automated startup configurations.
data-processor
Process data with custom algorithms