Architecture Deep-Dive

The Skills Graph
for AI Workflows

Most AI workflows are one giant instruction set — brittle, expensive, and impossible to maintain. A Skills Graph replaces that with a modular, composable architecture where specialized SKILL.md files load on demand, reference each other, and evolve independently.

80–90%Token reduction
3Tier hierarchy
N+1Composable skills
0Monolithic prompts
Scroll

01 — The Problem

Why monolithic prompts break at scale

When AI workflows grow, most teams respond by making the system prompt longer. This works until it doesn't — context windows bloat, instructions conflict, and the model's attention dilutes across thousands of tokens it doesn't need for the current task.

The Skills Graph inverts this. Instead of front-loading every capability, you mount only the skills relevant to the task at hand. The system prompt becomes an index; execution reads the playbook.

Monolithic System Prompt

  • Entire capability set in every request
  • Token cost scales with feature count
  • Conflicting instructions cause drift
  • One update can break everything
  • No versioning or isolation
  • Attention dilution on long contexts
  • Hard to test individual capabilities
  • No reuse across projects

Skills Graph Architecture

  • Only the needed skill loads per task
  • Token cost tied to task complexity
  • Each skill is self-contained and focused
  • Skills update independently
  • File-level versioning via git
  • Focused context = sharper output
  • Skills testable in isolation
  • Skills portable across projects

02 — Architecture

The three-tier skill hierarchy

A Skills Graph is organized into three layers. Public skills are stable, domain-agnostic utilities anyone can use. User skills encode your personal workflow, voice, and project context. Example skills are patterns and templates for building new capabilities.

The graph visualization below shows a real implementation with 27 mounted skills. Hover any node to see its description. Edges show documented cross-references between skills.

Public
User
Example
Core

03 — Skill Tiers

What lives in each layer

The tier a skill belongs to determines its scope, audience, and maintenance ownership.

/public

Shared

Domain-agnostic utilities maintained by a platform or team. Any workflow can mount these. They never contain user-specific context.

docxpdfpptxxlsxfrontend-designfile-readingpdf-readingproduct-self-knowledge

/user

Personal

Workflow-specific skills that encode personal voice, project stacks, brand rules, and domain expertise. The most valuable tier — hardest to replicate.

content-writercc-handoffdesign-elevationgoogle-flow-videoflutter-expertchrome-extensionsystem-prompt-optunicode-social

/examples

Templates

Reference implementations and patterns for building new skills. Also includes specialized tools less frequently needed but critical when triggered.

skill-creatormcp-builderweb-artifactsalgorithmic-artcanvas-designbrand-guidelinesdoc-coauthoringinternal-commsslack-gif-creatortheme-factory

04 — Anatomy

What a SKILL.md actually contains

Every skill is a plain Markdown file with a YAML frontmatter block and a structured workflow body. The model reads the file at invocation time — no preprocessing, no embedding, no separate retrieval step. The file is the skill.

01

Frontmatter

YAML block with name and description fields. The description is the trigger signal — it's what the system matches against the user's request to decide whether to load this skill.

02

Philosophy block

One paragraph establishing the mental model for this skill. Orients the model before it reaches procedural instructions. Often the most important section.

03

Phased workflow

Step-by-step instructions broken into numbered phases. Each phase is discrete and testable. Complex skills reference external files rather than embedding everything inline.

04

References directory

External Markdown files the skill reads on demand. This is the primary token optimization mechanism — detailed lookup tables, templates, and examples only load when that phase executes.

05

Quality gates

Verification checklists embedded at the end of the workflow. The model self-reviews against these criteria before delivering output.

skills/user/chrome-extension-builder/SKILL.md
1---
2name: chrome-extension-builder
3description: Expert Chrome extension developer
4  specializing in Manifest V3, service workers,
5  and modern extension architecture. Use when
6  building, debugging, or publishing extensions.
7---
8
9# Chrome Extension Builder
10
11## Core Requirements
12
13Target: Manifest V3 only. No MV2 patterns.
14Output: Complete file tree, ready to load.
15Testing: Include chrome://extensions steps.
16
17## Workflow
18
19### Step 1: Clarify Scope
20Determine permissions, host access,
21and background service worker needs.
22
23### Step 2: Scaffold Architecture
24See: references/mv3-patterns.md
25
26### Step 3: Implement & Validate
27See: references/debug-checklist.md
28
29### Step 4: Quality Verification
30☐ manifest.json passes validation
31☐ No deprecated MV2 APIs used
32☐ CSP headers declared correctly
33☐ Permissions follow least-privilege
34☐ Loads clean in chrome://extensions

05 — Execution

End-to-end workflow traces

How the system resolves a user request into skill invocations. Each trace shows which skills fire, which reference files load, and in what sequence — making the execution path auditable.

U
user input

"Build me a Chrome extension that highlights todos on any page"

