Skip to Content

Claude Code Hooks for Job Applications: A Complete Automation Walkthrough

October 2, 2026 by
aliakram

Claude Code hooks can help job seekers automate repetitive tasks, protect important career documents, and maintain a consistent job application workflow. Instead of manually checking every resume and cover letter, you can configure hooks to run specific checks whenever Claude Code performs an action.

For example, imagine tailoring your resume for five different companies. You want Claude to customize each version without accidentally changing your original resume. You also want to make sure every cover letter contains the correct company name, has no unfinished placeholders, and follows your preferred word limit.

This is where Claude Code hooks become useful. They let you run scripts automatically at specific points in Claude Code's workflow, such as before a file is edited, after a file is written, or when a session starts.

In this guide, you'll learn how to configure four practical hooks for job applications, protect your master resume, validate cover letters, load your application tracker automatically, and perform a final quality check before Claude finishes a task.

What Are Claude Code Hooks?

Claude Code hooks are automated commands that execute when specific events occur during a Claude Code session. They can run shell scripts, return structured output, validate actions, andβ€”in supported eventsβ€”block or modify tool behavior.Β 

Β According to the official Claude Code hooks guide, hooks are designed to provide predictable automation at defined points in the agent lifecycle.

Unlike instructions in CLAUDE.md, which Claude interprets and follows as part of its context, hooks execute when their configured event and matcher are triggered. This makes them useful for rules that require a consistent technical check.

Example: A safer job application workflow

  • Before editing: Block changes to your original resume.

  • After writing: Check a cover letter for placeholders and excessive length.

  • At session start: Load a summary of your application tracker.

  • Before finishing: Check application files for unfinished placeholders.

Hooks do not replace your judgment. They can check whether a document contains a placeholder, but they cannot reliably determine whether a claimed skill or achievement is true.

How Claude Code Hooks Work

A hook has three main parts: an event, a matcher, and a handler.

1. Event

Something happens in Claude Code, such as a file edit or session start.

2. Matcher

Checks whether the event matches a configured tool or session type.

3. Handler

Runs a shell script or another supported hook handler.

4. Result

Allows, blocks, validates, or provides context, depending on the event and returned output.

When a command hook runs, Claude Code supplies event information as JSON through standard input. The script can inspect that information and return an exit code or supported JSON output.

The main exit codes are:

Exit code

Meaning

0

Hook completed successfully. Supported JSON output may be processed.

2

Blocking error for events that support blocking. Stderr can be returned as feedback to Claude.

Other non-zero

Non-blocking error; the action generally continues, with the error reported according to the event.

One important distinction is that a successful PreToolUse hook does not automatically grant permission for a tool action. Claude Code's normal permission process still applies unless the hook explicitly returns a supported permission decision. The official

hooks reference documents event-specific input, output, and blocking behavior.Β 

Why Use Hooks for Job Applications?

Job applications often involve repeated document editing, company-specific customization, tracking deadlines, and reviewing information before submission. These tasks are manageable individually but can become difficult when you are applying to multiple positions.

Claude Code hooks can support this process in several ways:

  • Resume protection: Prevent accidental edits to your original resume through configured file-editing tools.

  • Cover letter validation: Detect unfinished placeholders and apply a preferred word limit.

  • Application tracking: Load a summary of your job search when a session starts.

  • Final checks: Identify unfinished application documents before Claude completes a task.

  • Workflow consistency: Run the same checks whenever matching actions occur.

These are examples of automated checks, not a guarantee that every application is error-free. Your final review remains important.

Requirements Before Setting Up Claude Code Hooks

Before creating your hooks, make sure you have:

  • Claude Code installed and working in your terminal.

  • A job application project folder.

  • Access to a shell such as Bash on macOS or Linux.

  • jq installed and available on your PATH for the example scripts.

  • Basic knowledge of editing JSON and running shell commands.

The scripts in this walkthrough use Bash. If you're using Windows, you can use a compatible Bash environment or adapt the examples to PowerShell using the official documentation.

Step 1: Create Your Job Application Folder

Start by creating a dedicated folder to keep your master resume, tailored resumes, cover letters, and application tracker organized.

A simple folder structure looks like this:

job-search/
β”œβ”€β”€ CLAUDE.md
β”œβ”€β”€ tracker.csv
β”œβ”€β”€ resume/
β”‚   └── master.md
β”œβ”€β”€ templates/
β”‚   └── cover-letter.md
β”œβ”€β”€ applications/
β”‚   β”œβ”€β”€ acme-data-analyst/
β”‚   β”‚   β”œβ”€β”€ job-description.md
β”‚   β”‚   β”œβ”€β”€ resume.md
β”‚   β”‚   └── cover-letter.md
β”‚   └── example-company-developer/
β”‚       β”œβ”€β”€ job-description.md
β”‚       β”œβ”€β”€ resume.md
β”‚       └── cover-letter.md
└── .claude/
    β”œβ”€β”€ settings.json
    └── hooks/
        β”œβ”€β”€ session-status.sh
        β”œβ”€β”€ protect-master.sh
        β”œβ”€β”€ check-letter.sh
        └── final-check.sh

Each folder has a specific purpose:

Folder or file

Purpose

resume/master.md

Your original resume and source of truth

applications/

Company-specific application documents

job-description.md

The role requirements for each application

tracker.csv

Application statuses and follow-up dates

templates/

Reusable cover letter and resume templates

CLAUDE.md

Instructions that Claude should follow throughout the project

.claude/hooks/

Scripts that automate your checks

.claude/settings.json

Hook configuration for the project

Create a tracker.csv file with the following header:

company,role,date_applied,status,follow_up_date,notes

You can then add a row for each application. For example:

Acme,Data Analyst,2026-10-01,Applied,2026-10-08,Awaiting response
Example Tech,Python Developer,2026-10-02,Interview,2026-10-06,Technical round

Keep company names free of commas in this simple CSV example, or use proper CSV quoting and a CSV-aware parser if your data contains commas.

Step 2: Configure CLAUDE.md for Job Applications

Before creating hooks, set up your project's CLAUDE.md file. This file provides persistent instructions to Claude Code about how to handle your job search.

For example:

# Job Application Instructions

- Use resume/master.md as the source of truth.
- Never invent skills, qualifications, or work experience.
- Create a separate resume for every job application.
- Save tailored resumes and cover letters inside
  the relevant applications folder.
- Read the job description before tailoring a resume.
- Use accurate company names and job titles.
- Do not submit any job application without my approval.
- Keep all personal information private.

These instructions provide the context for Claude's work, while hooks can perform technical checks at specific points.

For example, CLAUDE.md can instruct Claude not to invent work experience. A hook can block a write to the master resume. The two approaches complement each other, but neither replaces a human review of the final document.

Step 3: Create Your First Hook to Load the Application Tracker

Hook 1: SessionStart

When you begin a new Claude Code session, you may need to remind Claude which companies you've applied to, which applications are pending, and when follow-ups are due.

A SessionStart hook can automatically provide a summary of your tracker. It can also run after a session is resumed or context is compacted, depending on its matcher.

Create a script named .claude/hooks/session-status.sh:

#!/bin/bash

cd "$CLAUDE_PROJECT_DIR" || exit 0

[ -f tracker.csv ] || exit 0

echo "Application tracker summary:"
tail -n +2 tracker.csv | cut -d, -f4 | sort | uniq -c

echo "Today is $(date +%F)."

This script skips the CSV header and counts the values in the fourth column, which represents the application status.

For example, its output might look like this:

Application tracker summary:
      2 Applied
      1 Interview
      3 Rejected

Today is 2026-10-02.

This output gives Claude a quick overview of your pipeline without requiring you to paste the information into every new conversation.

To make the summary available at startup, configure the hook with a matcher for startup|resume|compact. These match the corresponding session-start sources. The official documentation also describes using SessionStart to restore important context after compaction.

Practical tip

This example counts statuses, but it does not calculate overdue follow-ups or correctly parse every possible CSV format. If you want company-specific reminders or dates, use a CSV-aware script and add explicit date comparisons.

Step 4: Protect Your Master Resume With PreToolUse

Hook 2: PreToolUse

Your master resume should remain unchanged when Claude creates tailored resumes for different jobs. A PreToolUse hook can inspect an upcoming tool call and block edits or writes to the protected file.

Create .claude/hooks/protect-master.sh:

#!/bin/bash

INPUT=$(cat)

FILE_PATH=$(echo "$INPUT" | jq -r \
  '.tool_input.file_path // empty')

FILE_PATH="${FILE_PATH//\\//}"

if [[ "$FILE_PATH" == */resume/master.md ]]; then
    echo "Blocked: master.md is protected.
Write the tailored resume to the relevant
applications folder instead." >&2
    exit 2
fi

exit 0

This script reads the file path from the tool input. If the path matches the master resume, it returns exit code 2, which blocks the matching tool action and sends the explanation back to Claude.

For example, if Claude attempts to edit:

job-search/resume/master.md

The hook returns a blocking message instead of allowing that matching edit or write to proceed.

However, there is an important limitation: a matcher for Edit|Write does not intercept changes made through other tools, such as a shell command that modifies the file. Path matching should also be tested against your actual project paths, including relative paths and symbolic links.

