agentleFS
bryanus1bryanus1/agent-skills/skills/architecture/architecture-map/SKILL.md

architecture-map

Skill0 starsChanged 19 days agoMITView on GitHub

Generate or update the architecture page by reading the real repository: stack, Mermaid diagram, modules/apps, data, auth, key flows, integrations and deployment. Supports Notion (MCP) and a local docs/ARCHITECTURE.md, preserving manual notes after confirmation.

  • Reads credentials
  • Commits and pushes

11 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

12 rules. 0 are common, 5 are distinctive, and 7 are very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Notion (MCP): if the user passes a Notion URL/ID or asks to write to Notion, use notion-fetch if the page already exists.

    line 45
  2. Very specific:

    Local file: if Notion is not mentioned, look for docs/ARCHITECTURE.md, ARCHITECTURE.md and docs/architecture.md, in that order, to update …

    line 46
  3. Distinctive:

    Preservation in update mode: read the whole current document and identify hand-written sections (ADRs, business decisions, roadmap, owners, …

    line 47
  4. Distinctive:

    Follow the checklist in references/repo-discovery.md, excluding build folders, dependencies and files with secrets:

    line 50
  5. Very specific:

    Add the freshness metadata at the end (Last updated: <YYYY-MM-DD> · Commit: <short-sha>).

    line 67
  6. Distinctive:

    Wait for the user's explicit confirmation: before creating or editing files or Notion pages.

    line 74
  7. Very specific:

    If updating in Notion, read again with notion-fetch right before notion-update-page so concurrent edits are not overwritten.

    line 75
  8. Very specific:

    Only facts verified in the repo: every path, command, module or integration documented must have been checked in real files.

    line 82
  9. Very specific:

    Zero secrets: never read .env, .env.local, .env.production, private keys or credentials.

    line 83
  10. Distinctive:

    Strict preservation of manual notes: never delete ADRs, historical context, links or team notes that cannot be regenerated from the code.

    line 85
  11. Very specific:

    No duplicate destination: if an ARCHITECTURE.md or a linked page already exists, update it instead of creating a second parallel copy.

    line 86
  12. Distinctive:

    Documentation only: do not modify application code or run git commit or git push.

    line 88

“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Architecture Map (mapa-arquitectura)

🎯 Purpose

Generate from scratch, or keep up to date, a project's living architecture page by reading the repository's real code (instead of stale documentation or assumptions). It produces a clear view of the system (verified stack, Mermaid diagram, modules/apps, data, security, key flows, integrations and deployment) in Notion or in docs/ARCHITECTURE.md.


⚡ When to Trigger

Trigger this skill when the user:

  • Asks to create, generate or update the architecture page or document ("mapa-arquitectura", "update the architecture page", "document this repo's architecture").
  • Has just merged structural changes or is onboarding someone and needs to sync docs/ARCHITECTURE.md or a Notion page with the real state of the code.

Do not use it to design a new project from scratch with prescriptive framework standards (use monorepo-architecture, nestjs-architecture, nextjs-architecture, astro-architecture or react-native-architecture for that).


📋 Workflow

Step 1: Determine the Destination and Mode (Create vs. Update)

Follow references/destinations.md:

  1. Notion (MCP): if the user passes a Notion URL/ID or asks to write to Notion, use notion-fetch if the page already exists; if it is new, confirm which parent page or database to create it in.
  2. Local file: if Notion is not mentioned, look for docs/ARCHITECTURE.md, ARCHITECTURE.md and docs/architecture.md, in that order, to update in place without duplicating. If none exists, propose docs/ARCHITECTURE.md (or first ask whether a Notion MCP is connected and they prefer Notion).
  3. Preservation in update mode: read the whole current document and identify hand-written sections (ADRs, business decisions, roadmap, owners, external links) to keep them intact.

Step 2: Explore the Repository by Layers (Read-Only)

Follow the checklist in references/repo-discovery.md, excluding build folders, dependencies and files with secrets:

  1. Topology and manifests: monorepo vs. single app, runtimes and package manager.
  2. Apps, modules and boundaries: entry points, main routes, shared packages and dependency direction.
  3. Data and persistence: database, ORM/migrations, file storage, cache or queues (only if they exist).
  4. Auth, security and permissions: identity providers, middleware/guards and RLS rules.
  5. Integrations and environment variables: external SDKs and webhooks; list only the names of variables from .env.example or configuration code (reading real .env files is forbidden).
  6. Key flows: trace 1–3 main end-to-end paths, citing verified paths.
  7. Testing, CI/CD and deployment: verified scripts, workflows and deployment artifacts.

Step 3: Detect Drift (Update Mode Only)

Compare what you observed in Step 2 against the existing page and briefly list what is stale or new (modules added/removed, stack changes, new integrations, deployment migration or changed commands).

Step 4: Write the Architecture Map

Follow references/architecture-template.md:

  1. Adapt the sections to the project's real size (omit DB, queue or auth sections if they don't exist).
  2. Generate a valid Mermaid diagram (flowchart TD or flowchart LR), quoting labels that contain parentheses, brackets or slashes.
  3. Mark anything that cannot be inferred with certainty from the code as [to confirm] instead of guessing. Pages written by earlier versions use [por confirmar]; treat it the same way and keep it in pages that already use it.
  4. Add the freshness metadata at the end (Last updated: <YYYY-MM-DD> · Commit: <short-sha>).

Step 5: Review Gate and Persistence

  1. Show in the chat:
    • The exact destination (Notion URL/page or local path).
    • On creation: the full draft.
    • On update: the drift summary, the preserved manual sections and the updated content.
  2. Wait for the user's explicit confirmation before creating or editing files or Notion pages.
  3. If updating in Notion, read again with notion-fetch right before notion-update-page so concurrent edits are not overwritten. Do not edit source code or commit.

⚠️ Critical Rules

  1. Reply in the user's language, even though this skill is written in English. Write the page in the language of the existing page or, for a new one, the user's language.
  2. Only facts verified in the repo: every path, command, module or integration documented must have been checked in real files. Anything unverifiable is marked [to confirm].
  3. Zero secrets: never read .env, .env.local, .env.production, private keys or credentials; only variable names from .env.example or code.
  4. Mandatory confirmation gate: writing to docs/ARCHITECTURE.md or Notion without first showing the proposal and receiving confirmation is forbidden.
  5. Strict preservation of manual notes: never delete ADRs, historical context, links or team notes that cannot be regenerated from the code.
  6. No duplicate destination: if an ARCHITECTURE.md or a linked page already exists, update it instead of creating a second parallel copy.
  7. Architectural level: explain boundaries, responsibilities and flows; avoid endless lists of every file in the repo.
  8. Documentation only: do not modify application code or run git commit or git push.

📚 References

  • Repo discovery checklist: what to read by layer and which files to ignore.
  • Architecture template and Mermaid: canonical structure, size adaptation and an example.
  • Destinations and note preservation: flow for Notion MCP, local Markdown and safe merging.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.