gh-org-chart

Generate an interactive HTML org explorer from a GitHub organization. Surfaces team hierarchy, members, owned repos, and CODEOWNERS path attributions. Two stages: collect.sh writes a canonical JSON, render.py emits a self-contained HTML file. The JSON is the cache (mtime ≤ 24h skips re-collection) and is hand-editable. Triggers: "org chart", "team chart", "visualize github org", "who owns this repo", "github team hierarchy", "/gh-org-chart"

12 stars

Best use case

gh-org-chart is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Generate an interactive HTML org explorer from a GitHub organization. Surfaces team hierarchy, members, owned repos, and CODEOWNERS path attributions. Two stages: collect.sh writes a canonical JSON, render.py emits a self-contained HTML file. The JSON is the cache (mtime ≤ 24h skips re-collection) and is hand-editable. Triggers: "org chart", "team chart", "visualize github org", "who owns this repo", "github team hierarchy", "/gh-org-chart"

Teams using gh-org-chart should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/gh-org-chart/SKILL.md --create-dirs "https://raw.githubusercontent.com/jackchuka/skills/main/gh-org-chart/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/gh-org-chart/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How gh-org-chart Compares

Feature / Agentgh-org-chartStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Generate an interactive HTML org explorer from a GitHub organization. Surfaces team hierarchy, members, owned repos, and CODEOWNERS path attributions. Two stages: collect.sh writes a canonical JSON, render.py emits a self-contained HTML file. The JSON is the cache (mtime ≤ 24h skips re-collection) and is hand-editable. Triggers: "org chart", "team chart", "visualize github org", "who owns this repo", "github team hierarchy", "/gh-org-chart"

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# GitHub Org Chart

Produces two artifacts in `${TMPDIR:-/tmp}/gh-org-chart/`:

- `<org>-org.json` — canonical data: teams, members, owned repos, CODEOWNERS paths. Cache + hand-editable source of truth.
- `<org>-org.html` — single self-contained file with a designed tree (left) and detail pane (right). Opens via `file://`, works offline.

Set `OUT_DIR` once at the start of every phase and reuse it:

```bash
OUT_DIR="${TMPDIR:-/tmp}/gh-org-chart"
mkdir -p "$OUT_DIR"
```

## Arguments

- `/gh-org-chart` — prompt for org.
- `/gh-org-chart <org>` — render-if-fresh: if `<org>-org.json` exists and `mtime` is within 24h, re-render from it. Otherwise collect, then render.
- `/gh-org-chart <org> --refresh` — force re-collect.
- `/gh-org-chart <org> --no-codeowners` — skip CODEOWNERS scan (faster on big orgs).
- `/gh-org-chart <org> --no-members` — drop members from collection and output.

## Phase 1: Intake

1. **Resolve org**: if provided as argument, use it. Otherwise ask:
   > Which GitHub org should I chart?

2. **Verify auth**: run `gh auth status`. Confirm `read:org` is in the scopes line. If not, instruct:
   > `gh auth refresh -s read:org`
   then re-run the skill.

## Phase 2: Decide collect vs. reuse

3. Locate `$OUT_DIR/<org>-org.json`.
4. If `--refresh` was passed, or the file does not exist, or its mtime is older than 24h, run collect (Phase 3). Otherwise skip to Phase 4.

   Freshness check:

   ```bash
   JSON="$OUT_DIR/$ORG-org.json"
   if [[ "$REFRESH" == "1" ]] || [[ ! -f "$JSON" ]] || \
      [[ $(($(date +%s) - $(stat -f %m "$JSON" 2>/dev/null || stat -c %Y "$JSON"))) -gt 86400 ]]; then
     NEEDS_COLLECT=1
   fi
   ```

## Phase 3: Collect

5. Run the bundled collect script (handles zsh `noclobber` via `rm -f`):

   ```bash
   rm -f "$OUT_DIR/$ORG-org.json"
   "${CLAUDE_SKILL_DIR:-$HOME/.claude/skills/gh-org-chart}/scripts/collect.sh" \
     "$ORG" $FLAGS > "$OUT_DIR/$ORG-org.json"
   ```

   Where `$FLAGS` is built from `--no-codeowners` and `--no-members` if set. CODEOWNERS scanning is the long pole — expect ~1 API call per owned repo. Big orgs (200+ owned repos with rate limiting): consider `--no-codeowners`.

## Phase 4: Render

6. Run the renderer:

   ```bash
   python3 "${CLAUDE_SKILL_DIR:-$HOME/.claude/skills/gh-org-chart}/scripts/render.py" \
     "$OUT_DIR/$ORG-org.json"
   ```

   This writes `<org>-org.html` next to the JSON (i.e. in `$OUT_DIR`).

7. Open it (macOS):

   ```bash
   open "$OUT_DIR/$ORG-org.html"
   ```

   Other platforms: report the path so the user can open it themselves.

## Phase 5: Report

