Convert λ-expressions to SK-expressions
Haskell, 251 237 222 214 bytes

15 bytes saved thanks to @Ørjan_Johansen (also see his TIO links in the remarks)!

8 more bytes saved thanks to @nimi!

data E=S|K|E:&gt;E|V Int
p(h:s)|h&gt;'_',(u,a)&lt;-p s,(v,b)&lt;-p u=(v,a:&gt;b)|h&gt;'['=a&lt;$&gt;p s|[(n,_:t)]&lt;-reads s=(t,V n)
a(e:&gt;f)=S:&gt;a e:&gt;a f
a(V 0)=S:&gt;K:&gt;K
a(V n)=K:&gt;V(n-1)
a x=K:&gt;x
o(e:&gt;f)='`':o e++o f
o S="S"
o K="K"
f=o.snd.p


p parses the input, returning the remaining unparsed part in the first component of the resulting pair. The first character of its argument must be a backtick, a backslash or an opening bracket. The pattern guards of p check these cases in this order. In the first case, denoting an application, two more expressions are parsed and combined to an element of the E data type with the infix constructor :&gt;. In the lambda case, the following expression is parsed and immediately given to the a function. Otherwise it is a variable, we get its number with the reads function (which returns a list) and drop the closing bracket by pattern matching with (_:t). 

The a function does the quite well known bracket abstraction. To abstract an application, we abstract the two subexpressions and use the S combinator to distribute the argument to both. This is always correct, but with more code we could do much better by handling special cases in order to get shorter expressions. Abstracting the current variable gives I or, when we don't have that, SKK. Usually the remaining cases can just add a K to the front, but when using this notation we have to renumber the variables as the inner lambda is abstracted.

o turns the result to a string for output. f is the complete function.

As in many languages, backslash is an escape character, so it has to be given twice in a string literal:

*Main&gt; f "\\[0]"
"``SKK"
*Main&gt; f "\\`[0][0]"
"``S``SKK``SKK"
*Main&gt; f "\\\\[0]"
"``S``S`KS`KK`KK"
*Main&gt; f "\\\\[1]"
"``S`KK``SKK"
*Main&gt; f "\\\\\\``[2][0]`[1][0]"
"``S``S`KS``S``S`KS``S`KK`KS``S``S`KS``S``S`KS``S`KK`KS``S``S`KS``S`KK`KK``S`KK``SKK``S``S`KS``S``S`KS``S`KK`KS``S`KK`KK``S`KK`KK``S``S`KS``S``S`KS``S`KK`KS``S``S`KS``S`KK`KK``S``S`KS`KK`KK``S``S`KS``S``S`KS``S`KK`KS``S`KK`KK``S`KK`KK"