Xpersona
C

code-communities

CLAWHUB · Unverified

Detects architectural clusters and coupling boundaries via community detection on the code graph Skill: code-communities Owner: athola Summary: Detects architectural clusters and coupling boundaries via community detection on the code graph Tags: latest:1.9.19 Version history: v1.9.19 | 2026-08-26T13:08:14.768Z | user Release v1.9.19 v1.9.17 | 2026-07-30T05:31:11.276Z | user Release v1.9.17 v1.9.16 | 2026-07-14T19:48:05.410Z | user Release v1.9.16 v1.9.15 | 2026-07-04T21:21:46.292Z | user Release v1.9.15 v1.9.14

62
Rank
84
Safety
1.7k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.7K downloads reported by the source. Last updated 10/10/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s17emme0e2m3cpf7k2jvp3a84984b8z9:nm-cartograph-code-communities
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-cartograph-code-communities/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

57,831 characters of source documentation, loaded on request.

Extracted files

3 files captured from the source.

SKILL.md

---
name: code-communities
description: |
  Detects architectural clusters and coupling boundaries via community detection on the code graph
version: 1.9.8
triggers:
  - identifying module groupings or refactoring targets
metadata: {"openclaw": {"homepage": "https://github.com/athola/claude-night-market/tree/master/plugins/cartograph", "emoji": "\ud83e\udd9e"}}
source: claude-night-market
source_plugin: cartograph
---

> **Night Market Skill** — ported from [claude-night-market/cartograph](https://github.com/athola/claude-night-market/tree/master/plugins/cartograph). For the full experience with agents, hooks, and commands, install the Claude Code plugin.


# Code Community Detection

Identify architectural clusters and module boundaries
in the codebase.

## 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

_meta.json

{
  "ownerId": "kn7d107jg9jv602h9ytsegydq184a42s",
  "slug": "nm-cartograph-code-communities",
  "version": "1.9.19",
  "publishedAt": 1787749694768
}

skill-card.md

## Description:

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

This skill is ready for commercial/non-commercial use.

## Publisher:

[athola](https://clawhub.ai/user/athola)

### License/Terms of Use:

MIT-0

## Use Case:

Developers and engineers use this skill to identify architectural clusters, module boundaries, coupling hotspots, and refactoring targets in a codebase.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: The skill may run a graph query script discovered from the local Claude plugin directory.

Mitigation: Review the gauntlet dependency or provide a trusted graph query path before executing the command.

Risk: If graph data or the gauntlet plugin is unavailable, architecture findings are based on directory structure and import patterns rather than graph community detection.

Mitigation: Treat fallback results as an estimate and run the gauntlet graph build when precise graph-based clustering is required.

## Reference(s):

- [Cartograph source plugin](https://github.com/athola/claude-night-market/tree/master/plugins/cartograph)

## Skill Output:

**Output Type(s):** [Text, Markdown, Shell commands, Guidance]

**Output Format:** [Markdown with shell commands, tables, warnings, Mermaid diagrams, and refactoring suggestions]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [May use gauntlet graph data when available and fall back to directory and import analysis.]

## Skill Version(s):

1.9.19 (source: server release metadata)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to code-communities and adjacent AI workflows.