{
  "name": "Skill Extractor",
  "nodes": [
    {
      "id": "a5a92bff-e159-4e25-8608-6b7dcaebeee6",
      "name": "Every Night",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.3,
      "position": [
        0,
        176
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "days",
              "triggerAtHour": 3
            }
          ]
        }
      }
    },
    {
      "id": "000f35e7-fed6-41d6-a610-ff898dc6bea5",
      "name": "Read What People Actually Built",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        240,
        176
      ],
      "parameters": {
        "mode": "runOnceForAllItems",
        "jsCode": "const builds = [\n  { builder: 'u_1042', seq: ['Webhook','Set','HTTP Request','Code','Slack'] },\n  { builder: 'u_1042', seq: ['Schedule','HTTP Request','Code','Slack'] },\n  { builder: 'u_2288', seq: ['Webhook','Set','HTTP Request','Code','Slack'] },\n  { builder: 'u_3901', seq: ['Gmail Trigger','AI Agent','Set','Google Sheets'] },\n  { builder: 'u_4415', seq: ['Webhook','Set','HTTP Request','Code','Slack'] },\n  { builder: 'u_5127', seq: ['Gmail Trigger','AI Agent','Set','Google Sheets'] },\n  { builder: 'u_6600', seq: ['Webhook','Set','HTTP Request','Code','Slack'] },\n  { builder: 'u_7311', seq: ['Gmail Trigger','AI Agent','Set','Google Sheets'] },\n  { builder: 'u_8004', seq: ['Form','AI Agent','Switch','Airtable','Slack'] }\n];\nreturn [{ json: { builds: builds, window: 'last 30 days' } }];"
      }
    },
    {
      "id": "58b74444-cbee-43c1-9b46-f7f441d26a54",
      "name": "Find The Shapes People Rebuild",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        480,
        176
      ],
      "parameters": {
        "mode": "runOnceForAllItems",
        "jsCode": "const d = $input.first().json;\nconst counts = {};\nd.builds.forEach(function (b) {\n  for (let i = 0; i < b.seq.length - 2; i++) {\n    for (let j = i + 3; j <= b.seq.length; j++) {\n      const key = b.seq.slice(i, j).join(' -> ');\n      if (!counts[key]) { counts[key] = { shape: key, length: j - i, builders: [] }; }\n      if (counts[key].builders.indexOf(b.builder) === -1) { counts[key].builders.push(b.builder); }\n    }\n  }\n});\nconst shapes = Object.keys(counts).map(function (k) { return counts[k]; })\n  .filter(function (s) { return s.builders.length >= 3; })\n  .sort(function (a, b) { return (b.builders.length * b.length) - (a.builders.length * a.length); })\n  .slice(0, 5);\nreturn [{ json: { candidate_shapes: shapes, total_builds: d.builds.length } }];"
      }
    },
    {
      "id": "70142c44-dba7-4ce0-ab1a-00a5f4376ed7",
      "name": "Name Them And Write The Skill Card",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        720,
        176
      ],
      "parameters": {
        "mode": "runOnceForAllItems",
        "jsCode": "const d = $input.first().json;\nconst names = {\n  'Webhook -> Set -> HTTP Request -> Code -> Slack': { name: 'Inbound Event to Enriched Alert', does: 'Takes an inbound webhook, normalises the payload, enriches it from an API, shapes the message and posts it to a channel.' },\n  'Gmail Trigger -> AI Agent -> Set -> Google Sheets': { name: 'Inbox to Structured Row', does: 'Reads new mail, has a model pull structured fields out of it, and appends one clean row per message.' },\n  'Form -> AI Agent -> Switch -> Airtable -> Slack': { name: 'Form Intake Triage', does: 'Classifies a form submission, routes it by category, records it and notifies the right owner.' }\n};\nconst skills = d.candidate_shapes.map(function (s) {\n  const meta = names[s.shape] || { name: 'Unnamed Pattern', does: 'Repeated shape with no card written yet.' };\n  return {\n    proposed_skill: meta.name,\n    what_it_does: meta.does,\n    shape: s.shape,\n    rebuilt_by: s.builders.length,\n    nodes_saved_each_time: s.length,\n    total_nodes_never_to_be_wired_again: s.builders.length * s.length\n  };\n});\nconst top = skills[0] || null;\nconst say = top\n  ? 'Nobody asked for a skill. ' + top.rebuilt_by + ' different builders independently wired the same ' + top.nodes_saved_each_time + '-node shape this month. That is not a coincidence, that is a missing primitive. Proposing it as the Skill \\\"' + top.proposed_skill + '\\\": ' + top.what_it_does\n  : 'No shape was rebuilt by enough independent builders this window to justify a Skill.';\nreturn [{ json: { plain_english: say, proposed_skills: skills, worth_shipping: skills.length > 0 } }];"
      }
    },
    {
      "id": "cb6661a3-604f-4408-912e-3aa67eb7ac53",
      "name": "Worth Shipping As A Skill",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        960,
        176
      ],
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 2
          },
          "conditions": [
            {
              "id": "c1",
              "leftValue": "={{ $json.worth_shipping }}",
              "rightValue": "true",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      }
    },
    {
      "id": "1cb9f339-055f-4772-9982-5d0ea9488499",
      "name": "PROPOSE: Draft Skill Into The Library",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        1200,
        48
      ],
      "parameters": {}
    },
    {
      "id": "a6579c97-735a-4185-bd40-21e5a9d134e8",
      "name": "WAIT: No Pattern Earned It This Month",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        1200,
        304
      ],
      "parameters": {}
    },
    {
      "id": "508c74a0-2314-47f1-97f0-0308e5061da1",
      "name": "Sticky Note aa6230c3",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -50,
        126
      ],
      "parameters": {
        "content": "## Skill Extractor - the product notices what people keep rebuilding\n\nThe AI Building workstream asks for **Skills** and **proactive suggestions**. Every product does this backwards: someone writes a template, then hopes people use it.\n\nInvert it. Watch what builders actually wire, find the sub-shapes that independent people rebuild from scratch, and propose those as Skills - already named, already described, already justified by usage.\n\n**A Skill nobody asked for but six people rebuilt is worth more than ten a PM guessed at.**",
        "color": 4,
        "width": 540,
        "height": 200
      }
    },
    {
      "id": "c4ecd546-1f03-44ca-8452-4b40ea23db4c",
      "name": "Sticky Note 3aeb89b2",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        430,
        126
      ],
      "parameters": {
        "content": "## The bar is independence, not frequency\n\nOne builder repeating a shape is a habit. Three unrelated builders converging on the same five nodes is **evidence of a missing primitive.**\n\nSo the filter is distinct builders, and the ranking is builders x shape length - how many people, times how much wiring it removes.",
        "color": 3,
        "width": 540,
        "height": 200
      }
    },
    {
      "id": "d3f6eb62-de26-4d60-b682-9f09560bd15a",
      "name": "Sticky Note f0ee3d78",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        910,
        -2
      ],
      "parameters": {
        "content": "## Where this goes in ten years\n\nn8n has 650k builders and 500+ integrations. That is the largest observed corpus of how humans actually compose automation anywhere.\n\nRun this continuously and the node library stops being hand-curated. **The platform learns its own vocabulary from its community** - and every Skill it ships arrives with the usage evidence already attached.",
        "color": 5,
        "width": 540,
        "height": 328
      }
    }
  ],
  "connections": {
    "Every Night": {
      "main": [
        [
          {
            "node": "Read What People Actually Built",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read What People Actually Built": {
      "main": [
        [
          {
            "node": "Find The Shapes People Rebuild",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find The Shapes People Rebuild": {
      "main": [
        [
          {
            "node": "Name Them And Write The Skill Card",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Name Them And Write The Skill Card": {
      "main": [
        [
          {
            "node": "Worth Shipping As A Skill",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Worth Shipping As A Skill": {
      "main": [
        [
          {
            "node": "PROPOSE: Draft Skill Into The Library",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "WAIT: No Pattern Earned It This Month",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}