Agent skill

Ext Php Rs Bindings

by Goldziher in Goldziher/ai-rulez

ext-php-rs conventions for building PHP 8.2+ native extensions from a Rust core: phpclass/phpfunction macros, Zval conversion, PhpException mapping, php.ini loading, and PHPUnit testing.

MITAuto-check passed

Install Ext Php Rs Bindings

skills CLI
$ npx skills add Goldziher/ai-rulez --skill ext-php-rs-bindings -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Goldziher/ai-rulez ext-php-rs-bindings --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Goldziher/ai-rulez.git skills-src && mkdir -p .claude/skills && cp -r skills-src/internal/builtins/bindings/ext-php-rs/skills/ext-php-rs-bindings .claude/skills/ext-php-rs-bindings && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ext-php-rs-bindings
GitHub stars
158
Token cost
~357 tokens
SKILL.md length
134 words
Files
1
Skills in repo
11
Repo updated
First seen
Licence
MIT

At a glance

ext-php-rs conventions for building PHP 8.2+ native extensions from a Rust core: phpclass/phpfunction macros, Zval conversion, PhpException mapping, php.ini loading, and PHPUnit testing.

  • Calls cargo and php

What it does

Ext Php Rs Bindings is an agent skill from Goldziher/ai-rulez. ext-php-rs conventions for building PHP 8.2+ native extensions from a Rust core: phpclass/phpfunction macros, Zval conversion, PhpException mapping, php.ini loading, and PHPUnit testing. Load when generating or reviewing ext-php-rs PHP bindings for a Rust library.

Its SKILL.md is about 360 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It works with PHP and Rust. The repository describes itself as: One source of truth for AI assistant configs: 14 built-in presets (Claude, Cursor, Copilot, Codex, Gemini, Xum, …), full-parity custom presets, and distributable plugin bundles… The licence is MIT.

Example prompts

  • “/ext-php-rs-bindings”

What it can do on your machine

Read from SKILL.md and the folder at commit 01417cf. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • cargo
    • php

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Ext Php Rs Bindings loads about 357 tokens when it runs. Until then it costs about 72 tokens; SKILL.md has 134 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~72
When it runs · the whole SKILL.md, loaded when a task matches
~357

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Goldziher/ai-rulez at commit 01417cf, republished under its MIT licence (© Goldziher). 134 words, ~357 tokens.

