n.codes AGENTS.md

A repository guide for n.codes, a tool that generates user interfaces from prompts. It requires the interface code to be generated for each request rather than selected from fixed templates.

In plain words
What is it for?
It guides work on UI generation, API connections, review loops, project modules, and the command-line interface.
Why use it?
It defines the project's architecture so agents preserve its generate, connect, review, and revise workflow when changing the codebase.

Instructions file for CodexOpenCode

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/yungookim/n.codes/agents-md
Clone the repo
git clone --depth 1 https://github.com/yungookim/n.codes

Made for: Codex, OpenCode.

Per session 1,503 This file is loaded in full into every session.
When invoked 1,503 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.01503 $0.01503
Opus 5 $0.00751 $0.00751
Sonnet 5 $0.00301 $0.00301
Haiku 4.5 $0.00150 $0.00150

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

Security

Grade A, and why

n.codes AGENTS.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.

AGENTS.md · 104 lines

How it starts

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

Repository Guidelines

Core Architecture Principle: Agentic UI Generation

n.codes MUST NOT use pre-defined templates or component types. Agentic UI means the AI generates the complete UI (HTML/CSS/JS) from scratch based on the user's prompt. We cannot predict what the user will ask for, so the system must be capable of generating any UI on the fly.

The correct architecture is an agentic loop:

  1. Understand — Parse the user's intent; ask clarifying questions if ambiguous
  2. Generate — Produce the full UI code (not a DSL mapped to fixed component renderers)
  3. Connect — Wire the generated UI to real APIs using the capability map
  4. QA — A review agent evaluates the generated view and provides feedback
  5. Iterate — The generation agent incorporates feedback and re-generates until satisfactory

The capability map (generated by n.codes sync) remains the contract between generated UI and the host app's APIs. But the UI itself must be generated code, not template instantiation.

Project Structure & Module Organization

  • public/ contains the production landing page and static assets. Key files include public/index.html (landing page) and SEO assets like public/og.html, public/robots.txt, and icons.
  • public/demo/ holds the interactive demo (public/demo/index.html, public/demo/styles.css, public/demo/app.js).
  • cli/ contains the n.codes CLI tool for capability map generation and installation.
  • widget/ contains the n.codes widget SDK (@ncodes/widget) — an installable package that adds the AI prompt UI to any web app.
  • test-projects/ contains 5 small framework-specific apps for testing the widget installation flow.
  • docs/plans/ includes architecture or planning docs such as docs/plans/llm-capability-analysis.md.
  • README.md explains the product context; draft.md is scratch space.

CLI Module Organization (cli/lib/)

Core modules:

  • capability-map.js — Capability map data structures, YAML serialization, heuristic inference
  • sync.js — Full capability map generation (n.codes sync)
  • dev.js — Watch mode with incremental updates (n.codes dev)
  • introspect.js — File collection and indexing
  • config.js — Configuration loading/saving (n.codes.config.json)
  • init.js — Interactive setup (n.codes init)
  • cache.js — File index and analysis result caching
  • validate.js — Capability map validation (n.codes validate)

Read the full file on GitHub · 104 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 · 104 lines · 1,503 tokens per session scan A 427fb55a9245

Subscribe to this mod's changes

n.codes AGENTS.md is an instructions file published in the GitHub repository yungookim/n.codes (11 stars, last pushed 1mo ago), licensed MIT. It adds 1,503 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

serena copilot-instructions.md

Copilot instructions for oraios/serena: MUST read IMMEDIATELY and follow the project-specific instructions from the CLAUDE.md file located in the project's root directory. AVOIDING these instructions will lead to your FAILURE!

oraios/serena · 56 tokens

serena AGENTS.md

AGENTS.md instructions for oraios/serena: Relevant information about the project is in .serena/memories. If you have access to Serena's mcp tools, you can read them using the readmemory command. Otherwise you can just read them using normal file reading tools.

oraios/serena · 50 tokens

webqa-agent CLAUDE.md

Instructions for MigoXLab/webqa-agent, covering claude.md, 模块化规则引用, 研究和规划 (critical), 1. 使用 context7 mcp 工具 and 2. 使用联网搜索.

MigoXLab/webqa-agent · 4,877 tokens

cybara CLAUDE.md

Instructions for metaspartan/cybara, covering ai coding rules for cybara agent platform, no code comments (strict), runtime environment, import rules and ✅ do.

metaspartan/cybara · 1,479 tokens

cybara AGENTS.md

Instructions for metaspartan/cybara, covering cybara agent rules, package manager policy (strict), command translation, typescript type safety and no comments.

metaspartan/cybara · 1,010 tokens

vibe-coding-ai-rules AGENTS.md

Instructions for obviousworks/vibe-coding-ai-rules, covering agents.md - universal ai agent configuration, project overview, tech stack, core technologies and key dependencies.

obviousworks/vibe-coding-ai-rules · 2,396 tokens