Abbreviate author's name biblatex

We can use biblatex's name hashes to compare the name. You will need to know the hash for your name. That can be found in the .bbl file as described in Highlight an author in bibliography using biblatex allowing bibliography style to format it. For "John Smith" we have 5d0ddda3a367ceb26fbaeca02e391c22 in our MWE.

We then only need to modify the labelname format to check for "John Smith". Replace 5d0ddda3a367ceb26fbaeca02e391c22 by the hash for your name and JS by your abbreviation.

\DeclareNameFormat{labelname}{%
  \iffieldequalstr{hash}{5d0ddda3a367ceb26fbaeca02e391c22}
    {JS}
    {\ifcase\value{uniquename}%
      \usebibmacro{name:family}
        {\namepartfamily}
        {\namepartgiven}
        {\namepartprefix}
        {\namepartsuffix}%
    \or
      \ifuseprefix
        {\usebibmacro{name:given-family}
          {\namepartfamily}
          {\namepartgiveni}
          {\namepartprefix}
          {\namepartsuffixi}}
        {\usebibmacro{name:given-family}
          {\namepartfamily}
          {\namepartgiveni}
          {\namepartprefixi}
          {\namepartsuffixi}}%
    \or
      \usebibmacro{name:given-family}
        {\namepartfamily}
        {\namepartgiven}
        {\namepartprefix}
        {\namepartsuffix}%
    \fi}
  \usebibmacro{name:andothers}}

MWE

\documentclass{article}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{publication1,
    author  = "John Smith and Mary Taylor",
    title   = "title",
    year    = "2016",
    journal = "some journal",
}  \end{filecontents}
\usepackage[backend=biber,citestyle=authoryear,bibstyle=authortitle]{biblatex}
\addbibresource{\jobname.bib}


\DeclareNameFormat{labelname}{%
  \iffieldequalstr{hash}{5d0ddda3a367ceb26fbaeca02e391c22}
    {JS}
    {\ifcase\value{uniquename}%
      \usebibmacro{name:family}
        {\namepartfamily}
        {\namepartgiven}
        {\namepartprefix}
        {\namepartsuffix}%
    \or
      \ifuseprefix
        {\usebibmacro{name:given-family}
          {\namepartfamily}
          {\namepartgiveni}
          {\namepartprefix}
          {\namepartsuffixi}}
        {\usebibmacro{name:given-family}
          {\namepartfamily}
          {\namepartgiveni}
          {\namepartprefixi}
          {\namepartsuffixi}}%
    \or
      \usebibmacro{name:given-family}
        {\namepartfamily}
        {\namepartgiven}
        {\namepartprefix}
        {\namepartsuffix}%
    \fi}
  \usebibmacro{name:andothers}}

\begin{document}
\parencite{publication1} vs.\ (JS and Taylor 2016)
\end{document}

gives

(JS and Taylor 2016) vs. (JS and Taylor 2016)


Here is a solution using the new Data Annotation feature of biblatex 3.5/biber 2.6 (currently in Development folders on Sourceforge). It is a more general solution in that does not need to know any internals like hashes and you can enable the behaviour by just annotating your name in the .bib (which could also be automated by a sourcemap):

\documentclass{article}
\usepackage[style=authoryear]{biblatex}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{publication1,
  author  = "John Smith and Mary Taylor",
  author+an  = "1=me",
  title   = "title",
  year    = "2016",
  journal = "some journal",
}
\end{filecontents}
\addbibresource{\jobname.bib}

\DeclareNameFormat{labelname}{%
  \ifcase\value{uniquename}%
    \ifitemannotation{me}
      {\def\bibnamedelimd{}%
       \usebibmacro{name:given-family}
        {\namepartfamily}
        {\namepartgiven}
        {\namepartprefix}
        {\namepartsuffix}}
      {\usebibmacro{name:family}
        {\namepartfamily}
        {\namepartgiven}
        {\namepartprefix}
        {\namepartsuffix}}%
  \or
    \ifuseprefix
      {\usebibmacro{name:given-family}
        {\namepartfamily}
        {\namepartgiveni}
        {\namepartprefix}
        {\namepartsuffixi}}
      {\usebibmacro{name:given-family}
        {\namepartfamily}
        {\namepartgiveni}
        {\namepartprefixi}
        {\namepartsuffixi}}%
  \or
    \usebibmacro{name:given-family}
      {\namepartfamily}
      {\namepartgiven}
      {\namepartprefix}
      {\namepartsuffix}%
  \fi
  \usebibmacro{name:andothers}}

\renewcommand*{\mkbibnamegiven}[1]{%
  \ifitemannotation{me}
    {\StrLeft{#1}{1}}
    {#1}}

\renewcommand*{\mkbibnamefamily}[1]{%
  \ifitemannotation{me}
    {\StrLeft{#1}{1}}
    {#1}}

\begin{document}

\cite{publication1} = JS and Taylor 2016

\end{document}