Xargs pass input to command that contains a pipe

Here you are with xargs:

find . -type d|xargs -I % sh -c 'find % -type f -maxdepth 1 | head -1'

But remember: internal loop is much faster!

time find $PWD -type d | while read dir;do find $dir -type f -maxdepth 1 | head -1;done >/dev/null                                                                                       
    0m09.62s real     0m01.67s user     0m02.36s system
time find . -type d|xargs -I % sh -c 'find % -type f -maxdepth 1 | head -1' >/dev/null                                                                                                   
    0m12.85s real     0m01.84s user     0m02.86s system