重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
npx skills add https://github.com/oimiragieo/agent-studio --skill php-expert在审查或编写代码时,请遵循以下准则:
在审查或编写代码时,请遵循以下准则:
在审查或编写代码时,请遵循以下准则:
在审查或编写代码时,请遵循以下准则:
此专家技能整合了 1 项独立技能:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
md5() 或 sha1() 存储密码 —— 这些是快速哈希,GPU 可在数秒内破解;对所有密码存储使用 password_hash() 并配合 PASSWORD_BCRYPT 或 PASSWORD_ARGON2ID。strict_types=1 —— 没有严格类型,PHP 会静默强制转换不匹配的类型,隐藏那些只在意外输入下才会出现的错误。\Exception 而不重新抛出或进行特定处理 —— 吞掉所有异常会掩盖错误,并允许损坏的状态在应用程序中静默传播。$request->validate() 或表单请求验证所有用户输入 —— 切勿在业务逻辑中直接信任 $_GET、$_POST 或 $_FILES。| 反模式 | 失败原因 | 正确方法 |
|---|---|---|
| 使用字符串插值的原始 SQL | 主要的 SQL 注入攻击媒介;用户输入被作为 SQL 执行 | 对所有数据库访问使用 Eloquent ORM 或 PDO 参数化查询 |
| 使用 md5() 或 sha1() 存储密码 | 快速哈希,GPU 彩虹表可在数秒内破解 | 使用 password_hash() 并配合 PASSWORD_BCRYPT 或 PASSWORD_ARGON2ID |
缺少 strict_types=1 | PHP 静默强制转换类型;错误隐藏直到意外输入出现 | 在每个 PHP 文件顶部声明 <?php declare(strict_types=1); |
静默捕获通用的 \Exception | 掩盖错误;损坏的状态传播;无法调试 | 捕获特定异常;记录上下文;重新抛出或显式处理 |
未经验证直接使用 $_GET/$_POST | 导致注入、XSS 和业务逻辑绕过 | 在控制器边界使用 $request->validate() 或表单请求进行验证 |
开始前:
cat .claude/context/memory/learnings.md
完成后: 记录发现的任何新模式或例外情况。
假设中断:您的上下文可能会重置。如果它不在记忆中,那就意味着它没有发生。
每周安装数
72
代码仓库
GitHub 星标数
20
首次出现
2026年1月27日
安全审计
安装于
github-copilot70
cursor70
gemini-cli69
codex68
kimi-cli68
amp68
When reviewing or writing code, apply these guidelines:
When reviewing or writing code, apply these guidelines:
When reviewing or writing code, apply these guidelines:
When reviewing or writing code, apply these guidelines:
This expert skill consolidates 1 individual skills:
md5() or sha1() — these are fast hashes that GPUs crack in seconds; use password_hash() with PASSWORD_BCRYPT or PASSWORD_ARGON2ID for all password storage.strict_types=1 at the top of every PHP file — without strict types, PHP silently coerces mismatched types, hiding bugs that only surface under unexpected inputs.\Exception without re-throwing or specific handling — swallowing all exceptions masks errors and allows corrupt state to propagate silently through the application.| Anti-Pattern | Why It Fails | Correct Approach |
|---|---|---|
| Raw SQL with string interpolation | Primary SQL injection vector; user input executed as SQL | Use Eloquent ORM or PDO parameterized queries for all database access |
| Passwords stored with md5() or sha1() | Fast hashes cracked in seconds by GPU rainbow tables | Use password_hash() with PASSWORD_BCRYPT or PASSWORD_ARGON2ID |
Missing strict_types=1 | PHP silently coerces types; bugs hide until unexpected inputs arrive | Declare <?php declare(strict_types=1); at the top of every PHP file |
| Catching generic silently |
Before starting:
cat .claude/context/memory/learnings.md
After completing: Record any new patterns or exceptions discovered.
ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.
Weekly Installs
72
Repository
GitHub Stars
20
First Seen
Jan 27, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykFail
Installed on
github-copilot70
cursor70
gemini-cli69
codex68
kimi-cli68
amp68
Kotlin 开发模式与最佳实践 | 构建健壮高效应用程序的惯用指南
1,300 周安装
$request->validate()$_GET$_POST$_FILES\Exception| Masks errors; corrupt state propagates; impossible to debug |
| Catch specific exceptions; log with context; re-throw or handle explicitly |
Directly using $_GET/$_POST without validation | Enables injection, XSS, and business logic bypass | Validate at controller boundary using $request->validate() or Form Requests |