Skip to content
Agentmart
Submit a tool

architecture-brief

Generate an architecture overview document from a pull request or local git diff.

Skill by hugobatista

IndexedMIT★ 1
Write a review

Chalk Labs

Need help deploying architecture-brief?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/hugobatista-architecture-brief

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Generate an architecture overview document from a pull request or local git diff. Detects the forge type (GitHub, Forgejo, GitLab) from the current repo and uses the appropriate CLI. Supports PR mode (pr brief #N, architecture-brief PR #N) and local diff mode (git brief, architecture-brief, architecture-brief --staged). Produces a concise brief with Mermaid diagrams explaining what was built and how it works. Triggered by: architecture-brief, pr brief, git brief.

Use cases: documents

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/architecture-brief

What's inside

Skill name
architecture-brief
Description
Generate an architecture overview document from a pull request or local git diff. Detects the forge type (GitHub, Forgejo, GitLab) from the current repo and uses the appropriate CLI. Supports PR mode (pr brief #N, architecture-brief PR #N) and local diff mode (git brief, architecture-brief, architecture-brief --staged). Produces a concise brief with Mermaid diagrams explaining what was built and how it works. Triggered by: architecture-brief, pr brief, git brief.
License
MIT
Instructions
179 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Architecture Brief (architecture-brief)

This skill generates an architecture overview document from a PR or local git diff — explaining **what was built** and **how it works**. It detects the forge from the current repo and adapts accordingly.

## When to skip

Do **not** generate a brief for:
- Bug fixes (PR closes an issue with a patch)
- Small changes (< 100 lines)
- Pure refactors with no behavioral change
- Documentation-only PRs
- Dependency bumps

If unsure, generate the brief — it's cheap and useful.

## Workflow

### 1. Determine mode

Parse the user's input:

| Input | Mode | Description |
|---|---|---|
| `pr brief #<N>`, `architecture-brief PR #<N>` | **PR** | Analyze a specific PR |
| `architecture-brief` | **Local** (unstaged) | Analyze current unstaged diff |
| `architecture-brief --staged`, `git brief --cached` | **Local** (staged) | Analyze staged changes only |
| `architecture-brief --output <path>` | any | Override output path |
| `git brief --since <ref>` | **Local** (range) | Analyze diff from `<ref>` to HEAD |

If both a PR number and a local diff context exist, PR mode wins.

### 2. Detect forge (PR mode only)

Load the `forge-detect` skill. It detects the repository's forge
and sets `$FORGE_CLI`, `$FORGE_TYPE`, and `$FORGE_HOST`. Use the
command templates from `forge-detect` for PR info, diff, and files.

If the forge CLI is not installed, fall back to the PR's web API or
local-diff mode. If the forge CLI is installed but not authenticated,
fall back to local-diff mode and note it to the user.

### 3. Gather input

#### PR mode

1. Fetch PR info (title, description, changed files count) using `$FORGE_CLI`
2. Save the diff using the PR diff command from `forge-detect`
3. Create a worktree:
   ```bash
   git fetch origin "pull/<N>/head:arch-brief-pr-<N>"
   git worktree add ../arch-brief-pr-<N> arch-brief-pr-<N>
   ```
4. Read the diff to understand scope and identify key new files

#### Local mode

1. Get branch name: `git branch --show-current`
2. Get the diff:
   - Unstaged: `git diff > /tmp/arch-brief.diff`
   - Staged: `git diff --cached > /tmp/arch-brief.diff`
   - Range: `git diff <ref>..HEAD > /tmp/arch-brief.diff`
3. Read the diff to understand scope
4. No worktree needed — files are in the current working tree

### 4. Analyze architecture

Read the diff and identify:

1. **New modules/directories** — new packages, subdirectories, or files that form a cohesive unit
2. **New data models** — database tables, schemas, Pydantic models
3. **New API endpoints or CLI commands** — routes, entry points, background workers
4. **New infrastructure patterns** — outbox, CQRS, event sourcing, background jobs, caching
5. **New configuration** — environment variables, feature flags, settings

For each, read the relevant source files from the worktree (PR mode) or working tree (local mode) to understand how they work.

### 5. Generate the brief

Build the output path:

- If `--output <path>` was provided, use it directly
- Otherwise:
  - PR mode: `docs/pr-<N>-arch.md`
  - Local mode: `docs/<branch-name>-arch.md`

Save to the resolved path with this structure:

```markdown
# <Title> Architecture

<Context line: PR #<N> | branch <name>, <date>, +/- line stats>

## Overview

<2-3 paragraphs. What problem does this solve? What are the key design
decisions?>

## Key concepts

<Explain the core domain concepts introduced. Use subheadings.>

### <Concept 1>

<How it works, why it exists, what problem it solves.>

### <Concept 2>

...

## Data flow

<Use Mermaid diagrams. Choose the type that best fits:

- **flowchart** for component relationships and routing
- **sequenceDiagram** for request/response flows
- **stateDiagram-v2** for state machines

```mermaid
flowchart LR

From hugobatista/agent-skills, MIT.

More from hugobatista/agent-skills

Signals

Stars
1
Forks
0
Open issues
0
Last commit (this folder)
Sep 20, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from hugobatista

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get architecture-brief running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying architecture-brief?

CallGet help
Cite this page

architecture-brief skill. Agent Mart. https://agentmart.dev/skills/hugobatista-architecture-brief (last updated 2026-10-24)