Get the FREE Ultimate OpenClaw Setup Guide →

init

npx machina-cli add skill lemon-etvibe/prompt-vault/init --openclaw
Files (1)
SKILL.md
3.2 KB

Set up the prompt-vault logging environment for a project.

Procedure

  1. Create .local/logs/ directory

  2. Add .local/ to .gitignore (skip if already present)

  3. Initialize .local/logs/_index.md (template-based)

    # Phase Log Index
    
    | # | Title | Status | Date | Summary |
    |---|-------|--------|------|---------|
    
  4. Add Phase Logging Protocol section to CLAUDE.md (skip if already present) → Reference content from ${CLAUDE_PLUGIN_ROOT}/templates/claude-md-snippet.md

  5. Ask user about model/plan and set context threshold in .local/logs/.config:

    ModelContext80% threshold (est. bytes)
    Opus 4.6 (200K)200K tokens~640,000 bytes
    Sonnet 4.5 (200K)200K tokens~640,000 bytes
    Haiku 4.5 (200K)200K tokens~640,000 bytes
    Extended (1M)1M tokens~3,200,000 bytes
  6. Set up project metadata and report palette:

    • project_name: Project name (default: current directory name)
    • project_description: One-line project description (default: empty)
    • palette: 5-color palette array — auto-generate via colormind.io API, fallback to ${CLAUDE_PLUGIN_ROOT}/data/palettes.json random selection

    Palette generation methods:

    # Primary: colormind.io API call (free, no key required)
    curl -s -X POST http://colormind.io/api/ -d '{"model":"default"}'
    # Convert RGB array from response to HEX and store in palette field
    
    # Fallback: random selection from curated palettes
    jq -r '.['"$RANDOM_INDEX"']' "${CLAUDE_PLUGIN_ROOT}/data/palettes.json"
    

    Palette role guide:

    • palette[0]: Primary — headers, main buttons, titles
    • palette[1]: Secondary — timeline, badges, links
    • palette[2]: Accent — highlights, hover, emphasis
    • palette[3]: Surface — card backgrounds, dividers
    • palette[4]: Muted — subtext, inactive states

    Default config example:

    {
      "model": "claude-opus-4-6",
      "context_window_tokens": 200000,
      "warn_percent": 80,
      "warn_bytes": 640000,
      "project_name": "My Project",
      "project_description": "",
      "palette": ["#264653", "#2A9D8F", "#E9C46A", "#F4A261", "#E76F51"]
    }
    
  7. Configure auto-logging:

    • Ask user: "자동 로깅을 활성화할까요? (Stop 훅에서 턴 수 기반 자동 기록)"
    • If yes: MERGE autoLog into existing .config (do NOT overwrite other fields)
      {
        "autoLog": {
          "enabled": true,
          "turnThreshold": 3
        }
      }
      
    • If no: skip (autoLog key absent = disabled by default)
    • Note: Read existing .config first, merge autoLog key, then write back
  8. Output initialization complete message — include generated palette preview and restart guide:

    ✅ 초기화 완료! CLAUDE.md에 로깅 프로토콜이 추가되었습니다.
    💡 Claude를 재시작하면 프로토콜이 자동 적용됩니다:
       /exit → claude --continue
    

    Note: Use --continue flag to resume the session with CLAUDE.md changes applied.

Source

git clone https://github.com/lemon-etvibe/prompt-vault/blob/main/skills/init/SKILL.mdView on GitHub

Overview

Sets up a complete prompt-vault logging environment for the current project. It scaffolds local logs, updates ignore rules, initializes a phase log index, adds a logging protocol to CLAUDE.md, configures model/context thresholds, and generates a project palette for consistent UI styling.

How This Skill Works

The skill creates the .local/logs directory, ensures .local/ is in .gitignore, initializes .local/logs/_index.md, appends a Phase Logging Protocol to CLAUDE.md, records model/context thresholds in .local/logs/.config, and generates a color palette (via colormind.io API or a local palettes.json fallback). It then outputs an initialization complete message with a palette preview and restart guidance for CLAUDE.

When to Use It

  • Starting a new project and want a standardized log setup.
  • Onboarding a team to enforce consistent prompt logging practices.
  • Integrating the CLAUDE.md logging protocol into the project.
  • Configuring model context thresholds and color palette for the project.
  • Reinitializing logging configuration after CLAUDE.md changes or updates.

Quick Start

  1. Step 1: Run the init skill to scaffold .local/logs, update .gitignore, and add the CLAUDE.md logging protocol.
  2. Step 2: Review and save the generated .local/logs/_index.md, .local/logs/.config, and the CLAUDE.md changes.
  3. Step 3: Follow the restart guidance to apply changes in CLAUDE (e.g., /exit → claude --continue) and verify the palette preview.

Best Practices

  • Create the .local/logs directory early and verify write permissions.
  • Add .local/ to .gitignore if not already present to avoid committing logs.
  • Review the generated _index.md and the CLAUDE.md snippet for accuracy.
  • Use the palette guidance to ensure consistent UI theming across logs.
  • Test autoLog merging by simulating user input and verifying .config is updated without overwriting other fields.

Example Use Cases

  • A new dev project where standardized prompt logging is required from day one.
  • A client handoff where the logging protocol is part of the project documentation.
  • Team onboarding to ensure all repos share the same logging workflow.
  • Rebuilding logging for a project after CLAUDE.md updates are deployed.
  • Rolling out a template across multiple repositories to maintain consistency.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers