asiaostrich/universal-dev-standards/ai-friendly-architecture

Claude Code and agent skill by asiaostrich/universal-dev-standards

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Design AI-friendly architecture with explicit patterns, layered documentation, and semantic boundaries. Use when: structuring projects for AI collaboration, optimizing codebase for AI analysis, setting up AI context. Not for: writing the instruction files — use /ai-instruction-standards; language-conventional directory layout — use /project-structure-guide. Keywords: architecture, AI-friendly, context, modules, documentation layers, .ai-context.yaml.

Install

npx vskill@latest install asiaostrich/universal-dev-standards/ai-friendly-architecture

SKILL.md

The same SKILL.md was published earlier as asiaostrich/universal-dev-standards/ai-friendly-architecture.

AI-Friendly Architecture Guide

Language: English | 繁體中文

Version: 1.0.0 Last Updated: 2026-01-25 Applicability: Claude Code Skills


Core Standard: This skill implements AI-Friendly Architecture. For comprehensive methodology documentation, refer to the core standard.

AI Skills Hierarchy | AI 技能層級

This skill is part of a three-layer AI collaboration system:

LayerSkillQuestion it Answers回答的問題
Behavior (Immediate)/ai-collaboration"How should AI respond accurately?"「AI 如何準確回應?」
Configuration (Session)/ai-instruction-standards"What to write in CLAUDE.md?"「CLAUDE.md 該寫什麼?」
Architecture (Long-term)/ai-friendly-architecture (this)"How to structure code for AI?"「如何讓專案對 AI 友善?」

Purpose

This skill helps design project architecture that maximizes AI collaboration effectiveness through explicit patterns, layered documentation, and semantic boundaries.

Quick Reference

Core Principles
PrincipleDescriptionBenefit
Explicit Over ImplicitDocument behavior explicitlyAI understands without guessing
Layered ContextMulti-level documentationAppropriate detail per task
Semantic BoundariesClear module boundariesIndependent analysis
Discoverable StructureSelf-documenting structureQuick orientation
Context Layers
LayerToken BudgetContent
L1: Quick Ref< 500One-liners, API signatures, entry points
L2: Detailed< 5,000Full API docs, usage examples
L3: ExamplesUnlimitedComplete implementations, edge cases
Recommended Structure
project/
├── .ai-context.yaml # AI context configuration
├── docs/
│ ├── QUICK-REF.md # Level 1 documentation
│ └── ARCHITECTURE.md # Level 2 documentation
├── src/
│ └── auth/
│ ├── index.ts # Entry point with module header
│ ├── QUICK-REF.md # Module quick reference
│ └── README.md # Module documentation
└── CLAUDE.md # AI instruction file

Module Header Template

javascript
/**
* ═══════════════════════════════════════════════════════════
* MODULE: [Module Name]
* ═══════════════════════════════════════════════════════════
*
* PURPOSE: [One-sentence description]
*
* DEPENDENCIES:
* - [dep1]: [reason]
* - [dep2]: [reason]
*
* EXPORTS:
* - [function1](params): [description]
* - [function2](params): [description]
*
* CONFIGURATION:
* - [CONFIG_VAR]: [description]
*
* ═══════════════════════════════════════════════════════════
*/

Detailed Guidelines

For complete standards, see:

AI-Optimized Format (Token-Efficient)

For AI assistants, use the YAML format file for reduced token usage:

  • Base standard: ai/standards/ai-friendly-architecture.ai.yaml

.ai-context.yaml Configuration

yaml
# .ai-context.yaml - AI Context Configuration
version: 1.0.0
project:
name: my-project
type: web-app # web-app | library | cli | api | monorepo
primary-language: typescript
modules:
- name: auth
path: src/auth/
entry: index.ts
description: Authentication and authorization
dependencies: [database, crypto]
priority: high
- name: api
path: src/api/
entry: routes.ts
description: REST API endpoints
dependencies: [auth, database]
priority: high
analysis-hints:
entry-points:
- src/main.ts
- src/index.ts
ignore-patterns:
- node_modules
- dist
- "*.test.ts"
architecture-type: layered
documentation:
quick-ref: docs/QUICK-REF.md
detailed: docs/ARCHITECTURE.md
examples: docs/examples/

Context Priority Guidelines

PriorityContent TypeReason
1Entry pointsApplication structure
2.ai-context.yamlModule map and dependencies
3QUICK-REF filesRapid API understanding
4Modified filesDirect task relevance
5Dependency chainContext for changes

Anti-Patterns to Avoid

Anti-PatternProblemSolution
Magic stringsAI can't trace constantsTyped constants with docs
Implicit routingHidden behaviorExplicit route mappings
Global stateUnpredictable depsDependency injection
Circular depsContext confusionHierarchical dependencies
Monolithic filesContext overflowFocused modules

Implementation Checklist

Quick Start (< 1 hour)
  • [ ] Create .ai-context.yaml with module list
  • [ ] Add QUICK-REF.md to project root
  • [ ] Document entry points in README
  • [ ] Add module headers to main files
Standard Implementation (< 1 day)
  • [ ] Complete .ai-context.yaml configuration
  • [ ] Add QUICK-REF.md to each major module
  • [ ] Document all public APIs with type info
  • [ ] Add section dividers to large files

Configuration Detection

This skill supports project-specific configuration.

Detection Order
  1. Check for existing .ai-context.yaml
  2. Check for QUICK-REF.md files
  3. If not found, suggest creating AI-friendly structure
First-Time Setup

If no configuration found:

  1. Suggest: "This project hasn't been configured for AI collaboration. Would you like to set up an AI-friendly structure?"
  2. Create .ai-context.yaml template
  3. Create QUICK-REF.md in project root

Next Steps Guidance | 下一步引導

After /ai-friendly-architecture completes, the AI assistant should suggest:

AI 友善架構指南已掌握。建議下一步 / AI-friendly architecture guide understood. Suggested next steps:
- 執行 /sdd 將 AI 友善架構設計納入正式規格 ⭐ Recommended / 推薦 — 確保架構決策有規格追蹤 / Ensure architecture decisions are tracked in specs
- 建立 .ai-context.yaml 和 QUICK-REF.md — 立即實作 AI 友善結構 / Implement AI-friendly structure immediately
- 執行 /ai-instruction-standards 更新 CLAUDE.md 以反映架構配置 — 讓 AI 指令檔案與架構保持同步 / Keep AI instruction files in sync with architecture

Related Standards


Version History

VersionDateChanges
1.0.02026-01-25Initial release

License

This skill is released under CC BY 4.0.

Source: universal-dev-standards

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
75
Repository forks
13
7-day trend score
22

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/asiaostrich/universal-dev-standards/ai-friendly-architecture/badge)](https://verified-skill.com/skills/asiaostrich/universal-dev-standards/ai-friendly-architecture)

Something wrong with this skill or its page? Tell us.