← Back to Skills

php-syntax-validator

v1.0.0 approved Development updated today
USK v3 ✅ Verified
⬇ Download
Install Guide↓
🤖 Agent install commands (curl / MCP / Claude Desktop)
▸ curl one-liner
curl -L -o php-syntax-validator.skill   "https://aiskillstore.io/v1/agent/skills/7249120a-6068-4d8c-bcd1-2e4cfd9fa46b/download?platform=ClaudeCode"
▸ MCP tool call (after registering Skill Store MCP)
{
  "tool": "download_skill",
  "arguments": {
    "skill_id": "7249120a-6068-4d8c-bcd1-2e4cfd9fa46b",
    "platform": "ClaudeCode"
  }
}
▸ Claude Desktop / Cursor MCP config (one-time)
{
  "mcpServers": {
    "skill-store": {
      "url": "https://aiskillstore.io/mcp/"
    }
  }
}
📖 Full agent API guide: /llms.txt  ·  MCP server card

Validates PHP code syntax using php -l (built-in lint). Returns structured JSON with error line numbers, messages, and types. Designed as a deterministic validation anchor for agent self-repair loops.

# php # syntax # lint # validator # static-analysis

Basic Info

Owner 👤 aiskillstore-team Category Development Registered 2026-06-15 Last Updated 2026-06-15 Latest Version 1.0.0 Packaged At 2026-06-15 Vetting Status approved Downloads 0 Checksum (SHA256) 67447d0f0677a2b9cf9419a1be813db00b6e22c3ad238830d2fa64bc8f4644e6

⚡ AGENT INFO USK v3

Capabilities
php_syntax_check code_validation lint agent_self_repair static_analysis
Permissions
✗ network
✓ filesystem
✓ subprocess
Interface
type: cli   entry_point: main.py   runtime: python3   call_pattern: stdin_stdout
Agent API
# 스킬 스키마 조회 (에이전트가 호출 방법을 파악) GET /v1/agent/skills/7249120a-6068-4d8c-bcd1-2e4cfd9fa46b/schema # 플랫폼별 자동 변환 다운로드 GET /v1/agent/skills/7249120a-6068-4d8c-bcd1-2e4cfd9fa46b/download?platform=OpenClaw GET /v1/agent/skills/7249120a-6068-4d8c-bcd1-2e4cfd9fa46b/download?platform=ClaudeCode GET /v1/agent/skills/7249120a-6068-4d8c-bcd1-2e4cfd9fa46b/download?platform=ClaudeCodeAgentSkill GET /v1/agent/skills/7249120a-6068-4d8c-bcd1-2e4cfd9fa46b/download?platform=Cursor GET /v1/agent/skills/7249120a-6068-4d8c-bcd1-2e4cfd9fa46b/download?platform=GeminiCLI GET /v1/agent/skills/7249120a-6068-4d8c-bcd1-2e4cfd9fa46b/download?platform=CodexCLI GET /v1/agent/skills/7249120a-6068-4d8c-bcd1-2e4cfd9fa46b/download?platform=CustomAgent

Installation

Compatible Platforms any

