# majerle/c-code-style architecture

> Architecture diagram of the GitHub repository majerle/c-code-style, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/majerle/c-code-style
- Repository: https://github.com/majerle/c-code-style

## Overview

This repository provides recommended C coding rules, clang-format configuration, and lightweight editor/AI-agent integration. A contributor consults the rules and applies the formatter using the repository configuration; the shipped C files are a small template example, not a larger application workflow. README.md documents the integration, but the agent skill and AGENTS.md contents were not sampled, so their internal behavior is not expanded here.

Main entry points: [`.clang-format`](https://github.com/majerle/c-code-style/blob/main/.clang-format) (Format configuration), [`.claude/skills/c-code-style/SKILL.md`](https://github.com/majerle/c-code-style/blob/main/.claude/skills/c-code-style/SKILL.md) (Agent style skill), [`AGENTS.md`](https://github.com/majerle/c-code-style/blob/main/AGENTS.md) (Agent guidance), [`template.c`](https://github.com/majerle/c-code-style/blob/main/template.c) (Template functions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_guidance["Style guidance"]
  node_rules["C coding rules<br/>[CODING_RULES.md]"]
  node_readme["Project overview<br/>[README.md]"]
  node_agent_skill["Agent style skill<br/>[SKILL.md]"]
  node_agent_guidance["Agent guidance<br/>[AGENTS.md]"]
end

subgraph group_formatting["Formatting"]
  node_format_config["Format configuration<br/>[.clang-format]"]
end

subgraph group_template["C template"]
  node_template_header["Template declarations<br/>[template.h]"]
  node_template_source["Template functions<br/>[template.c]"]
end

node_developer(("Contributor"))

node_developer -->|"consults"| node_rules
node_developer -->|"formats with"| node_format_config
node_agent_skill -->|"uses rules"| node_format_config
node_agent_guidance -->|"uses rules"| node_format_config
node_template_source -->|"includes"| node_template_header

click node_rules "https://github.com/majerle/c-code-style/blob/main/CODING_RULES.md"
click node_readme "https://github.com/majerle/c-code-style/blob/main/README.md"
click node_format_config "https://github.com/majerle/c-code-style/blob/main/.clang-format"
click node_agent_skill "https://github.com/majerle/c-code-style/blob/main/.claude/skills/c-code-style/SKILL.md"
click node_agent_guidance "https://github.com/majerle/c-code-style/blob/main/AGENTS.md"
click node_template_header "https://github.com/majerle/c-code-style/blob/main/template.h"
click node_template_source "https://github.com/majerle/c-code-style/blob/main/template.c"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_rules,node_readme,node_agent_skill,node_agent_guidance toneBlue
class node_format_config toneAmber
class node_template_header,node_template_source toneMint
class node_developer toneIndigo
```

## Components

### Style guidance

- [C coding rules](https://github.com/majerle/c-code-style/blob/main/CODING_RULES.md): `CODING_RULES.md`
- [Project overview](https://github.com/majerle/c-code-style/blob/main/README.md): `README.md`
- [Agent style skill](https://github.com/majerle/c-code-style/blob/main/.claude/skills/c-code-style/SKILL.md): `.claude/skills/c-code-style/SKILL.md`
- [Agent guidance](https://github.com/majerle/c-code-style/blob/main/AGENTS.md): `AGENTS.md`

### Formatting

- [Format configuration](https://github.com/majerle/c-code-style/blob/main/.clang-format): `.clang-format`

### C template

- [Template declarations](https://github.com/majerle/c-code-style/blob/main/template.h): `template.h`
- [Template functions](https://github.com/majerle/c-code-style/blob/main/template.c): `template.c`

### Other components

- **Contributor**

## Connections

- Contributor → C coding rules: consults (evidence: `README.md`)
- Contributor → Format configuration: formats with (evidence: `README.md`)
- Agent style skill → Format configuration: uses rules (evidence: `README.md`)
- Agent guidance → Format configuration: uses rules (evidence: `README.md`)
- Template functions → Template declarations: includes (evidence: `template.c`)
