← Commit history
README.mdadded+33
@@ -0,0 +1,33 @@+# Build a Component Page Yourself++Adom's parts factory builds most requested parts on its own. When it cannot, this skill lets your own AI finish the+part: it is the factory's order of work and its checks, written as a procedure.++    adom-wiki pkg install adom/build-a-component-page++Then ask your AI, for example:++> My part request for ERJ-2GE0R00X could not be built. Build the component page yourself.++## The order of work++![The seven steps, each checked against the one before](screenshots/steps.png)++The footprint is settled before the pinout, and it is chosen by the package drawing's numbers, never by the package's+name. Pin names are the datasheet's spelling. Two readings of the pinout must agree before it is used.++## By failure reason++![What to do for each reason a request could not be built](screenshots/reasons.png)++The skill has a row for each reason the request email can give, and a list of the cases where the AI should stop and+ask you instead of guessing.++## What it uses++All public wiki packages: `adom-ds2sf`, `adom-footprint`, `adom-symbol`, `service-kicad`, `adom-step2glb`,+`adom-chip-laser`, `adom-lbr`, `adom-parts-search`. Install the ones you lack with `adom-wiki pkg install adom/<name>`.++## License++CC-BY-SA-4.0.
docs/hero.pngadded
⋯ 1 unchanged line ⋯
install.shadded+4
@@ -0,0 +1,4 @@+#!/bin/sh+set -eu+SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)+exec python3 "$SCRIPT_DIR/scripts/install.py" "$@"
package.jsonadded+68
@@ -0,0 +1,68 @@+{+  "name": "build-a-component-page",+  "slug": "build-a-component-page",+  "title": "Build a Component Page Yourself",+  "version": "0.1.0",+  "type": "skill",+  "org": "adom",+  "description": "The parts factory's method, written for your own AI: build a wiki component page for a part the wiki lacks or a part request that could not be built. Datasheet, package, footprint checked against the package drawing, pinout read twice, symbol, 3D model, hero and page, with what to do for each failure reason and when to stop instead of guessing.",+  "brief": "When a part request can't be built, your AI can finish it: the factory's method and checks, step by step.",+  "license": "CC-BY-SA-4.0",+  "files": [+    "package.json",+    "README.md",+    "skills/**",+    "install.sh",+    "uninstall.sh",+    "scripts/install.py",+    "scripts/uninstall.py"+  ],+  "dependencies": {},+  "tags": [+    "component",+    "parts",+    "footprint",+    "symbol",+    "datasheet",+    "kicad",+    "claude",+    "codex"+  ],+  "author": {+    "name": "Ray",+    "email": "[email protected]"+  },+  "hero": {+    "type": "image",+    "path": "docs/hero.png",+    "headline": "Build the Part Yourself",+    "subhead": "The parts factory's method, for your own AI."+  },+  "discovery_triggers": [+    "build this part myself",+    "make a component page",+    "part request failed",+    "couldn't build this part",+    "make a footprint from the datasheet",+    "the wiki has no page for this part"+  ],+  "discovery_pitch": "Use when the wiki has no page for a part, or a part request came back 'could not be built': it walks your AI through the factory's own order of work and checks so the page it builds has the right footprint and pinout.",+  "sample_prompts": [+    {+      "label": "Finish a failed request",+      "prompt": "My part request for ERJ-2GE0R00X could not be built. Build the component page yourself."+    },+    {+      "label": "Build from a datasheet",+      "prompt": "Make a component page for this part from its datasheet: <link>"+    },+    {+      "label": "Check a footprint",+      "prompt": "Does this footprint match the package drawing in the datasheet?"+    }+  ],+  "scripts": {+    "install": "./install.sh",+    "uninstall": "./uninstall.sh"+  }+}
page.jsonadded+69
@@ -0,0 +1,69 @@+{+  "name": "build-a-component-page",+  "slug": "build-a-component-page",+  "title": "Build a Component Page Yourself",+  "version": "0.1.0",+  "type": "skill",+  "org": "adom",+  "description": "The parts factory's method, written for your own AI: build a wiki component page for a part the wiki lacks or a part request that could not be built. Datasheet, package, footprint checked against the package drawing, pinout read twice, symbol, 3D model, hero and page, with what to do for each failure reason and when to stop instead of guessing.",+  "brief": "When a part request can't be built, your AI can finish it: the factory's method and checks, step by step.",+  "license": "CC-BY-SA-4.0",+  "files": [+    "package.json",+    "README.md",+    "skills/**",+    "install.sh",+    "uninstall.sh",+    "scripts/install.py",+    "scripts/uninstall.py"+  ],+  "dependencies": {},+  "tags": [+    "component",+    "parts",+    "footprint",+    "symbol",+    "datasheet",+    "kicad",+    "claude",+    "codex"+  ],+  "author": {+    "name": "Ray",+    "email": "[email protected]"+  },+  "hero": {+    "type": "image",+    "path": "docs/hero.png",+    "headline": "Build the Part Yourself",+    "subhead": "The parts factory's method, for your own AI."+  },+  "discovery_triggers": [+    "build this part myself",+    "make a component page",+    "part request failed",+    "couldn't build this part",+    "make a footprint from the datasheet",+    "the wiki has no page for this part"+  ],+  "discovery_pitch": "Use when the wiki has no page for a part, or a part request came back 'could not be built': it walks your AI through the factory's own order of work and checks so the page it builds has the right footprint and pinout.",+  "sample_prompts": [+    {+      "label": "Finish a failed request",+      "prompt": "My part request for ERJ-2GE0R00X could not be built. Build the component page yourself."+    },+    {+      "label": "Build from a datasheet",+      "prompt": "Make a component page for this part from its datasheet: <link>"+    },+    {+      "label": "Check a footprint",+      "prompt": "Does this footprint match the package drawing in the datasheet?"+    }+  ],+  "scripts": {+    "install": "./install.sh",+    "uninstall": "./uninstall.sh"+  },+  "visibility": "public"+}\ No newline at end of file
scripts/install.pyadded+15
@@ -0,0 +1,15 @@+#!/usr/bin/env python3+"""Install only this package's skills into Claude and Codex homes."""+import argparse, json, os, shutil+from pathlib import Path+ROOT=Path(__file__).resolve().parents[1]+parser=argparse.ArgumentParser();parser.add_argument('--home',type=Path,help='Isolated home for validation');args=parser.parse_args()+home=args.home or Path.home()+codex=home/'.codex' if args.home else Path(os.environ.get('CODEX_HOME',str(home/'.codex')))+for destination in [home/'.claude/skills',codex/'skills']:+    for source in sorted((ROOT/'skills').iterdir()):+        if not (source/'SKILL.md').is_file():continue+        target=destination/source.name+        target.mkdir(parents=True,exist_ok=True)+        shutil.copytree(source,target,dirs_exist_ok=True)+        print(target)
scripts/uninstall.pyadded+16
@@ -0,0 +1,16 @@+#!/usr/bin/env python3+"""Remove only unchanged files installed by this package; preserve local edits."""+import argparse,os+from pathlib import Path+root=Path(__file__).resolve().parents[1]+p=argparse.ArgumentParser();p.add_argument('--home',type=Path);args=p.parse_args()+home=args.home or Path.home();codex=home/'.codex' if args.home else Path(os.environ.get('CODEX_HOME',str(home/'.codex')))+for base in [home/'.claude/skills',codex/'skills']:+ for source in sorted((root/'skills').iterdir()):+  target=base/source.name+  for file in source.rglob('*'):+   out=target/file.relative_to(source)+   if file.is_file() and out.is_file() and out.read_bytes()==file.read_bytes():out.unlink()+  if target.exists():+   for d in sorted([p for p in target.rglob('*') if p.is_dir()]+[target],key=lambda p:len(p.parts),reverse=True):+    if not any(d.iterdir()):d.rmdir()
skills/build-a-component-page/SKILL.mdadded+186
@@ -0,0 +1,186 @@+---+name: build-a-component-page+description: Build an Adom wiki component (part) page yourself, the way Adom's parts factory does, when the wiki has no page for a part or a part request came back "We couldn't build it". Covers the order of work (datasheet, package, footprint checked against the package drawing, pinout read twice, symbol, 3D model, hero, page), the checks that catch wrong footprints and wrong pinouts, what to do for each failure reason in the request email, and when to stop instead of guessing. Trigger words - build this part myself, make a component page, part request failed, couldn't build this part, no datasheet, no land pattern, make a footprint from the datasheet, do it yourself part page, factory could not build.+---++# Build a component page yourself++Adom's parts factory builds most requested parts on its own. When it cannot, it says why. This skill is the+factory's method written out so that you, an AI working for one person, can finish the part. You have two things+the factory lacks: the person, who can answer a question or hand you a file, and time to read one datasheet closely.++The page you make goes under the person's own name on the wiki (`<their-handle>/<part>`), and they can use it in a+design straight away.++## First: do you need to build it at all?++1. Look for the page: `adom-wiki discover find "<part number>"`. Try the number without its packaging suffix as well+   (tape-and-reel and lead-free suffixes share one page).+2. If there is none and nobody has asked yet, ask: `adom-wiki part request <MPN> --manufacturer "<maker>" --datasheet <link>`.+   Passing a link to the maker's datasheet removes the most common reason for failure.+   `adom-wiki part status` shows the outcome and the reason.+3. Build it yourself when the request ended in "could not be built", or the person does not want to wait.++## The order of work, and why it is this order++Each step is checked against the one before it. Do not reorder them.++| Step | What you produce | What it is checked against |+|---|---|---|+| 1. Datasheet | the maker's own PDF | it names this part |+| 2. Package | the exact package of this orderable number | the ordering table |+| 3. Footprint | a `.kicad_mod` | the package drawing's numbers |+| 4. Pinout | pin number and name for every pad | the footprint's pads, and a second reading |+| 5. Symbol | a `.kicad_sym` | the pinout |+| 6. 3D model | a STEP and a GLB | the package drawing and the footprint |+| 7. Page | `page.json`, README, hero | the checklist at the end |++The footprint comes before the pinout on purpose. The pad set is the anchor: a pinout that does not fit it belongs+to a different package.++## 1. Datasheet++- Use the manufacturer's own, current datasheet. A distributor's copy can be an old edition, and a distributor's+  "datasheet" link is often a product web page, not a PDF.+- Check that it is a PDF and that its text names the part: the whole part number, or the device number the orderable+  number extends. A family sheet that only shows a sibling is the wrong document.+- For a standard chip resistor, capacitor or inductor, the document is the maker's series datasheet (Panasonic ERJ,+  Yageo RC, Murata GRM, Samsung CL, and so on). There is usually no sheet for one value.+- Keep the URL, the date you fetched it and the page numbers you read. They go on the page.+- If a maker's site blocks automated downloads, ask the person to download the PDF and give you the file.++## 2. Package++- Find the ordering information table and decode this exact part number. The suffix chooses the package.+- One part number family often comes in several packages with different pin orders. From here on, read only the+  figures and tables for this package.+- Write down the package drawing's numbers with their page: pin count, pitch (e), overall width across the leads (E),+  body width (E1), body length (D), height (A), and any exposed pad. If a number is not printed, record it as Unknown.+  Do not estimate it from the picture.++## 3. Footprint++**Choose the footprint by its dimensions, never by its name.** Package names are reused by different makers for+different bodies (a TSSOP-8 can be 3 mm or 4.4 mm wide), and a footprint picked by name is the most common way a part+page goes wrong.++1. If the datasheet prints a recommended land pattern for this package, that drawing decides.+2. For a standard package, fetch the matching footprint from KiCad's library: `service-kicad fp fetch <library> <name>`+   (`service-kicad fp --help`). Then check it against the numbers from step 2:+   - the pad pitch equals e;+   - the pads reach the lead tips (the outer pad edges are at or beyond E/2), and do not belong to a wider or narrower body;+   - the body size in the footprint's name matches E1 and D;+   - the pad count equals the pin count, with the exposed pad counted when the package has one;+   - for a DIP, the row spacing matches the drawing.+3. If no library footprint passes, draw the pads from the datasheet's land pattern with `adom-footprint create`+   (`adom-footprint create --help` shows the JSON it takes).+4. If the datasheet has no land pattern and no library footprint matches, look for the maker's separate package or+   land-pattern document. If that does not exist either, stop and tell the person. Do not invent a land pattern.++`adom-ds2sf extract` also writes a footprint. Treat it as a draft: its pin names have been reliable in our tests and+its footprints have not. Run the same dimension check on it as on any other candidate.++Also check that no two pads with different numbers touch, and that no copper lies outside the courtyard.++## 4. Pinout++- Read the pin table or pin figure for this package only. Make sure you know whether a figure is a top view or a+  bottom view.+- Get two independent readings and compare the whole pinout. `adom-ds2sf extract` can be one. The other can be your+  own reading of the pin table text, or another model's. If they differ anywhere, read the datasheet again and+  settle it from the page, or ask the person. Never build a pinout by taking each pin from whichever reading was in+  the majority: that can produce a pinout no reading gave.+- Every pin must be a pad and every signal pad must have a pin. Thermal and mounting pads are the exception.+- Pin names are the datasheet's spelling, exactly. VDD stays VDD. Do not rename pins to a house style.+- Every name must appear in the datasheet text. A name that appears nowhere is a misread.+- Polarity comes from the part's own datasheet. If anode and cathode are shown only in a drawing you cannot tie to+  pad numbers, stop and ask. A two-pin LED has the cathode on pin 1 and the anode on pin 2, which matches KiCad's+  LED footprints. A polarised capacitor or a diode is never described as "either orientation".+- An unpolarised two-terminal part (resistor, ceramic capacitor, inductor, fuse) whose datasheet prints no pin numbers+  takes pins 1 and 2 by library convention. Say so on the page.++## 5. Symbol++- `adom-symbol create` builds the `.kicad_sym` from the pin list (`adom-symbol create --help`).+- Give the exposed pad its own pin when the footprint has one.+- The symbol must carry its own pins. A symbol that `extends` a library symbol it does not include loads with no pins.+- Check that the symbol's pins equal the page's pins, and that no two pin names overlap in the drawing.++## 6. 3D model++- Prefer the maker's STEP if their site offers one and its terms allow redistribution. Otherwise use the KiCad model+  for the package: `step2glb from-library "<Library>/<Name>"` or `service-kicad model fetch`.+- Pose: Z up, the lowest point seated on z = 0, the body centred on the pad pattern (not on pin 1), no extra rotation+  between model and footprint.+- Fit: the model's height is within A, and its outline is within D by E, from the datasheet. A generic model that is+  too tall or too wide for this maker's package is wrong for this part.+- Marking: `adom-chip-laser etch` puts the part number on the top of the body as a flat mark.+- Convert with `step2glb convert`. Colours follow the datasheet (housing colour, plating).++## 7. The page++- **Hero:** a 16:10 PNG at least 1600 px wide. `step2glb thumbnail --width 2400 --height 1500` renders one from the STEP.+- **Fusion and EAGLE library:** `adom-lbr generate` from the symbol and footprint, then `adom-lbr validate`.+- **`page.json` component block:** part number, manufacturer, package, the pin list, the datasheet link, the files+  (symbol, footprint, STEP, GLB), the package numbers from step 2, and where each fact came from (datasheet URL, fetch+  date, pages).+- **Ratings and limits:** state each figure with its conditions and its datasheet page. Leave out what the datasheet+  does not say.+- **Distributor numbers:** DigiKey and Mouser numbers from `adom-parts-search`. An LCSC number is written with its C+  prefix (`C377955`).+- **License:** state one. CAD taken from KiCad's libraries is CC-BY-SA-4.0.+- **Publishing:** the mechanics (creating the page, pushing files, setting the hero) are in the skills+  `adom-hardware-component-publish` and `wiki-publish-safely`. Push `page.json` last. Publish private first, check+  it, then make it public with open source: `adom-wiki page visibility <ref> --preset open`. A public page with+  sealed source shows no footprint or model to anyone else.++## Before you call it done++Go down this list. Each line is a defect that reached a published page at least once.++- [ ] The datasheet is the maker's and names this part.+- [ ] The footprint's pitch, pad reach, body and pad count agree with the package drawing.+- [ ] No two different pads touch. No copper is outside the courtyard.+- [ ] Every pin is a pad. Every signal pad has a pin.+- [ ] Two readings agreed on the whole pinout.+- [ ] Every pin name is printed in the datasheet, spelled the same way.+- [ ] The pinout is from the diagram for this variant and this package.+- [ ] Polarity is from the datasheet, and nothing polarised says "either orientation".+- [ ] The symbol's pins equal the page's pins, and the symbol does not depend on a missing base.+- [ ] The model is Z up, seated, centred on the pads, and fits A, D and E.+- [ ] The hero is 16:10 and at least 1600 px wide.+- [ ] The `.lbr` validates.+- [ ] Distributor numbers are present; LCSC has its C.+- [ ] A license is stated.+- [ ] Open the live page and look at it: the symbol, the footprint and the 3D model all render.++Tell the person which of these you checked and which you could not.++## By failure reason++The request email and `adom-wiki part status` give a reason. Start where it points.++| The reason says | What to do |+|---|---|+| No datasheet, or could not get a datasheet | Step 1. Find the maker's PDF (for a chip passive, the series sheet). You can also request again with `--datasheet <link>`. |+| Wrong document | The fetched sheet did not name the part. Find the sheet that does, usually the family's or the orderable number's own. |+| No land pattern or terminal drawing | Step 3. Check the package numbers against a KiCad footprint. Look for the maker's separate land-pattern document. Ask the person if neither exists. |+| No footprint for the package; footprint failed the fit check | Step 3, item 3: draw the pads from the datasheet drawing and check every number. |+| Readings disagreed; pin or footprint guard | Step 4. Two readings gave different pinouts, or the pinout did not fit the pads. First confirm the package (step 2): this usually means the wrong package variant. |+| 3D model pose; model outside the package | Step 6. Re-seat and centre the model, or pick the model that fits A, D and E. |+| Waiting on a maker 3D model | Ask the person whether they have the maker's STEP. If not, model the body from the datasheet drawing and say it is generated. |+| Unsupported kind (a development kit or module board) | A board is not a single-package part. It needs its own header footprint, pinout and 3D; say so and ask the person how far they want to go. |+| Not orderable | Confirm the exact orderable number with the person. `adom-wiki part candidates "<partial number>"` lists them. |++## When to stop and ask++Stop and tell the person, with the page number, when:++- no document names the part;+- the package drawing lacks a number you need and no other maker document has it;+- two careful readings of the pinout still disagree;+- polarity cannot be tied to pad numbers;+- the only 3D model available has terms that forbid sharing it.++A page with an honest gap ("Unknown", with the reason) is useful. A page with a guessed value causes a board that+does not work.
uninstall.shadded+4
@@ -0,0 +1,4 @@+#!/bin/sh+set -eu+SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)+exec python3 "$SCRIPT_DIR/scripts/uninstall.py" "$@"