1
Install the skill using openclaw_skill_manager.py.
python openclaw_skill_manager.py --install php-syntax-validator
2
Verify installation
python openclaw_skill_manager.py --list-installed
3
Install a specific version (optional)
python openclaw_skill_manager.py --install php-syntax-validator --version 1.0.0
1
Download the skill package.
curl -O https://aiskillstore.io/v1/skills/7249120a-6068-4d8c-bcd1-2e4cfd9fa46b/download
2
Place it in the Claude Code commands directory.
unzip php-syntax-validator.skill -d ~/.claude/commands/php-syntax-validator/
3
Use it as a slash command in Claude Code.
/php-syntax-validator
1
Download the Agent Skills package.
curl -O https://aiskillstore.io/v1/agent/skills/7249120a-6068-4d8c-bcd1-2e4cfd9fa46b/download?platform=ClaudeCodeAgentSkill
2
Unzip it into the Claude Code skills directory.
unzip php-syntax-validator-agent-skill-*.skill -d ~/.claude/skills/php-syntax-validator/
3
Restart Claude Code — the skill is auto-loaded at session start. No slash command needed.
1
Download the Cursor-converted package.
curl -O https://aiskillstore.io/v1/agent/skills/7249120a-6068-4d8c-bcd1-2e4cfd9fa46b/download?platform=Cursor
2
Unzip and place it in a permanent location.
unzip php-syntax-validator-cursor-*.skill -d ~/.cursor/skills/php-syntax-validator/
3
Add the MCP server config to .cursor/mcp.json, then restart Cursor.
cat ~/.cursor/skills/php-syntax-validator/cursor_mcp_config.json
1
Download the Gemini CLI-converted package.
curl -O https://aiskillstore.io/v1/agent/skills/7249120a-6068-4d8c-bcd1-2e4cfd9fa46b/download?platform=GeminiCLI
2
Unzip and place it in a permanent location.
unzip php-syntax-validator-geminicli-*.skill -d ~/.gemini/skills/php-syntax-validator/
3
Add the MCP server config to ~/.gemini/settings.json, then restart Gemini CLI.
cat ~/.gemini/skills/php-syntax-validator/gemini_settings_snippet.json
1
Download the Codex CLI-converted package.
curl -O https://aiskillstore.io/v1/agent/skills/7249120a-6068-4d8c-bcd1-2e4cfd9fa46b/download?platform=CodexCLI
2
Unzip and place it in a permanent location.
unzip php-syntax-validator-codexcli-*.skill -d ~/.codex/skills/php-syntax-validator/
3
Add the MCP server config to ~/.codex/config.toml, then restart Codex CLI.
cat ~/.codex/skills/php-syntax-validator/codex_config_snippet.toml
1
Download the skill package via REST API.
GET https://aiskillstore.io/v1/skills/7249120a-6068-4d8c-bcd1-2e4cfd9fa46b/download
2
Place it in your agent platform's skills directory.
cp php-syntax-validator.skill ./skills/
3
Fetch platform-specific details via the Install Guide API.
GET https://aiskillstore.io/v1/skills/7249120a-6068-4d8c-bcd1-2e4cfd9fa46b/install-guide?platform=CustomAgent

Security Vetting Report

Vetting Result CAUTION

Findings: ['USK v3 경고: 이 스킬은 자동 변환 조건을 충족하지 않아 manual_install로 처리됩니다']

✅ No security risks found.

AI Review Stage

Reviewer gemini Risk Level 🟢 Low Review Summary PHP 코드의 문법 검사를 안전하게 수행하며, 선언된 권한 범위 내에서 동작합니다.
Reasoning

1. **선언된 권한 일치:** 스킬 메타데이터에 선언된 `network: false`, `filesystem: true`, `subprocess: true` 권한이 코드의 실제 동작과 정확히 일치합니다. 임시 파일을 생성하고 삭제하는 `tempfile.NamedTemporaryFile`, `os.unlink` 및 외부 프로그램(`php -l`)을 실행하는 `subprocess.run` 외에 다른 권한을 요구하는 작업은 없습니다. 2. **악의적 목적 없음:** 코드는 PHP 코드의 문법 검사라는 명확한 목적을 가지고 있으며, 이를 위해 `php -l` 명령을 안전하게 호출합니다. `subprocess.run` 호출 시 `shell=True`를 사용하지 않고 인자 리스트를 직접 전달하여 셸 인젝션 공격을 방지합니다. 사용자 입력 코드를 임시 파일에 저장한 후 검사하며, 이 과정에서 시스템 파괴, 데이터 탈취, 또는 기타 악의적인 행위를 시도하는 코드는 발견되지 않았습니다. 코드 난독화도 없습니다. 3. **외부 통신 없음:** 네트워크 관련 라이브러리(예: `requests`, `urllib`, `socket`)를 사용하지 않으며, 외부 네트워크 통신을 시도하는 코드가 없습니다. 4. **사용자 데이터 처리:** 사용자로부터 받은 PHP 코드를 문법 검사용으로만 사용하고, 어떠한 형태로도 저장하거나 무단으로 외부에 전송하지 않습니다. 5. **코드 품질 및 목적 일치:** 스킬의 설명에 따라 PHP 코드의 문법 검사 기능을 충실히 구현하고 있습니다. `php` CLI 도구를 찾지 못하거나 타임아웃이 발생하는 경우에 대한 예외 처리도 포함되어 있습니다. 입력 스키마와 출력 스키마를 잘 따르고 있으며, `<?php` 태그 자동 추가 기능도 사용자 편의성을 높입니다. 정적 분석 결과의 `status: caution`은 `subprocess` 사용에 대한 일반적인 경고일 수 있으나, `red_flags_found`가 비어있고 코드 분석 결과 `subprocess` 사용이 안전하게 이루어지고 있음을 확인했습니다.

