The Yaeli Martinez Child Protection Act prohibits states receiving federal child welfare funding from treating parental affirmation of a child's biological sex as abuse or neglect, and restricts certain gender-related medical interventions for children in foster care and state custody. The bill requires states to train child welfare workers and judges that affirming a child's sex is not harmful, establish foster care housing policies based on biological sex, and prevent discrimination against foster and adoptive parents who affirm children's biological sex. It creates a federal civil right of action allowing parents, guardians, and children to sue state child welfare agencies in federal court for actions related to a child's sex affirmation, with courts presuming such actions were discriminatory unless states prove otherwise with clear evidence, and eliminates traditional legal defenses like qualified and sovereign immunity for states accepting federal funds. The bill imposes escalating financial penalties—ranging from 5 to 30 percent of federal child welfare grants—on states that violate its requirements and amends federal child custody law to prevent states from exercising jurisdiction over custody cases based on gender-related interventions or parental affirmation of a child's sex. These provisions take effect upon enactment and apply immediately to any state or entity receiving federal child welfare funding under the Social Security Act.