code-communities
Detects architectural clusters and coupling boundaries via community detection on the code graph. Use when identifying module groupings or refactoring targets.
npx skills add majiayu000/claude-skill-registry --skill code-communities --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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 |
- Prerequisites
- Steps
- Algorithm
python3 "$GRAPH_QUERY" --action communities
find . -name "*.py" -not -path "*/node_modules/*" | \
sed 's|/[^/]*$||' | sort | uniq -c | sort -rn
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 -20What does the code-communities skill do?
Detects architectural clusters and coupling boundaries via community detection on the code graph. Use when identifying module groupings or refactoring targets.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill code-communities --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
