Skip to main content

sw-learner

Reconstruct a complete consent-ready FeedbackSubmission from the entire current SolidWorks task, including corrected build instructions, every final code artifact, reproducible errors and fixes, lessons, and eligible images. Use throughout SolidWorks work for tracking and invoke at the end through sw-session-reporter; do not use for non-SolidWorks conversations.

소스 정보

저장소
hashgraph-online/awesome-codex-plugins
최근 소스 활동
2026년 9월 30일 03:01
감지된 SKILL.md 언어
영어
스타
1,230
포크
343

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
2 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
sw-learner
description
Reconstruct a complete consent-ready FeedbackSubmission from the entire current SolidWorks task, including corrected build instructions, every final code artifact, reproducible errors and fixes, lessons, and eligible images. Use throughout SolidWorks work for tracking and invoke at the end through sw-session-reporter; do not use for non-SolidWorks conversations.
# SolidWorks Learner Track the session from the first SolidWorks message. When invoked, reread the entire Codex task and rebuild the complete current payload, not a delta. Keep only corrected final versions. Never show the raw payload, base64 images, or full submission JSON to the user. ## 1. Confirm relevance and session If no SolidWorks modeling, API calls, CAD code, design decisions, or debugging occurred, return an internal skip result and stop. Read `.sw-learner-state.json` in the CAD working directory and require a non-empty fixed `sessionId`. If it is missing, resolve the plugin root and run `scripts/sw_session.py start` once, then keep that UUID for the rest of the task. ## 2. Resolve the part Use quoted `curl` and the configured `SW_KB_HOST` default to query: ```text GET /api/parts?q={encoded-part-identifier}&pageSize=20 ``` Record the best exact or close `partId`; use `null` when none exists. Preserve the known `partNumber`. On Windows, run `curl.exe` instead of `curl`: in Windows PowerShell 5.1 `curl` is an alias for `Invoke-WebRequest`, which rejects curl options such as `-sS`. `curl.exe` is the real curl in every Windows shell. ## 3. Collect eligible images Find images referenced by generated code (`SaveBMP`, `ExportBMP`, `SaveAs`, or paths ending in `.png`, `.jpg`, `.jpeg`, `.bmp`, `.tiff`, `.tif`, `.gif`) and images actually shown in the task. Include only existing readable files under 10 MB. Deduplicate by filename and encode bytes as base64. Use MIME types `image/png`, `image/jpeg`, `image/bmp`, `image/tiff`, or `image/gif`. Convert Windows paths to accessible host paths when working through WSL. ## 4. Build FeedbackSubmission Follow `../../schemas/feedback-submission.schema.json`. Always include: - `issues`: a two-to-five sentence narrative of what was built, the approach, mistakes fixed, validation, and final state; - `sessionId`: the fixed ID for this Codex task; - `partId`: the matched UUID or `null` when useful. Add arrays only when they contain at least one item. Omit empty arrays entirely. ### Classification hints You know what you were asked to build. The reviewer sees only the resulting code and renders, and has to work backwards from them. Pass that knowledge forward so they confirm rather than deduce: - `suggestedCategory`: an exact category `name` from `GET {SW_KB_HOST}/api/categories`. Fetch the list; never invent a name. Use `"Uncategorised"` when nothing fits — reviewers create categories, agents do not. - `suggestedPartName`: short descriptive name including the defining dimension, e.g. `"Cardan yoke, 30mm bore"`. - `suggestedPartNumber`: the part number when the user gave one or the catalog lookup in step 3 matched. **Omit it rather than invent one** — a fabricated part number is worse than none. All three are optional; omit any you cannot infer, and never send an empty string. They are advisory: nothing is published on their strength, and `partId` is still set only by an explicit reviewer action, so a wrong guess costs nothing. ### Instructions Include exact ordered build steps with the SolidWorks version, material, final feature order, real parameter values, API calls, validation, and exports. Skip generic steps that add no reusable knowledge. ### Macros Include every code artifact written in the task: Python, VBA, or SWAPI. Store the full verbatim final working source, never a summary or truncated excerpt. Required macro fields are `name`, `language`, and `code`. Add description, `swFeaturesUsed`, parameters, template flag, version, and part ID when known. ### Known errors Include only concrete failures with the exact return value or error, affected SolidWorks method, and a resolution that actually worked. Exclude typos, immediately-fixed syntax mistakes, vague symptoms, and non-SolidWorks issues. Use severity `critical` for total failure, `high` for plausible but wrong output, `medium` for a caught and repaired failure, and `low` for minor inconvenience. ### Lessons Include non-obvious lessons demonstrated in this task, from successes and failures. Every lesson needs `category`, `title`, `whatHappened`, `rootCause`, `prevention`, and `severity`. Make `prevention` a concrete rule, never merely `be careful`. ## 5. Validate and persist privately Write the payload to `.sw-feedback-payload.json` in the CAD working directory only when persistence is needed across the consent turn. Ensure it is ignored by version control. Validate it with: ```text python <plugin-root>/scripts/validate_feedback.py .sw-feedback-payload.json python <plugin-root>/scripts/sw_session.py mark-payload --part-id <uuid-or-null> --part-number <value> ``` Increment `payloadVersion` on every rebuild. Replace earlier payload content; do not accumulate stale or broken code versions.
GitHub에서 보기