XKeen-UI
AGENTS.md462 starsChanged 6 days agoMITView on GitHub
This document defines the project architecture, development conventions, and guidelines for AI coding agents. XKeen UI is a web-based management interface and extension for XKeen, designed for Keenetic/Netcraze routers. Frontend - React - TypeScript - Bun - Vite - Tailwind CSS - shadcn/ui Backend - Tokio - Axum The application targets resource-constrained routers running KeeneticOS/Entware on Linux. Keep runtime resource usage and binary size in mind. Before implementing changes: After implementing changes: Do not claim that a check passed unless…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 33,315 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repositoryOne other file it gives its agents.
- shadcnSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
26 rules. About 0 are common, 26 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈26
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 40
Follow the existing project architecture and coding patterns.
- Distinctive: line 42
Prefer native, official, and recommended APIs and approaches.
- Distinctive: line 43
Avoid unnecessary complexity, duplicated logic, and premature abstractions.
- Distinctive: line 44
Keep changes focused and avoid modifying unrelated code.
- Distinctive: line 45
Do not reinvent existing functionality when a suitable solution is already available.
- Distinctive: line 49
Prefer existing shadcn/ui components when implementing UI elements.
- Distinctive: line 50
Follow the established component structure and styling conventions.
- Distinctive: line 52
Ensure components are responsive and accessible.
- Distinctive: line 54
Use monospace fonts only for editors, logs, and code snippets (JSON/YAML), not regular UI elements.
- Distinctive: line 55
Use tailwind css classes, avoid using any inline styles if possible.
- Distinctive: line 56
Avoid introducing custom components when an existing shadcn/ui component can fulfill the requirement.
- Distinctive: line 60
Prefer Tokio-compatible asynchronous APIs.
- Distinctive: line 61
Avoid blocking operations inside asynchronous execution contexts.
- Distinctive: line 64
Keep API behavior consistent with existing endpoints and response formats.
- Distinctive: line 68
Check existing dependencies before adding new ones.
- Distinctive: line 69
Prefer established libraries over custom implementations when they meaningfully reduce boilerplate or maintenance.
- Distinctive: line 70
Avoid unnecessarily heavy dependencies, especially in the router-targeted backend.
- Distinctive: line 71
Consider compatibility with all supported architectures and build targets.
- Distinctive: line 84
Run relevant formatting, linting, and type checks.
- Distinctive: line 85
Run tests related to the modified functionality.
- Distinctive: line 86
Verify that the frontend/backend builds successfully when applicable.
- Distinctive: line 87
Check compatibility with supported target architectures when backend build behavior is affected.
- Distinctive: line 89
Do not claim that a check passed unless it was actually executed successfully.
- Distinctive: line 93
Run commands from the corresponding project directory.
- Distinctive: line 125
Read the relevant skill instructions before performing tasks covered by them.
- Distinctive: line 126
Do not load unrelated skills.
≈ “Common” is an estimate: at least 1 in 5 of the 42,283 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent Guide for XKeen UI
This document defines the project architecture, development conventions, and guidelines for AI coding agents.
Project Overview
XKeen UI is a web-based management interface and extension for XKeen, designed for Keenetic/Netcraze routers.
- Managing the XKeen service.
- Managing Xray-core and Mihomo configurations.
- Configuration validation, backups, and templates.
- Managing application and core updates.
Tech Stack
Frontend
- React
- TypeScript
- Bun
- Vite
- Tailwind CSS
- shadcn/ui
Backend
- Tokio
- Axum
Supported Architectures
aarch64mips32mips32le
The application targets resource-constrained routers running KeeneticOS/Entware on Linux. Keep runtime resource usage and binary size in mind.
Development Guidelines
General Principles
- Follow the existing project architecture and coding patterns.
- Inspect existing implementations before introducing new abstractions or utilities.
- Prefer native, official, and recommended APIs and approaches.
- Avoid unnecessary complexity, duplicated logic, and premature abstractions.
- Keep changes focused and avoid modifying unrelated code.
- Do not reinvent existing functionality when a suitable solution is already available.
Frontend
- Prefer existing shadcn/ui components when implementing UI elements.
- Follow the established component structure and styling conventions.
- Maintain consistent spacing, typography, colors, and visual hierarchy.
- Ensure components are responsive and accessible.
- Handle loading, empty, success, and error states appropriately.
- Use monospace fonts only for editors, logs, and code snippets (JSON/YAML), not regular UI elements.
- Use tailwind css classes, avoid using any inline styles if possible.
- Avoid introducing custom components when an existing shadcn/ui component can fulfill the requirement.
Backend
- Prefer Tokio-compatible asynchronous APIs.
- Avoid blocking operations inside asynchronous execution contexts.
- Handle errors explicitly; avoid unnecessary
unwrap()andexpect()in runtime code. - Validate external input before processing it.
- Keep API behavior consistent with existing endpoints and response formats.
Dependencies
- Check existing dependencies before adding new ones.
- Prefer established libraries over custom implementations when they meaningfully reduce boilerplate or maintenance.
- Avoid unnecessarily heavy dependencies, especially in the router-targeted backend.
- Consider compatibility with all supported architectures and build targets.
Development Workflow
Before implementing changes:
- Inspect the relevant source code and existing implementation.
- Identify reusable components, utilities, and dependencies.
- Understand the impact on both frontend and backend when applicable.
- Implement the smallest reasonable change.
After implementing changes:
- Run relevant formatting, linting, and type checks.
- Run tests related to the modified functionality.
- Verify that the frontend/backend builds successfully when applicable.
- Check compatibility with supported target architectures when backend build behavior is affected.
Do not claim that a check passed unless it was actually executed successfully.
Build & Validation Commands
Run commands from the corresponding project directory.
Frontend
Working directory: frontend/
bun i
bun run build
bunx prettier .bun run build— TypeScript type checking and Vite production build.bunx prettier .— formatting.
Backend
Working directory: backend/
cargo +nightly fmt --all
cargo +nightly clippy --all-targets -- -D warnings
cargo +nightly test
cargo +nightly build --releasecargo +nightly clippy --all-targets -- -D warnings— run Clippy across all targets and treat warnings as errors.cargo +nightly build --release— build the optimized backend binary.
Agent Skills
- Project-specific agent skills are located in
.agents/skills/. - Read the relevant skill instructions before performing tasks covered by them.
- Do not load unrelated skills.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

