Great! Welcome to the world of scripting!
I'm going to assume that you're at least comfortable in javascript. After that it's just a matter of conforming to the peculiarities of Roll20's sandbox.
This post has a bunch of information I think can help someone getting started on their scripting journey. I would direct you especially to the parts about the RMP template and the ways that the Inspector and ScriptInfo scripts can simplify your life.
Also spend some time with breaking down and parsing command lines. Think about that complexity you want to add, later, to make sure that the model you implement will scale up to everything you later want to do.
Now, as for getting items from the character sheet, you're most likely going to be getting attributes or abilities. You're going to want either/both of findObjs() and getObj() (you can find both of those in the function documentation linked from the above post). If you want to see a script that does this (gets a list of attributes or abilities and presents them as a menu of buttons), you can check out InsertArg.

(It seems InsertArg has disappeared from the 1-click repo. You can find it in my personal repo.)
EDIT: I was mistaken. It's still in the 1-click.
The bits of code that deal with retrieving game objects begins on line 369 and goes through 451.
Post back with specific questions about what you are trying to do if you run into problems!