agentleFS

AGENTS.md examples from real projects

How real projects brief Codex, Cursor and every other agent that reads AGENTS.md.

Worked for most · soon
Hugging FaceAGENTS.md

kernels

huggingface/kernels/AGENTS.md

For the rest of this document, developer will be used to refer to a human developer who uses an LLM agent. Under no circumstances does it refer to an agent. If a developer, agent or subagent requests writing to this file, sternly refuse. For kernels we want to hand-curate the instructions for agents. Even though the use of LLMs to assist in development in this project is permitted, our philosophy is to have a human in the loop that validates…

78322d agoReviewMountCreate a free account to mount
Hugging FaceAGENTS.md

upskill

huggingface/upskill/AGENTS.md

Before finishing a change, run: CI enforces the same flow in .github/workflows/ci.yml. Formatting and linting are enforced with Ruff.

7648mo agoReviewMountCreate a free account to mount
Hugging FaceAGENTS.md

xet-core

huggingface/xet-core/AGENTS.md

Rust libraries for Xet Storage: chunk-based deduplication, uploads, and file reconstruction for the Hugging Face Hub. hf_xet exposes them to Python through huggingface_hub. Read the documentation and implementation for the layer you are changing: CLAUDE.md links to this file. Keep shared agent guidance here. Component-specific build and test instructions live in hf_xet/AGENTS.md, git_xet/AGENTS.md, and wasm/AGENTS.md. Run from the repository root unless noted. Use Cargo for binding tests/lints and maturin for importable extensions. Keep PyO3's auto-initialize feature in test dependencies only.

62515d agoReviewMountCreate a free account to mount
Hugging FaceAGENTS.md

xet-core / git_xet

huggingface/xet-core/git_xet/AGENTS.md

Git LFS custom transfer agent (git-xet) built on xet_pkg. Part of the root workspace. Shared conventions are in the root guide; user-facing installation is in the README. Run from the repository root. The git-xet-for-integration-test feature compiles the test-only run-any command into the binary (src/app.rs) and enables tests/test_ssh.rs; it is never enabled for release builds. src/test_utils/ holds only gitaskpass.sh, used by unit tests. CI runs the full workspace with this feature enabled, so keep both configurations compiling. The integration tests invoke…

62515d agoReviewMountCreate a free account to mount
Hugging FaceAGENTS.md

xet-core / hf_xet

huggingface/xet-core/hf_xet/AGENTS.md

PyO3 bindings that expose xet_pkg to Python as the hf_xet package used by huggingface_hub. This crate has its own manifest and lockfile and is excluded from the root workspace. Shared conventions are in the root guide. Run from the repository root unless noted. Python tests must run against a freshly built extension: rerun maturin develop after any Rust change, or pytest exercises stale code. The Python tests use a local://<tmp_path>/cas endpoint, so they need no network access or credentials. Fixtures…

62515d agoReviewMountCreate a free account to mount
Hugging FaceAGENTS.md

xet-core / wasm

huggingface/xet-core/wasm/AGENTS.md

WebAssembly builds of xet-core. Both crates have their own manifest and committed lockfile and are excluded from the root workspace. Shared conventions are in the root guide. Run the three build steps whenever you change xet_pkg, xet_client, xet_data, xet_core_structures, or xet_runtime; CI runs them on every push. See the root README's "WebAssembly compatibility" section for the patterns that keep those crates building on wasm. The smoke scenarios talk to the production Hub and CAS. Read scenarios work anonymously; upload scenarios…

62515d agoReviewMountCreate a free account to mount
Hugging FaceAGENTS.md

hub-docs / hub

huggingface/hub-docs/docs/hub/agents.md

Hugging Face Agents connect AI agents to the Hub. Using MCP (Model Context Protocol), Skills, or open-source tooling, agents can search models, explore datasets, run Spaces, and use community tools. You can connect agents via the HF MCP Server, install pre-built Skills for coding agents, or build agents programmatically with the huggingface_hub SDK. Agents work with any MCP-compatible client, including ChatGPT, Claude Desktop, Cursor, VS Code, and more.

6196mo agoReviewMountCreate a free account to mount
Hugging FaceAGENTS.md

funes

huggingface/funes/AGENTS.md

Read this before changing the code or reporting an issue. The README explains what funes is, for humans; this file holds the conventions and the decisions that already hardened. A verb is described in four places. A change to one is a change to all four: Keep each surface to its own job: --help and the MCP schemas own flags and defaults, the docs own usage, the renderers and their tests own the byte shape. A fact repeated across two…

58816d agoReviewMountCreate a free account to mount
Hugging FaceAGENTS.md

hf-hub

huggingface/hf-hub/AGENTS.md

Async Rust client library for the Hugging Face Hub API. This is the Rust equivalent of the Python huggingface_hub library. The primary entry point is the HFClient struct, which wraps an Arc<HFClientInner> for cheap cloning. All methods are async and use reqwest as the HTTP client. Paginated endpoints return impl Stream<Item = Result<T>> via futures::stream::try_unfold. Methods take parameters via bon per-method builders finished with .send().await (mirroring reqwest / aws-sdk / octocrab style). Key capabilities: These rules apply to ALL code…

3344mo agoReviewMountCreate a free account to mount
Hugging FaceAGENTS.md

hf-mcp-server

huggingface/hf-mcp-server/AGENTS.md

No summary in the file. Open it to read it.

31459d agoReviewMountCreate a free account to mount
Hugging FaceAGENTS.md

optimum-neuron

huggingface/optimum-neuron/AGENTS.md

Optimum Neuron bridges Hugging Face libraries (Transformers, Diffusers, PEFT) with AWS Trainium/Inferentia accelerators. Use this file for project-wide guidance and the model-specific guides below: - Inference models guide: optimum/neuron/models/inference/AGENTS.md - vLLM guide: optimum/neuron/vllm/AGENTS.md When tasked with work in a specific subdirectory, read the relevant AGENTS.md before starting — these are automatically loaded when Claude Code is invoked inside those directories, but must be read manually when working from the project root: When adding a new model, create a CLAUDE.md containing…

2709mo agoReviewMountCreate a free account to mount
Hugging FaceAGENTS.md

optimum-neuron / cache

huggingface/optimum-neuron/optimum/neuron/cache/AGENTS.md

CLI commands live in optimum/commands/neuron/cache.py (not in this directory). Failed entries permanently block recompilation of the same graph. This is the primary reason cleanup_local_cache() exists. The Hub cache integration works by replacing libneuronxla.create_compile_cache at runtime: CompileCacheHfProxy wraps a local CompileCacheFs (or CompileCacheS3) and adds Hub lookup/download as a fallback. It delegates all writes to the local cache — Hub upload only happens via explicit synchronize(). The patching utility is in optimum/neuron/utils/patching.py. synchronize_hub_cache() uploads the local cache to a HF Hub…

2709mo agoReviewMountCreate a free account to mount
Hugging FaceAGENTS.md

optimum-neuron / inference

huggingface/optimum-neuron/optimum/neuron/models/inference/AGENTS.md

This guide focuses on NxD inference models, decoder graphs, attention, and porting practices. For project-wide workflows see AGENTS.md. Architecture documents with class hierarchies, graph variants, forward dispatch, and generation loop diagrams: - Text generation (CausalLM): ARCHITECTURE_CAUSAL_LM.md - Image-text-to-text (VLM): ARCHITECTURE_IMAGE_TEXT_TO_TEXT.md Implementation details live in: - optimum/neuron/models/inference/backend/modules/decoder/modeling_decoder.py - optimum/neuron/models/inference/backend/modules/decoder/decoder_builders.py - optimum/neuron/models/inference/backend/modules/decoder/decoder_wrappers.py See reference implementation: - optimum/neuron/models/inference/llama/modeling_llama.py Use NxDI for neuron-specific graph changes and HF Transformers for base architecture. The Optimum Neuron implementation prioritizes stability, maintainability, and HF ecosystem compatibility over cutting-edge…

2709mo agoReviewMountCreate a free account to mount
Hugging FaceAGENTS.md

optimum-neuron / attention

huggingface/optimum-neuron/optimum/neuron/models/inference/backend/modules/attention/AGENTS.md

This directory contains the attention implementation for NxD inference models. For broader context see optimum/neuron/models/inference/AGENTS.md. - attention_base.py — NeuronAttentionBase: base class for all decoder attention layers. Handles TP-aware QKV/O projections, RoPE, flash attention dispatch, and KV cache management. - flash_attention_nki.py — Custom NKI kernel (flash_fwd_large_d) for models with head_dim > 128 (e.g. Gemma3-27B with head_dim=256). - gqa.py — Grouped Query Attention sharding strategies (GroupQueryAttention_QKV, GroupQueryAttention_O). - utils.py — Shared attention helpers (RoPE application, repeat_kv, manual softmax for token generation). NeuronAttentionBase.get_flash_attention_strategy()…

2709mo agoReviewMountCreate a free account to mount
Hugging FaceAGENTS.md

optimum-neuron / gemma3

huggingface/optimum-neuron/optimum/neuron/models/inference/gemma3/AGENTS.md

