MR
Mayur Rathi
@mayurrathi
⭐ 40.7k GitHub stars

C4 Code

C4 Code is an code AI skill with a core value of |. It helps developers solve real-world problems in the code domain, boosting efficiency, automating repetitive tasks, and optimizing workflows.

|

Last verified on: 2026-07-08

Quick Facts

Category code
Works With Claude
Source sickn33/antigravity-awesome-skills
Stars ⭐ 40.7k
Last Verified 2026-07-08
Risk Level Low
mkdir -p ./skills/c4-code && curl -sfL https://raw.githubusercontent.com/sickn33/antigravity-awesome-skills/main/skills/c4-code/SKILL.md -o ./skills/c4-code/SKILL.md

Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).

Skill Content

# 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.

- If detailed examples are required, open `resources/implementation-playbook.md`.


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:


mermaid
---
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
text

### 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:

---

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

text

**Option B: Data Flow Diagram** - Use `flowchart` to show function pipelines and data transformations:

---

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

text

**Option C: Function Dependency Graph** - Use `flowchart` to show which functions call which:

---

title: Function Dependencies for [Component Name]

---

flowchart TB

subgraph Public API

processData[processData]

exportReport[exportReport]

end

subgraph Inter

🎯 Best For

  • Claude users
  • Software engineers
  • Development teams
  • Tech leads

💡 Use Cases

  • Code quality improvement
  • Best practice enforcement

📖 How to Use This Skill

  1. 1

    Install the Skill

    Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.

  2. 2

    Load into Your AI Assistant

    Open Claude and reference the skill. Paste the SKILL.md content or use the system prompt tab.

  3. 3

    Apply C4 Code to Your Work

    Open your project in the AI assistant and ask it to apply the skill. Start with a small module to verify the output quality.

  4. 4

    Review and Refine

    Review AI suggestions before committing. Run tests, check for regressions, and iterate on the skill output.

❓ Frequently Asked Questions

Is C4 Code compatible with Cursor and VS Code?

Yes — this skill works with any AI coding assistant including Cursor, VS Code with Copilot, and JetBrains IDEs.

Do I need specific dependencies for C4 Code?

Check the install command and Works With section. Most code skills only require the AI assistant and your codebase.

How do I install C4 Code?

Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/c4-code/SKILL.md, ready to use.

Can I customize this skill for my team?

Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.

⚠️ Common Mistakes to Avoid

Skipping validation

Always test AI-generated code changes, even for simple refactors.

Missing dependency updates

Check if the skill requires updated dependencies or new packages.

🔗 Related Skills