aws-samples/serverless-samples/fragment-update
Claude Code and agent skill by aws-samples/serverless-samples
- community
Checking that the SKILL.md file is still in the repository.
Install
npx vskill@latest install aws-samples/serverless-samples/fragment-updateSKILL.md
The same SKILL.md was published earlier as aws-samples/serverless-samples/fragment-update.
Hub Fragment Update
Review and apply updates from the central claude-hub fragment to the current project.
Context
Fragment content in CLAUDE.md is delimited by markers:
Updates replace only the managed section between markers. Project-specific content below the end marker is preserved. Files under .claude/ (settings, skills) are also fragment-managed and can be replaced directly.
Steps
- Read the
.claude/.fragmentmarker file in the current project directory ($PWD/.claude/.fragment). If it does not exist, inform the developer that this project is not linked to a fragment and stop.
- Parse the marker to extract
fragmentname andtracked_fileslist.
- Locate the latest fragment source. Check
~/.claude/claude-hub/repo/examples/fragments/<fragment>/first, then fall back to~/.claude/claude-hub/repo/fragments/<fragment>/. If neither exists, inform the developer that the fragment no longer exists in the central repo. Stop.
- For each file in
tracked_files(comma-separated):
- `.claude/*` files: Compare project version with fragment version. Show diff if they differ.
- `CLAUDE.md`: Extract the managed section (between
claude-hub:fragment:beginandclaude-hub:fragment:endmarkers) from both the project and the fragment source. Compare only those sections. Show diff if they differ. - If a file exists only in the fragment (new file), note it as available for addition.
- If both exist and are identical, note as up to date.
- Also check for any new files in the fragment's
.claude/directory that are NOT intracked_files.
- Present a summary table of all files and their status. Ask the developer which files to update:
- All: Apply all available updates
- Selective: Choose per file
- Skip: Cancel
- Apply the selected updates:
- `.claude/*` files: Replace the project file with the fragment version.
- `CLAUDE.md`: Replace ONLY the content between
claude-hub:fragment:beginandclaude-hub:fragment:endmarkers. Preserve everything outside those markers (the markers themselves, and all project-specific content after the end marker). If markers are missing from the project file (developer removed them), warn and ask whether to prepend the managed section with markers at the top.
- Recompute the fragment hash and update
.claude/.fragment:
- Find all files under
.claude/(excluding.fragmentitself), sort, concatenate with---FILE:<path>---delimiters. - Extract the managed section from the source fragment's
CLAUDE.mdand append as---FILE:CLAUDE.md:managed---. - Compute SHA-256 of the concatenated content.
- Update the
hash,tracked_files, andversionfields.
- Remove the drift notice file at
~/.claude/claude-hub/drift/for this project (filename is MD5 of project path).
Important
- Never modify content outside the fragment markers in
CLAUDE.md. - Never modify project files without explicit developer approval.
- Show diffs before applying any changes.
- If the cached repo does not exist, inform the developer to run a Claude Code session first so the sync script populates the cache.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingclaude-hub/examples/org/skills/fragment-update/SKILL.md
Popularity
- Repository stars
- 345
- Repository forks
- 145
- 7-day trend score
- 29
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 5 Jun 2026, 5 months ago.
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
[](https://verified-skill.com/skills/aws-samples/serverless-samples/fragment-update)