[platform] lambda-friendly WriteCommandAction