gamerz-file-explorer: Instructions file for Claude Code

CLAUDE.md

gamerz-file-explorer CLAUDE.md is an instructions file for Claude Code from lesterchan/gamerz-file-explorer. It costs 1,500 tokens per session, scanned A, original, MIT.

Project guidance for a small PHP web app that displays, searches, previews, and downloads files from a configured folder. It uses plain PHP without a framework, package manager, or database.

In plain words
What is it for?
Use it when changing file listings, search, previews, downloads, settings, error pages, or the shared HTML helpers.
Why use it?
It explains where each part of the app belongs and helps changes follow its simple installation and coding conventions.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

This is lesterchan/gamerz-file-explorer's own configuration. It tells Claude Code how to work on gamerz-file-explorer itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything gamerz-file-explorer configures →

Reuse

Borrowing it

Nothing to install: this file belongs to lesterchan/gamerz-file-explorer. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/lesterchan/gamerz-file-explorer/master/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/lesterchan/gamerz-file-explorer

Made for: Claude Code.

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 gamerz-file-explorer CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/lesterchan/gamerz-file-explorer/claude-md/github.svg)](https://agentmods.dev/instructions/lesterchan/gamerz-file-explorer/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/lesterchan/gamerz-file-explorer/claude-md"><img src="https://agentmods.dev/badge/instructions/lesterchan/gamerz-file-explorer/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gamerz-file-explorer CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/lesterchan/gamerz-file-explorer/claude-md"><img src="https://agentmods.dev/badge/instructions/lesterchan/gamerz-file-explorer/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,500 This file is loaded in full into every session.
When invoked 1,500 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.01500 $0.01500
Opus 5 $0.00750 $0.00750
Sonnet 5 $0.00300 $0.00300
Haiku 4.5 $0.00150 $0.00150

Measured 10d ago against content hash d3cc35c2f550, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

gamerz-file-explorer 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 10d 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 · 84 lines

How it starts

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

CLAUDE.md

Guidance for working in the GaMerZ File Explorer codebase.

What this is

A single-directory PHP web app (no framework, no Composer, no database) that lists, searches, views, and downloads the contents of a configured root folder — styled like Windows Explorer. Procedural PHP, distributed as a set of files users drop into a web directory.

Layout

File Role
config.php Site constants (GFE_ROOT_DIR, GFE_ROOT_URL, GFE_URL, names, toggles). Edited per-install.
settings.php Ignore lists ($ignore_files, $ignore_ext, $ignore_folders), inline-view lists ($text_ext/$image_ext/$video_ext/$audio_ext), extension→label/icon map, and GFE_VERSION.
functions.php Shared helpers and the HTML templates (template_header, template_footer, breadcrumbs, display_error, listing/sort helpers).
index.php Directory listing. Reads $_GET['dir'], by, order.
search.php Search UI + results. Reads $_GET['search'], in, by, order.
view.php View (text/image/PDF/video/audio) or download a file. Reads $_GET['file'], dl.
404.php Error page.

Every entry point starts with require 'config.php'; require 'settings.php'; require 'functions.php'; in that order.

Conventions

  • PHP 8.1+, declare(strict_types=1), PSR-12, 4-space indent, short array syntax [], snake_case functions/vars, GFE_-prefixed SCREAMING_SNAKE constants, ' . $x . ' concatenation spacing throughout. .editorconfig and phpcs.xml.dist are authoritative.
  • settings.php returns a settings array; entry points do $settings = require 'settings.php'; and pass it into the functions.php helpers. There is no shared global state.
  • When outputting any dynamic value (filenames, paths, search terms, request values), escape it at the point of output with esc($value) — the functions.php helper for htmlspecialchars($value, ENT_QUOTES, 'UTF-8') (the only place that raw call should appear). Pass raw values to url() — it URL-encodes the path internally, so esc() the display copy rather than the raw value. url() can also return a ?by=&order= query string (a non-default sort), so also esc() its result wherever it lands in markup (an href), not just the display copy.
  • urldecode() the incoming dir/file request values before using them and before the traversal check in index.php/view.php — reject any . or .. path segment (explode('/') then in_array) plus a literal //, so a bare .. with no trailing slash can't list the parent of the web root. Nice-URLs encode a space as +, which the web server passes as %2B; skipping the decode breaks paths with spaces (the 3.0.0 regression). Keep that decode-then-check order for any new path input.
  • settings.php ignore lists keep internal files (config.php, functions.php, the Composer/PHPStan/PHPCS/PHPUnit files, the README/LICENSE/AGENTS.md/CLAUDE.md metadata, …) out of listings; add new internal files there. Hiding is not access control — the .htaccess/Nginx deny rules and the CLI-only guard in tests/ are what stop the web server serving dev/tooling files. Keep them in place.
  • Frontend is Bootstrap 5.3 + Font Awesome 6 loaded from cdnjs with SRI hashes, no jQuery. If you bump a CDN version, update its integrity hash too.
  • Custom styling and behaviour live in resources/style.css and resources/script.js, linked from functions.php with a ?v=GFE_VERSION cache-buster (resources/ is served statically and is in $ignore_folders). The stylesheet defines light/dark design tokens keyed off data-bs-theme and maps Font Awesome classes (.fa-file-pdf, .fa-folder, …) to category CSS variables; the script wires the three-way theme switch (data-gfe-theme, auto/light/dark, persisted to localStorage), the clickable rows, and highlight.js. The one inline script is the tiny theme-detection snippet in <head> that sets data-bs-theme before paint to avoid a flash — keep it inline. Keep style.css comment-free and bump GFE_VERSION for visible style changes (so the cache-buster updates).
  • view.php embeds PDFs inline with <object> (with an open/download fallback for browsers that can't render it), and video/audio with <video>/<audio>. The PDF <object> needs the site CSP to allow object-src 'self'; <video>/<audio> rely on media-src. Only browser-playable $video_ext/$audio_ext embed; everything else downloads.

Read the full file on GitHub · 84 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. 10d ago First seen · 84 lines · 1,500 tokens per session scan A d3cc35c2f550

Subscribe to this mod's changes

gamerz-file-explorer CLAUDE.md is an instructions file published in the GitHub repository lesterchan/gamerz-file-explorer (23 stars, last pushed 1mo ago), licensed MIT. It adds 1,500 tokens to every session, about $0.0075 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 instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens