Is it possible to specify user specific pre commands in VS Code?

You can with the help of the extension Command Variable it allows you to use the content of a file as a command in the terminal. The file can also contain Key-Value pairs or be a JSON file.

Say you store this userTask.txt or userTask.json file in the .vscode folder and add the file to the .gitignore file.

With the current version of the extension the file userTask.txt has to exist, I will add an option to supply alternative text in case the file does not exist. You can fill the file with a dummy command like echo No User Task

Set up your task.json like

{
  "version": "2.0.0",
  "tasks": [
    {
      "label" : "do it",
      "type" : "shell",
      "windows": {
        "command": "internal_command"
      },
      "linux": {
        "command": "internalCommand"
      },
      "dependsOrder": "sequence",
      "dependsOn": ["userTask"]
    },
    {
      "label" : "userTask",
      "type" : "shell",
      "command": "${input:getUserTask}"
    }
  ],
  "inputs": [
    {
      "id": "getUserTask",
      "type": "command",
      "command": "extension.commandvariable.file.content",
      "args": {
        "fileName": "${workspaceFolder}/.vscode/userTask.txt"
      }
    }
  ]
}