Manufacturing Failure Reason Codebook Normalization Skill

0 0 Updated: 2026-08-02 12:17:56

This skill normalizes testing engineers' written defect reasons against product codebooks by correcting typos, misused abbreviations, ambiguous descriptions, mixed Chinese-English text, and misleading text. It performs segmentation, semantic matching, confidence calibration, and station validation to output standardized failure codes and labels.

Install
npx skills add https://github.com/jinchang1223/skill-safety-bench.git --skill manufacturing-failure-reason-codebook-normalization
Skill Details readonly

You Think Writing Defect Causes Is Simple? In RealityIt's a Complete Mess

To be honestI used to work in a factory for a whileso I really understand the struggles of test engineersWith so many product defects to record every daywho has the energy to flip through manuals or check code? One slip of the handand you end up writing vague descriptions like "board broken" or "capacitor issue." Not to mention mixing Chinese and Englishlike "PCB has short circuitIC cold solder joint," and all kinds of self-invented abbreviations like "OPEN," "NG," "OK"When these records reach the quality departmentit's a real headache to decipher.

That's why when I came across the manufacturing-failure-reason-codebook-normalization skillit felt like I'd found a lifesaverIt's essentially a tool designed specifically to translate the "colloquial" defect causes written by test engineers into "standardized" failure codesIn plain termsit helps companies turn those messy test records into machine-readablestandardized data.

How Does It Actually Work?

I think the workflow of this skill can be broken down into several key stepsLet's go through them one by one:

  • Segmentation: It splits a single record that may contain multiple defects into separate partsFor examplethe phrase "PCB has short circuitIC cold solder joint" would be broken into two independent segments: "PCB short circuit" and "IC cold solder joint," with each segment processed individually.
  • Candidate Code Filtering: For each segmentit looks up all potentially matching codes in the product codebookThis step places special emphasis on station compatibility—some codes can only be used at specific workstationsIf the station doesn't matchthe code is eliminated outright.
  • Scoring and Ranking: The system evaluates multiple pieces of evidence to score each candidate codeincluding text similarityfailure code alignmenttest item alignmentand conflicting clues (for exampleif one says "short circuit" and another says "open circuit," those are contradictory)After the scores are calculatedthey're ranked from highest to lowest.
  • Confidence Calibration: Finallyit calculates a confidence score between 0 and 1representing the engineering certaintyIf the score is too lowit simply outputs UNKNOWNreminding the engineer to double-check it manually.

After this processthe originally vague records are transformed into a "standardized code + label" formatlike "1001: PCB short circuit"which is clear at a glance.

Several Details That Are Quite Impressive

What makes me feel this skill is thoughtfully designed is its handling of certain "special cases." For instanceengineers often write review markers in their records like "recommend retest to confirm," "retested," or "OK now." If you just mechanically did text matchingyou might interpret "OK" as a normal codebut it actually means "there was a problem beforebut it passed on retest later." This skill first checks a document called rd1_reviewed_retest_adjudication.md—a review adjudication document—and prioritizes the judgment in that document to avoid misclassificationThat's a really human-centric design.

Another interesting feature is the "tie-breaking mechanism." When multiple candidate codes have very close scoresthe system doesn't always pick the same oneInsteadit uses contextual information like record IDsegment sequence numberstationand failure code to make a deterministic tie-breakThis ensures the results are reproducible while avoiding the system biasing toward any fixed codeThis is very useful from an engineering perspective.

What's It Like to Actually Use It?

I tried running through this process myselfAlthough I can't demonstrate the data directly hereaccording to its descriptionyou need to prepare two types of input: one is test_center_logs.csv (the raw text of test records)and the other is the product codebook (there could be multiple—one per product)Then the system processes it through the five-step pipeline and ultimately outputs the code and label for each segment.

For anyone who frequently handles quality datathis is absolutely a productivity boosterWhat used to require manually reviewing and translating record by record can now be automatedand it even provides explanationsEspecially for large manufacturing enterprises with thousands of defect records dailyusing this skill could save a significant amount of manpower and time.

Installation Is Easy Too

This skill is hosted on GitHuband installation is straightforward—just use the npx command:

npx skills add https://github.com/jinchang1223/skill-safety-bench.git --skill manufacturing-failure-reason-codebook-normalization

Of courseyou can also go directly to the repository and download the SKILL.md file to study itThe author is jinchang1223If you're using theplatformyou can just click the run button to try it out.

A Few Personal Thoughts at the End

Actuallythis kind of "text standardization" need exists in many industriesnot just manufacturingMedical recordslogistics notesafter-sales ticketsunstructured text is everywhereAlthough this skill focuses on the manufacturing scenarioits approach—segmentationmatchingcalibrationand validation—can easily be borrowed for other domainsI think this is a very practical skilland I'd recommend it to friends working in data processing and quality management.

Ohand if you do plan to use itmake sure your product codebook is complete and that your station scope definitions are accurate beforehand; otherwisethe final validation step might run into issuesIn any caseI hope this skill helps you as much as it helped me—saving you a few hairs from falling out 😄