8. Summarize (set `JSON="$OUT_DIR/$ORG-org.json"`):
   - Teams: `jq '.teams | length' "$JSON"`
   - Owned repos (admin or maintain): `jq '[.teams[].repos[] | select(.permission == "admin" or .permission == "maintain") | .name] | unique | length' "$JSON"`
   - CODEOWNERS path attributions: `jq '[.teams[].repos[].codeowner_paths // [] | length] | add // 0' "$JSON"`
   - Member entries: `jq '[.teams[].members[]] | length' "$JSON"` (omit if `--no-members`).
   - Whether the JSON was freshly collected or reused from cache.

## Notes

- **Hand-editing the JSON**: edits survive across `/gh-org-chart <org>` runs because the freshness check reuses the file. Use `--refresh` when you want collection to overwrite your edits.
- **CODEOWNERS attribution**: only `@<org>/<team-slug>` owners produce attributions. Individual user owners (`@alice`) and external orgs (`@other-org/team-x`) are intentionally ignored — this is a team-ownership view.
- **No reporting lines**: GitHub teams reflect permission grouping, not management hierarchy. Manager → report relationships need a different data source (HRIS).
- **Performance**: CODEOWNERS scan is restricted to owned repos (permission ≥ maintain) to keep API calls bounded.

Related Skills

restaurant-search

12
from jackchuka/skills

Search for Japanese restaurants using the `hpp` CLI (HotPepper Gourmet API). Use when the user wants to find a restaurant, plan a dinner, search for izakayas, or book a group meal in Japan. Triggers on requests like "find a restaurant near Shibuya", "search for izakayas in 新宿", "restaurant for 10 people in 浜松町", "dinner spot near Tokyo station".

project-namer

12
from jackchuka/skills

Use when naming a project, repository, tool, or product and wanting a memorable, unique name

p-slack-triage

12
from jackchuka/skills

Scan Slack for messages needing your attention, walk through them one-by-one, and draft/send replies. Covers DMs, mentions, threads, and channel activity. Use when the user wants to triage Slack, check what needs attention, or draft replies. Triggers on "triage slack", "check slack", "what needs my attention on slack", "slack replies", "review slack messages", "/slack-triage".

p-news-briefing

12
from jackchuka/skills

Use when the user asks for news, wants a briefing, says "/news-briefing", or asks to aggregate recent information on any topic. Triggers on requests like "what's happening with AI", "get me news on crypto", "news briefing on climate".

p-md-to-slides

12
from jackchuka/skills

Convert a structured Markdown deck source into a styled Google Slides presentation. Use this skill when the user has a slide.md file (or wants to write one) and wants Google Slides output — talks, LT decks, lecture slides, conference presentations, internal explainers. Trigger phrases include "md からスライド作って", "slide.md を Google Slides にして", "発表資料を Google Slides で", "convert this markdown to slides", "build a Google Slides deck from this markdown", "make slides from md", "/md-to-slides", and similar. Also use when the user references a presentation/<date>/slide.md file structure with `## Slide N — title`, `**話すこと:**`, and `**スライド要素:**` sections.

p-ego-search

12
from jackchuka/skills

Search for mentions of you across Slack, Fireflies, and GitHub. Triggers on "egosearch", "/egosearch", "search for mentions of me", "who's talking about me".

p-daily-standup

12
from jackchuka/skills

Aggregate previous business day activity and post standup update to Slack. Use when the user says "standup", "daily standup", "post status", "status update", or "/daily-standup".

p-daily-report

12
from jackchuka/skills

Use when reviewing what you worked on, creating standups, writing status updates, tracking daily/weekly progress, or asking "what did I do today"

p-daily-reflection

12
from jackchuka/skills

Reflect on past work and iterate to improve. Analyzes Claude sessions, GitHub, Slack, and Fireflies to generate a journal entry with actionable improvements. Updates persistent memory with confirmed learnings. Use when the user says "reflect", "reflection", "what can I improve", "retrospective", "review my work", or "/daily-reflection".

p-blog-writer

12
from jackchuka/skills

Write blog posts in {user_name}'s voice with theoretical depth and persuasive arguments. Iterative workflow: intake → outline → section-by-section expansion → polish. Adapts to tool announcements, opinion pieces, deep-dives, and tutorials. Use when the user says "/blog-writer", "write a blog post", "draft an article about", "help me write about", or wants to create blog content.

p-blog-post-mining

12
from jackchuka/skills

Mine development activities for blog-worthy topics and create outlines. Analyzes Claude session history, GitHub commits/PRs, Slack discussions, and Fireflies meeting recordings to find interesting stories. Use when the user wants blog ideas, content inspiration, or asks "what can I write about", "find blog material", "blog ideas from my work", "/blog-post-mining".

p-activity-digest

12
from jackchuka/skills

Summarize recent communication activity from Slack and meeting recordings. Use when the user wants to know what happened on Slack, review meeting action items, find mentions, or get a communication summary. Triggers on "summarize Slack", "meeting action items", "what was discussed", "activity summary", "search my mentions", "highlight of the day", "/activity-digest".