Download SKILL.mdSave it as .claude/skills/ext-php-rs-bindings/SKILL.md (or your agent's skills folder).
name
ext-php-rs-bindings
description
ext-php-rs conventions for building PHP 8.2+ native extensions from a Rust core: php_class/php_function macros, Zval conversion, PhpException mapping, php.ini loading, and PHPUnit testing. Load when generating or reviewing ext-php-rs PHP bindings for a Rust library.
  • Use ext-php-rs for PHP 8.2+ native extensions. Use #[php_class] and #[php_function] macros.
  • Map Rust types to PHP via FromZval/IntoZval traits. Return PhpResult<T> for fallible operations.
  • Map Rust errors to PHP exceptions: PhpException::from(...) with specific classes (InvalidArgumentException, RuntimeException).
  • Use #[php_method] for class methods. Implement __construct for PHP constructors.
  • Build with cargo build --release. Load extension via php.ini (extension=your_ext.so) or PECL distribution.
  • Test from PHP using PHPUnit. Verify extension loading with php -m | grep extension_name.
  • Use ZendClassObject<T> for wrapping Rust structs as PHP objects.
  • PHP uses reference counting — avoid circular references in wrapped Rust structs. Implement Drop for cleanup.
  • PHP is single-threaded per request — offload CPU-intensive work to Rust, return results synchronously.
  • Keep PHP extension thin — business logic in Rust, PHP provides typed interface.
  • Anti-patterns: panics in PHP functions, blocking operations without timeout, raw pointer manipulation.

© Goldziher, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in internal/builtins/bindings/ext-php-rs/skills/ext-php-rs-bindings of Goldziher/ai-rulez.

Open the folder on GitHubat commit 01417cf

Compare with similar skills

Ext Php Rs Bindings next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Ext Php Rs Bindings compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Ext Php Rs Bindings this skillGoldziher/ai-rulez158—~357Automated safety check: PassMIT
SpikardGoldziher/spikard123—~799Automated safety check: PassMIT
Security Reviewgithub/awesome-copilot40k1 repos~2.3kAutomated safety check: NotesMIT
SDK Implementation Guidemacalbert/envilder138—~1.9kAutomated safety check: PassMIT
Phy Regex AuditLeoYeAI/openclaw-master-skills2.2k—~5.1kAutomated safety check: PassApache-2.0
Configuring Horizoncoollabsio/coolify63k4 repos~898Automated safety check: PassMIT

Similar skills

  • Spikard

    Goldziher/spikard

    Scaffold Spikard projects and generate code from OpenAPI, AsyncAPI, OpenRPC, GraphQL, and Protobuf schemas using the Spikard CLI or its MCP server.

    123 GitHub stars~799 tokensUpdated 5 days ago
    Backend & APIsAuto-check passed
  • Security Review

    github/awesome-copilot

    Official

    AI-powered codebase security scanner that reasons about code like a security researcher — tracing data flows, understanding component interactions, and catching vulnerabilities that pattern-matching…

    40k GitHub starsUsed in 1 repo~2.3k tokens
    SecurityAuto-check: notes
  • SDK Implementation Guide

    macalbert/envilder

    Operational guide for implementing a new Envilder runtime SDK.

    138 GitHub stars~1.9k tokensUpdated 3 days ago
    Productivity & AutomationAuto-check passed
  • Phy Regex Audit

    LeoYeAI/openclaw-master-skills

    Static ReDoS (Regular Expression Denial of Service) vulnerability scanner and regex quality auditor for codebases.

    2.2k GitHub stars~5.1k tokensUpdated 2 mo ago
    SecurityAuto-check passed
  • Configuring Horizon

    coollabsio/coolify

    A skill your agent uses whenever the user mentions Horizon by name in a Laravel context.

    63k GitHub starsUsed in 4 repos~898 tokens
    Backend & APIsAuto-check passed
  • Tailwindcss Development

    anonaddy/anonaddy

    Always invoke when the user's message includes 'tailwind' in any form.

    4.9k GitHub starsUsed in 10 repos~865 tokens
    Frontend & DesignAuto-check passed

More from Goldziher/ai-rulez

All 11 skills in this repo
  • AI Rulez

    Goldziher/ai-rulez

    Manage AI assistant governance rules across 52 harnesses (Claude Code, Cursor, Codex, Copilot, Gemini CLI, OpenCode, Devin, and more) using ai-rulez.

    158 GitHub stars~3.1k tokensUpdated yesterday
    Auto-check passed
  • Code Quality Standards

    Goldziher/ai-rulez

    Concrete code-quality thresholds and anti-patterns: 120-char lines, max 20 cyclomatic complexity, max 4 nesting levels, max 50 lines per function, no magic numbers, no global state, composition over…

    158 GitHub stars~486 tokensUpdated yesterday
    Auto-check passed
  • Rust Conventions

    Goldziher/ai-rulez

    Rust code conventions covering edition 2024, cargo fmt/clippy, Result-based error handling, unsafe discipline, async with tokio, API-guideline naming, trait implementations, benchmarking, and…

    158 GitHub stars~746 tokensUpdated yesterday
    Auto-check passed
  • Testing Conventions

    Goldziher/ai-rulez

    How to write a good test: behaviour-describing names (shouldreturnerrorwheninputisempty, givenwhenthen), exact-value assertions over truthiness, snapshot and property-based testing…

    158 GitHub stars~473 tokensUpdated yesterday
    Auto-check passed
  • Vite Plus Conventions

    Goldziher/ai-rulez

    vite+ unified TypeScript toolchain conventions: the vp CLI for package/node management, oxlint/oxfmt, type-aware linting, vitest, rolldown/tsdown bundling, task caching, and migration.

    158 GitHub stars~567 tokensUpdated yesterday
    Auto-check passed
  • Bindings

    Goldziher/ai-rulez

    Cross-language binding architecture rules: bindings as minimal glue, canonical API surface ordering (core, ABI, language), per-language test suites in CI, generated-code discipline, and error/async…

    158 GitHub stars~265 tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Ext Php Rs Bindings

What does Ext Php Rs Bindings do?

ext-php-rs conventions for building PHP 8.2+ native extensions from a Rust core: phpclass/phpfunction macros, Zval conversion, PhpException mapping, php.ini loading, and PHPUnit testing. Ext Php Rs Bindings is an agent skill from Goldziher/ai-rulez.ini loading, and PHPUnit testing.

How do I install Ext Php Rs Bindings in Claude Code?

Run `npx skills add Goldziher/ai-rulez --skill ext-php-rs-bindings -a claude-code`. Or copy the skill folder (internal/builtins/bindings/ext-php-rs/skills/ext-php-rs-bindings in Goldziher/ai-rulez) into .claude/skills/ext-php-rs-bindings in your project. Claude Code loads it when a task matches its description.

How do I install Ext Php Rs Bindings in Codex?

Run `npx skills add Goldziher/ai-rulez --skill ext-php-rs-bindings -a codex`. Or copy the skill folder (internal/builtins/bindings/ext-php-rs/skills/ext-php-rs-bindings in Goldziher/ai-rulez) into .agents/skills/ext-php-rs-bindings in your project. Codex loads it when a task matches its description.

Can I use Ext Php Rs Bindings in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Goldziher/ai-rulez --skill ext-php-rs-bindings -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ext-php-rs-bindings, .gemini/skills/ext-php-rs-bindings, .github/skills/ext-php-rs-bindings and .opencode/skills/ext-php-rs-bindings in your project.

What does Ext Php Rs Bindings need to run?

Going by SKILL.md and its folder, Ext Php Rs Bindings needs the command-line tools its instructions call (cargo and php).

Does Ext Php Rs Bindings access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Ext Php Rs Bindings safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Ext Php Rs Bindings use?

Ext Php Rs Bindings is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Ext Php Rs Bindings use?

About 357 tokens (SKILL.md is roughly 1.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Ext Php Rs Bindings?

Skills that share tags, products or a category with Ext Php Rs Bindings: Spikard (Goldziher/spikard, 123 stars), Security Review (github/awesome-copilot, 40k stars), SDK Implementation Guide (macalbert/envilder, 138 stars) and Phy Regex Audit (LeoYeAI/openclaw-master-skills, 2.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ext Php Rs Bindings?

Goldziher (a GitHub user) maintains it in Goldziher/ai-rulez, which has 158 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on October 8, 2026.

Source: Goldziher/ai-rulez on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.