hyperf

hyperf is a skill for Claude Code, Codex from fanqingxuan/awesome-skills. It costs 109 tokens per session (730 once invoked), scanned A, original, MIT.

A development guide for Hyperf 3.1, a PHP framework for building web applications and services.

In plain words
What is it for?
Use it to create controllers, models, commands, middleware, request validation, routes, services, and dependency-injected components.
Why use it?
It gives agents framework-specific patterns and commands instead of leaving them to guess how Hyperf projects are structured.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create controllers, models, commands, middleware, request validation, routes, services, and dependency-injected components.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fanqingxuan/awesome-skills/hyperf
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add fanqingxuan/awesome-skills --skill hyperf
Clone the repo
git clone --depth 1 https://github.com/fanqingxuan/awesome-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for hyperf

README.md
[![agentmods](https://agentmods.dev/badge/skills/fanqingxuan/awesome-skills/hyperf/github.svg)](https://agentmods.dev/skills/fanqingxuan/awesome-skills/hyperf)
Your own site
<a href="https://agentmods.dev/skills/fanqingxuan/awesome-skills/hyperf"><img src="https://agentmods.dev/badge/skills/fanqingxuan/awesome-skills/hyperf/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for hyperf

Your own site · 80×15
<a href="https://agentmods.dev/skills/fanqingxuan/awesome-skills/hyperf"><img src="https://agentmods.dev/badge/skills/fanqingxuan/awesome-skills/hyperf.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 109 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 730 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00109 $0.00730
Opus 5 $0.00055 $0.00365
Sonnet 5 $0.00022 $0.00146
Haiku 4.5 $0.00011 $0.00073

Measured 12d ago against content hash 6017aca28c6c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

hyperf scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/hyperf/SKILL.md · 125 lines

How it starts

The opening of the file, as written. The whole thing — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Hyperf 3.1 开发指南

Hyperf 3.1 框架开发助手,专注于控制器、模型、命令行工具的快速开发。

常用命令

# 生成控制器
php bin/hyperf.php gen:controller UserController

# 生成模型
php bin/hyperf.php gen:model User

# 生成命令
php bin/hyperf.php gen:command ImportCommand

# 生成中间件
php bin/hyperf.php gen:middleware AuthMiddleware

# 生成请求验证类
php bin/hyperf.php gen:request UserRequest

# 启动服务
php bin/hyperf.php start

快速示例

控制器

<?php
declare(strict_types=1);

namespace App\Controller;

use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\GetMapping;

#[Controller(prefix: "/api/users")]
class UserController extends AbstractController
{
    #[GetMapping("")]
    public function index()
    {
        return $this->response->json(['code' => 0, 'data' => []]);
    }
}

模型

<?php
declare(strict_types=1);

namespace App\Model;

use Hyperf\DbConnection\Model\Model;

class User extends Model
{
    protected ?string $table = 'users';
    protected array $fillable = ['name', 'email'];
}

命令

<?php
declare(strict_types=1);

namespace App\Command;

use Hyperf\Command\Command as HyperfCommand;
use Hyperf\Command\Annotation\Command;

#[Command]
class ImportDataCommand extends HyperfCommand
{
    protected ?string $name = 'import:data';

    public function handle()
    {
        $this->info('Processing...');
    }
}

服务类

<?php
declare(strict_types=1);

namespace App\Service;

use App\Model\User;

class UserService
{
    public function create(array $data): User
    {
        return User::create($data);
    }
}

官方文档参考

详细文档请参考 references/zh-cn/ 目录下的官方文档:

Read the full file on GitHub · 125 lines

Files

What ships with it

60 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 125 lines · 109 tokens per session scan A 6017aca28c6c

Subscribe to this mod's changes

hyperf is a skill published in the GitHub repository fanqingxuan/awesome-skills (27 stars, last pushed 4mo ago), licensed MIT. It adds 109 tokens to every session and 730 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

laravel-specialist

Build and configure Laravel 10+ applications, including creating Eloquent models and relationships, implementing Sanctum authentication, configuring Horizon queues, designing RESTful APIs with API resources, and building reactive interfaces with Livewire. Use when creating Laravel models, setting up queue workers…

Jeffallan/claude-skills · 86 tokens

php-pro

Use when building PHP applications with modern PHP 8.3+ features, Laravel, or Symfony frameworks. Invokes strict typing, PHPStan level 9, async patterns with Swoole, and PSR standards. Creates controllers, configures middleware, generates migrations, writes PHPUnit/Pest tests, defines typed DTOs and value objects…

Jeffallan/claude-skills · 107 tokens

craftcms

Craft CMS 5 plugin and module development — extending Craft with PHP. Covers elements, element queries, services, models, records, controllers, migrations, queue jobs, console commands, field types, native fields, events, behaviors, Twig extensions, widgets, filesystems, permissions, project config, GraphQL, testing…

michtio/craftcms-claude-skills · 327 tokens

php-ecosystem-reference

Use when picking a non-Laravel PHP tool — Symfony components, API Platform, or Slim — and routing to implementation. Do NOT use for Laravel (laravel-expert).

fusengine/agents · 42 tokens

php-http-psr

Use when building framework-agnostic PHP HTTP code — PSR-7/15/17/18 messages, middleware, factories, clients. Do NOT use for Laravel HTTP or Symfony HttpFoundation (not PSR-7).

fusengine/agents · 52 tokens

scraperapi-php-sdk

Best-practices reference for the ScraperAPI PHP SDK (scraperapi/sdk Composer package). Consult whenever the user is writing, debugging, or reviewing PHP code that calls ScraperAPI. Use when user asks: "scrape a website with PHP and ScraperAPI", "ScraperAPI PHP example", "how do I use the ScraperAPI PHP SDK", "PHP…

scraperapi/scraperapi-skills · 154 tokens