# HYPHP-SKill **Repository Path**: hyyyp/hyphp-skill ## Basic Information - **Project Name**: HYPHP-SKill - **Description**: HYPHP开发框架 skill - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-08-31 - **Last Updated**: 2026-08-31 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # hyphp-skill [HYPHP](http://hyphp.cn) 框架的 AI 编程技能(ZCode / Claude Code 等 Agent Skills 兼容格式)。 依据 **HYPHP 2.8 源码**(HY/ 目录)与官方文档(hyphp.cn/api.html)整理,供 AI 助手在 HYPHP 项目中正确编写控制器(Action)、模型(Model)、Medoo 数据库查询、HY 模板、插件与中文PHP语法。 ## 安装 克隆为技能目录(目录名必须是 `hyphp`,与 SKILL.md 中 `name` 一致): ```bash # 项目级(仅当前项目生效, 推荐) git clone https://gitee.com/hyyyp/hyphp-skill.git .zcode/skills/hyphp # 或用户级(全局生效) git clone https://gitee.com/hyyyp/hyphp-skill.git ~/.zcode/skills/hyphp ``` 兼容 `.agents/skills/hyphp` 等标准技能发现路径。 ## 内容结构 ``` hyphp-skill/ ├── SKILL.md # 技能入口: 心智模型 + 必守规则 + 代码速查 ├── references/ │ ├── routing.md # 路由/URL生成/别名/CLI/入口开关 │ ├── database.md # S()/M()/Medoo全量WHERE/JOIN/事务/多库/查询缓存 │ ├── template.md # 模板标签总表/include/分组/多语言 │ ├── helpers.md # 全局函数与常量逐条说明 │ ├── config.md # 配置键大全 │ └── plugins.md # hook/re插件机制/中文PHP └── assets/ ├── controller.template.php # 控制器模板 ├── model.template.php # 模型模板 └── config.sample.php # 配置模板 ``` ## 框架快速回顾 ```php // 入口 index.php define('INDEX_PATH', str_replace('\\','/',dirname(__FILE__)).'/'); define('DEBUG', 1); require 'HY/HYPHP.php'; // Action/User.php → /?s=/user/index.html namespace Action; use HY\Action; class User extends Action { public function Index(){ $this->v('row', S('user')->get('*', array('id'=>1))); $this->display('user'); // View/user.html } } ``` ## 许可 技能文档遵循仓库开源协议;HYPHP 框架本身基于 Apache License 2.0(作者 Krabs)。