# bakkarjutt07-max/skill-pipeline architecture

> Architecture diagram of the GitHub repository bakkarjutt07-max/skill-pipeline, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bakkarjutt07-max/skill-pipeline
- Repository: https://github.com/bakkarjutt07-max/skill-pipeline

## Overview

skill-pipeline is a single-file, zero-dependency CLI for auditing, simplifying, and synchronizing AI-agent markdown rules. Its principal workflow runs Guard → Lint → Distill → Sync: scan for security risks, check budgets and rule issues, consolidate rules into distilled outputs, then update supported agent-specific files. Individual stages can also be invoked directly. The README documents these capabilities; the excerpts do not show the stage implementations in full, so the graph represents their documented workflow rather than internal calls.

Main entry points: [`skill_pipeline.py`](https://github.com/bakkarjutt07-max/skill-pipeline/blob/main/skill_pipeline.py) (Pipeline CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("CLI user"))
node_pipeline["Pipeline CLI<br/>[skill_pipeline.py]"]
node_guard["Guard scan<br/>[skill_pipeline.py]"]
node_lint["Lint rules<br/>[skill_pipeline.py]"]
node_distill["Distill rules<br/>[skill_pipeline.py]"]
node_sync["Sync agents<br/>[skill_pipeline.py]"]
node_skill_files["Skill files"]
node_distilled_files["Distilled outputs"]
node_agent_files["Agent rule files"]
node_skillspector["skillspector CLI"]

node_user -->|"invokes"| node_pipeline
node_pipeline -->|"runs stage"| node_guard
node_pipeline -->|"runs stage"| node_lint
node_pipeline -->|"runs stage"| node_distill
node_pipeline -->|"runs stage"| node_sync
node_skill_files -->|"scans"| node_guard
node_skill_files -->|"checks"| node_lint
node_skill_files -->|"clusters rules"| node_distill
node_guard -->|"then runs"| node_lint
node_lint -->|"then runs"| node_distill
node_distill -->|"then runs"| node_sync
node_distill -->|"writes"| node_distilled_files
node_distilled_files -->|"provides source"| node_sync
node_sync -->|"updates"| node_agent_files
node_guard -.->|"optionally merges findings"| node_skillspector

click node_pipeline "https://github.com/bakkarjutt07-max/skill-pipeline/blob/main/skill_pipeline.py"
click node_guard "https://github.com/bakkarjutt07-max/skill-pipeline/blob/main/skill_pipeline.py"
click node_lint "https://github.com/bakkarjutt07-max/skill-pipeline/blob/main/skill_pipeline.py"
click node_distill "https://github.com/bakkarjutt07-max/skill-pipeline/blob/main/skill_pipeline.py"
click node_sync "https://github.com/bakkarjutt07-max/skill-pipeline/blob/main/skill_pipeline.py"

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_user toneBlue
class node_pipeline,node_guard,node_lint,node_distill,node_sync toneTeal
class node_skill_files,node_distilled_files,node_agent_files,node_skillspector toneIndigo
```

## Components

### Other components

- **CLI user**
- [Pipeline CLI](https://github.com/bakkarjutt07-max/skill-pipeline/blob/main/skill_pipeline.py): `skill_pipeline.py`
- [Guard scan](https://github.com/bakkarjutt07-max/skill-pipeline/blob/main/skill_pipeline.py): `skill_pipeline.py`
- [Lint rules](https://github.com/bakkarjutt07-max/skill-pipeline/blob/main/skill_pipeline.py): `skill_pipeline.py`
- [Distill rules](https://github.com/bakkarjutt07-max/skill-pipeline/blob/main/skill_pipeline.py): `skill_pipeline.py`
- [Sync agents](https://github.com/bakkarjutt07-max/skill-pipeline/blob/main/skill_pipeline.py): `skill_pipeline.py`
- **Skill files**
- **Distilled outputs**
- **Agent rule files**
- **skillspector CLI**

## Connections

- CLI user → Pipeline CLI: invokes (evidence: `README.md`)
- Pipeline CLI → Guard scan: runs stage (evidence: `README.md`)
- Pipeline CLI → Lint rules: runs stage (evidence: `README.md`)
- Pipeline CLI → Distill rules: runs stage (evidence: `README.md`)
- Pipeline CLI → Sync agents: runs stage (evidence: `README.md`)
- Skill files → Guard scan: scans (evidence: `README.md`)
- Skill files → Lint rules: checks (evidence: `README.md`)
- Skill files → Distill rules: clusters rules (evidence: `README.md`)
- Guard scan → Lint rules: then runs (evidence: `README.md`)
- Lint rules → Distill rules: then runs (evidence: `README.md`)
- Distill rules → Sync agents: then runs (evidence: `README.md`)
- Distill rules → Distilled outputs: writes (evidence: `README.md`)
- Distilled outputs → Sync agents: provides source (evidence: `README.md`)
- Sync agents → Agent rule files: updates (evidence: `README.md`)
- Guard scan → skillspector CLI: optionally merges findings (evidence: `README.md`)
