@xynogen/pix-skills 0.11.2 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/package.json +2 -2
- package/skills/freecad.md +103 -0
- package/src/index.ts +9 -4
package/README.md
CHANGED
|
@@ -166,6 +166,7 @@ as `/skill:<name>` slash commands.
|
|
|
166
166
|
| `explain` | Trace and explain existing code in plain STE-style language |
|
|
167
167
|
| `finish` | Branch completion — verify, decide merge/PR/keep, clean up |
|
|
168
168
|
| `format` | Select and run the project's formatter, check mode before write mode |
|
|
169
|
+
| `freecad` | FreeCAD parts with an engineer's mindset: ISO/DIN/ANSI standards, proven patterns, simple joinery, clearance per production method |
|
|
169
170
|
| `handoff` | Toggle session handoff — write or read+delete `HANDOFF.md` |
|
|
170
171
|
| `harden` | Retrofit a fail-fast static-analysis gate onto an existing project |
|
|
171
172
|
| `human` | Audit and rewrite text to remove AI writing patterns (bundle with references) |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xynogen/pix-skills",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Pi extension — agent skill loader (skill tool + skills bundle)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@xynogen/pix-gate": "^0.5.0",
|
|
50
|
-
"@xynogen/pix-pretty": "^3.0
|
|
50
|
+
"@xynogen/pix-pretty": "^3.4.0",
|
|
51
51
|
"@xynogen/pix-runtime": "^0.22.2"
|
|
52
52
|
}
|
|
53
53
|
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: freecad
|
|
3
|
+
description: Design FreeCAD parts and assemblies like a mechanical engineer — load paths, ISO/DIN/ANSI standards, standard parts, proven design patterns, simple joinery, clearance per production method, version-independent code, fast models. Use when modeling, changing, or checking a FreeCAD part or assembly, or when choosing a standard, joint, fit, or clearance.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# FreeCAD
|
|
8
|
+
|
|
9
|
+
## Mindset
|
|
10
|
+
|
|
11
|
+
Before modeling, answer: what does the part **do**, which **loads** act and where do they flow, how is it **assembled** and serviced, and where will it **fail** first? Prefer the simplest common industry solution: one part over two, geometry over fasteners, a standard part or pattern over an invented one.
|
|
12
|
+
|
|
13
|
+
## Before modeling
|
|
14
|
+
|
|
15
|
+
1. Check the CAD app responds before claiming a build or render. After a timeout, check status before retrying.
|
|
16
|
+
2. Keep the design in source code. Preserve touched user documents; close only your own untouched temp documents.
|
|
17
|
+
3. Find the **production method** and material (FDM, resin, powder, CNC, sheet cutting, molding). Ask if unknown; do not assume FDM.
|
|
18
|
+
4. Find the **standard system** (region, customer, metric or inch). Ask if unknown; default to ISO metric.
|
|
19
|
+
5. Find mating faces, bought-part envelopes, fastener direction, and orientation. Datasheet or caliper is truth; label assumptions.
|
|
20
|
+
6. Research unclear joints, fits, and specs; cite the source. Never invent a tolerance or strength value.
|
|
21
|
+
|
|
22
|
+
## Standards
|
|
23
|
+
|
|
24
|
+
One system per project; never mix on one drawing.
|
|
25
|
+
|
|
26
|
+
| Topic | ISO / EN | DIN (legacy) | ANSI / ASME |
|
|
27
|
+
|---|---|---|---|
|
|
28
|
+
| Fits | ISO 286 | DIN ISO 286 | ANSI B4.1 (inch), B4.2 (metric) |
|
|
29
|
+
| General tolerance | ISO 2768 | DIN 7168 → ISO 2768 | title-block tolerances |
|
|
30
|
+
| GD&T | ISO 1101 (GPS) | DIN EN ISO 1101 | ASME Y14.5 |
|
|
31
|
+
| Threads | ISO 261/262 | DIN 13 | UNC/UNF, ASME B1.1 |
|
|
32
|
+
| Drawings | ISO 128, first-angle | DIN ISO 128 | ASME Y14, third-angle |
|
|
33
|
+
|
|
34
|
+
- DIN → ISO: 912 → 4762, 933 → 4017, 934 → 4032, 125 → 7089, 7991 → 10642, 7 → 2338. Some sizes differ; model to the standard you buy.
|
|
35
|
+
- Use standard bought parts (screws, dowels, bearings, circlips, O-rings, rails, extrusions) and preferred sizes (standard drills, reamers, stock).
|
|
36
|
+
- Name the standard next to the value in code: `# ISO 4762 M4: head Ø7 x 4`.
|
|
37
|
+
|
|
38
|
+
## Version-independent code
|
|
39
|
+
|
|
40
|
+
- Documented API only; check it exists (`hasattr`, try/except) instead of assuming a version.
|
|
41
|
+
- Set every property that matters; never rely on defaults or user preferences.
|
|
42
|
+
- Select faces/edges by geometry and assert the count; never hard-code `Face6`/`Edge17`.
|
|
43
|
+
|
|
44
|
+
## Joinery (stop at the first that works)
|
|
45
|
+
|
|
46
|
+
1. **No joint** — one part.
|
|
47
|
+
2. **Geometry holds it** — shoulder, ledge, slot, tab.
|
|
48
|
+
3. **Dovetail / T-slot / rail** — resists pull-apart without glue; add a stop or detent.
|
|
49
|
+
4. **Pegs / dowels** — locate; glue only fixes, never carries peel load.
|
|
50
|
+
5. **Snap fit** — size the arm from allowable strain; root fillet, lead-in.
|
|
51
|
+
6. **Bayonet / twist-lock** — round parts that come apart.
|
|
52
|
+
7. **Screws** — self-tapping for few cycles; inserts, tapped holes, or nut traps for load or service; washers on plastic.
|
|
53
|
+
8. **Print-in-place hinge** — last resort.
|
|
54
|
+
|
|
55
|
+
State why simpler options were not enough.
|
|
56
|
+
|
|
57
|
+
## Clearance by method
|
|
58
|
+
|
|
59
|
+
Keep each clearance as one named parameter. These are starting points; test-fit critical joints.
|
|
60
|
+
|
|
61
|
+
| Fit (per side) | FDM | Resin | Powder |
|
|
62
|
+
|---|---|---|---|
|
|
63
|
+
| Press | 0.05-0.15 mm | 0-0.05 mm | 0-0.1 mm |
|
|
64
|
+
| Sliding | 0.2-0.3 mm | 0.125-0.2 mm | 0.2-0.3 mm |
|
|
65
|
+
| Moving | 0.3-0.4 mm | 0.2-0.3 mm | 0.3-0.4 mm |
|
|
66
|
+
|
|
67
|
+
**CNC** (total, hole basis; ANSI RC/LC/LT/LN/FN for inch): press H7/s6, location H7/h6, sliding H7/g6, running H8/f7, free H11/c11. Values depend on size; read the table. Fit class only where needed; ISO 2768-m elsewhere. Inside corners keep the tool radius (dogbones).
|
|
68
|
+
|
|
69
|
+
**Sheet cutting:** slot = measured thickness + 0.05-0.1 mm snug, + 0.15-0.25 mm loose; measure kerf on a test cut.
|
|
70
|
+
|
|
71
|
+
**Molding:** molder's tolerances, draft 1-2° per side.
|
|
72
|
+
|
|
73
|
+
## Proven patterns
|
|
74
|
+
|
|
75
|
+
- **Stiffness:** add depth, not thickness (I = b·h³/12). Flange free edges, add ribs/beads, close open sections against torsion, triangulate with gussets, use standard sections.
|
|
76
|
+
- **Molded ribs:** 40-60% of wall, height ≤ 3× wall, draft, root fillet.
|
|
77
|
+
- **Strength:** spread loads (washers, bosses, inserts), even walls, tie bosses to walls, fillet stressed inside corners, plan the weak link.
|
|
78
|
+
- **Location:** 3-2-1 rule; one round + one diamond pin; poka-yoke keyed features; slots or shims where tolerances stack.
|
|
79
|
+
- **Assembly:** lead-in chamfers, captive fasteners, relief grooves, bend relief.
|
|
80
|
+
- **Sheet metal:** bend radius ≥ thickness, flange ≥ 4× thickness; use the fabricator's bend table.
|
|
81
|
+
|
|
82
|
+
## FDM rules
|
|
83
|
+
|
|
84
|
+
- Layers are weak: run tension and bending along layers. Print pegs, clips, and snap arms lying flat.
|
|
85
|
+
- Walls give strength, not infill.
|
|
86
|
+
- Plastic creeps and softens; avoid constant preload, check operating temperature.
|
|
87
|
+
- Holes print small, horizontal holes oval: add clearance, teardrop profile, or ream.
|
|
88
|
+
- Elephant's foot: chamfer bottom edges and bottom holes.
|
|
89
|
+
- Bottom face: chamfer, not fillet. Overhang: start at 45°, check in a slicer. Strength beats printability; split at a joint if both matter.
|
|
90
|
+
|
|
91
|
+
## Structure and verify
|
|
92
|
+
|
|
93
|
+
**Main shape → supports → modifiers → validation.** Decorative fillets and chamfers go last; functional fillets go where the load needs them. Shared dimensions live in one config module.
|
|
94
|
+
|
|
95
|
+
Verify: validity, solid count, bounding box, key dimensions, holes and clearances, interference with neighbours, assembly path and tool access, full assembly, and a render you inspect. Leave one runnable assertion for non-trivial geometry.
|
|
96
|
+
|
|
97
|
+
## Performance
|
|
98
|
+
|
|
99
|
+
Recompute is serial and slows as faces grow. Measure slow features first. Keep fillets out of mid-tree, skip intermediate refine/checks, hide intermediate features, recompute only what changed, run heavy work headless. Kernel and display settings are user preferences: ask before changing, restore after.
|
|
100
|
+
|
|
101
|
+
## Report
|
|
102
|
+
|
|
103
|
+
Say what ran: builds, checks, renders, slicer/CAM, physical tests. Fit, strength, and printability stay unverified until made and tested.
|
package/src/index.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
import { dirname, isAbsolute, join, relative, resolve, win32 } from "node:path";
|
|
15
|
-
import { frameToolResult, moreLines } from "@xynogen/pix-pretty/frame";
|
|
15
|
+
import { bodyText, frameToolResult, moreLines } from "@xynogen/pix-pretty/frame";
|
|
16
16
|
import {
|
|
17
17
|
dotJoin,
|
|
18
18
|
hideCollapsedToolCall,
|
|
@@ -748,10 +748,15 @@ function registerSkillLoader(pi: ExtensionAPI): void {
|
|
|
748
748
|
return component;
|
|
749
749
|
}
|
|
750
750
|
if (details.mode === "search" && details.results) {
|
|
751
|
-
component.setText(
|
|
751
|
+
component.setText(
|
|
752
|
+
bodyText(formatRemoteSkillSearchSummary(details.query, details.results, theme), theme),
|
|
753
|
+
);
|
|
752
754
|
return options.isPartial ? component : frameToolResult(component, theme, false);
|
|
753
755
|
}
|
|
754
|
-
const body =
|
|
756
|
+
const body = bodyText(
|
|
757
|
+
formatSkillSummary(formatExpandedSkillResult(details, text ?? ""), theme),
|
|
758
|
+
theme,
|
|
759
|
+
);
|
|
755
760
|
// Long skill bodies collapse to a fading preview; ctrl+o shows the full text.
|
|
756
761
|
component.setText(
|
|
757
762
|
options.expanded
|
|
@@ -760,7 +765,7 @@ function registerSkillLoader(pi: ExtensionAPI): void {
|
|
|
760
765
|
);
|
|
761
766
|
return options.isPartial ? component : frameToolResult(component, theme, false);
|
|
762
767
|
}
|
|
763
|
-
component.setText(formatSkillSummary(text ?? "", theme));
|
|
768
|
+
component.setText(bodyText(formatSkillSummary(text ?? "", theme), theme));
|
|
764
769
|
return options.isPartial
|
|
765
770
|
? component
|
|
766
771
|
: frameToolResult(component, theme, renderCtx.isError === true);
|