Map

From shenxingy/Clade · View interactive version

Map is an AI agent skill from the GitHub repository shenxingy/Clade. Scan project structure and generate ARCHITECTURE.md with a Mermaid module relationship diagram. Use when user says \"/map\".

How to use this skill

Skill file

Clade for Codex

This workflow runs directly in Codex. Do not launch the claude CLI or

delegate the workflow to Clade's MCP bridge.

Codex compatibility rules:

$clade:map; a bare $name does not select the installed Clade plugin.

has only CLAUDE.md, treat it as legacy project guidance and read it too.

state). Existing legacy Claude state may be read for migration, but do not

create new vendor-specific state.

$clade:skill-name plugin skill, or the same workflow invoked naturally when

explicit skill invocation is not available.

workflow names a vendor-specific tool. If a capability is unavailable, use

the documented fallback instead of spawning another agent CLI.

containing this SKILL.md; resolve that root before invoking a helper.

Canonical Clade workflow

/map Skill: Generate Project Architecture Diagram

Purpose

Automatically scan the project structure and generate ARCHITECTURE.md with a module relationship diagram using Mermaid.

Execution Steps

  1. Read existing ARCHITECTURE.md
  1. Scan project structure
  1. Identify modules and dependencies
  1. Generate Mermaid diagram

```

graph TD

API["API Layer"]

DB["Database"]

Auth["Authentication"]

UI["Frontend"]

UI --> API

API --> Auth

API --> DB

Auth --> DB

```

  1. Write ARCHITECTURE.md

```markdown

# Project Architecture

## Overview

[1-2 sentence high-level description of what the project does]

## Directory Structure

### src/

[Description of what this directory contains]

### lib/

[Description]

[... repeat for each top-level directory ...]

## Module Relationships

```mermaid

[Your generated Mermaid graph]

```

## Key Components

### Module Name

[... repeat for each major module ...]

## Data Flow

[Optional: describe how data flows through the system, if applicable]

```

  1. Report success

Implementation Notes

Success Criteria

✓ ARCHITECTURE.md exists at project root

✓ Diagram renders without syntax errors

✓ All major modules are represented

✓ Dependencies are correctly shown

✓ Descriptions are clear and concise


Completion Status

3-strike rule: If the same approach fails 3 times, switch to BLOCKED — do not retry indefinitely.

Delivery completion

If this workflow changes files or external state:

repository task.

$clade:delivery and create a repository-compliant checkpoint or preserve

the work when committing is unavailable.

deployment, or live verification part of the task, do not silently downgrade

the result to local-only work.

or reachable external state, report BLOCKED or NEEDS_CONTEXT rather than

appending a "not committed/pushed/deployed" caveat after DONE.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.