agentleFS
zxc-rvzxc-rv/XKeen-UI/AGENTS.md

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.

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
  1. Distinctive:

    Follow the existing project architecture and coding patterns.

    line 40
  2. Distinctive:

    Prefer native, official, and recommended APIs and approaches.

    line 42
  3. Distinctive:

    Avoid unnecessary complexity, duplicated logic, and premature abstractions.

    line 43
  4. Distinctive:

    Keep changes focused and avoid modifying unrelated code.

    line 44
  5. Distinctive:

    Do not reinvent existing functionality when a suitable solution is already available.

    line 45
  6. Distinctive:

    Prefer existing shadcn/ui components when implementing UI elements.

    line 49
  7. Distinctive:

    Follow the established component structure and styling conventions.

    line 50
  8. Distinctive:

    Ensure components are responsive and accessible.

    line 52
  9. Distinctive:

    Use monospace fonts only for editors, logs, and code snippets (JSON/YAML), not regular UI elements.

    line 54
  10. Distinctive:

    Use tailwind css classes, avoid using any inline styles if possible.

    line 55
  11. Distinctive:

    Avoid introducing custom components when an existing shadcn/ui component can fulfill the requirement.

    line 56
  12. Distinctive:

    Prefer Tokio-compatible asynchronous APIs.

    line 60
  13. Distinctive:

    Avoid blocking operations inside asynchronous execution contexts.

    line 61
  14. Distinctive:

    Keep API behavior consistent with existing endpoints and response formats.

    line 64
  15. Distinctive:

    Check existing dependencies before adding new ones.

    line 68
  16. Distinctive:

    Prefer established libraries over custom implementations when they meaningfully reduce boilerplate or maintenance.

    line 69
  17. Distinctive:

    Avoid unnecessarily heavy dependencies, especially in the router-targeted backend.

    line 70
  18. Distinctive:

    Consider compatibility with all supported architectures and build targets.

    line 71
  19. Distinctive:

    Run relevant formatting, linting, and type checks.

    line 84
  20. Distinctive:

    Run tests related to the modified functionality.

    line 85
  21. Distinctive:

    Verify that the frontend/backend builds successfully when applicable.

    line 86
  22. Distinctive:

    Check compatibility with supported target architectures when backend build behavior is affected.

    line 87
  23. Distinctive:

    Do not claim that a check passed unless it was actually executed successfully.

    line 89
  24. Distinctive:

    Run commands from the corresponding project directory.

    line 93
  25. Distinctive:

    Read the relevant skill instructions before performing tasks covered by them.

    line 125
  26. Distinctive:

    Do not load unrelated skills.

    line 126

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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

  • aarch64
  • mips32
  • mips32le

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() and expect() 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:

  1. Inspect the relevant source code and existing implementation.
  2. Identify reusable components, utilities, and dependencies.
  3. Understand the impact on both frontend and backend when applicable.
  4. Implement the smallest reasonable change.

After implementing changes:

  1. Run relevant formatting, linting, and type checks.
  2. Run tests related to the modified functionality.
  3. Verify that the frontend/backend builds successfully when applicable.
  4. 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 --release
  • cargo +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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.