In Stargirl, teenager Courtney Whitmore discovers the Cosmic Staff, the weapon/device used by her stepfather Pat Dugan's partner Sylvester Pemberton aka Starman, in the basement of their new home in Blue Valley, Nebraska. With the staff only accessible to a select few, the Cosmic Staff was essential to Courtney becoming Sylvester's successor. But what is the Cosmic Staff, how can it do what it does and who created it?
The precursor to the Cosmic staff was a device called a gravity rod which was created by a wealthy scientist named Ted Knight. Ted used the device to draw stellar energy from space which granted him the ability of flight, energy projection, and other useful abilities for his crime-fighting career as Starman. While he operated as the guardian of his hometown Opal City as well as a member of the Justice Society of America, Ted's age eventually caught up to him and he retired, ing along the responsibility and tech to his oldest son David. But when David was brutally murdered while on patrol, a grieving Ted offered the role to his youngest son, Jack. With dwindling resources at hand, Jack used a prototype "Cosmic Staff/Rod" in his final battle with Kyle Nimbus, the younger son of his father's nemesis the Mist. The Cosmic Staff would be the signature weapon of Jack Knight's career as Starman with his father Ted on call to repair, upgrade or advise Jack about how to properly use the staff (whether Jack listened to him or not) or give advice to Opal City's current guardian if necessary.
At some point in his career, Jack crossed paths with Courtney Whitmore, the then Star-Spangled Kid who inherited the mantle once worn by Sylvester Pemberton. Sylvester had worked with Ted in the JSA and at one point, Ted had been grooming him to succeed him as Starman. Although he turned down the offer, Sylvester used technology given to him by Ted until his death, and the costume and gadgets had been discovered by Courtney, the stepdaughter of Sylvester's former partner Pat Dugan. Finding Courtney to be an amateur and annoying hero, Ted worked with her and Dugan, currently operating as the robotic hero STRIPE, to take down the Icicle and would later work alongside Courtney in the newest incarnation of the Justice Society. Watching Courtney grow and mature as a hero, even getting to meet and learn from the time-displaced Sylvester in one adventure, Jack chose her to carry on the Starman legacy when he decided to retire.
Calling Courtney to meet with him, Jack bestowed upon her the Cosmic Staff as well as his signature jacket and goggles, telling her that his late father would have approved of the decision and that she'd make a great "Stargirl" whenever she was ready for it. Eventually, after a sobering confrontation with her real father and a following conversation with Pat, Courtney decided to permanently change her name to Stargirl to represent both legacies that she carries, the Star-Spangled Kid, and Starman.
Since then, the Cosmic Staff has remained in her possession and has become synonymous with her portrayal in an animated and live-action format. A version of Stargirl wielded the Staff alongside her partner STRIPE in Justice League Unlimited as well as cameos by herself in Batman: Brave and the Bold, Justice League Action, and in Young Justice: Outsiders. It appeared in the "Legends of Tomorrow as Courtney, portrayed by actress Sarah Grey, and the wartime Justice Society confronts the time-traveling Legends over their mission to locate the Spear of Destiny. This incarnation did little to elaborate much on Courtney's background, how she obtained the staff, or anything notable regarding her place in that world outside of the JSA.
In Stargirl, the latest incarnation of Courtney Whitmore discovered the floating and apparently aware Cosmic Staff in the basement along with Pat's mementos of his time as the JSA and working with his partner Starman. This version continues the tradition of Courtney, portrayed by Brec Bassinger, inheriting the role from Sylvester, portrayed by actor Joel McHale, who has replaced Ted (and Jack) as the the renewal of a second season means there may be opportunities for future Stargirl story-lines to elaborate more about the Cosmic Staff and its rich DC Comics history.