AgentSkillsCN

bootstrap-new-day

为股票交易截图处理创建一个新的每日项目文件夹。适用于用户提出“启动新一天”、“创建新一天文件夹”、“设置 YYYY_MM_DD 文件夹”,或提到要开始新交易日的工作时使用。该技能会创建目录结构,复制相关文档与提示词,可选地复制股票映射,并打开 known_issues.txt 供用户编辑。

SKILL.md
--- frontmatter
name: bootstrap-new-day
description: Bootstrap a new daily project folder for stock transaction screenshot processing. Use when user asks to "bootstrap new day", "create new day folder", "set up YYYY_MM_DD folder", or mentions starting work on a new trading day. Creates directory structure, copies documentation and prompts, optionally copies stock mappings, and opens known_issues.txt for user editing.
<!-- [Created by Claude: 6cb9a49b-cfcd-4a8e-96db-d484df689589] -->

Bootstrap New Day

Create a new daily project folder with the complete directory structure, documentation, and prompts needed for stock transaction screenshot processing.

Overview

This skill automates the creation of daily project folders (format: YYYY_MM_DD) on the user's Desktop with:

  • Standard directory structure for OCR, segmentation, and AI-generated outputs
  • Copied documentation and task prompts from the previous day
  • Optional stock mappings file (ask user if not specified)
  • Automatically opens known_issues.txt in VS Code for user editing

Workflow

Step 1: Determine the New Day Folder Name

Ask the user for the target date if not already provided:

code
What date should I bootstrap? (Format: YYYY_MM_DD)

Set the folder path:

bash
NEW_DAY_FOLDER=~/Desktop/YYYY_MM_DD

Step 2: Find the Most Recent Previous Day Folder

Locate the most recent existing day folder to use as a template:

bash
# Find all existing day folders on Desktop
ls -d ~/Desktop/20??_??_?? | sort -r | head -1

Set this as PREV_DAY_FOLDER.

Step 3: Create Directory Structure

Create the following directory structure:

bash
mkdir -p ${NEW_DAY_FOLDER}/{.claude/skills,soto_docs,prompts,ocr_outputs,segmentation_outputs,ai/{generated_code,generated_doc,generated_data,generated_script}}

Directory purposes:

  • .claude/skills/ - Claude configuration and local skills
  • soto_docs/ - Task documentation and workflow guides
  • prompts/ - Stock-specific OCR prompts (stock4-12)
  • ocr_outputs/ - OCR extraction results
  • segmentation_outputs/ - Image segmentation outputs
  • ai/generated_code/ - Reusable code and functions
  • ai/generated_doc/ - Documentation and reports
  • ai/generated_data/ - Processed data files
  • ai/generated_script/ - Throwaway one-time scripts

Step 4: Copy Documentation and Prompts

Copy all documentation from the previous day:

