Agent skill

Dependency Analysis

by revfactory in revfactory/harness-100

Tools and methodologies for analyzing codebase dependency graphs and quantitatively measuring coupling/cohesion.

Apache-2.0Auto-check passedDevelopment

Install Dependency Analysis

skills CLI
$ npx skills add revfactory/harness-100 --skill dependency-analysis -a claude-code

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

GitHub CLI
$ gh skill install revfactory/harness-100 dependency-analysis --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/revfactory/harness-100.git skills-src && mkdir -p .claude/skills && cp -r skills-src/en/22-legacy-modernizer/.claude/skills/dependency-analysis .claude/skills/dependency-analysis && 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
dependency-analysis
GitHub stars
1.3k
Token cost
~1.2k tokens
SKILL.md length
186 words
Files
1
Skills in repo
464
Repo updated
First seen
Licence
Apache-2.0

At a glance

Tools and methodologies for analyzing codebase dependency graphs and quantitatively measuring coupling/cohesion.

  • Works in 4 steps: Coupling Metrics → Cohesion Metrics → Circular Dependency Detection — Tarjan… → …
  • Dependency analysis
  • SKILL.md covers Dependency Metric System, Language-specific Tools, Change Impact Analysis (CIA) and Architecture Fitness Functions, plus 1 more section
  • Calls npx

What it does

Dependency Analysis is an agent skill from revfactory/harness-100. Tools and methodologies for analyzing codebase dependency graphs and quantitatively measuring coupling/cohesion. Use this skill for 'dependency analysis', 'coupling measurement', 'circular dependencies', 'module coupling', 'cohesion analysis', 'dependency graph', 'coupling analysis', and other code dependency-related analysis. Enhances the dependency analysis capabilities of legacy-analyzer and refactoring-strategist. Note: full pipeline orchestration is outside the scope of this skill.

Its SKILL.md is about 1.2k 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 Data pipelines and ETL and Refactoring. The licence is Apache-2.0.

When your agent uses it

  • Dependency analysis
  • Coupling measurement
  • Circular dependencies
  • Module coupling

Example prompts

  • “dependency analysis”
  • “coupling measurement”
  • “circular dependencies”
  • “/dependency-analysis”

Requirements

  • Python 3
  • Node.js

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Coupling Metrics
  2. Cohesion Metrics
  3. Circular Dependency Detection — Tarjan SCC Algorithm
  4. Cycle Resolution Patterns

What it can do on your machine

Read from SKILL.md and the folder at commit 8e8d35c. 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:

    • npx

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

  • Network

    No URLs in SKILL.md. Its commands use npx, which can reach the network depending on how they are called.

    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

Dependency Analysis loads about 1.2k tokens when it runs. Until then it costs about 128 tokens; SKILL.md has 186 words of instructions outside code blocks.

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

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 revfactory/harness-100 at commit 8e8d35c, republished under its Apache-2.0 licence (© revfactory). 186 words, ~1,241 tokens.

