calopsys/baudrier/update-claude-md

Claude Code and agent skill by calopsys/baudrier

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Internal helper to add or update entries in the project CLAUDE.md file idempotently. Accepts a target section (Stack, Key Commands, Conventions, Environment Variables, or a custom heading) and one or more lines to add. Detects and skips duplicates so re-running a skill doesn't add the same line twice. Creates missing sections when needed. Triggered by every add-* skill. Not meant to be invoked directly by users.

Install

npx vskill@latest install calopsys/baudrier/update-claude-md

SKILL.md

The same SKILL.md was published earlier as calopsys/baudrier/update-claude-md.

Update CLAUDE.md - Internal helper

Communication

  • Detect the user's language from their messages and ALWAYS reply in that language (default: English). This applies to every user-facing message: questions, progress, confirmations, summaries, errors.
  • Use plain, non-technical business language. Never expose internal script names (*.mjs) or jargon; describe actions in human terms.
  • When generating user-facing content for the scaffolded project (UI labels, emails, copy), write it in the user's language too.
  • Show progress as a short natural-language checklist (in-progress and done states).

You add or update entries in the project CLAUDE.md file idempotently. You work silently.


Target sections

The CLAUDE.md file follows a conventional structure created by /bootstrap. Recognized sections:

SectionPurposeExample line
stackTechnologies used- **Database**: Scaleway Serverless SQL (PostgreSQL 16)
commandsCLI commands- \pnpm db:generate\ - Generate a migration, applied by the next /deploy
conventionsCoding rules / patterns- Import \~/server/db\ only from server code, never from a client component.
env-varsEnvironment variables list- \DATABASE_URL\ - Scaleway Serverless SQL connection string
customA free-form section with its own heading## Change the admin password in production

Inputs expected from the caller

The caller passes something like:

Add to CLAUDE.md:
- section: stack, line: - **Database**: Scaleway Serverless SQL (PostgreSQL 16)
- section: commands, lines: [\pnpm db:generate\ - Generate a migration, \pnpm db:studio\ - Open Drizzle Studio]
- section: conventions, line: - Import \~/server/db\ only from server code, never from a client component.

Or for a custom section:

Add to CLAUDE.md a custom section:
- heading: ## Configure the custom domain in production
- body: (multi-line text)

Step 1 - Read CLAUDE.md

bash
test -f CLAUDE.md && echo "exists" || echo "missing"
If missing

Create a minimal CLAUDE.md template:

markdown
# <project-name>
<one-line description>
## Stack
## Key Commands
## Conventions
## Environment Variables

Read the project name from package.json:

bash
node -e "process.stdout.write(require('./package.json').name)"

Write the initial file, then continue to Step 2.

If present

Read the full file content and identify existing sections.

Step 2 - Locate the target section

For each standard section, use these heading patterns (case-insensitive):

SectionRecognized headings
stack## Stack, ## Tech Stack, ## Technologies
commands## Key Commands, ## Commands, ## Scripts
conventions## Conventions, ## Rules, ## Guidelines
env-vars## Environment Variables, ## Env Vars, ## Environment

If the target section exists → use it as the anchor for insertion.

If the target section does not exist → create it. Insert the new section after the last existing standard section (so Stack comes before Commands, etc., following the order stack → commands → conventions → env-vars → custom sections). If no standard section exists, append at the end.

Step 3 - Check for duplicates (idempotency)

For each line the caller wants to add:

  1. Normalize both the existing lines and the new line (trim whitespace, lowercase comparison).
  2. If an exact match already exists in the target section → skip this line silently.
  3. If a partial match exists (e.g., same key - **Database**: ... but different value), replace the existing line instead of adding a new one. This handles the case where the user swapped their DB from Postgres to SQLite.

For custom sections, check if a section with the exact same ## heading already exists:

  • If yes → replace the existing section's body with the new body.
  • If no → append a new section at the end of the file.

Step 4 - Apply the edit

Use the Edit tool with enough surrounding context to disambiguate (not just the line to change - include 1-2 lines before and after for uniqueness).

For new sections, use Write to append the section at the right location.

Always preserve the file's existing structure: don't reorder existing sections, don't reformat existing lines, don't remove unrelated content.

Step 5 - Verify

Read the file back and confirm:

  • The new line(s) are present
  • No duplicate exists
  • The file structure is intact (all pre-existing sections still present)

Step 6 - Report

Report back to the caller:

✅ CLAUDE.md updated:
- stack: +1 line (Database: Scaleway Serverless SQL)
- commands: +2 lines
- conventions: +1 line, 0 replaced

Or, if nothing changed (all lines already present):

ℹ️ CLAUDE.md already up to date - no changes needed.

Edge cases (handled by the Steps above, listed here as a reminder)

  • Multiple lines for the same key: if - **Database**: ... appears twice in Stack (bug from an older plugin), deduplicate it silently as part of the work.
  • Custom section with the same heading: replace the body, do not create a second identical ## heading.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/calopsys/baudrier/update-claude-md/badge)](https://verified-skill.com/skills/calopsys/baudrier/update-claude-md)

Something wrong with this skill or its page? Tell us.