curiouslearnerdev/online_tools-ai/php-route-mapper
Claude Code and agent skill by curiouslearnerdev/online_tools-ai
- community
Checking that the SKILL.md file is still in the repository.
PHP Web 源码路由与参数映射分析工具。从源码中提取所有入口路由与参数结构,输出完整请求模板与参数清单(禁止省略)。
Install
npx vskill@latest install curiouslearnerdev/online_tools-ai/php-route-mapperSKILL.md
PHP 源码 Route & Param Mapper
分析 PHP Web 项目源码,提取完整的 HTTP 路由入口与请求参数结构,生成可用于安全测试的请求模板(Burp/Repeater 风格),并自动保存为 Markdown。
CRITICAL:完整输出(强制)
此技能必须输出所有发现的路由与接口,不允许省略:
- 禁止出现省略占位符;必须输出完整的路由与参数内容
- 禁止只输出“关键路由/重要路由”
- 每条路由必须包含:HTTP 方法、路径规则、处理器位置、完整参数结构、完整请求模板(在代码块里)
核心输入
用户提供:
source_path:PHP 项目源码根目录
可选:
context_path:如果存在反向代理/网关前缀,可用于拼接完整路径(必须有证据来源)
输出目录结构(建议)
路径与流水线合并模式下的对应关系见 `shared/IO_PATH_CONVENTION.md`(route_mapping/*.md 与报告内「路由/参数」章节等价)。
识别范围(必做)
- 路由配置/定义(按框架识别)
- Laravel:
routes/web.php、routes/api.php、Route::get/post/{subpath}、Route::resource、Route group 前缀与中间件 - Symfony:
config/routes/*、PHP8 attribute#[Route({route_options})]、Annotation@Route({route_options}) - Slim:
$app->get/post/any({handler})、自定义中间件 - WordPress:
admin-post.php/admin-ajax.php、add_action('admin_post_*')、add_action('wp_ajax_*') - 纯 PHP:front controller(如
public/index.php)的分发逻辑、基于$_SERVER['REQUEST_URI']的路由匹配
- 动态路由/参数化路由(必做)
{id}/(?P<id>{id_pattern})/ 正则路由:必须把可控参数列出来- 路由约束(where/regex limit):必须输出约束规则与可控性边界
参数结构解析(必做)
对每条路由输出以下参数来源与类型信息:
- Path 参数:来自路由规则的占位(输出如
{id}) - Query 参数:
$_GET/request()->query({query})/ 框架 query 解析结果 - Body 参数:
php://input、$_POST、JSONjson_decode({json}) - Header 参数:
getallheaders()、$_SERVER[{value}]、框架 request header API - Cookie 参数:
$_COOKIE - File 参数:
$_FILES(输出字段名与 filename 来源)
处理器位置(必做)
每条路由必须给出处理器来源证据:
- 文件路径(相对/绝对均可,但必须一致)
- 函数/类/方法签名(在源码中能定位到的名称)
- 关键分发点:路由匹配如何进入 handler(如 switch case / include 文件链)
输出格式(强制)
routes_{timestamp}.md:主索引(逐条列出)
说明:本 skill 使用 routes_{timestamp}.md 中 === [N] {route_summary} === 的 N 作为 HTTP 路由的 route_id(流水线后续用于 route_tracer/{route_id}/trace_{timestamp}.md 文件分桶)。CLI / hook / sink-only 等合成 route_id 由 php-audit-pipeline 阶段 3 写入 high_risk_routes_{timestamp}.md,不占用本文件的 [N] 序号。
params_{timestamp}.md:参数详细(逐条列出)
GET /path/to/{id}?a={a}&b={b} HTTP/1.1 Host: {host} Cookie: {cookie} Authorization: Bearer {token} Content-Type: application/json
{"k":"{v}"}
输出前自检(强制)
- [ ] routes 与 params 中每条路由“序号/路由标识”一致
- [ ] 没有出现省略占位符
- [ ] 每条路由都有“完整请求模板”代码块
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingstorage/Skill/PHP-Code-Audit-Skill/php-route-mapper/SKILL.md
Popularity
- Repository stars
- 54
- Repository forks
- 8
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/curiouslearnerdev/online_tools-ai/php-route-mapper)