Skip to content

LeoYeAI/agent-master-skills / skills/batch-resume-screener

batch-resume-screener

Verified

Batch screens multiple resumes against multiple job positions using strict evaluation rules from java-resume-screener skill. Invoke when user asks to batch screen resumes or evaluate multiple candidates against multiple job requirements.

FileKindSize
README.mdmarkdown7.3 KB
SKILL.mdskill md18.7 KB
_meta.jsonconfig296 B
step1_extract_resumes.pyscript2.4 KB

step1_extract_resumes.py

View on GitHub
import os
import sys
import shutil
import zipfile
import pdfplumber
from datetime import datetime

def extract_text_from_pdf(pdf_path):
    """Extract text from PDF file using pdfplumber"""
    text = ""
    try:
        with pdfplumber.open(pdf_path) as pdf:
            for page in pdf.pages:
                page_text = page.extract_text()
                if page_text:
                    text += page_text + "\n"
    except Exception as e:
        print(f"Error extracting text from {pdf_path}: {e}")
    return text

def extract_zip_if_needed(zip_path, extract_dir):
    """Extract ZIP file if needed"""
    if zipfile.is_zipfile(zip_path):
        print(f"Extracting ZIP file: {zip_path}")
        with zipfile.ZipFile(zip_path, 'r') as zip_ref:
            zip_ref.extractall(extract_dir)
        return extract_dir
    return os.path.dirname(zip_path)

def main():
    if len(sys.argv) < 2:
        print("Usage: python step1_extract_resumes.py <zip_or_resume_path> [output_dir]")
        print("Example: python step1_extract_resumes.py resumes.zip resumes_output")
        sys.exit(1)

    input_path = sys.argv[1]
    output_dir = sys.argv[2] if len(sys.argv) > 2 else "resumes_text"

    timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
    output_dir = f"{output_dir}_{timestamp}"

    os.makedirs(output_dir, exist_ok=True)

    temp_dir = os.path.join(output_dir, "temp")
    os.makedirs(temp_dir, exist_ok=True)

    resume_dir = extract_zip_if_needed(input_path, temp_dir)

    pdf_files = []
    for root, dirs, files in os.walk(resume_dir):
        for file in files:
            if file.lower().endswith('.pdf'):
                pdf_files.append(os.path.join(root, file))

    print(f"Found {len(pdf_files)} PDF files to process")

    success_count = 0
    for pdf_file in pdf_files:
        print(f"Processing: {os.path.basename(pdf_file)}")

        text = extract_text_from_pdf(pdf_file)

        base_name = os.path.splitext(os.path.basename(pdf_file))[0]
        output_file = os.path.join(output_dir, f"{base_name}.txt")

        with open(output_file, 'w', encoding='utf-8') as f:
            f.write(text)

        print(f"  -> Saved to {output_file}")
        success_count += 1

    shutil.rmtree(temp_dir)

    print(f"\nDone! Successfully extracted {success_count} resumes to {output_dir}")
    print(f"Output directory: {os.path.abspath(output_dir)}")

if __name__ == "__main__":
    main()
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 323kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 323kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 323kUpdated Claude CodeCodexVerifiedInstall