Skills with Code
A skill can come with code. The SKILL.md file tells the agent when to use the skill and how to run the code, and the code does the actual work, exactly the same way every time. That's handy for research you repeat, because the agent can't skip a step or make up a number.
We're going to add a skill called Candidate Research. It comes with a short Python script that gets campaign finance totals from the FEC: how much each candidate has raised and spent, and how much cash they have left. You can ask about a whole race, like the Texas Senate race, or about specific candidates, like Ken Paxton and James Talarico.
You'll need the FEC API key from the Setup page.
I'm using on
Pick both to see the steps.
Step 1: Add the skill
-
Open the
.agents/skillsfolder in your home folder, where you put thegreet-userskill in My First Skill. -
Inside
skills, make a new folder calledcandidate-research. Insidecandidate-research, make another folder calledscripts. -
Now write the skill's instructions. Here's what goes in
SKILL.md. You can change it or add your own instructions underneath:--- name: candidate-research description: Looks up 2026 campaign finance totals (money raised, money spent, cash on hand) for federal candidates using FEC data. Use when the user asks how much candidates in a race have raised, wants a fundraising update on a candidate, or wants to compare candidates' money. --- # Candidate Research Get the numbers by running `scripts/money.py`, which is in the same folder as this file. Don't look the numbers up any other way, and don't estimate them. If the script says the API key is missing or wasn't accepted, stop. Tell the user to open `scripts/money.py` and paste their FEC API key on the `API_KEY` line. Don't edit the key yourself.Download SKILL.md, then move it from your Downloads folder into the
candidate-researchfolder. -
Download money.py, then move it from your Downloads folder into the
scriptsfolder.You should end up with:
Home └── .agents └── skills ├── greet-user └── candidate-research ├── SKILL.md └── scripts └── money.pyC:\Users\you └── .agents └── skills ├── greet-user └── candidate-research ├── SKILL.md └── scripts └── money.py/home/you └── .agents └── skills ├── greet-user └── candidate-research ├── SKILL.md └── scripts └── money.py
Step 2: Add your FEC API key
-
Open the
scriptsfolder, right-clickmoney.pyand choose Open With → TextEdit. (If TextEdit isn't listed, choose Other… and pick it.)Open the
scriptsfolder, right-clickmoney.pyand choose Open with → Notepad. (If Notepad isn't listed, choose Choose another app and pick it.)Open the
scriptsfolder, right-clickmoney.pyand choose Open With → Text Editor. -
Near the top, find this line:
API_KEY = "INSERT YOUR API KEY HERE"Replace
INSERT YOUR API KEY HEREwith your FEC API key. Keep the quote marks around it, so it looks like this (with your key instead):API_KEY = "a1B2c3D4e5F6g7H8i9J0" -
Save the file and close it. While it's open, have a look around: the comments (lines starting with
#) explain what each part of the script does.
Step 3: Call the skill
-
Quit DeepSeek Harness (Command + Q) and open it again, so it notices your new skill.
Close DeepSeek Harness and open it again, so it notices your new skill.
Close DeepSeek Harness and open it again, so it notices your new skill.
-
Start a new chat, type
/candidate-researchfollowed by your question, and press Enter:Start a new chat, type
$candidate-researchfollowed by your question, and press Enter:Click Code to start a new Claude Code session, type
/candidate-researchfollowed by your question, and press Enter:/candidate-research Texas Senate Race$candidate-research Texas Senate Race/candidate-research Texas Senate RaceThe agent may ask permission to run the script. It needs the internet to reach the FEC, so allow it. You should get back a table of candidates, from the biggest fundraiser down.
-
Now ask without calling the skill by name. The description in
SKILL.mdtells the agent when to use it:Compare Ken Paxton and James Talarico's fundraising. -
Try a race you care about, like your own state's Senate race or your House district. For a House race, include the state and district number, like "the Texas 21st district".
Step 4: Modify the skill
-
Right now the agent decides how to show the results. You can tell it exactly what you want in
SKILL.md.In the
candidate-researchfolder, right-clickSKILL.mdand choose Open With → TextEdit.In the
candidate-researchfolder, right-clickSKILL.mdand choose Open with → Notepad.In the
candidate-researchfolder, right-clickSKILL.mdand choose Open With → Text Editor. -
Add this to the end of the file, then save it:
## How to show the results Show only a table with each candidate's name, party, money raised, money spent, cash on hand and the date the numbers run through. Don't add any analysis or commentary. Under the table, list the FEC links that the script prints, so readers can check the numbers on the FEC website. -
Start a new chat and run it again:
/candidate-research Texas Senate Race$candidate-research Texas Senate Race/candidate-research Texas Senate RaceThis time you should get just the table, with links to each candidate's page on the FEC website.
Instructions written by Dhrumil w/ Claude Code