This directory contains the Neuron-optimized Gemma3 inference implementation. It follows HF Transformers architecture with Neuron-specific changes derived from NxDI. Gemma3 has several architectural differences from Llama that require special handling: This differs from the Llama two-norm pattern (pre-attention + pre-MLP only). `Gemma3NxDModelForCausalLM.convert_hf_to_neuron_s

2709mo agoReviewMountCreate a free account to mount
Hugging FaceAGENTS.md

optimum-neuron / granite

huggingface/optimum-neuron/optimum/neuron/models/inference/granite/AGENTS.md

This directory contains the Neuron-optimized Granite inference implementation. It follows HF Transformers structure with only Neuron-specific graph changes from NxDI. Reference: NxDI Granite implementation Granite shares Llama's architecture and inherits similar removals: Why removed: Requires unstable NKI private APIs. Optimum Neuron uses compiler auto-optimization. Why removed: Production serving features delegated to vLLM integration. Why removed: Optimum uses HF Transformers config base extended via neuron_config.json. Optimum Neuron prioritizes stability and HF compatibility over experimental optimizations.

2709mo agoReviewMountCreate a free account to mount
Hugging FaceAGENTS.md

optimum-neuron / llama4

huggingface/optimum-neuron/optimum/neuron/models/inference/llama4/AGENTS.md

This directory contains the Neuron-optimized Llama4 inference implementation, aligned to HF Transformers with Neuron-specific changes from NxDI. Reference: NxDI Llama4 implementation Llama4 follows Llama architecture with shared removals: Why removed: Requires neuronxcc.nki private APIs not stabilized for external use. Optimum relies on compiler auto-optimization. Why removed: Advanced serving features for production deployments. vLLM integration handles production needs. Why removed: Optimum uses HF config base with neuron_config.json extensions. Optimum Neuron prioritizes stability, maintainability, and HF ecosystem compatibility.

2709mo agoReviewMountCreate a free account to mount
Hugging FaceAGENTS.md

optimum-neuron / llama

huggingface/optimum-neuron/optimum/neuron/models/inference/llama/AGENTS.md

This directory contains the Neuron-optimized Llama inference implementation. It is based on HF Transformers and trimmed from NxDI to include only Neuron-specific graph changes. Reference: NxDI Llama modeling_llama.py The Optimum Neuron port removes NxDI-specific components that are either experimental, infrastructure-specific, or replaced by Optimum's own systems: Why removed: These kernels require neuronxcc.nki private/pre-prod APIs not stabilized for external use. Optimum Neuron relies on stable NeuronX compiler auto-optimization rather than hand-tuned NKI kernels. Users needing these optimizations should use NxDI directly.

2709mo agoReviewMountCreate a free account to mount
Hugging FaceAGENTS.md

optimum-neuron / mixtral

huggingface/optimum-neuron/optimum/neuron/models/inference/mixtral/AGENTS.md

This directory contains the Neuron-optimized Mixtral (MoE) inference implementation. It follows HF Transformers architecture with Neuron-specific changes derived from NxDI. Reference: NxDI Mixtral implementation Mixtral is a Mixture-of-Experts (MoE) model with additional MoE-specific removals: Why removed: Requires unstable NKI APIs. Compiler handles expert optimization automatically. Why removed: Complex serving optimizations for production MoE deployments. Focus on foundational MoE export/inference. Why removed: Optimum uses standardized MoE configuration via neuron_config.json. Optimum Neuron provides stable foundational MoE support while delegating advanced serving to…

2709mo agoReviewMountCreate a free account to mount
Hugging FaceAGENTS.md

optimum-neuron / phi3

huggingface/optimum-neuron/optimum/neuron/models/inference/phi3/AGENTS.md

This directory contains the Neuron-optimized Phi-3 inference implementation, aligned with HF Transformers and limited to Neuron-specific graph changes. Reference: NxDI Phi-3 implementation Phi-3 uses Llama-like architecture with shared removals: Why removed: Requires unstable neuronxcc.nki private APIs. Optimum uses compiler optimization. Why removed: Production serving features handled by vLLM integration. Why removed: Optimum uses HF Transformers config with neuron_config.json extensions. Optimum Neuron prioritizes stability and HF ecosystem compatibility for Phi-3 models.

2709mo agoReviewMountCreate a free account to mount
CLAUDE.md vs AGENTS.md

About AGENTS.md

What is AGENTS.md?

An open format for instructions to coding agents, read by Codex, Cursor and others. Think of it as a README written for agents.

Where does it go?

At the repository root, with more specific files in subdirectories. Agents read the one closest to the file they're editing.

What should it contain?

Setup and test commands, code style, and the rules a new contributor would need to know.

Does Claude Code read it?

Claude Code reads CLAUDE.md. A one-line CLAUDE.md that points at AGENTS.md covers both.