Lychee copilot-instructions.md

A set of coding rules for LycheeOrg/Lychee, a web application built with PHP and Vue 3. It covers PHP, application structure, user-interface code, and documentation.

In plain words
What is it for?
Use it when writing or reviewing PHP, TypeScript, Vue 3, application, or documentation code in Lychee. It provides rules for naming, files, components, requests, and related project conventions.
Why use it?
It helps an agent produce changes that match the project's existing style and avoid common mistakes, such as unsafe comparisons, incorrect file structure, or using the wrong UI conventions.

Instructions file for GitHub Copilot

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/lycheeorg/lychee/copilot-instructions
Clone the repo
git clone --depth 1 https://github.com/LycheeOrg/Lychee

Made for: GitHub Copilot.

Per session 650 This file is loaded in full into every session.
When invoked 650 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.00650 $0.00650
Opus 5 $0.00325 $0.00325
Sonnet 5 $0.00130 $0.00130
Haiku 4.5 $0.00065 $0.00065

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

Security

Grade A, and why

Lychee copilot-instructions.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.

.github/copilot-instructions.md · 58 lines

How it starts

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

Quick Reference for GitHub Copilot

For comprehensive coding standards, see docs/specs/3-reference/coding-conventions.md

This file provides quick hints for GitHub Copilot during real-time code completion.


Conventions for PHP

  • Any new file should contain the license header and has a single blank line after the opening PHP tag.
  • The variable name should be in snake_case.
  • We apply the PSR-4 coding standard.
  • in_array() should be used with true as the third parameter.
  • Only booleans should be used in if statements, not integers or strings.
  • Use strict comparison (===) instead of loose comparison (==).
  • Avoid code duplication in both if and else statements.
  • Do not use empty()

Convention for the Application

  • In Requests, if a user is provided by the query it is placed in the $this->user2.
  • In Requests, $this->user is reserved for the user making the request.
  • The Resource classes should extend from Spatie Data instead of JsonResource.
  • We do not use blade view, we use Vue3 instead.

Conventions for Vue3

  • Use Typescript in composition API for Vue3. Use PrimeVue for UI components.
  • Do not use await async calls in Vue3, use .then() instead.
  • Do not use const function = () => {}, use function functionName() {} instead.
  • the comes first, then , then .
  • axios requests should be in the services/ directory and make use of ${Constants.getApiUrl()} to specify the base URL.

Documentation Conventions

  • Use Markdown format for documentation.
  • At the bottom of the file, add an hr line followed by "Last updated: [date of the update]"

Testing Conventions

  • Tests in the tests/Unit directory should extend from AbstractTestCase.
  • Tests in the tests/Feature_v2 directory should extend from BaseApiWithDataTest.
  • No need to mock the database in tests, we use the in-memory SQLite database instead.

Working with Money and Currency

When dealing with monetary values in PHP, it's crucial to handle them with precision to avoid rounding errors and inaccuracies. Here are how we handle money and currency in our application: we use the moneyphp/money library, which provides a robust way to manage monetary values and currencies.

Read the full file on GitHub · 58 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 · 58 lines · 650 tokens per session scan A c874f30d9dcc

Subscribe to this mod's changes

Lychee copilot-instructions.md is an instructions file published in the GitHub repository LycheeOrg/Lychee (4,267 stars, last pushed today), licensed MIT. It adds 650 tokens to every session, about $0.0032 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.