c4-code
Has your agent analyze code directories to create C4 code-level documentation. It details functions, arguments, dependencies, and code structure.
What it does
This tool analyzes code folders to create detailed documentation about how functions and classes are organized, what data they use, and how they connect to each other. It helps in understanding the internal structure of a program.
When to use it
- ✓When starting to work on a new part of the code.
- ✓When you need to understand how a specific section of code works.
- ✓When documenting a project for other developers.
Example of what to ask your AI
“Document the 'utils' folder of the project, showing the functions, their parameters, and dependencies.”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
The tool examines the code files in the specified folder. It identifies functions, classes, their parameters, what they return, and which other parts of the code they use. It then organizes this information clearly.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add sickn33/agentic-awesome-skills --skill c4-codeOr download just the file:
curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/c4-code/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
C4 Code Level: [Directory Name]
Use this skill when
- Working on c4 code level: [directory name] tasks or workflows
- Needing guidance, best practices, or checklists for c4 code level: [directory name]
Do not use this skill when
- The task is unrelated to c4 code level: [directory name]
- You need a different domain or tool outside this scope
Instructions
- Clarify goals, constraints, and required inputs.
- Apply relevant best practices and validate outcomes.
- Provide actionable steps and verification.
Overview
- Name: [Descriptive name for this code directory]
- Description: [Short description of what this code does]
- Location: [Link to actual directory path]
- Language: [Primary programming language(s)]
- Purpose: [What this code accomplishes]
Code Elements
Functions/Methods
functionName(param1: Type, param2: Type): ReturnType- Description: [What this function does]
- Location: [file path:line number]
- Dependencies: [what this function depends on]
Classes/Modules
ClassName- Description: [What this class does]
- Location: [file path]
- Methods: [list of methods]
- Dependencies: [what this class depends on]
Dependencies
Internal Dependencies
- [List of internal code dependencies]
External Dependencies
- [List of external libraries, frameworks, services]
Relationships
Optional Mermaid diagrams for complex code structures. Choose the diagram type based on the programming paradigm. Code diagrams show the internal structure of a single component.
Object-Oriented Code (Classes, Interfaces)
Use classDiagram for OOP code with classes, interfaces, and inheritance:
---
title: Code Diagram for [Component Name]
---
classDiagram
namespace ComponentName {
class Class1 {
+attribute1 Type
+method1() ReturnType
}
class Class2 {
-privateAttr Type
+publicMethod() void
}
class Interface1 {
<<interface>>
+requiredMethod() ReturnType
}
}
Class1 ..|> Interface1 : implements
Class1 --> Class2 : uses
### Functional/Procedural Code (Modules, Functions)
For functional or procedural code, you have two options:
**Option A: Module Structure Diagram** - Use `classDiagram` to show modules and their exported functions:
```mermaid
---
title: Module Structure for [Component Name]
---
classDiagram
namespace DataProcessing {
class validators {
<<module>>
+validateInput(data) Result~Data, Error~
+validateSchema(schema, data) bool
+sanitize(input) string
}
class transformers {
<<module>>
+parseJSON(raw) Record
+normalize(data) NormalizedData
+aggregate(items) Summary
}
class io {
<<module>>
+readFile(path) string
+writeFile(path, content) void
}
}
transformers --> validators : uses
transformers --> io : reads from
```
**Option B: Data Flow Diagram** - Use `flowchart` to show function pipelines and data transformations:
```mermaid
---
title: Data Pipeline for [Component Name]
---
flowchart LR
subgraph Input
A[readFile]
end
subgraph Transform
B[parseJSON]
C[validateInput]
D[normalize]
E[aggregate]
end
subgraph Output
F[writeFile]
end
A -->|raw string| B
B -->|parsed data| C
C -->|valid data| D
D -->|normalized| E
E -->|summary| F
```
**Option C: Function Dependency Graph** - Use `flowchart` to show which functions call which:
```mermaid
---
title: Function Dependencies for [Component Name]
---
flowchart TB
subgraph Public API
processData[processData]
exportReport[exportReport]
end
subgraph Internal Functions
validate[validate]
transform[transform]
format[format]
cache[memoize]
end
subgraph Pure Utilities
compose[compose]
pipe[pipe]
curry[curry]
end
processData --> validate
processData --> transform
processData --> cache
transform --> compose
transform --> pipe
exportReport --> format
exportReport --> processData
```
### Choosing the Right Diagram
…
FAQ
What is 'C4 Code-level'?
It's a way of documenting code by focusing on internal details like functions and classes to help understand the structure of a specific component.
What kind of diagrams can it create?
It can create class diagrams for object-oriented code and flow or module structure diagrams for functional/procedural code, depending on the code's style.
Do I need to know about the C4 model to use this tool?
Not necessarily. The tool focuses on code details, which is one level of the C4 model, but you don't need to be an expert in the model to use it.
Details
Original description by the author
Expert C4 Code-level documentation specialist. Analyzes code directories to create comprehensive C4 code-level documentation including function signatures, arguments, dependencies, and code structure.
Popularity
- GitHub stars
- 48k
- Ranking position
- #2484
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
00-andruia-consultant
Helps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
sickn33/agentic-awesome-skills
007
Lets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
sickn33/agentic-awesome-skills
10-andruia-skill-smith
Helps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
sickn33/agentic-awesome-skills
20-andruia-niche-intelligence
Lets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
sickn33/agentic-awesome-skills
Similar skills
architecture-decision-records
Has your agent record important project structure decisions. It helps to understand the reasoning behind choices and maintain a clear history of changes.
affaan-m/ECC
code-tour
Lets your agent create step-by-step code walkthroughs with exact file and line anchors. It's useful for project introductions, code explanations, or change reviews. Helps understand how a system works.
affaan-m/ECC
codebase-onboarding
Helps your agent analyze unfamiliar code and create an onboarding guide. It includes an architecture map, entry points, and conventions. Ideal for starting on a new project.
affaan-m/ECC