sc-lang-php

sc-lang-php is a skill for Claude Code, Codex from ersinkoc/security-check. It costs 10 tokens per session (1,996 once invoked), scanned A, original, MIT.

A PHP-focused security review that checks code for common PHP vulnerabilities, including unsafe deserialization, type confusion, file-inclusion attacks, and Laravel or WordPress issues.

In plain words
What is it for?
Use it when a project contains PHP, especially Laravel or WordPress code. It helps inspect unsafe input handling, file includes, serialized data, and related configuration mistakes.
Why use it?
General security checks can miss risks caused by PHP's older functions, type rules, and common framework settings. This review focuses attention on those PHP-specific problems.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/ersinkoc/security-check/sc-lang-php
Any agent
npx skills add ersinkoc/security-check --skill sc-lang-php
Clone the repo
git clone --depth 1 https://github.com/ersinkoc/security-check

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 sc-lang-php

README.md
[![agentmods](https://agentmods.dev/badge/skills/ersinkoc/security-check/sc-lang-php.svg)](https://agentmods.dev/skills/ersinkoc/security-check/sc-lang-php)
Your own site
<a href="https://agentmods.dev/skills/ersinkoc/security-check/sc-lang-php"><img src="https://agentmods.dev/badge/skills/ersinkoc/security-check/sc-lang-php.svg" alt="Measured on agentmods" height="20"></a>
Per session 10 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,996 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00010 $0.01996
Opus 5 $0.00005 $0.00998
Sonnet 5 $0.00002 $0.00399
Haiku 4.5 $0.00001 $0.00200

Measured 4d ago against content hash ad261e886efa, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

sc-lang-php 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 4d 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/sc-lang-php/SKILL.md · 274 lines

How it starts

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

SC: PHP Security Deep Scan

Purpose

Detects PHP-specific security anti-patterns including deserialization gadgets, type juggling, include-based attacks, and framework-specific vulnerabilities in Laravel and WordPress. Focuses on PHP's unique type system, legacy functions, and common misconfigurations.

Activation

Activates when PHP is detected in security-report/architecture.md.

Checklist Reference

References references/php-security-checklist.md.

PHP-Specific Vulnerability Patterns

Category 1: unserialize() POP Chains

// VULNERABLE: Unserializing user input → RCE via magic methods
$data = unserialize($_POST['data']); // __wakeup, __destruct chain

// SAFE: Use JSON or restrict classes
$data = json_decode($_POST['data'], true);
$data = unserialize($input, ['allowed_classes' => false]);

Category 2: phar:// Deserialization

// VULNERABLE: phar:// triggers deserialization without unserialize()
file_exists("phar://" . $_GET['file']); // Triggers metadata deserialization!
// Also: file_get_contents, fopen, is_dir, etc.

// SAFE: Validate file path, never use user input in phar://

Category 3: include/require LFI/RFI

// VULNERABLE: User input in include path
include($_GET['page'] . '.php'); // LFI: ?page=../../etc/passwd%00

// SAFE: Allowlist
$allowed = ['home', 'about', 'contact'];
$page = in_array($_GET['page'], $allowed) ? $_GET['page'] : 'home';
include($page . '.php');

Category 4: extract() Variable Overwrite

// VULNERABLE: Overwrites existing variables including auth vars
extract($_POST); // If POST contains 'isAdmin=1' → $isAdmin = 1

// SAFE: Never use extract() on user input; use specific variables
$name = $_POST['name'];

Category 5: Type Juggling (== vs ===)

// VULNERABLE: Loose comparison type juggling
if ($_POST['password'] == $storedHash) { /* ... */ } // "0" == "0e462097..." is TRUE!
if (strcmp($_POST['token'], $expectedToken) == 0) { /* ... */ }
// strcmp([], "string") returns NULL, and NULL == 0 is TRUE!

// SAFE: Strict comparison
if ($_POST['password'] === $storedHash) { /* ... */ }
if (hash_equals($expectedToken, $_POST['token'])) { /* ... */ }

Read the full file on GitHub · 274 lines

Files

What ships with it

1 file 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. 4d ago First seen · 274 lines · 10 tokens per session scan A ad261e886efa

Subscribe to this mod's changes

sc-lang-php is a skill published in the GitHub repository ersinkoc/security-check (56 stars, last pushed 1mo ago), licensed MIT. It adds 10 tokens to every session and 1,996 once invoked, about $0.0001 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-actions

Build, refactor, and troubleshoot Laravel Actions using lorisleiva/laravel-actions. Use when implementing reusable action classes (object/controller/job/listener/command), converting service classes/controllers/jobs into actions, orchestrating workflows via faked actions, or debugging action entrypoints and wiring.

coollabsio/coolify · 62 tokens

laravel-best-practices

Apply this skill whenever writing, reviewing, or refactoring Laravel PHP code. This includes creating or modifying controllers, models, migrations, form requests, policies, jobs, scheduled commands, service classes, and Eloquent queries. Triggers for N+1 and query performance issues, caching strategies, authorization…

coollabsio/coolify · 114 tokens

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

laravel-best-practices

Apply this skill whenever writing, reviewing, or refactoring Laravel PHP code. This includes creating or modifying controllers, models, migrations, form requests, policies, jobs, scheduled commands, service classes, and Eloquent queries. Triggers for N+1 and query performance issues, caching strategies, authorization…

laravel/boost · 114 tokens

owl-admin-devtools-generator

Use this skill for Owl Admin development tools, code generator, dynamic API templates, relationships, visual pages, generated CRUD code, app/ApiTemplates, Support/Apis, Support/CodeGenerator, Controllers/DevTools, or questions about “代码生成器”, “动态 API”, “API 模板”, “关系管理”, “可视化页面”, and “生成 CRUD”.

slowlyo/owl-admin · 82 tokens

create-module

Scaffold a new Marko module — a self-contained Composer package with composer.json, namespaced src/, and Pest tests. Use this skill whenever the user asks to create, add, or scaffold a new Marko module or package. Concrete triggers: 'create a module named payment', 'scaffold an acme/blog package', 'add a new module…

marko-php/marko · 120 tokens