For stronger protection, consider making the master resume read-only, keeping it in version control, and maintaining a backup. A hook is one layer of protection, not a complete security boundary.

The

DataCamp Claude Code hooks tutorial also explains how PreToolUse can inspect and block actions before a tool executes.

Step 5: Automatically Check Cover Letters With PostToolUse

Hook 3: PostToolUse

A cover letter may contain unfinished placeholders such as [COMPANY], [ROLE], or [NAME]. It may also exceed your preferred word limit.

A PostToolUse hook can check a cover letter after Claude has successfully written or edited it. Unlike PreToolUse, it cannot undo the file operation that has already happened. It can, however, return feedback so Claude can make corrections.

Create .claude/hooks/check-letter.sh:

#!/bin/bash

INPUT=$(cat)

F=$(echo "$INPUT" | jq -r \
  '.tool_input.file_path // empty')

F="${F//\\//}"

case "$F" in
  */applications/*/cover-letter.md) ;;
  *) exit 0 ;;
esac

[ -f "$F" ] || exit 0

WORDS=$(wc -w < "$F" | tr -d ' ')

if [ "$WORDS" -gt 350 ]; then
    echo "Cover letter is $WORDS words.
Please reduce it to 350 words or fewer." >&2
    exit 2
fi

if grep -qE '\[(COMPANY|ROLE|NAME|TODO)[^]]*\]' "$F"; then
    echo "Unfilled placeholders remain.
Complete all placeholders before finishing." >&2
    exit 2
fi

exit 0

This script checks two things:

  1. Whether the cover letter contains more than 350 words.

  2. Whether it contains selected unfinished placeholders.

The word limit is configurable. If you prefer 250 words or 400 words, change the number in the script to match your requirements.

The placeholder pattern can also be expanded to detect other terms, such as [HIRING MANAGER] or [INSERT ACHIEVEMENT].

Example of an automated check

Before the hook

Dear [COMPANY] Hiring Team,

I am applying for the [ROLE] position...

PostToolUse validation

Validation warning

Unfilled placeholders detected. Complete the company and role details before finalizing this cover letter.

This is a mechanical check, not a quality assessment. A letter can pass the hook and still contain irrelevant experience, inaccurate claims, or an unsuitable tone. Review those details yourself.

Step 6: Add a Final Check With the Stop Hook

Hook 4: Stop

The Stop event runs when Claude finishes responding. You can use it to scan your application folders for remaining placeholders.

Create .claude/hooks/final-check.sh:

#!/bin/bash

INPUT=$(cat)

if [ "$(echo "$INPUT" | jq -r '.stop_hook_active')" = "true" ]; then
    exit 0
fi

cd "$CLAUDE_PROJECT_DIR" || exit 0

BAD=$(grep -rlE \
  '\[(COMPANY|ROLE|NAME|TODO)[^]]*\]' \
  applications --include="*.md" 2>/dev/null)

if [ -n "$BAD" ]; then
    jq -n --arg files "$BAD" \
      '{decision: "block",
        reason: ("Unfilled placeholders remain in:\n" + $files)}'
fi

exit 0

This script searches Markdown files inside the applications folder and returns a blocking decision when it finds selected placeholders.

The stop_hook_active check is especially important. It prevents the hook from repeatedly blocking Claude when Claude has already continued because of the same Stop hook.

The script deliberately scans only application files, not reusable templates. Otherwise, placeholders intentionally included in your templates could repeatedly trigger the final check.

Note: The Stop event uses its own structured response behavior. Keep the response schema aligned with the current official hooks reference and test it against your installed version.

A Stop hook can encourage Claude to address unfinished work, but it does not prove the documents are factually accurate or ready to submit. The final decision should remain with you.

Step 7: Connect All Four Hooks in settings.json

Now that the four scripts are ready, you need to register them in Claude Code.

Open your project's .claude/settings.json file and add the following configuration:

{
  "hooks": {
    "SessionStart": [
      {
        "matcher": "startup|resume|compact",
        "hooks": [
          {
            "type": "command",
            "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/session-status.sh"
          }
        ]
      }
    ],
    "PreToolUse": [
      {
        "matcher": "Edit|Write",
        "hooks": [
          {
            "type": "command",
            "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/protect-master.sh"
          }
        ]
      }
    ],
    "PostToolUse": [
      {
        "matcher": "Edit|Write",
        "hooks": [
          {
            "type": "command",
            "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/check-letter.sh"
          }
        ]
      }
    ],
    "Stop": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/final-check.sh"
          }
        ]
      }
    ]
  }
}

The configuration connects each event to its corresponding script.

Event

Matcher

Action

SessionStart

startup\|resume\|compact

Loads the application status

PreToolUse

Edit\|Write

Protects the master resume

PostToolUse

Edit\|Write

Checks cover letters

Stop

No matcher

Scans application files for placeholders

The official documentation supports project-level settings in .claude/settings.json, while user-level and local settings provide other configuration scopes. Multiple settings sources can contribute hooks, so check the complete configuration if an unexpected hook also runs.

Make the scripts executable

On macOS or Linux, open your terminal in the project folder and run:

chmod +x .claude/hooks/*.sh

Then open Claude Code in your job-search project and run:

/hooks

Check that your hooks appear under the intended events. The /hooks interface helps you inspect and manage hook configuration, but you should still test the actual behavior of each script.

Step 8: Test Your Hooks Before Using Them

Never rely on an automation script without checking that it behaves as expected. Start by testing each script outside Claude Code with sample JSON input.

For example, test the master resume protection hook:

echo '{"tool_input":{"file_path":"/home/me/job-search/resume/master.md"}}' \
  | .claude/hooks/protect-master.sh

echo $?

Expected result: a blocking message and exit code 2.

You can also test the cover letter validation hook by creating a temporary cover letter containing a placeholder:

mkdir -p applications/test-company

echo "Dear [COMPANY], I am applying for [ROLE]." \
  > applications/test-company/cover-letter.md

Then supply the appropriate tool input to the script:

echo '{"tool_input":{"file_path":"applications/test-company/cover-letter.md"}}' \
  | .claude/hooks/check-letter.sh

echo $?

The test should return exit code 2 because the document contains placeholders.

After testing the individual scripts, run a real Claude Code session and verify that each hook fires under its configured event. Also test that ordinary files are not blocked by the master-resume guard and that a completed cover letter passes validation.

Step 9: Troubleshoot Common Claude Code Hook Problems

Hooks can fail because of incorrect matchers, missing dependencies, malformed JSON, or script permission issues. The following table covers common problems and ways to investigate them.

Problem

Possible cause

What to check

Hook does not run

Wrong event or matcher

Check event and case-sensitive tool name

jq: command not found

Missing dependency

Install jq and check PATH

Master resume is still editable

Other tool used to change file

Check the actual tool and add appropriate safeguards

Hook runs but doesn't block

Incorrect exit code or event behavior

Check whether the event supports blocking and use the correct output

Cover letter check is skipped

File path doesn't match

Check the path supplied in the hook's JSON

Claude keeps continuing

Stop hook repeatedly blocks

Check the stop_hook_active guard

Script won't execute

Missing executable permission or invalid command

Check chmod +x, paths, and shell syntax

Use Claude Code's /hooks command to inspect configured hooks and its debugging options to investigate hook execution. The Ctrl+O transcript view can help reveal hook errors, while a debug log can provide additional information when a hook is not matching or behaving as expected.

The

official hooks reference is the place to verify event-specific schemas and output behavior if a script does not work as expected.Β 

Step 10: Protect Your Resume and Personal Information

Hooks execute commands with the permissions of the user running Claude Code. This means that a hook script may be able to read, modify, or delete files that your account can access.

This is especially important for job applications because resumes and trackers can contain personal information, such as:

  • Full name and contact details

  • Employment history

  • Education and qualifications

  • Personal addresses

  • Salary expectations

  • Private job-search notes

Follow these precautions before installing or using hooks:

  • Read and understand every script before executing it.

  • Avoid copying commands from untrusted repositories without reviewing them.

  • Keep a backup of your master resume.

  • Use version control where appropriate.

  • Avoid sending personal application data to external HTTP endpoints unless there is a clear, necessary reason and you understand the privacy implications.

  • Limit the files and commands your hooks can access where possible.

Hooks should not be treated as a replacement for Claude Code's permission system or other operating-system security controls. In particular, a script that checks Edit and Write calls does not necessarily protect against a different tool changing the same file.

The

Claude's hook configuration guide also describes hooks as a way to customize behavior, including notifications, automatic formatting, logging, and behavior correction.Β 

Advanced Ways to Use Claude Code Hooks for Job Applications

Once your basic hooks are working, you can extend your workflow with additional events. The aim is to automate useful checks without creating unnecessary scripts or slowing down every session.

1. UserPromptSubmit: Add current job-search context

A UserPromptSubmit hook can validate a prompt or inject additional context before Claude processes it. For example, it could provide the current date or a short reminder about the active application.

This can be useful when you frequently switch between job applications, although the injected context should be concise to avoid wasting tokens.

2. Notification: Get alerts when Claude needs input

A Notification hook can respond to supported notification events. You could use it to trigger a desktop alert when Claude is waiting for permission or needs your attention during a longer task.

This is particularly relevant when you are processing multiple job descriptions and do not want to watch the terminal continuously.

3. PermissionRequest: Review sensitive actions

A PermissionRequest hook can handle supported permission events. For a job-search workflow, you might use it to apply additional checks before Claude accesses or modifies sensitive files.

Be careful with automatic approvals. Sensitive operations should retain appropriate human oversight.

4. SessionEnd: Record session information

A SessionEnd hook can run when a session ends. You could use it to record basic workflow information, such as the time a session finished or which task was being worked on.

Avoid logging unnecessary personal information or storing sensitive document contents in logs.

These events are part of the broader hook system described in the official reference. Their exact inputs and supported outputs vary, so implement each according to its event schema rather than reusing a script designed for a different event.

Claude Code Hooks vs. CLAUDE.md, Skills, and MCP

Claude Code provides several ways to customize an AI coding workflow. Understanding their differences helps you avoid using hooks for tasks that do not need automation.

Feature

Main purpose

Job application example

CLAUDE.md

Persistent project instructions

Never invent work experience

Hooks

Event-triggered automation and checks

Block a matching edit to the master resume

Skills

Reusable task-specific guidance

Tailor a resume to a job description

MCP

Connect Claude to external tools and services

Access an approved job-tracking service

A skill could guide Claude through analyzing a job description, identifying relevant experience, and drafting a tailored cover letter. A hook could then check the resulting file for unfinished placeholders.

MCP could provide access to an external service, if you configure an appropriate server and permissions. Hooks, skills, and MCP therefore serve different roles and can work together within a larger workflow.

When Should You Avoid Using Hooks?

Hooks are useful for repeated, clearly defined checks, but not every job-search task needs one.

  • Static writing rules: Put instructions such as preferred tone, formatting, or writing style in CLAUDE.md.

  • Judging factual accuracy: A placeholder check cannot verify whether a claimed qualification is true. Review your experience and achievements yourself.

  • Choosing a career direction: Hooks cannot replace your personal evaluation of job opportunities, compensation, or career goals.

  • Submitting applications: Keep final approval and submission under human control.

  • Strict security enforcement: Use appropriate operating-system protections and Claude Code permissions rather than relying solely on a hook script.

A hook can verify that a document contains a company name, but it cannot guarantee that the letter is relevant to the company or that the application is ready to submit.

Frequently Asked Questions

1. Are Claude Code hooks suitable for beginners?

Yes, if you start with simple examples. You should be comfortable following terminal instructions, editing JSON, and understanding what a script does before running it. Begin with a simple session summary or a placeholder checker.

2. Can Claude Code hooks automatically edit my resume?

Hooks can run scripts that modify files, and some supported PreToolUse outputs can modify tool input. However, the examples in this guide are designed to protect the master resume and validate tailored versions, not automatically rewrite your career history.

3. Do Claude Code hooks work on Windows?

Yes, Claude Code supports hooks on Windows, but the Bash examples in this guide require a compatible shell environment. Windows users can adapt the scripts to PowerShell or use a supported Bash environment and verify paths and dependencies.

4. Can hooks replace CLAUDE.md?

No. CLAUDE.md provides persistent instructions, while hooks perform event-triggered actions. They are designed to complement each other.

5. Can a hook guarantee that my cover letter is accurate?

No. A hook can check word counts, required phrases, and known placeholders. It cannot reliably verify every claim about your experience, skills, or achievements. You must review the document before sending it.

6. Where are Claude Code hooks stored?

Hooks can be configured in project settings such as .claude/settings.json, user settings such as ~/.claude/settings.json, and other supported settings locations. The appropriate location depends on whether the hook is intended for one project, multiple projects, or an organization.

7. How do I check whether my hooks are active?

Run /hooks inside Claude Code to inspect the configured hooks. Then test each script with sample input and verify its behavior in a real session.

Final Thoughts

Claude Code hooks can turn a repetitive job application process into a more structured workflow. With a few carefully designed scripts, you can load your application tracker, protect your original resume from matching edit and write actions, check cover letters for unfinished placeholders, and run a final document scan.

The most important part is to automate checks that are clear, repeatable, and technically verifiable. Keep your instructions in CLAUDE.md, use hooks for event-driven tasks, and retain human oversight for decisions that require judgmentβ€”especially checking the truthfulness of your experience and approving the final application.

Start with one hook, test it thoroughly, and add more only when they solve a real problem. That approach makes your workflow easier to maintain while keeping your career documents and personal information under your control.