M
system match

"Chrome extension" → loads skills/user/chrome-extension-builder/SKILL.md

S1
step 1

Scope clarification — content script needed, no background worker, host_permissions: <all_urls>

R
reference load

Loads references/mv3-patterns.md — manifest scaffold, content script template, CSP rules

S2
step 2

Generates complete file tree: manifest.json, content.js, popup.html, styles.css

R
reference load

Loads references/debug-checklist.md — chrome://extensions load steps, common MV3 errors

S3
step 3

Quality gate: manifest validates, no MV2 APIs, CSP declared, least-privilege permissions

O
output

Complete extension folder — load unpacked at chrome://extensions and it runs

U
user input

"Create a pitch deck for the 2 Squirrels AI consulting offer"

M
dual match

"deck" → matches pptx + "visual deliverable" → triggers design-elevation automatically

S1
skill load

Reads skills/public/pptx/SKILL.md — establishes python-pptx workflow, slide structure, and file output pattern

S2
design overlay

Reads skills/user/design-elevation/SKILL.md — applies interrogation checklist before any code is written

R
reference load

design-elevation reads references/technique-catalog.md and selects slide-appropriate techniques

O
output

.pptx file — design-elevated, downloadable, with proper layout hierarchy applied

U
user input

"/cc-handoff" or "package this for Claude Code"

M
trigger match

Slash command /cc-handoff — direct match, no ambiguity. Loads skills/user/cc-handoff/SKILL.md

S1
step 1

Scans conversation context — identifies project type, tech stack, scope from prior messages

R
reference load

Loads references/stack-defaults.md — pre-populated project profiles for auto-filling common fields

R
reference load

Loads references/output-template.md — 14-section document structure for the handoff prompt

O
output

Structured .md handoff document — paste-ready for Claude Code CLI, zero round-trips

U
user input

"Create a new skill for writing technical RFCs in our company format"

M
meta trigger

"create a skill" → loads skills/examples/skill-creator/SKILL.md — the skill for building skills

S1
intake

skill-creator conducts intake: name, trigger phrases, output format, references needed, quality gates

S2
generation

Generates SKILL.md with frontmatter, philosophy block, phased workflow, and reference stubs

O
output

Complete skill file tree — ready to drop into skills/user/rfc-writer/ and mount



07 — Design Principles

Six rules for a maintainable graph

These principles emerged from building and maintaining a 27-skill graph over several months. Violating any of them predictably leads to the same problems monolithic prompts create.

01

One skill, one job

A skill should have a single, clear purpose expressible in one sentence. If the name requires "and" to describe it, split it.

02

Trigger descriptions are contracts

The description field determines when the skill fires. It's a contract between the skill author and the matching system. Treat it like a unit test — specific, unambiguous, tested.

03

References over embedding

Put detailed lookup tables, templates, and examples in reference files. The main SKILL.md should read like a workflow spec, not a dictionary. Reference files load on demand.

04

Document cross-links explicitly

If skill A ever invokes skill B, that dependency must be documented in A's workflow body. Undocumented cross-dependencies are bugs waiting to surface at the worst moment.

05

Quality gates, not vibes

Every skill must end with a concrete verification checklist. "Does this look good?" is not a quality gate. Specific, binary pass/fail criteria are.

06

Audit on a cadence

Skills drift. Descriptions stop matching their actual behavior. Cross-links go stale. Build a periodic audit into your workflow — review the full graph, test trigger accuracy, prune dead skills.


08 — Implementation

Building your own Skills Graph

You don't need special tooling. A Skills Graph is a directory structure, a naming convention, and a discipline.

STEP 01

Audit your current workflow

List every repeated task you give an AI assistant. Group by domain. These are your proto-skills. Any task you've explained more than three times should be a skill.

STEP 02

Set up your directory structure

Create skills/public/, skills/user/, and skills/examples/. Start with user skills — they'll have the highest ROI since they encode your specific context.

STEP 03

Write your first skill

Start with a skill you use daily. Write the frontmatter description first — if you can't write a clear trigger description, you don't understand the skill's scope yet. That's valuable information.

STEP 04

Extract references aggressively

Any section of a skill longer than 20 lines that could stand alone is a reference file. Create a references/ subdirectory per skill and move it there. The skill should reference it by path.

STEP 05

Map cross-links

Once you have 5+ skills, draw the dependency graph. Which skills naturally chain? Document those relationships in the workflow bodies. Now you have a graph, not a collection.

STEP 06

Build the meta-skill

Create a skill-creator skill. It should run intake, generate SKILL.md structure, and output a complete file tree. Now your graph can grow itself.

STEP 07

Schedule quarterly audits

A 27-skill graph without auditing becomes 27 independent experiments with conflicting assumptions. Every quarter: test every trigger description, retire unused skills, update cross-link documentation.