Download SKILL.mdSave it as .claude/skills/dependency-analysis/SKILL.md (or your agent's skills folder).
name
dependency-analysis
description
Tools and methodologies for analyzing codebase dependency graphs and quantitatively measuring coupling/cohesion. Use this skill for 'dependency analysis', 'coupling measurement', 'circular dependencies', 'module coupling', 'cohesion analysis', 'dependency graph', 'coupling analysis', and other code dependency-related analysis. Enhances the dependency analysis capabilities of legacy-analyzer and refactoring-strategist. Note: full pipeline orchestration is outside the scope of this skill.

Dependency Analysis — Dependency Graph Analysis Tool

Methodologies and tool guide for quantitative measurement and visualization of code dependencies.

Dependency Metric System

1. Coupling Metrics
MetricFormulaInterpretationRisk Threshold
Ca (Afferent Coupling)Number of packages depending on meHigh = large change ripple effect> 20
Ce (Efferent Coupling)Number of packages I depend onHigh = unstable> 20
I (Instability)Ce / (Ca + Ce)0=stable, 1=unstableWarning in middle zone (0.3-0.7)
D (Distance)|A + I - 1|Distance from the main sequence> 0.3

Stable Dependencies Principle (SDP) Verification:

Dependency direction: Unstable -> Stable (correct)
Violation: Stable -> Unstable (risky — dependency inversion needed)
2. Cohesion Metrics
MetricMeasurement TargetAcceptable Threshold
LCOM4Number of connected components within a class= 1
TCC (Tight Class Cohesion)Ratio of directly connected methods> 0.5
H (Henderson-Sellers)Ratio of intra-package relationships> 0.7
3. Circular Dependency Detection — Tarjan SCC Algorithm
python
def find_cycles(graph):
    """Detect circular dependency groups using Tarjan SCC"""
    index_counter, stack, result = [0], [], []
    lowlink, index, on_stack = {}, {}, {}

    def strongconnect(v):
        index[v] = lowlink[v] = index_counter[0]
        index_counter[0] += 1
        on_stack[v] = True
        stack.append(v)
        for w in graph.get(v, []):
            if w not in index:
                strongconnect(w)
                lowlink[v] = min(lowlink[v], lowlink[w])
            elif on_stack.get(w):
                lowlink[v] = min(lowlink[v], index[w])
        if lowlink[v] == index[v]:
            component = set()
            while True:
                w = stack.pop()
                on_stack[w] = False
                component.add(w)
                if w == v: break
            if len(component) > 1:
                result.append(component)
    for v in graph:
        if v not in index: strongconnect(v)
    return result
4. Cycle Resolution Patterns
PatternApplicable SituationMethod
Dependency Inversion (DIP)A<->B bidirectionalExtract interface, unify direction
Event-based DecouplingA->B->A callbackIndirect communication via event bus
Mediator PatternA<->B<->C complex cycleCentral coordination via Mediator
Common Module ExtractionA<->B shared logicExtract shared parts into module C

Language-specific Tools

JavaScript/TypeScript
bash
npx madge --image graph.svg src/        # Dependency graph
npx madge --circular src/               # Circular detection
npx depcheck                            # Unused dependencies
Python
bash
pipdeptree --graph-output svg > deps.svg
pydeps src/mypackage --max-bacon=2
Java/Kotlin
bash
./gradlew dependencies --configuration runtimeClasspath
# Architecture rule testing with ArchUnit

Change Impact Analysis (CIA)

Changed file: UserService.java
+-- Direct impact (depth 1): UserController, OrderService, AuthService
+-- Indirect impact (depth 2): OrderController, PaymentService
+-- Test impact: UserServiceTest, OrderIntegrationTest
-> Estimated ripple scope: 8 files, 3 tests

Architecture Fitness Functions

python
DEPENDENCY_RULES = {
    "domain -> infrastructure prohibited": {
        "from": "domain/**", "to_not": "infrastructure/**", "severity": "ERROR"
    },
    "controller -> repository direct access prohibited": {
        "from": "controller/**", "to_not": "repository/**", "severity": "ERROR"
    },
}

Report Template

markdown
# Dependency Analysis Report

## Summary
- Total modules: N | Average coupling (Ce): X.X | Circular groups: N

## Per-module Metrics
| Module | Ca | Ce | I | A | D | LCOM4 | Grade |

## Circular Dependencies
- Group 1: [A, B, C] — Resolution strategy: DIP

## Hotspots (High Ca + High Ce)
- ModuleX: Ca=25, Ce=18 — Excessive change ripple scope

## Recommendations
1. [Urgent] Resolve circular dependencies
2. [Important] Separate hotspot modules
3. [Improvement] Automate dependency rules in CI

© revfactory, Apache-2.0. 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 en/22-legacy-modernizer/.claude/skills/dependency-analysis of revfactory/harness-100.

Open the folder on GitHubat commit 8e8d35c

Compare with similar skills

Dependency Analysis 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.

Dependency Analysis compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Dependency Analysis this skillrevfactory/harness-1001.3k—~1.2kAutomated safety check: PassApache-2.0
Veomni DevelopByteDance-Seed/VeOmni2.2k—~1kAutomated safety check: PassApache-2.0
Refactoring Dbt ModelsAltimateAI/data-engineering-skills127—~1.2kAutomated safety check: PassMIT
R Empirical Financeaspi6246/Claude-Code-Skills-for-Academics157—~1.3kAutomated safety check: PassNone
Guidelinesakash-network/node1.1k22 repos~577Automated safety check: PassMIT
Component Refactoringlangflow-ai/langflow156k—~3.5kAutomated safety check: PassMIT

Similar skills

  • Veomni Develop

    ByteDance-Seed/VeOmni

    VeOmni-specific checklist for feature development and refactoring.

    2.2k GitHub stars~1k tokensUpdated 6 days ago
    DevelopmentAuto-check passed
  • Refactoring Dbt Models

    AltimateAI/data-engineering-skills

    Safely refactors dbt models with downstream impact analysis.

    127 GitHub stars~1.2k tokensUpdated 5 days ago
    Data & AnalyticsAuto-check passed
  • R Empirical Finance

    aspi6246/Claude-Code-Skills-for-Academics

    Conventions for writing empirical finance R code with data.table, fixest, arrow, and ggplot2.

    157 GitHub stars~1.3k tokensUpdated 1 mo ago
    Data & AnalyticsAuto-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
  • 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.

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

More from revfactory/harness-100

All 464 skills in this repo
  • Anti Bot Analyzer

    revfactory/harness-100

    A skill for analyzing website anti-bot defense mechanisms and developing legitimate evasion strategies.

    1.3k GitHub stars~1.1k tokensUpdated 6 mo ago
    Auto-check passed
  • API Error Design Patterns

    revfactory/harness-100

    Reference for designing how an API reports failures: structured error codes, response shapes, client-friendly messages, an error catalog and retry or fallback advice.

    1.3k GitHub stars~1.6k tokensUpdated 6 mo ago
    Auto-check passed
  • API Security Checklist

    revfactory/harness-100

    Walks a backend-dev agent through OWASP API Top 10 checks, authentication and authorization patterns, and defense code during API design.

    1.3k GitHub stars~1.7k tokensUpdated 6 mo ago
    Auto-check passed
  • Arg Parser Generator

    revfactory/harness-100

    Methodology for systematically designing and generating CLI tool argument parser structures.

    1.3k GitHub stars~1.2k tokensUpdated 6 mo ago
    Auto-check passed
  • Audience Segmentation

    revfactory/harness-100

    Audience segmentation skill used by the analyst and curator agents.

    1.3k GitHub stars~1.3k tokensUpdated 6 mo ago
    Auto-check passed
  • Audio Storytelling

    revfactory/harness-100

    Audio storytelling skill used by the podcast scriptwriter and show note editor.

    1.3k GitHub stars~1.6k tokensUpdated 6 mo ago
    Auto-check passed

Categories

Questions about Dependency Analysis

What does Dependency Analysis do?

Tools and methodologies for analyzing codebase dependency graphs and quantitatively measuring coupling/cohesion. Dependency Analysis is an agent skill from revfactory/harness-100. Tools and methodologies for analyzing codebase dependency graphs and quantitatively measuring coupling/cohesion.

When should I use Dependency Analysis?

Dependency Analysis fits situations like: dependency analysis; coupling measurement; circular dependencies; module coupling.

How do I install Dependency Analysis in Claude Code?

Run `npx skills add revfactory/harness-100 --skill dependency-analysis -a claude-code`. Or copy the skill folder (en/22-legacy-modernizer/.claude/skills/dependency-analysis in revfactory/harness-100) into .claude/skills/dependency-analysis in your project. Claude Code loads it when a task matches its description.

How do I install Dependency Analysis in Codex?

Run `npx skills add revfactory/harness-100 --skill dependency-analysis -a codex`. Or copy the skill folder (en/22-legacy-modernizer/.claude/skills/dependency-analysis in revfactory/harness-100) into .agents/skills/dependency-analysis in your project. Codex loads it when a task matches its description.

Can I use Dependency Analysis 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 revfactory/harness-100 --skill dependency-analysis -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/dependency-analysis, .gemini/skills/dependency-analysis, .github/skills/dependency-analysis and .opencode/skills/dependency-analysis in your project.

What does Dependency Analysis need to run?

Going by SKILL.md and its folder, Dependency Analysis needs the command-line tools its instructions call (npx). Our summary lists: Python 3; Node.js.

Does Dependency Analysis access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Dependency Analysis 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 Dependency Analysis use?

Dependency Analysis is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Dependency Analysis use?

About 1.2k tokens (SKILL.md is roughly 5k 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 Dependency Analysis?

Skills that share tags, products or a category with Dependency Analysis: Veomni Develop (ByteDance-Seed/VeOmni, 2.2k stars), Refactoring Dbt Models (AltimateAI/data-engineering-skills, 127 stars), R Empirical Finance (aspi6246/Claude-Code-Skills-for-Academics, 157 stars) and Guidelines (akash-network/node, 1.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Dependency Analysis?

revfactory (a GitHub user) maintains it in revfactory/harness-100, which has 1,290 GitHub stars. The repository holds 464 skills in this directory. The repository was last updated on March 22, 2026.

Source: revfactory/harness-100 on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.