Download the PHP package skim/framework without Composer
On this page you can find all versions of the php package skim/framework. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package framework
SKIM Framework
A modern, fast PHP 8.5+ micro-framework. Zero magic, PSR-style casing (PascalCase classes, camelCase methods), Docker-ready.
Requirements
- PHP 8.5+
- Composer 2
- Docker + Docker Compose (recommended)
Quick start
Project structure
Configuration
Two sources of config, one priority order
| Source | Used when |
|---|---|
.env file |
Local development — easy to edit |
| OS environment variables (Docker / CI / production) | Deployment — no files on server |
Important: OS environment variables take priority over .env.
This means values set in docker-compose.yml environment: block or passed by
Kubernetes/CI will override whatever is in .env. The .env file is the fallback
for when no OS variable is set — i.e., plain local dev without Docker.
Compiled Cache (Production)
For maximum performance in production, pre-compile config and env into OPcache-friendly PHP arrays:
This generates storage/cache/{env,config,extensions}.php — pure return [...] files
that bypass all parsing overhead on every request. In development (APP_DEBUG=true),
the framework automatically falls back to raw parsing when source files change.
Config files
All config is plain PHP arrays — no YAML, no INI. IDE autocomplete works out of the box.
APP_KEY
32-byte secret for signing cookies and encrypting session data. Generate with:
Routing
Database
Raw queries with query_gen
Active Record
Multiple DB connections
The alt connection ships as an example of a secondary database
kept separate from the primary transactional DB — so slow queries cannot
block the main application.
Cache
Drivers: redis (primary), file (fallback), array (tests).
If Redis is unreachable, the cache silently falls back to the file driver.
Views
Pure PHP templates — no Twig, no Blade.
Middleware
Built-in: cors, RateLimit, ToolbarMiddleware (injects debug toolbar in HTML responses when APP_DEBUG=true).
CLI commands
Agent-friendly CLI output
Use --agent when an LLM agent, shell script, or parser needs concise output:
--agent implies --quiet and --no-ansi, disables the interactive help menu,
removes the banner and timing footer, and prints help / list as tab-separated
rows: command<TAB>usage<TAB>description. Unknown commands and uncaught command
errors are reported as one-line tab-separated messages on STDERR.
Docs commands (dev only — disabled in production)
llm.md is committed to the repo root — paste it into any LLM when no tooling is available.
Use --source and --output for isolated documentation builds without overwriting the root docs files:
With --output, the generator writes llm.json, llm.md, and all generated *.mdx files directly into that directory.
If multiple extracted classes share the same class name, MDX filenames include the source filename to avoid overwrites.
Write your own command
Testing
Tests use SQLite :memory: for DB and array driver for cache — no real services needed.
Docker services
| Service | Image | Port | Purpose |
|---|---|---|---|
app |
PHP 8.5 Alpine | 8080, 5173 | Application + Vite dev server |
mysql |
MySQL 8.0 | 3306 | Primary database (skim_dev) |
pgsql |
PostgreSQL 16 | 5432 | Alternative database (skim_alt) |
redis |
Redis 7 | — | Cache + Queue + Sessions |
MCP server
SKIM ships a stdio MCP server so tool-capable LLMs (Claude Code, Cursor) can query the framework's @ai.* annotations directly.
Wire into Claude Code
Wire into Cursor
Or install the npm wrapper for registry-based clients:
Available MCP tools
| Tool | Description |
|---|---|
skim_class(name) |
Summary, lifecycle, owner, file path |
skim_method(class, method) |
Signature, contracts, invariants, non_goals, side_effects, perf, throws |
skim_search(query) |
Fuzzy search across class names, methods, and contract text |
skim_lifecycle() |
Boot order and request lifecycle |
skim_non_goals() |
All @ai.non_goal entries grouped by class |
Pre-commit hook (recommended)
Catch annotation regressions before they reach CI:
Key design decisions
- Conventional PHP casing — PascalCase classes, camelCase methods, UPPER_SNAKE constants.
HomeController, nothome_controller. - No template engines — raw PHP with opcache is ~3x faster than Twig/Blade; real stack traces.
- Static facades (
Db::,Cache::,Log::) — each hasreset()andsetDriver()for test isolation. - Lazy connections — DB and Redis are not opened until the first actual query.
- Fail-open cache — Redis failure falls back to file driver silently; app keeps running.
- PHP arrays for config — no YAML/INI parser, IDE autocomplete works natively.
strict_types=1everywhere — no implicit type coercion.