embedded_svc.settings.extraPrechatFormDetails can be used in Salesforce Embedded Service Chat to pass value to the Custom Field on the Chat Transcript object/entity.
Create a Custom Field in the Chat Transcript object to pass from Pre-Chat and store it on the record.
Custom Field:

Code Snippet:
embedded_svc.settings.extraPrechatFormDetails = [ {
"label": "Skill Selected",
"value": "Sales",
"transcriptFields":[ "Skill__c" ],
"displayToAgent": true
} ];
Output:

