c4-code
Skill by sickn33
Creates C4 code-level documentation for a code directory, covering function signatures, arguments, dependencies and code structure. Aimed at developers who want structured docs for object-oriented, functional or procedural code, with optional Mermaid diagrams.
Install c4-code
Built from the published package, never by AI.
git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills /tmp/agentic-awesome-skills && mkdir -p ~/.claude/skills && cp -r /tmp/agentic-awesome-skills/skills/c4-code ~/.claude/skills/c4-codeRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills /tmp/agentic-awesome-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/agentic-awesome-skills/skills/c4-code ~/.gemini/antigravity-cli/skills/c4-codeAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
The c4-code skill documents a single code directory at the code level of the C4 model. It asks the assistant to record each function or method with its signature, arguments, location and dependencies, and to describe classes or modules with their methods and dependencies. Internal and external dependencies are listed in separate sections.
The template includes guidance on choosing Mermaid diagrams by code style. Object-oriented code uses classDiagram, while functional code can use a module diagram or a flowchart of data flow or function dependencies. The source notes that the C4 model usually creates code diagrams only for complex components. It is aimed at developers documenting code in languages such as TypeScript, Rust, Go and Elixir, as named in its examples.
Written from the project's SKILL.md and checked against it.
What it can do
- Function documentationRecords function signatures, arguments, return types, descriptions, locations and dependencies.
- Class and module documentationDescribes classes or modules with their methods, locations and dependencies.
- Dependency listingLists internal code dependencies and external libraries, frameworks or services separately.
- Mermaid diagramsCreates classDiagram or flowchart diagrams chosen to fit the code's programming paradigm.
- Paradigm guidanceGives a table matching OOP, FP, procedural and mixed code to a suitable diagram type.
Try asking
- Analyze the src/api directory and create C4 Code-level documentation
- Document all functions in the authentication module with their signatures
- Create a data pipeline diagram for the ETL transformers in src/pipeline
Good to know
- Intended for code-level detail only; the C4 model usually needs code diagrams only for complex components.
- Output is not a substitute for testing, validation or expert review.
- Should be used only when the task clearly matches its documentation scope.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/c4-code/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md8 KB
Alternatives to c4-code
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
c4-code: common questions
What does the c4-code skill produce?
It produces structured C4 Code-level documentation for a directory, including function and class entries, dependency lists and optional Mermaid diagrams.
Which diagram types does it use?
It uses classDiagram for object-oriented code and module structures, and flowchart for data pipelines and function dependency graphs.
How does it differ from the other C4 agents?
The source says it focuses on individual code elements, while the C4-Component agent synthesizes files into components and the C4-Container agent maps components to deployment units.
How do I install c4-code?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is c4-code free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is c4-code safe to use?
It scores 89 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to c4-code?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
