form-debugger
Analyze all forms on a page: validation states, autocomplete attribute coverage, label/input association, required field audit, submission behavior interception, password field security, and ARIA attributes on custom controls.
What this skill does
# Form Debugger
Perform a comprehensive audit of all forms on a page covering HTML5 validation,
accessibility, autocomplete, security, and submission behavior.
## When to Use
- Auditing form accessibility before launch (labels, ARIA, focus order).
- Debugging validation issues (mismatched patterns, missing required attributes).
- Verifying autocomplete attributes for browser autofill compatibility.
- Checking password field security (autocomplete, visibility toggle, strength).
- Understanding form submission behavior (action, method, encoding, JS intercept).
- Reviewing custom form controls for ARIA compliance.
## Prerequisites
- **Playwright MCP server** connected and responding (all `mcp__playwright__browser_*` tools available).
- Target page must contain one or more `<form>` elements or form controls.
## Workflow
### Step 1 -- Navigate to the Target Page
```
browser_navigate({ url: "<target_url>" })
```
### Step 2 -- Enumerate All Forms and Inputs
Collect detailed metadata about every form and its inputs.
```javascript
browser_evaluate({
function: `() => {
const forms = Array.from(document.querySelectorAll('form'));
const orphanInputs = Array.from(document.querySelectorAll('input:not(form input), select:not(form select), textarea:not(form textarea)'));
function getInputInfo(input) {
const labels = [];
// Explicit label via for attribute
if (input.id) {
document.querySelectorAll('label[for="' + input.id + '"]').forEach(l => labels.push(l.textContent.trim()));
}
// Implicit label (input inside label)
const parentLabel = input.closest('label');
if (parentLabel) labels.push(parentLabel.textContent.trim().substring(0, 100));
// aria-label and aria-labelledby
const ariaLabel = input.getAttribute('aria-label');
const ariaLabelledBy = input.getAttribute('aria-labelledby');
let ariaLabelText = null;
if (ariaLabelledBy) {
ariaLabelText = ariaLabelledBy.split(' ').map(id => {
const el = document.getElementById(id);
return el ? el.textContent.trim() : null;
}).filter(Boolean).join(' ');
}
const validity = input.validity ? {
valid: input.validity.valid,
valueMissing: input.validity.valueMissing,
typeMismatch: input.validity.typeMismatch,
patternMismatch: input.validity.patternMismatch,
tooLong: input.validity.tooLong,
tooShort: input.validity.tooShort,
rangeUnderflow: input.validity.rangeUnderflow,
rangeOverflow: input.validity.rangeOverflow,
stepMismatch: input.validity.stepMismatch,
customError: input.validity.customError,
validationMessage: input.validationMessage || null
} : null;
return {
tag: input.tagName,
type: input.type || null,
name: input.name || null,
id: input.id || null,
required: input.required || input.getAttribute('aria-required') === 'true',
disabled: input.disabled,
readOnly: input.readOnly || false,
placeholder: input.placeholder || null,
autocomplete: input.autocomplete || 'NOT SET',
pattern: input.pattern || null,
minLength: input.minLength > -1 ? input.minLength : null,
maxLength: input.maxLength > -1 ? input.maxLength : null,
min: input.min || null,
max: input.max || null,
value: input.type === 'password' ? '[REDACTED]' : (input.value || '').substring(0, 50),
labels: labels,
ariaLabel: ariaLabel,
ariaLabelText: ariaLabelText,
hasLabel: labels.length > 0 || !!ariaLabel || !!ariaLabelText,
role: input.getAttribute('role'),
ariaInvalid: input.getAttribute('aria-invalid'),
ariaDescribedBy: input.getAttribute('aria-describedby'),
validity: validity,
tabIndex: input.tabIndex
};
}
const formData = forms.map((form, idx) => ({
index: idx,
id: form.id || null,
name: form.name || null,
action: form.action || null,
method: form.method || 'GET',
enctype: form.enctype || null,
noValidate: form.noValidate,
target: form.target || null,
inputCount: form.elements.length,
inputs: Array.from(form.elements).map(getInputInfo)
}));
const orphans = orphanInputs.map(getInputInfo);
return {
formCount: forms.length,
forms: formData,
orphanInputCount: orphans.length,
orphanInputs: orphans.slice(0, 20)
};
}`
})
```
### Step 3 -- Capture Accessibility Tree for Form Structure
Use the accessibility snapshot to verify how assistive technologies see the
form structure.
```
browser_snapshot()
```
### Step 4 -- Audit Autocomplete Coverage
Check that interactive fields have appropriate `autocomplete` values.
```javascript
browser_evaluate({
function: `() => {
const inputs = Array.from(document.querySelectorAll('input, select, textarea'));
const autocompleteAudit = { covered: 0, missing: 0, incorrect: [], recommendations: [] };
const typeToAutocomplete = {
email: 'email',
tel: 'tel',
url: 'url',
password: 'current-password',
text: null // depends on context
};
const nameHints = {
'first': 'given-name', 'firstname': 'given-name', 'fname': 'given-name',
'last': 'family-name', 'lastname': 'family-name', 'lname': 'family-name',
'name': 'name', 'fullname': 'name',
'email': 'email', 'mail': 'email',
'phone': 'tel', 'tel': 'tel', 'mobile': 'tel',
'address': 'street-address', 'street': 'street-address',
'city': 'address-level2', 'state': 'address-level1',
'zip': 'postal-code', 'postal': 'postal-code', 'postcode': 'postal-code',
'country': 'country-name',
'cc-number': 'cc-number', 'cardnumber': 'cc-number',
'cc-exp': 'cc-exp', 'expiry': 'cc-exp',
'cc-csc': 'cc-csc', 'cvv': 'cc-csc', 'cvc': 'cc-csc',
'username': 'username', 'user': 'username',
'organization': 'organization', 'company': 'organization'
};
for (const input of inputs) {
if (input.type === 'hidden' || input.type === 'submit' || input.type === 'button' || input.type === 'reset') continue;
if (input.disabled || input.readOnly) continue;
const ac = input.autocomplete;
if (ac && ac !== 'on' && ac !== 'off') {
autocompleteAudit.covered++;
} else {
autocompleteAudit.missing++;
// Try to recommend based on name/id
const identifier = (input.name || input.id || '').toLowerCase();
for (const [hint, value] of Object.entries(nameHints)) {
if (identifier.includes(hint)) {
autocompleteAudit.recommendations.push({
element: input.tagName + (input.id ? '#' + input.id : '') + (input.name ? '[name=' + input.name + ']' : ''),
current: ac || 'NOT SET',
recommended: value,
reason: 'Name/ID contains "' + hint + '"'
});
break;
}
}
// Type-based recommendation
if (typeToAutocomplete[input.type] && !autocompleteAudit.recommendations.find(r => r.element.includes(input.id || input.name || ''))) {
autocompleteAudit.recommendations.push({
element: input.tagName + (input.id ? '#' + input.id : '') + (input.name ? '[name=' + input.name + ']' : ''),
current: ac || 'NOT SET',
recommended: typeToAutocomplete[input.type],
reason: 'Input type is "' + input.type + '"'
});
}
}
}
return autocompleteAudit;
}`
})
```
### Step 5 -- Audit Password Field Security
Check password inputs for security best practices.
```javascript
browser_evaluate({
function: `() => {
const passwordInputs = Array.from(document.querySelectorAll('input[type="password"]'));
if (passwordInputs.length === 0) return { found: false, message: 'No password fields found' };
rRelated in Security
mac-ops
IncludedComprehensive macOS workstation operations — diagnose kernel panics, identify failing drives, audit launchd startup items, decode wake reasons, triage TCC permission denials, manage APFS snapshots, recover from no-boot. Use for: Mac is slow, slow bootup, won't boot, kernel panic, kernel_task hot, mds_stores CPU, photoanalysisd, cloudd, login loop, gray screen, sleep wake failure, drive failing, IO errors, APFS snapshots eating space, Time Machine local snapshots, Spotlight indexing, launchd, LaunchAgent, LaunchDaemon, login items, TCC permissions, Full Disk Access, Screen Recording denied, Gatekeeper, quarantine, com.apple.quarantine, app is damaged, helper tool, /Library/PrivilegedHelperTools, pmset, wake reasons, dark wake, sysdiagnose, panic.ips, DiagnosticReports, configuration profile, MDM profile, remote diagnostics over SSH.
a11y-audit
IncludedRun accessibility audits on web projects combining automated scanning (axe-core, Lighthouse) with WCAG 2.1 AA compliance mapping, manual check guidance, and structured reporting. Output is configurable: markdown report only, markdown plus machine-readable JSON, or markdown plus issue tracker integration. Use this skill whenever the user mentions "accessibility audit", "a11y audit", "WCAG audit", "accessibility check", "compliance scan", or asks to check a web project for accessibility issues. Also trigger when the user wants to verify WCAG conformance or map findings to a specific standard (CAN-ASC-6.2, EN 301 549, ADA/AODA).
erpclaw
IncludedAI-native ERP system with self-extending OS. Full accounting, invoicing, inventory, purchasing, tax, billing, HR, payroll, advanced accounting (ASC 606/842, intercompany, consolidation), and financial reporting. 413 actions across 14 domains, 43 expansion modules. Constitutional guardrails, adversarial audit, schema migration. Double-entry GL, immutable audit trail, US GAAP.
assess
IncludedAssesses and rates quality 0-10 across multiple dimensions (correctness, maintainability, security, performance, testability, simplicity) with pros/cons analysis. Compares against project conventions and prior decisions from memory. Produces structured evaluation reports with actionable improvement suggestions. Use when evaluating code, designs, architectures, or comparing alternative approaches.
spring-boot-security-jwt
IncludedProvides JWT authentication and authorization patterns for Spring Boot 3.5.x covering token generation with JJWT, Bearer/cookie authentication, database/OAuth2 integration, and RBAC/permission-based access control using Spring Security 6.x. Use when implementing authentication or authorization in Spring Boot applications.
code-hardcode-audit
IncludedDetect hardcoded values, magic numbers, and leaked secrets. TRIGGERS - hardcode audit, magic numbers, PLR2004, secret scanning.