marko CLAUDE.md

A set of instructions for developing Marko, a PHP framework, including its coding principles and project commands. It explains how to run tests, code checks, static analysis, and continuous-integration checks.

In plain words
What is it for?
Use it when changing Marko code, running the full test suite, checking code style, measuring test coverage, or verifying that continuous-integration checks pass.
Why use it?
It gives the coding agent the project’s expected working rules and makes important checks easier to run consistently.

Instructions file

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 instructions/marko-php/marko/claude-md
Clone the repo
git clone --depth 1 https://github.com/marko-php/marko
Per session 865 This file is loaded in full into every session.
When invoked 865 The same file — it is already loaded in full.
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.00865 $0.00865
Opus 5 $0.00432 $0.00432
Sonnet 5 $0.00173 $0.00173
Haiku 4.5 $0.00086 $0.00086

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

Security

Grade A, and why

marko CLAUDE.md 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 2d 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.

CLAUDE.md · 87 lines

How it starts

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

Marko Framework

Marko is a modular PHP 8.5+ framework combining Magento's extensibility with Laravel's developer experience.

Core Principles

  1. Loud errors - No silent failures, helpful messages
  2. Explicit over implicit - No magic, everything discoverable
  3. Pragmatically opinionated - Guide toward better patterns, grounded in real-world needs
  4. True modularity - Interface/implementation split, clean boundaries
  5. No pseudo-functionality - Don't build fake features to demonstrate concepts; only build real functionality when core supports it. If there's nothing meaningful to build, build nothing.

Commands

# Run tests (fast — excludes slow destructive integration tests)
composer test

# Run all tests including destructive integration tests
composer test:all

# Run with coverage
./vendor/bin/pest -c phpunit.xml --parallel --exclude-group=integration-destructive --coverage --min=80

# Lint (check)
./vendor/bin/phpcs

# Lint (fix)
./vendor/bin/php-cs-fixer fix

# Static analysis — NOT part of composer test; must be zero errors
composer phpstan

# Everything the CI gate runs (tests + lint + static analysis)
composer ci

Every PR is gated by the CI workflow on Tests, Lint, and Static analysis. A red check blocks the merge; develop never carries a failing test, lint error, or PHPStan error.

Key Conventions

  • Branch naming - all branches use feature/{name} format, regardless of change type (fix, feature, refactor, docs, etc.). Never use fix/, chore/, or other prefixes
  • No hardcoded versions in composer.json - never add "version" to package composer.json files; let Composer infer from the branch
  • Constructor property promotion - always use it
  • Strict types - every file needs declare(strict_types=1)
  • No magic methods - be explicit
  • No final classes - blocks Preferences (extensibility)
  • readonly - use when appropriate for immutability, not as blanket rule
  • Type declarations - required on all parameters, returns, properties

Read the full file on GitHub · 87 lines

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. 2d ago First seen · 87 lines · 865 tokens per session scan A 9894ef79a420

Subscribe to this mod's changes

marko CLAUDE.md is an instructions file published in the GitHub repository marko-php/marko (393 stars, last pushed 3d ago), licensed MIT. It adds 865 tokens to every session, about $0.0043 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.