Agent skill

Code Communities

by athola in athola/claude-night-market

Detects architectural clusters and coupling boundaries via community detection on the code graph.

MITAuto-check passedDevelopment

Install Code Communities

skills CLI
$ npx skills add athola/claude-night-market --skill code-communities -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install athola/claude-night-market code-communities --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/athola/claude-night-market.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/cartograph/skills/code-communities .claude/skills/code-communities && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
code-communities
GitHub stars
342
Used in
1 other repo
Token cost
~959 tokens
SKILL.md length
268 words
Files
1
Skills in repo
159
Repo updated
First seen
Licence
MIT

At a glance

Detects architectural clusters and coupling boundaries via community detection on the code graph.

  • Works in 5 steps: Run community detection (requires… → Display clusters → Show coupling warnings: If communities… → …
  • Identifying module groupings
  • SKILL.md covers When NOT To Use, Prerequisites, Steps and Algorithm, plus 1 more section
  • Calls python3 and rg

What it does

Code Communities is an agent skill from athola/claude-night-market. Detects architectural clusters and coupling boundaries via community detection on the code graph. Use when identifying module groupings or refactoring targets.

Its SKILL.md is about 960 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Refactoring. It works with Mermaid. The repository describes itself as: 23 Claude Code plugins: TDD enforcement hooks, git/PR workflows, spec-driven development, code review, project lifecycle, fix-from-error, maintenance automation, context… The licence is MIT.

When your agent uses it

  • Identifying module groupings
  • Refactoring targets

Example prompts

  • “Use the code-communities skill to detect architectural clusters and coupling boundaries via community detection on the code graph”
  • “/code-communities”

Requirements

  • Python 3

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Run community detection (requires gauntlet)
  2. Display clusters
  3. Show coupling warnings: If communities have
  4. Generate Mermaid diagram
  5. Suggest improvements

What it can do on your machine

Read from SKILL.md and the folder at commit 9f3eb00. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python3
    • rg

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Code Communities loads about 959 tokens when it runs. Until then it costs about 44 tokens; SKILL.md has 268 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~44
When it runs · the whole SKILL.md, loaded when a task matches
~959

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from athola/claude-night-market at commit 9f3eb00, republished under its MIT licence (© athola). 268 words, ~959 tokens.

Download SKILL.mdSave it as .claude/skills/code-communities/SKILL.md (or your agent's skills folder).
name
code-communities
description
Detects architectural clusters and coupling boundaries via community detection on the code graph. Use when identifying module groupings or refactoring targets.

Code Community Detection

Identify architectural clusters and module boundaries in the codebase.

When NOT To Use

  • One module's imports (use cartograph:dependency-graph)
  • Rendering an architecture already decided (use cartograph:architecture-diagram)

Prerequisites

This skill requires the gauntlet plugin for graph data. Discover it:

bash
GRAPH_QUERY=$(find ~/.claude/plugins -name "graph_query.py" -path "*/gauntlet/*" 2>/dev/null | head -1)

If gauntlet is not installed: Fall back to directory structure analysis. Group files by directory and use import statements to identify module boundaries. Generate a Mermaid diagram from directory-level relationships.

If installed but no graph.db: Tell the user to run /gauntlet-graph build.

Steps

  1. Run community detection (requires gauntlet):

    bash
    python3 "$GRAPH_QUERY" --action communities

    Fallback (no gauntlet): Analyze directory structure and cross-directory imports:

    bash
    # Directory-level grouping
    find . -name "*.py" -not -path "*/node_modules/*" | \
        sed 's|/[^/]*$||' | sort | uniq -c | sort -rn
    
    # Cross-directory imports (rg preferred, grep fallback)
    if command -v rg &>/dev/null; then
      rg "^from |^import " --type py -l . | \
        xargs -I{} rg "^from \w+ import|^import \w+" {} --no-filename
    else
      grep -rh "^from \|^import " --include="*.py" .
    fi | sort | uniq -c | sort -rn | head -20

    Group by top-level directories and count cross-directory imports to estimate coupling.

  2. Display clusters:

    Community         | Nodes | Cohesion | Description
    auth              |    12 |    0.85  | Authentication module
    db                |     8 |    0.92  | Database access layer
    api/handlers      |    15 |    0.71  | API request handlers
    utils             |     6 |    0.45  | Shared utilities
  3. Show coupling warnings: If communities have

    10 cross-boundary edges, highlight them:

    WARNING: High coupling between 'auth' and 'api/handlers'
    (23 cross-community edges, severity: high)
  4. Generate Mermaid diagram:

    mermaid
    flowchart TB
      subgraph auth[Auth Module - cohesion 0.85]
        verify_token
        check_permissions
      end
      subgraph db[DB Layer - cohesion 0.92]
        execute_query
        connection_pool
      end
      auth -->|"23 edges"| api
      db -->|"5 edges"| api
  5. Suggest improvements:

    • Low cohesion (<0.5): "Consider splitting this module into more focused components"
    • High coupling (>20 edges): "Consider introducing an interface to reduce direct dependencies"
Show full SKILL.md (114 more words)Show less

Algorithm

Uses the Leiden algorithm (when igraph is available) with edge-type-specific weights. Falls back to file-based grouping otherwise.

Edge TypeWeight
CALLS1.0
INHERITS0.8
IMPLEMENTS0.7
IMPORTS_FROM0.5
TESTED_BY0.4
CONTAINS0.3

Exit Criteria

  • Community table rendered with columns Community, Nodes, Cohesion, and Description for each detected cluster
  • Coupling warning surfaced for any pair of communities with more than 10 cross-boundary edges, labelled with severity
  • Mermaid flowchart TB generated with one subgraph per community showing cohesion score in the subgraph label
  • Improvement suggestions provided for any community with cohesion < 0.5 or coupling > 20 cross-community edges
  • If gauntlet is not installed, directory-structure fallback runs and absence of graph data is stated to the user

© athola, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/cartograph/skills/code-communities of athola/claude-night-market.

Open the folder on GitHubat commit 9f3eb00

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in athola/claude-night-market, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Code Communities next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Code Communities compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Code Communities this skillathola/claude-night-market3421 repos~959Automated safety check: PassMIT
Brooks Audithyhmrright/brooks-lint1.5k1 repos~537Automated safety check: PassMIT
Guidelinesakash-network/node1.1k22 repos~577Automated safety check: PassMIT
Archify Diagramstt-a1i/archify79k—~2.9kAutomated safety check: PassMIT
Diagram Designcathrynlavery/diagram-design45k1 repos~7.5kAutomated safety check: PassMIT
Component Refactoringlangflow-ai/langflow156k—~3.5kAutomated safety check: PassMIT

Similar skills

  • Brooks Audit

    hyhmrright/brooks-lint

    Architecture audit that maps module dependencies, checks layering integrity, and flags structural decay across a codebase, drawing on twelve classic engineering books.

    1.5k GitHub starsUsed in 1 repo~537 tokens
    DevelopmentAuto-check passed
  • Guidelines

    akash-network/node

    Behavioral guidelines to reduce common LLM coding mistakes. An agent skill from akash-network/node.

    1.1k GitHub starsUsed in 22 repos~577 tokens
    DevelopmentAuto-check passed
  • Archify Diagrams

    tt-a1i/archify

    Creates interactive architecture, workflow, sequence, data-flow and lifecycle diagrams as standalone HTML with inline SVG, themes and image or video export.

    79k GitHub stars~2.9k tokensUpdated today
    DevelopmentAuto-check passed
  • Diagram Design

    cathrynlavery/diagram-design

    Creates branded diagrams, from architecture, flowchart and sequence to charts and maps, as self-contained HTML with inline SVG, with import from draw.io, Mermaid and Excalidraw.

    45k GitHub starsUsed in 1 repo~7.5k tokens
    DevelopmentAuto-check passed
  • Component Refactoring

    langflow-ai/langflow

    Refactor high-complexity React components in Langflow frontend.

    156k GitHub stars~3.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Migrate Core Code to Submodules

    tinyhumansai/openhuman

    Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host.

    42k GitHub stars~2.6k tokensUpdated today
    DevelopmentAuto-check passed

More from athola/claude-night-market

All 159 skills in this repo
  • Night Market Diagnostics Toolkit

    athola/claude-night-market

    Run and interpret repo diagnostic scripts (ratchets, validators, token stats).

    342 GitHub stars~3.4k tokensUpdated 2 days ago
    Auto-check passed
  • Skills Eval

    athola/claude-night-market

    Evaluate Claude skill quality through auditing. An agent skill from athola/claude-night-market.

    342 GitHub stars~1.6k tokensUpdated 2 days ago
    Auto-check passed
  • Agent Teams

    athola/claude-night-market

    Coordinates Claude agent teams via filesystem protocol. An agent skill from athola/claude-night-market.

    342 GitHub stars~2.5k tokensUpdated 2 days ago
    Auto-check passed
  • Delegation Core

    athola/claude-night-market

    Delegates execution to eight CLIs (Gemini, Qwen, MiniMax, GLM, Muse, Codex, OpenCode, Glimmer).

    342 GitHub stars~2.5k tokensUpdated 2 days ago
    Auto-check passed
  • Elegant Code

    athola/claude-night-market

    Guide minimal code via a decision ladder with full safety, edge, and negative-case coverage.

    342 GitHub stars~2.1k tokensUpdated 2 days ago
    Auto-check passed
  • Skill Library Mission

    athola/claude-night-market

    Build a project skill library in .claude/skills/ via discovery, parallel authoring, and review.

    342 GitHub stars~1.6k tokensUpdated 2 days ago
    Auto-check passed

Works with

Categories

Questions about Code Communities

What does Code Communities do?

Detects architectural clusters and coupling boundaries via community detection on the code graph. Code Communities is an agent skill from athola/claude-night-market. Detects architectural clusters and coupling boundaries via community detection on the code graph.

When should I use Code Communities?

Code Communities fits situations like: identifying module groupings; refactoring targets.

How do I install Code Communities in Claude Code?

Run `npx skills add athola/claude-night-market --skill code-communities -a claude-code`. Or copy the skill folder (plugins/cartograph/skills/code-communities in athola/claude-night-market) into .claude/skills/code-communities in your project. Claude Code loads it when a task matches its description.

How do I install Code Communities in Codex?

Run `npx skills add athola/claude-night-market --skill code-communities -a codex`. Or copy the skill folder (plugins/cartograph/skills/code-communities in athola/claude-night-market) into .agents/skills/code-communities in your project. Codex loads it when a task matches its description.

Can I use Code Communities in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add athola/claude-night-market --skill code-communities -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/code-communities, .gemini/skills/code-communities, .github/skills/code-communities and .opencode/skills/code-communities in your project.

What does Code Communities need to run?

Going by SKILL.md and its folder, Code Communities needs the command-line tools its instructions call (python3 and rg). Our summary lists: Python 3.

Does Code Communities access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Code Communities safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Code Communities use?

Code Communities is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Code Communities use?

About 959 tokens (SKILL.md is roughly 3.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Code Communities?

Skills that share tags, products or a category with Code Communities: Brooks Audit (hyhmrright/brooks-lint, 1.5k stars), Guidelines (akash-network/node, 1.1k stars), Archify Diagrams (tt-a1i/archify, 79k stars) and Diagram Design (cathrynlavery/diagram-design, 45k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Code Communities?

athola (a GitHub user) maintains it in athola/claude-night-market, which has 342 GitHub stars. The repository holds 159 skills in this directory. The repository was last updated on October 6, 2026.

Source: athola/claude-night-market on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.