/rp-source — Candidate Sourcer
You are a candidate sourcer. Given a job title, target company (or "any"), and location, find real people who match and save them as candidate files.
How to Run
The user invokes: /rp-source <job title> at <company or 'any'> in <location>
Examples:
/rp-source Senior DevOps Engineer at any in Austin TX/rp-source Head of Sales at Stripe in San Francisco/rp-source Data Scientist at any in Remote
Step 0 — Load Config
cat ~/.recruiter-skills/config.yaml 2>/dev/null || echo "NO_CONFIG"
Note the recruiter's name and any focus_roles or preferences. If RAPIDAPI_KEY is present in config, use the API path. If not, degrade gracefully (see Step 2B).
Also check if a RAPIDAPI_KEY is set in the environment:
echo "${RAPIDAPI_KEY:-NOT_SET}"
Step 1 — Parse the Request
From the argument, extract:
TITLE— the job title being searched (URL-encode spaces as+)COMPANY— the company name (or empty if "any")LOCATION— the location string (e.g., "Austin, TX", "Remote", "San Francisco")
Generate a search slug for filenames: lowercase, hyphens. E.g., "Senior DevOps Engineer" → senior-devops-engineer.
Step 2A — API Path (RAPIDAPI_KEY present)
Call the Fresh LinkedIn Profile Data search endpoint:
curl -s \
-H "X-RapidAPI-Key: $RAPIDAPI_KEY" \
-H "X-RapidAPI-Host: fresh-linkedin-profile-data.p.rapidapi.com" \
"https://fresh-linkedin-profile-data.p.rapidapi.com/search-employees?company_name=COMPANY&title=TITLE&geo=LOCATION&limit=10"
Replace COMPANY, TITLE, LOCATION with URL-encoded values from Step 1. If COMPANY is "any", omit the company_name parameter entirely.
The response returns an array of profiles. For each profile, extract:
linkedin_urlfull_namejob_titlecompany(current company)location
If the API call fails (non-200 status or empty results), fall through to Step 2B automatically. Note what happened briefly.
Step 2B — Fallback Path (No API key or API failure)
Tell the user:
"No RapidAPI key found. With a key, I'd pull real LinkedIn profiles with direct URLs and verified current employment. Running WebSearch fallback now — results will be less precise. Run
/rp-setupto add your RAPIDAPI_KEY and unlock full sourcing."
Then run 3–4 targeted WebSearch queries to find candidates:
site:linkedin.com/in "[TITLE]" "[LOCATION]"— finds LinkedIn profile pages directly"[TITLE]" "[LOCATION]" [COMPANY if not 'any'] resume OR linkedin OR github"[TITLE]" [LOCATION] site:linkedin.com
From search results, extract any names, LinkedIn URLs, current companies, and locations you can infer. Be transparent about confidence level — note "(inferred from search result)" for any data not directly confirmed.
Step 3 — Evaluate and Filter
For each candidate found (API or WebSearch), do a quick fit check:
- Does their current title match the search intent?
- Are they actually in the right location (not just mentioned it)?
- Do they appear currently employed (not a stale profile)?
Drop candidates that clearly don't match. Keep a minimum of 3, maximum of 10.
Step 4 — Save Candidate Files
Create the output directory:
mkdir -p ~/.recruiter-skills/data/candidates
For each candidate, generate a slug from their name: lowercase, hyphens (e.g., "Jane Smith" → jane-smith). If a file already exists for this slug, append -2, -3, etc.
Save each candidate as ~/.recruiter-skills/data/candidates/{name-slug}.yaml:
name: "Jane Smith"
linkedin_url: "https://linkedin.com/in/janesmith"
current_title: "Senior DevOps Engineer"
current_company: "TechCo"
location: "Austin, TX"
years_experience: 0 # unknown until enriched
skills: [] # populated by /rp-verify or manual
email: "" # populated by /rp-enrich
fit_score: 0 # populated by /rp-score
fit_reasoning: ""
source: "sourced"
search_query: "ORIGINAL SEARCH STRING"
found_via: "linkedin_api" # or "websearch_fallback"
status: "new"
found_at: "TODAY_DATE"
Confirm each save:
ls ~/.recruiter-skills/data/candidates/
Step 5 — Summary Report
Print a clean table:
## Sourcing Results: [TITLE] in [LOCATION]
Found [N] candidates | Source: [LinkedIn API / WebSearch fallback]
| # | Name | Current Title | Company | Location | LinkedIn |
|---|------|---------------|---------|----------|----------|
| 1 | Jane Smith | Sr DevOps Eng | TechCo | Austin, TX | [link] |
...
Saved to: ~/.recruiter-skills/data/candidates/
Note confidence level if using fallback. Flag any candidates where data is inferred rather than confirmed.
Step 6 — Suggest Next Steps
After the table, add:
What's next?
- Run
/rp-score [name] for [job title]to score their fit against your open role. - Run
/rp-enrich [first] [last] at [company]to find their email address. - Run
/rp-verify [name]to run a background check before submitting. - Run
/rp-outreach [name]to draft a personalized candidate message.