Build a Local AI HR Agent Using Claude Code
Stop wasting 40 hours a week manually grading an avalanche of resumes in an isolated browser tab. This guide explains how to build a persistent, locally-hosted AI employee using Claude Code and the DBS framework to autonomously parse, score, and rank candidates directly from your local file system.
Prerequisites
Claude Code CLI installed and authenticated.
Anthropic API Key (with appropriate usage limits for bulk document processing).
Python 3.x installed locally (for the data extraction layer).
A local directory containing raw candidate PDF resumes.
Why Standard Chat Fails (The Technical Context)
Step-by-Step Solution
1. Architect the Direction Layer (The Brain) Create a markdown file named skill.mmd. This acts as the logic tree your AI must follow, preventing it from going off-task.
Define the hard operational constraints. For example, explicitly code the logic so the agent cannot email a candidate or advance a profile until a human provides explicit system approval.
2. Supply the Blueprints Layer (The Memory) Provide the static files the agent needs to evaluate candidates objectively.
Store your company brand guides, ideal candidate profiles, and job description matrices in a local folder. This forces the agent to grade resumes against your specific criteria, overriding generic foundational model logic.
3. Build the Solutions Layer (The Hands) Write the Python scripts that Claude Code will use to perform technical tasks natural language cannot achieve on its own.
Create a script to reach into your file system, extract raw text from PDFs, and prep it for the LLM.
Python
# Extract text from local PDF resumes using PyPDF2 and prepare it for the LLM
import PyPDF2
import os
def extract_resume_data(directory_path):
# Initializes an empty list to store the extracted resume data objects
resumes = []
# Iterates through the target folder to locate all raw PDF files
for filename in os.listdir(directory_path):
if filename.endswith(".pdf"):
filepath = os.path.join(directory_path, filename)
# Opens the PDF in read-binary mode to parse the raw text layer
with open(filepath, 'rb') as file:
reader = PyPDF2.PdfReader(file)
text = ""
for page in reader.pages:
text += page.extract_text()
# Appends the raw string data to the list so Claude Code can read it
resumes.append({"file": filename, "content": text})
return resumes
{
"Goal": "Identify the top 5 candidates for the Senior Developer role.",
"Context": "Use the static blueprint files located in /hr/blueprints/ to define the ideal candidate profile.",
"Action": "Execute the python script in /hr/solutions/ to read all PDFs in /hr/resumes/. Cross-reference the extracted text against the skill.mmd logic tree.",
"Output": "Generate a structured CSV dashboard showing candidate names, match scores, and extracted skills. Do not trigger any external emails."
}
5. Execute the Workflow in Claude Code
Open your terminal environment.
Navigate to your project directory.
Enter your GCAO command into the Claude Code terminal and let it run.
The agent will immediately parse the local directory, score every application in real-time, and filter the noise into a ranked pyramid of the top candidates.
Pin
Pin Edge Cases / Alternative Fixes
skill.mmd logic tree can hard-reject applications lacking those exact strings.
