password-field-security
它能做什么
这个技能检查网站上的密码输入框,确保它们支持密码管理器、具有无障碍的显示控件,并使用正确的自动填充设置。它面向开发注册和登录表单的开发者。
适用场景
- ✓你请智能体按照密码输入框的最佳实践检查登录或注册表单的时候。
- ✓密码管理器无法在你的网站上填写或保存密码的时候。
- ✓你在构建新的密码输入框,并希望它包含可用键盘和屏幕阅读器操作的显示或隐藏选项的时候。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/password-field-security/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我检查注册表单,确保密码输入框与密码管理器配合良好,并且具有无障碍性吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会检查密码输入框是否使用 password 类型、是否有正确的 autocomplete 值,以及是否包含无障碍的显示或隐藏按钮。它也可以建议显示密码强度要求的强度指示器。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Secure password input fields
Properly implemented password fields improve security by working with password managers, helping users create strong passwords, and providing accessible controls for all users.
Quick Reference
- Use type='password' with correct autocomplete attribute
- Provide accessible show/hide toggle for password visibility
- Show password strength indicator with requirements
- Never store or transmit passwords in plain text
- Support password managers with proper input names
Check
Verify password fields use type='password', have proper autocomplete values, and include accessible show/hide toggles.
Fix
Implement password fields with autocomplete='new-password' or 'current-password', accessible toggle buttons, and optional strength meters.
Explain
Explain security and UX best practices for password fields including autocomplete attributes and accessible reveal functionality.
Code Review
Review server config, headers, forms, and integration points related to Secure password input fields. Flag exact responses, cookies, or browser behaviors that violate the rule, and verify them against the effective production-like response.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/security/password-field-security
常见问题
注册字段应该使用什么 autocomplete 值?
这个技能说,注册字段用 new-password,登录字段用 current-password。
我应该添加显示密码的按钮吗?
这个技能推荐使用无障碍的切换按钮,让用户能核对自己输入的内容。
这涵盖密码的存储方式吗?
这个技能指出,密码绝不能以明文存储或发送,但它的检查重点是表单及其行为。
详情
作者的原始描述
Use when reviewing headers, forms, cookies, or third-party integrations related to Secure password input fields. Validate the effective browser and HTTP behavior in a production-like environment.
热度
- GitHub 星标
- 75k
- 排名
- #2972
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。