Implement /write-application-email command and update folder structure:
Changes:
- Add /write-application-email command with document verification
- Update /new-application to create attachments/ subfolder with .keep file
- Update CLAUDE.md with comprehensive workflow documentation
- Add Example 5 showing email generation usage
Features:
- Verifies CV, cover letter exist in attachments/ before generation
- Generates brief professional email (3-4 sentences)
- Supports German/English language detection
- Adapts tone (Formal/Balanced/Casual) from application.md
- Professional subject line format
- Explicit document references
- Flags: --skip-validation, --force
File structure now includes:
applications/pending/[app-name]/
├── application.md
├── input/
└── attachments/
└── .keep
OpenSpec: add-application-email
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
20 KiB
Job Application Framework - Instructions for Claude Code
This directory contains the Job Application Framework (Bewerbungszauberer), designed to help create tailored CVs, cover letters, and application emails using Claude Code.
Core Principle: Profile as Source of Truth
IMPORTANT: When the user requests help with ANY job application task (CV, cover letter, email, or application advice), you MUST:
- Validate the profile first - Run
/validate-profileto ensureprofile.mdis complete (see Profile Validation section below) - Always read
profile.mdfirst - This file contains the applicant's verified personal and professional information - Use ONLY information from
profile.md- Never fabricate, assume, or hallucinate details about the applicant - Maintain consistency - All generated documents must align with the information in
profile.md
Profile Validation
CRITICAL: Before generating any job application documents (CV, cover letter, or email), you MUST validate that profile.md is complete.
When to Validate
Run /validate-profile automatically before:
- Generating a CV/resume
- Writing a cover letter
- Drafting an application email
- Creating any job application materials
Validation Process
- Automatic validation: When the user requests application generation, first run
/validate-profile - Check results:
- ✅ If validation passes → proceed with generation
- ❌ If validation fails → inform the user of incomplete sections and STOP
- User action: User must complete the profile sections flagged by validation
- Re-validate: After user updates
profile.md, run/validate-profileagain before proceeding
Handling Validation Failures
If /validate-profile reports incomplete sections:
- Do NOT generate documents - Incomplete profiles will result in placeholder text in professional documents
- Show validation results - Display which sections need completion
- Guide the user: "Your profile has incomplete sections. Please update
profile.mdwith your real information in the following areas: [list sections]. Run/validate-profileagain when ready." - Wait for updates: Do not proceed until validation passes
Explicit Skip Option
If the user explicitly requests to skip validation with phrases like:
- "Generate CV without validation"
- "I know my profile is incomplete, proceed anyway"
- "Skip validation and generate"
You MAY proceed with a clear warning:
⚠️ WARNING: Proceeding without validation. Your profile may contain placeholder text.
Generated documents might include [Your Name], [Company], or other template text.
Please review carefully and manually replace any placeholders before sending to employers.
Default behavior: ALWAYS validate unless explicitly told to skip.
Application Management
The framework provides a structured system for managing individual job applications. Each application gets its own workspace with organized folders for documents and strategy.
Creating a New Application
Use /new-application to initialize a new job application:
/new-application "Company Name - Job Title"
This will:
- Create a dated folder:
applications/pending/YYYY-MM-DD-CompanyName-JobTitle/ - Generate an
application.mdtemplate with sections for research, strategy, and planning - Create an
input/folder for storing job-related documents
Example:
/new-application "TechCorp - Senior Developer"
Creates: applications/pending/2025-11-02-TechCorp-Senior-Developer/
Adding Input Documents
After creating an application, add all relevant documents to the input/ folder:
Recommended documents:
- Job posting/advertisement (PDF, TXT, MD, DOCX)
- Recruiter emails or communications
- Company research notes (from website, LinkedIn, Glassdoor)
- Follow-up emails or additional context
- Application requirements or instructions
Supported formats: PDF, TXT, MD, DOCX, HTML, EML
The more context you provide, the better the analysis will be.
Populating the Application
Once you've added documents to the input/ folder, navigate to the application directory and run:
cd applications/pending/[your-application-folder]/
/populate-application
This will:
- Read and analyze all documents in the
input/folder - Extract job requirements, company information, and keywords
- Read your
profile.mdto understand your background - Match your experience and skills to the job requirements
- Populate
application.mdwith:- Extracted job information
- Company research and culture insights
- Match strategy (which experiences/skills to emphasize)
- Key messages to convey
- Tone recommendations
- Suggested projects and achievements to highlight
The population preserves any manual notes you've added - it merges AI analysis with your insights.
Working with application.md
After population, review and refine the application.md file:
- Review extracted information: Ensure job details and requirements are accurate
- Add your insights: Enhance the strategy with your own thoughts
- Adjust match strategy: Fine-tune which experiences and projects to emphasize
- Add personal notes: Document your authentic reasons for interest in the role
- Plan your approach: Use the document checklist to track what needs to be created
The application.md serves as your strategic planning document for the entire application process.
Re-populating Applications
You can run /populate-application multiple times:
- Add more documents to
input/folder - Re-run to merge new analysis with existing content
- Manual notes are always preserved
When to Read the Profile
Read profile.md automatically when the user asks for help with:
- Creating or tailoring a CV/resume
- Writing a cover letter
- Drafting an application email
- Customizing application documents for a specific job
- Reviewing or improving existing application materials
- Extracting relevant experience or skills for a position
- Advice on how to position themselves for a role
Job Application Workflow
When helping with job applications, follow this comprehensive workflow:
0. Profile Validation (REQUIRED FIRST STEP)
- Run
/validate-profileto checkprofile.mdis complete - If validation fails, stop and ask user to complete profile
- If validation passes or user explicitly skips, proceed to step 1
1. Initialize Application (NEW)
- Use
/new-application "Company - Job Title"to create organized workspace - This creates:
applications/pending/YYYY-MM-DD-Company-JobTitle/ - Workspace includes
application.mdtemplate andinput/folder
2. Gather Documents & Context (NEW)
- User adds documents to
input/folder:- Job posting/description
- Recruiter communications
- Company research
- Any other relevant context
- More context = better analysis and strategy
3. Analyze & Populate (NEW)
- Navigate to application folder:
cd applications/pending/[folder-name]/ - Run
/populate-applicationto:- Read and analyze all input documents
- Extract job requirements, keywords, company culture
- Cross-reference with
profile.md - Generate match strategy
- Populate
application.mdwith research and recommendations
4. Review & Refine Strategy
- User reviews
application.mdfor accuracy - User adds personal insights and authentic motivations
- Adjust which experiences and projects to emphasize
- Fine-tune key messages and tone
5. Validate Application (NEW - Quality Gate)
- Run
/validate-applicationto ensure application.md is complete - Check that required sections are filled (Organization, Job Title, Job Description)
- Verify no placeholder text remains (like
[To be filled]) - Get warnings if input/ folder is empty or application seems unpopulated
- Must pass before document generation
6. Generate Cover Letter
- Run
/write-cover-letterto generate a tailored cover letter - System automatically validates application first (stops if incomplete)
- Checks if cover-letter.md already exists (prevents overwriting)
- Generates 300-400 word cover letter using:
- Profile.md for applicant background and achievements
- Application.md for job strategy, key messages, and tone
- Standard structure: Opening → Why this role → What you bring → Cultural fit → Closing
- Applies appropriate tone (Formal/Balanced/Casual) from application.md
- Saves to
cover-letter.mdin application folder - Flags available:
--skip-validation,--force(overwrite existing)
7. Review and Refine Cover Letter
- Read generated cover-letter.md carefully
- Verify factual accuracy (names, dates, achievements)
- Add personal touches or additional insights
- Ensure authentic voice and genuine enthusiasm
- Proofread for typos and flow
8. Generate CV (FUTURE)
- Generate tailored CV based on application.md strategy (coming soon)
- Emphasize relevant experience from profile.md
- Incorporate keywords naturally
9. Prepare Attachments
- Convert generated documents to PDF if needed
- Add final documents to
attachments/folder:- CV/Resume (PDF)
- Cover letter (PDF) - convert from cover-letter.md
- Certificates and diplomas (PDF) if required by job posting
10. Generate Application Email
- Run
/write-application-emailto generate professional email with document references - System automatically:
- Validates application first (stops if incomplete)
- Verifies required documents exist in attachments/ folder (CV and cover letter minimum)
- Checks if application-email.md already exists (prevents overwriting)
- Generates brief email (3-4 sentences) including:
- Professional subject line (format: "Application for [Job Title] - [Your Name]")
- Brief introduction and interest statement
- Explicit reference to all attached documents
- Contact information and availability statement
- Applies appropriate tone (Formal/Balanced/Casual) from application.md
- Detects and applies correct language (German/English)
- Saves to
application-email.mdin application folder - Flags available:
--skip-validation,--force(overwrite existing)
11. Review Application Email
- Read generated application-email.md
- Verify all attachments are correctly listed
- Ensure subject line is appropriate
- Check contact information is current
- Confirm tone matches company culture
12. Quality Assurance
- Verify all company names, dates, and facts are correct
- Ensure consistency between all documents (CV ↔ cover letter ↔ email)
- Check that tone matches the target company culture
- Confirm ATS optimization if applicable (simple formatting, keywords, standard sections)
Document Standards
CV/Resume
- Use information from relevant sections of
profile.md - Tailor the professional summary to the specific role
- Emphasize experiences and skills that match job requirements
- Keep formatting simple and ATS-friendly
- Use quantifiable achievements when available
Cover Letter (Generated by /write-cover-letter)
- Structure: Opening → Why this role → What you bring → Cultural fit → Closing
- Length: 300-400 words (approximately 1 page)
- Tone: Applied from application.md tone assessment (Formal/Balanced/Casual)
- Language: Inferred from job posting context (German/English)
- Content:
- Use ONLY authentic information from profile.md (no fabrication)
- Incorporate 2-3 key experiences from match strategy
- Reference company research and culture insights from application.md
- Natural incorporation of keywords from job description
- Company-specific personalization (values, news, projects)
- Quality checks:
- Automatic validation before generation
- Protection against overwriting existing work
- Word count target enforcement (300-400 words)
- Factual accuracy verification
Application Email (Generated by /write-application-email)
- Structure: Subject → Greeting → Brief body (3-4 sentences) → Sign-off with contact info
- Length: 3-4 sentences maximum (the cover letter contains the details)
- Tone: Applied from application.md tone assessment (Formal/Balanced/Casual)
- Language: Inferred from job posting context (German/English)
- Content:
- Professional subject line: "Application for [Job Title] - [Your Name]"
- Brief statement of purpose (applying for the position)
- Explicit reference to attached documents (CV, cover letter, certificates)
- One sentence showing interest or fit
- Availability for interview/discussion
- Document Verification:
- Automatic check that CV and cover letter exist in attachments/ folder
- Lists all documents that will be attached
- Stops generation if required documents are missing
- Quality checks:
- Automatic validation before generation
- Protection against overwriting existing work
- Verification that attachments folder contains required documents
Cultural Considerations
This framework is designed with the German job market in mind:
- More formal tone is often expected
- Detailed work history with exact dates is valued
- Certificates and credentials are highly regarded
- A professional photo on CV may be common (user's choice)
Adjust recommendations based on the target market if the user specifies a different region.
Constraints
Data Privacy:
- All information stays local - only API calls to Claude use the data
- Never suggest uploading sensitive personal data to third-party services
- Respect GDPR and data protection principles
Accuracy & Honesty:
- NEVER fabricate experience, skills, or achievements
- If
profile.mdlacks information needed for a job application, ask the user to updateprofile.mdfirst - Be transparent about what can and cannot be emphasized from the applicant's background
Quality Standards:
- All generated content is a DRAFT - user must review and approve
- Fact-check company names, contact persons, and details from job postings
- Maintain consistency across all documents for a single application
Available Commands
/validate-profile- Validate thatprofile.mdis complete and ready for application generation/new-application "Company - Job Title"- Create a new application workspace with organized folder structure (includes attachments/ folder)/populate-application- Analyze input documents and populate application.md with job info, research, and strategy/validate-application [optional-app-name]- Validate that application.md is complete before document generation/write-cover-letter [optional-app-name] [--skip-validation] [--force]- Generate a tailored cover letter based on application strategy/write-application-email [optional-app-name] [--skip-validation] [--force]- Generate a professional application email with document references
Example Usage
Example 1: Complete Application Workflow
User: "Help me apply for this software engineering position at TechCorp"
Claude Code should:
- Run
/validate-profileto check profile completeness - If validation passes, suggest: "Let's create an application workspace. Run:
/new-application 'TechCorp - Software Engineer'" - After application is created, guide user: "Add the job posting and any other documents to
applications/pending/[folder]/input/" - When user has added documents: "Navigate to the application folder and run
/populate-application" - After population completes: "Review
application.mdto see the analysis and strategy" - Validation step: "Run
/validate-applicationto ensure the application is complete" - If validation passes: "Generate cover letter with
/write-cover-letter" - After generation: "Review cover-letter.md and personalize as needed"
- Document preparation: "Convert cover-letter.md to PDF and add it along with your CV to the
attachments/folder" - Email generation: "Generate application email with
/write-application-email" - Final review: "Review application-email.md, verify all documents are listed correctly, and you're ready to send!"
Example 2: Quick Document Request (Legacy Flow)
User: "Write a cover letter for this role [paste job description]"
Claude Code should:
- Run
/validate-profileto check profile completeness - If validation fails: inform user of incomplete sections and stop
- If validation passes: Read
profile.mdto load applicant information - Analyze the job description for requirements and culture
- Identify matching experiences and skills from the profile
- Generate tailored cover letter using only information from
profile.md - Suggest: "For better organization, consider using
/new-applicationnext time to manage the full application process"
Example 3: Validating an Application
User: "Check if my TechCorp application is ready"
Claude Code should:
- If user is in application folder: Run
/validate-application(auto-detects current location) - If user is elsewhere: Run
/validate-application 2025-11-02-TechCorp-Software-Engineer - If validation passes (✅): "Your application is complete! Organization: TechCorp, Position: Software Engineer. Ready for document generation."
- If validation fails (❌): Show specific issues like "Organization Name: Contains placeholder '[To be filled]'" and suggest "Please update application.md or run
/populate-applicationif you have documents in input/" - Provide clear next steps based on validation result
Example 4: Generating a Cover Letter
User: "Generate cover letter for my TechCorp application"
Claude Code should:
- If user is in application folder: Run
/write-cover-letter(auto-detects location) - If user is elsewhere: Run
/write-cover-letter 2025-11-02-TechCorp-Software-Engineer - System automatically validates application first:
- If validation fails: Stop and show errors, suggest fixing or using
--skip-validation - If validation passes: Proceed to generation
- If validation fails: Stop and show errors, suggest fixing or using
- Check for existing cover-letter.md:
- If exists: Stop and suggest using
--forceflag to overwrite - If doesn't exist: Proceed to generation
- If exists: Stop and suggest using
- Generate cover letter:
- Read profile.md for applicant background
- Read application.md for job strategy and tone
- Generate 300-400 word tailored cover letter
- Save to cover-letter.md
- Show success: "✅ Cover letter saved: cover-letter.md. Generated 376 words. Next: Review and personalize."
User: "Regenerate the cover letter with different approach"
Claude Code should:
- Run
/write-cover-letter --forceto overwrite existing file - System warns: "⚠️ Overwriting existing cover letter"
- Proceeds with generation
- Suggests: "Review the new version and keep whichever you prefer"
Example 5: Generating an Application Email
User: "Generate application email for my TechCorp application"
Claude Code should:
- If user is in application folder: Run
/write-application-email(auto-detects location) - If user is elsewhere: Run
/write-application-email 2025-11-02-TechCorp-Software-Engineer - System automatically validates application first:
- If validation fails: Stop and show errors, suggest fixing or using
--skip-validation - If validation passes: Proceed to document verification
- If validation fails: Stop and show errors, suggest fixing or using
- System verifies documents in attachments/ folder:
- Check for CV/Resume file
- Check for cover letter file
- Check for optional certificates
- If required documents missing: Stop and show clear error with guidance
- If documents found: Proceed to generation
- Generate application email:
- Read profile.md for applicant contact information
- Read application.md for job details and tone
- Generate brief email (3-4 sentences) with professional subject line
- Include explicit references to all attached documents
- Save to application-email.md
- Show success: "✅ Application email saved: application-email.md. Attachments ready: CV.pdf, Cover_Letter.pdf. Next: Review and send."
User: "There's no CV in attachments folder"
Claude Code should:
- System detects missing CV during verification step
- Show error: "❌ CV/Resume not found in attachments folder"
- List what was found and what's missing
- Provide guidance: "Please add your CV to: applications/pending/[folder]/attachments/"
- Suggest filename conventions: "Tip: Filename should contain 'cv', 'resume', or 'lebenslauf'"
Updating the Profile
If you notice missing or outdated information during application preparation:
- Inform the user which sections of
profile.mdneed updates - Ask them to update
profile.mdfirst before generating documents - This ensures the profile remains the single source of truth
Remember: The quality of output depends on the quality of profile.md. Encourage users to keep it complete, accurate, and up to date.