Version History

Version USK v3 Vetting Status Packaged At Downloads Changelog
v1.0.0 approved 2026-06-15 ⬇ 0 Initial release

Examples 7

Representative input/output examples for this skill. Agents can use these to understand how to invoke the skill and what output to expect.

valid_php_code
# valid# function# basic

Valid PHP function definition — expects valid=true

📥 Input
{
  "code": "\u003c?php\nfunction greet(string $name): string {\n    return \"Hello, \" . $name . \"!\";\n}\necho greet(\"World\");\n"
}
📤 Output
{
  "errors": [],
  "php_version": "8.5.3",
  "valid": true,
  "warnings": []
}
missing_semicolon
# invalid# semicolon# parse-error

PHP code with a missing semicolon on line 3 — expects Parse error

📥 Input
{
  "code": "\u003c?php\n$x = 10;\n$y = 20\necho $x + $y;\n"
}
📤 Output
{
  "errors": [
    {
      "line": 4,
      "message": "Parse error: syntax error, unexpected token \"echo\"",
      "type": "Parse error"
    }
  ],
  "php_version": "8.5.3",
  "valid": false,
  "warnings": []
}
unbalanced_braces
# invalid# braces# parse-error

PHP code with unmatched closing brace — expects error at end

📥 Input
{
  "code": "\u003c?php\nfunction test() {\n    $arr = [1, 2, 3];\n    foreach ($arr as $v) {\n        echo $v;\n    }\n}\n}\n"
}
📤 Output
{
  "errors": [
    {
      "line": 8,
      "message": "Parse error: syntax error, unexpected token \"}\"",
      "type": "Parse error"
    }
  ],
  "php_version": "8.5.3",
  "valid": false,
  "warnings": []
}
no_php_tag_auto_prepend
# valid# no-tag# auto-prepend

PHP code without opening tag — skill auto-prepends <?php and validates

📥 Input
{
  "code": "$greeting = \"hello\";\necho strtoupper($greeting);\n"
}
📤 Output
{
  "errors": [],
  "php_version": "8.5.3",
  "valid": true,
  "warnings": []
}
heredoc_terminator_violation
# invalid# heredoc# parse-error

Heredoc with invalid indented terminator — expects Parse error

📥 Input
{
  "code": "\u003c?php\n$text = \u003c\u003c\u003cEOT\nLine one\nLine two\n  EOT;\necho $text;\n"
}
📤 Output
{
  "errors": [
    {
      "line": 5,
      "message": "Parse error: Invalid body indentation level",
      "type": "Parse error"
    }
  ],
  "php_version": "8.5.3",
  "valid": false,
  "warnings": []
}
empty_code_error
# error# empty# edge-case

Empty string input — expects EMPTY_CODE error

📥 Input
{
  "code": ""
}
📤 Output
{
  "error": {
    "code": "EMPTY_CODE",
    "message": "Input code is empty. Provide PHP source code to validate."
  },
  "errors": [],
  "php_version": "",
  "valid": false,
  "warnings": []
}
version_hint_informational
# valid# version-hint# arrow-function

Code with php_version_hint provided — hint is echoed in output, does not change behavior

📥 Input
{
  "code": "\u003c?php\n$arr = array_map(fn($x) =\u003e $x * 2, [1, 2, 3]);\nvar_dump($arr);\n",
  "php_version_hint": "8.1"
}
📤 Output
{
  "errors": [],
  "php_version": "8.5.3",
  "php_version_hint": "8.1",
  "valid": true,
  "warnings": []
}

All examples are also available via the agent API: /v1/agent/skills/7249120a-6068-4d8c-bcd1-2e4cfd9fa46b/schema

Reviews & Ratings

No reviews yet. Be the first to leave one!

✍️ Write a Review