Get the FREE Ultimate OpenClaw Setup Guide →

apply-observations

Scanned
npx machina-cli add skill SenZhangAI/your-taste/apply-observations --openclaw
Files (1)
SKILL.md
3.5 KB

Apply learned observations from your-taste to CLAUDE.md files.

Important: Always respond in the user's language (infer from their recent messages in this conversation).

Steps

  1. Read the observations file:

    • Read ~/.your-taste/observations.md
    • If the file doesn't exist or is empty, tell the user: "No observations yet — run taste:init first to scan your sessions." Then stop.
  2. Read existing CLAUDE.md files:

    • Read ~/.claude/CLAUDE.md (global — should always exist)
    • Read the current project's CLAUDE.md if it exists (check common locations: ./CLAUDE.md, then parent directories up to git root)
    • Note the full content of each file, paying attention to any existing <!-- your-taste:start --> ... <!-- your-taste:end --> sections
  3. Analyze observations.md and extract actionable rules for CLAUDE.md:

    Source priority:

    • Suggested Rules section: Direct candidates — already in concise rule format
    • Working Principles section: Extract the core principle as a one-line rule (drop evidence and examples)
    • Common Misreads section: Convert to "Do NOT" rules (e.g., "Do not add compensation layers — trace to the root cause")
    • Thinking Patterns section: Generally skip — too detailed for CLAUDE.md, better served by observations.md via session-start hook injection

    For each candidate rule:

    • Check if CLAUDE.md already contains the same or substantially similar instruction (anywhere in the file, not just the your-taste section) — if so, skip it
    • Determine scope: mentions specific tech stack, project name, or domain → project-level; abstract principle → global-level
    • Rewrite if needed to match CLAUDE.md's directive style (imperative, concise)
  4. If no new rules to suggest (all deduplicated), tell the user: "Your CLAUDE.md already reflects your current observations — no changes needed." Then stop.

  5. Present the changes. For EACH target file (global CLAUDE.md first, then project CLAUDE.md if applicable):

    If the file has no <!-- your-taste:start --> section yet:

    • Use Edit tool to append the new section at the end of the file:
      <!-- your-taste:start -->
      ## Your Taste — Learned Preferences
      
      - rule 1
      - rule 2
      ...
      
      <!-- your-taste:end -->
      

    If the file already has a <!-- your-taste:start --> section:

    • Use Edit tool to update the section content (add new rules, keep existing ones)
    • The old_string should be the entire section from <!-- your-taste:start --> to <!-- your-taste:end -->
    • The new_string should be the updated section with new rules added

    The user will see each Edit as a diff preview and can accept or reject.

  6. After all edits are presented, summarize what was applied:

    • How many rules were added to global CLAUDE.md
    • How many rules were added to project CLAUDE.md (if any)
    • Remind the user these will take effect on their next session

Constraints

  • Maximum 10 rules per run (avoid overwhelming the user)
  • Do NOT modify any content outside the <!-- your-taste:start/end --> markers
  • Do NOT delete rules the user previously accepted — only add new ones or suggest replacements for contradicted ones
  • Do NOT create a project-level CLAUDE.md just for a few rules — only add to it if it already exists
  • Keep rules concise: one line each, imperative voice

Source

git clone https://github.com/SenZhangAI/your-taste/blob/main/skills/apply-observations/SKILL.mdView on GitHub

Overview

This skill reads your-taste observations and updates CLAUDE.md files to reflect current guidelines. It supports a global CLAUDE.md and a project-level CLAUDE.md, appending or updating a <!-- your-taste:start --> section and presenting diff previews before changes.

How This Skill Works

The tool reads observations.md and both global and project CLAUDE.md files, extracts rules from Suggested Rules, Working Principles, and Common Misreads, and updates the CLAUDE.md sections accordingly. It respects existing content, deduplicates rules, and limits edits to the <!-- your-taste:start --> block, presenting a diff preview for review.

When to Use It

  • Align CLAUDE.md with your latest observations from your-taste.
  • Remove outdated practices by adding Do NOT rules from Common Misreads.
  • Ensure global CLAUDE.md reflects universal guidelines before project-specific edits.
  • Update CLAUDE.md only when new rules are not already present.
  • Preview diffs before applying changes to guard against unintended edits.

Quick Start

  1. Step 1: Ensure ~/.your-taste/observations.md exists and contains rules.
  2. Step 2: Run the CLAUDE.md update flow to analyze and propose changes.
  3. Step 3: Review the diff previews and accept or reject the edits.

Best Practices

  • Check for duplicates across global and project CLAUDE.md before adding.
  • Keep each rule concise and imperative.
  • Write rules in the CLAUDE.md style (imperative, concise).
  • Limit total new rules to 10 per run.
  • Append new rules inside the <!-- your-taste:start --> block only.

Example Use Cases

  • Global rule: Do NOT reveal secrets in CLAUDE.md; trace to root cause.
  • Global rule: Prefer explicit naming over implicit references.
  • Project rule: Enforce file path conventions in CLAUDE.md for this project.
  • Project rule: Align CLAUDE.md with the project tech stack (Python, Node, etc.).
  • Project rule: Add a rule to prevent bypassing tests in CI for CLAUDE guidelines.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers