Install
openclaw skills install ai-readme-generatorGenerate AI-readable project documentation for OpenClaw/Cursor-style coding workflows. Use when the user asks to create, initialize, update, or refresh AGENTS.md, AI README, project rules, Cursor rules, or AI-friendly project documentation from an existing codebase.
openclaw skills install ai-readme-generatorUse this skill to scan an existing code project and generate maintainable documentation for both AI agents and developers.
The generated docs should help future AI coding sessions quickly understand:
Generate or update these files in the target project:
AGENTS.md
.cursor/rules/ai-readme/RULE.mdc
.cursor/rules/ai-readme/generated/project-structure.mdc
.cursor/rules/ai-readme/generated/technical-architecture.mdc
.cursor/rules/ai-readme/generated/development-guide.mdc
.cursor/rules/ai-readme/generated/core-flows.mdc
.cursor/rules/ai-readme/manual/business-knowledge.mdc
.cursor/rules/ai-readme/manual/lessons-learned.mdc
Use English file names for better cross-platform compatibility. Chinese section text is allowed when the project language is Chinese.
<!-- TODO: verify ... -->..cursor/rules/ai-readme/manual/.AGENTS.md already exists, read it first. Preserve useful human-written constraints and update only project facts that can be verified from code..cursor/rules/ai-readme/generated/ may be refreshed from code evidence..env, credentials, tokens, private keys, or local machine-specific paths into generated docs..mdc file must include frontmatter with description and alwaysApply: false..mdc file should include at least one Mermaid or ASCII diagram when useful.If the user provides a path, use it. Otherwise inspect the current workspace and ask only if the project root is ambiguous.
Confirm the project root by checking common files:
package.json, pnpm-lock.yaml, yarn.lockpom.xml, build.gradle, settings.gradlepyproject.toml, requirements.txt, setup.pygo.modCargo.toml*.csproj, *.slnRead only enough files to understand the project:
Record facts with source paths in your notes before writing docs.
For non-trivial projects, keep a short task plan:
RULE.mdc skeletonproject-structure.mdctechnical-architecture.mdcdevelopment-guide.mdccore-flows.mdcAGENTS.mdCreate directories as needed. Use the templates below, adapting content to verified project facts.
---
description: "AI README entrypoint - project rules navigation. Read this before working on the project."
alwaysApply: false
---
# AI README - Project Rules Entry
## Project overview
<!-- One short paragraph describing the verified project purpose. -->
```mermaid
flowchart LR
Entry[Entry Points] --> Core[Core Modules]
Core --> Data[Data / External Services]
### generated/project-structure.mdc
```md
---
description: "Project structure - directories, modules, and responsibilities. Use when understanding code organization."
alwaysApply: false
---
# Project Structure
## Directory tree
```text
project-root/
├── ...
| Path | Responsibility | Key files |
|---|
flowchart LR
A[Module A] --> B[Module B]
path/to/file
### generated/technical-architecture.mdc
```md
---
description: "Technical architecture - layers, dependencies, and technology stack. Use when understanding technical design."
alwaysApply: false
---
# Technical Architecture
## Architecture overview
```mermaid
flowchart TD
UI[Interface / API Layer] --> App[Application / Service Layer]
App --> Domain[Domain / Core Logic]
Domain --> Infra[Infrastructure / Data Layer]
| Layer | Responsibility | Main files/classes |
|---|
| Category | Technology | Version/source | Purpose |
|---|---|---|---|
| Language/runtime | |||
| Framework | |||
| Build tool | |||
| Test framework |
path/to/file
### generated/development-guide.mdc
```md
---
description: "Development guide - setup, run, build, test, and configuration. Use when preparing a development environment."
alwaysApply: false
---
# Development Guide
## Requirements
| Tool | Version | Evidence |
| --- | --- | --- |
## Common commands
| Task | Command | Evidence |
| --- | --- | --- |
| Install dependencies | <!-- TODO: verify --> | |
| Run locally | <!-- TODO: verify --> | |
| Build | <!-- TODO: verify --> | |
| Test | <!-- TODO: verify --> | |
## Configuration
| File / variable | Purpose | Required? |
| --- | --- | --- |
## Validation checklist
- [ ] dependencies install successfully
- [ ] app starts locally
- [ ] tests pass
- [ ] build succeeds
---
description: "Core flows - important runtime or business call chains. Use when understanding how the system works."
alwaysApply: false
---
# Core Flows
> These flows are inferred from code evidence. Ask the user to confirm if they match the team's product understanding.
## Flow list
| Priority | Flow | Entry point | Evidence |
| --- | --- | --- | --- |
| P0 | | | |
| P1 | | | |
## Flow: <!-- name -->
```mermaid
sequenceDiagram
participant Client
participant Entry
participant Service
participant Store
Client->>Entry: request
Entry->>Service: delegate
Service->>Store: read/write
Service-->>Entry: result
Entry-->>Client: response
file:Class.methodfile:Class.method
### manual/business-knowledge.mdc
Create this file only if it does not already exist.
```md
---
description: "Business knowledge - product context, domain terms, and business rules. Use when business context is needed."
alwaysApply: false
---
# Business Knowledge
## Project context
<!-- TODO: human to fill: who uses this project, what problem it solves, and important product boundaries. -->
## Domain terms
| Term | Code name | Meaning |
| --- | --- | --- |
## Business rules
<!-- TODO: human to fill: state transitions, limits, calculations, approvals, exceptions. -->
Create this file only if it does not already exist.
---
description: "Lessons learned - pitfalls, decisions, and team experience. Read before changing risky code."
alwaysApply: false
---
# Lessons Learned
## Pitfalls
| Problem | Cause | Solution |
| --- | --- | --- |
## Decisions
| Decision | Reason | Date / owner |
| --- | --- | --- |
# AGENTS.md
## Project Overview
<!-- One verified paragraph describing the project purpose and core capability. -->
## Development Commands
- Install dependencies: <!-- TODO: verify -->
- Run locally: <!-- TODO: verify -->
- Build: <!-- TODO: verify -->
- Test: <!-- TODO: verify -->
## Key Directories
- `src/` - <!-- responsibility -->
- `tests/` - <!-- responsibility, if present -->
## Boundaries and Constraints
<!-- Verified project conventions, safety rules, generated-code boundaries, or things not to modify. -->
## AI Context
Detailed project rules live in `.cursor/rules/ai-readme/RULE.mdc`:
- architecture: `.cursor/rules/ai-readme/generated/technical-architecture.mdc`
- flows: `.cursor/rules/ai-readme/generated/core-flows.mdc`
- business context: `.cursor/rules/ai-readme/manual/business-knowledge.mdc`
- lessons learned: `.cursor/rules/ai-readme/manual/lessons-learned.mdc`
After writing files:
.mdc frontmatter is valid.TODO items.Return a concise summary: