Skip to content
Back to skills

Analyze

ASecurity

Code and component analysis — analyze code, trace flows, audit consistency, inspect components

  • 7 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 26, 2026
developmentgo

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add jhlee0409/all-for-claudecode --skill analyze --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Analyze?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Analyze
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jhlee0409-analyze/badge)](https://www.skillsdirectory.com/skills/jhlee0409-analyze)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: afc:analyze
description: "Code and component analysis — analyze code, trace flows, audit consistency, inspect components"
argument-hint: "<analysis target or question>"
user-invocable: true
context: fork
allowed-tools:
  - Read
  - Grep
  - Glob
  - WebSearch
model: sonnet
---

# /afc:analyze — Code Analysis

> Performs general-purpose codebase exploration and analysis based on a natural-language prompt.
> **Read-only** — does not modify any files.

## Arguments

- `$ARGUMENTS` — (required) description of what to analyze (e.g., "trace the login flow", "root cause of rendering bug", "how does the hook system work")

## Config Load

Architecture, Code Style, and Project Context are auto-loaded via `.claude/rules/afc-project.md`.
Read `.claude/afc.config.md` if CI commands are needed.

If neither rules file nor config exists: read `CLAUDE.md` for architecture info. Proceed without config if neither exists.

## Execution Steps

### 1. Parse Analysis Intent

Read the user's question semantically. What does the user actually want to understand? Select the mode that best serves their learning goal.

| Mode | When to select | Focus |
|------|---------------|-------|
| **Root Cause** | User wants to understand WHY something is broken, failing, or behaving unexpectedly — the goal is diagnosing a problem | Error trace → data flow → hypothesis |
| **Structural** | User wants to understand HOW a system is built or how components relate — the goal is comprehension of design or flow | Component relationships, call graphs, data flow |
| **Exploratory** | User wants to discover WHAT exists in the codebase — the goal is finding, listing, or locating things | File/function discovery, pattern matching |
| **Comparative** | User wants to understand the DIFFERENCE between two or more things — the goal is contrast and tradeoff evaluation | Side-by-side analysis of implementations |

If the question spans multiple modes, select the PRIMARY mode that best matches the user's core learning goal, and note secondary aspects to incorporate during analysis.

If the intent doesn't clearly match a single mode, default to **Exploratory**.

### 2. Codebase Exploration

Based on the classified mode:

1. **Identify scope**: determine which files/directories are relevant to `$ARGUMENTS`
2. **Read code**: read relevant files using Read tool (prioritize by relevance)
3. **Trace connections**: follow imports, function calls, and data flow
4. **Gather evidence**: collect specific code references (file:line) for findings

Exploration should be guided by `{config.architecture}` layer structure when available.

### 3. Analysis

Apply the appropriate analysis lens:

- **Root Cause**: build a causal chain from symptom → intermediate causes → root cause
- **Structural**: map component relationships, identify coupling and cohesion patterns
- **Exploratory**: enumerate findings with code references
- **Comparative**: highlight similarities, differences, and tradeoffs

### 4. Output Results (console)

```markdown
## Analysis: {summary of $ARGUMENTS}

### Mode: {Root Cause | Structural | Exploratory | Comparative}

### Findings
{Numbered findings with code references (file:line)}

### Key Relationships
{Relevant component/function relationships discovered}

### Summary
{2-3 sentence conclusion answering the original question}

### Suggested Next Steps
{1-3 actionable suggestions based on the analysis}
```

### 5. Final Output

```
Analysis complete: {short summary}
├─ Mode: {mode}
├─ Files explored: {N}
├─ Findings: {N}
└─ Suggested next steps: {N}
```

## Notes

- **Read-only**: Do not modify any files. Report only.
- **Scope discipline**: Focus analysis on what was asked. Do not expand scope unnecessarily.
- **Code references**: Always include `file:line` references so the user can navigate to relevant code.
- **Not artifact validation**: For spec/plan/tasks consistency checks, use `/afc:validate` instead.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.