bash
# Copy documentation files
cp -r ${PREV_DAY_FOLDER}/soto_docs/* ${NEW_DAY_FOLDER}/soto_docs/

# Copy stock prompts (stock4_prompt.txt through stock12_prompt.txt)
cp -r ${PREV_DAY_FOLDER}/prompts/* ${NEW_DAY_FOLDER}/prompts/

# Copy .claude config if exists
cp -r ${PREV_DAY_FOLDER}/.claude/* ${NEW_DAY_FOLDER}/.claude/ 2>/dev/null || true

Step 5: Handle Stock Mappings (ASK USER)

CRITICAL: If the user did NOT explicitly mention stock mappings, ask:

code
Should I copy the stock mappings from ${PREV_DAY}? (yes/no)

If yes:

bash
cp ${PREV_DAY_FOLDER}/stock_mappings.txt ${NEW_DAY_FOLDER}/stock_mappings.txt

If no:

bash
touch ${NEW_DAY_FOLDER}/stock_mappings.txt

Step 6: Create Initial Files

Create CLAUDE.md:

markdown
<!-- [Created by Claude: ${YOUR_AGENT_ID}] -->

# ${NEW_DAY} Project

**Trading Date**: ${HUMAN_READABLE_DATE}

## Overview

This is a daily project folder for processing stock transaction screenshots and related analysis.

## Stock Mappings

See `stock_mappings.txt` for the mapping of stock codes.

## Directory Structure

- `viber_image_*.jpg` - Raw screenshot images from Viber
- `ocr_outputs/` - OCR extraction results
- `segmentation_outputs/` - Image segmentation results
- `soto_docs/` - Documentation and reference materials
- `prompts/` - Agent prompts and instructions
- `ai/` - AI-generated outputs
  - `generated_code/` - Reusable code
  - `generated_doc/` - Documentation and reports
  - `generated_data/` - Processed data
  - `generated_script/` - Throwaway scripts

## Work Logs

See `work_logs.md` for daily progress tracking.

Create work_logs.md:

markdown
<!-- [Created by Claude: ${YOUR_AGENT_ID}] -->

# Work Logs - ${NEW_DAY}

## Session 1

**Agent ID**: ${YOUR_AGENT_ID}
**Date**: ${CURRENT_DATE}
**Task**: Bootstrapped project folder

### Actions
- Created directory structure
- Copied documentation and prompts from ${PREV_DAY}
- ${STOCK_MAPPINGS_ACTION}
- Initialized CLAUDE.md, work_logs.md, known_issues.txt

### Status
Ready for work

Create empty known_issues.txt:

bash
touch ${NEW_DAY_FOLDER}/known_issues.txt

DO NOT copy or overwrite this file from the previous day.

Step 7: Review Documentation for Date Updates

CRITICAL: After copying documentation, remind the user to check these files for date-specific content:

High Priority (Must Update):

  1. soto_docs/ocr_prompt_for_gemini.md (Priority: 10/10)

    • Contains date-specific references in the OCR prompt
    • Search for previous date (e.g., "2026_01_22") and update to new date (e.g., "2026_01_23")
    • The prompt instructs agents to cd ~/Desktop/${DATE}/ - this MUST be updated
  2. prompts/stock*_prompt.txt (Priority: 10/10)

    • Each stock prompt contains date-specific paths
    • Search for previous date folder references and update to new date
    • Example: Change cd ~/Desktop/2026_01_22 to cd ~/Desktop/2026_01_23
  3. soto_docs/workflow_daily_pipeline.md (Priority: 8/10)

    • May contain date-specific examples or commands
    • Review and update any hardcoded dates or paths

Medium Priority (Review Recommended):

  1. soto_docs/task_fabricate_pickle.md (Priority: 6/10)

    • May contain examples with specific dates
    • Update example commands if they reference the old day
  2. soto_docs/task_segment_stock.md (Priority: 5/10)

    • Check for date-specific file paths in examples
  3. soto_docs/task_rename_segmentation.md (Priority: 5/10)

    • Verify no hardcoded dates in example commands

Lower Priority (Optional Review):

  1. soto_docs/task_detect_stock_split.md (Priority: 3/10)

    • Generally date-agnostic, but check if examples reference specific dates
  2. soto_docs/task_segment_stock_text.md (Priority: 3/10)

    • Usually date-agnostic
  3. soto_docs/task_segment_verification.md (Priority: 2/10)

    • Typically no date-specific content

Step 8: Open known_issues.txt in VS Code

CRITICAL FINAL STEP: Automatically open known_issues.txt for user editing:

bash
\code ${NEW_DAY_FOLDER}/known_issues.txt

Note: \code is the alias for VS Code. This allows the user to immediately edit the known issues file.

Step 9: Report Completion

Provide a summary to the user:

code
✅ Bootstrapped ${NEW_DAY} folder successfully!

📁 Location: ~/Desktop/${NEW_DAY}

📋 What was created:
- Directory structure (ai/, soto_docs/, prompts/, ocr_outputs/, segmentation_outputs/)
- CLAUDE.md with project overview
- work_logs.md initialized
- stock_mappings.txt ${COPIED_OR_EMPTY}
- known_issues.txt (opened in VS Code for your editing)

📚 Copied from ${PREV_DAY}:
- All soto_docs/ task documentation (8 files)
- All prompts/ files (stock4-12 prompts)
- .claude/ configuration

⚠️  REQUIRED EDITS - Update dates in these files:
   [List files from Step 7 with priority ratings]

🔍 Next Steps:
1. Edit known_issues.txt (already open in VS Code)
2. Review and update date references in the files listed above
3. Add viber_image_*.jpg screenshots to the folder
4. Begin OCR processing workflow

Required Edits Checklist

After bootstrapping, the agent MUST inform the user to update these files:

Must Update (Priority 10/10)

FileWhat to UpdateWhy Critical
soto_docs/ocr_prompt_for_gemini.mdChange all cd ~/Desktop/YYYY_MM_DD commands to new dateOCR scripts will fail if they cd to wrong directory
prompts/stock4_prompt.txt through stock12_prompt.txtUpdate date in file paths and commandsPrompts reference specific day folders

Should Update (Priority 6-8/10)

FileWhat to UpdateWhy Important
soto_docs/workflow_daily_pipeline.mdUpdate example dates and pathsExamples should reflect current day
soto_docs/task_fabricate_pickle.mdUpdate example commands with datePrevents confusion when following examples

Optional Review (Priority 2-5/10)

FileWhat to Check
soto_docs/task_segment_stock.mdCheck for hardcoded date paths
soto_docs/task_rename_segmentation.mdVerify example paths are date-agnostic or current
soto_docs/task_detect_stock_split.mdReview for date-specific examples

Reading List for Agents

Before executing this skill, agents should read these materials in priority order:

PriorityFilePurposeWhen to Read
10/10This SKILL.mdComplete workflow understandingAlways - before execution
8/10soto_docs/workflow_daily_pipeline.mdUnderstand the overall daily workflow contextTo understand why this folder structure exists
6/10soto_docs/ocr_prompt_for_gemini.mdSee what needs date updatingBefore Step 7 (review edits)
5/10prompts/stock4_prompt.txt (sample)Understand prompt structureTo know what date references to expect
4/10Previous day's CLAUDE.mdTemplate for new CLAUDE.mdBefore creating CLAUDE.md
3/10Previous day's work_logs.mdTemplate for new work_logs.mdBefore creating work_logs.md
2/10Stock mappings file (if exists)Know what to copyOnly if copying stock mappings

Important Notes

DO NOT Overwrite

  • NEVER copy known_issues.txt from the previous day
  • Always create an empty known_issues.txt and open it for user editing

Always Ask About Stock Mappings

Unless the user explicitly mentions stock mappings in their request, always ask whether to copy them from the previous day.

Date Format

  • Folder name: YYYY_MM_DD (e.g., 2026_01_23)
  • Human-readable date in CLAUDE.md: "January 23, 2026"

VS Code Alias

The command \code is an alias for VS Code. If it fails, fall back to:

bash
code ${NEW_DAY_FOLDER}/known_issues.txt

Or inform the user to open it manually.