Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Grafema Snapshot Ci Friction

ASecurity

Fix GraphSnapshot tests blocking CI on every feature PR. Use when: (1) every PR fails CI with "Snapshot mismatch" despite correct behavior, (2) fixing snapshots requires build → regen → commit → wait CI cycle per PR, (3) snapshot test in test/unit/*.test.js glob breaks on any intentional change, (4) pre-push hook runs pnpm build + snapshots:update on every push (2-3min overhead). Solution: move GraphSnapshot.test.js to test/unit/snapshots/ so it's excluded from the *.test.js glob. Run manuall...

36 stars
0 votes
0 copies
0 views
Added 9/20/2026
datagobashnodegitapi

Works with

claude codeapi

Security Analysis

A92/100
mediumInstalls packages at runtime which could introduce malicious dependencies

Scanned 9/20/2026

Install to Claude Code

$npx -y skills add Disentinel/grafema --skill grafema-snapshot-ci-friction --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Grafema Snapshot Ci Friction?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Grafema Snapshot Ci Friction
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/disentinel-grafema-snapshot-ci-friction/badge)](https://www.skillsdirectory.com/skills/disentinel-grafema-snapshot-ci-friction)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: grafema-snapshot-ci-friction
description: |
  Fix GraphSnapshot tests blocking CI on every feature PR. Use when:
  (1) every PR fails CI with "Snapshot mismatch" despite correct behavior,
  (2) fixing snapshots requires build → regen → commit → wait CI cycle per PR,
  (3) snapshot test in test/unit/*.test.js glob breaks on any intentional change,
  (4) pre-push hook runs pnpm build + snapshots:update on every push (2-3min overhead).
  Solution: move GraphSnapshot.test.js to test/unit/snapshots/ so it's excluded from
  the *.test.js glob. Run manually via pnpm snapshots:update when needed.
author: Claude Code
version: 1.0.0
date: 2026-02-23
---

# Grafema GraphSnapshot CI Friction

## Problem

`GraphSnapshot.test.js` lives in `test/unit/` and is picked up by the
`test/unit/*.test.js` glob used in `pnpm test:coverage`. Every feature PR that
intentionally changes graph output (new node types, edge types, column positions, etc.)
breaks this test — requiring a manual snapshot update cycle before CI goes green.

This creates a tax on every feature PR:
1. CI fails with "Snapshot mismatch for 03-complex-async. Run UPDATE_SNAPSHOTS=true"
2. Developer must: create worktree → pnpm install → pnpm build → UPDATE_SNAPSHOTS=true → run all tests → commit → push → wait CI again
3. Repeat for each PR

## Root Cause

Snapshot tests capture **full graph output** which changes on **any** intentional
behavior change. In an actively-developed codebase, this means they break on every
PR — they are not regression tests, they are **progress blockers**.

The `pre-push` hook compounds this by running `pnpm build` + `pnpm snapshots:update`
on every push (~2-3 minutes), even when snapshots aren't relevant.

## Solution

**Move the snapshot test outside the CI glob:**

```bash
mkdir -p test/unit/snapshots
git mv test/unit/GraphSnapshot.test.js test/unit/snapshots/GraphSnapshot.test.js
```

The `test/unit/*.test.js` glob only matches files directly in `test/unit/`, not
subdirectories. The snapshot test now exists but won't run in CI.

**Update `package.json` scripts** (the glob stays unchanged — subdirectory exclusion
is automatic):
```json
{
  "snapshots:update": "UPDATE_SNAPSHOTS=true node --test --test-concurrency=1 test/unit/snapshots/GraphSnapshot.test.js"
}
```

**Simplify the pre-push hook** (`.husky/pre-push`):
```sh
#!/bin/sh
# Snapshots are excluded from CI (test/unit/snapshots/) and updated manually via:
#   pnpm snapshots:update
```

## When to Update Snapshots

Run `pnpm snapshots:update` manually when:
- Preparing a release and want to verify graph shape hasn't unexpectedly changed
- Merging a large refactor that touches multiple node/edge types
- Investigating a suspected silent regression in the graph structure

## Current State (as of 2026-02-23)

- `test/unit/snapshots/GraphSnapshot.test.js` — excluded from CI glob ✓
- `pnpm snapshots:update` — works for manual runs ✓
- `.husky/pre-push` — no-op (removed build+snapshot step) ✓

## Trade-off

Losing: automatic detection of unintended graph shape changes in CI.
Gaining: every feature PR goes green without snapshot maintenance overhead.

Acceptable trade-off while graph shape is actively evolving. Revisit when the graph
API stabilizes — at that point, targeted invariant tests (not full snapshots) would
provide better regression coverage with less maintenance burden.

Attribution

DisentinelDisentinel
View sourceMore from Disentinel →
SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Related Skills

Rank Tracker

This skill helps you track, analyze, and report on keyword ranking positions over time. It monitors both traditional SERP rankings and AI/GEO visibility to provide comprehensive search performance insights.

1821 votes

Youtube Competitor Analyzer

Find and analyze YouTube competitor channels using YouTube Data API v3. Discover competitors through keyword search, category matching, content similarity, and related channel discovery. Compare metrics, content strategies, and market positioning. Use when users want to (1) Find competitors for their YouTube channel, (2) Analyze competitor performance metrics, (3) Compare their channel against competitors, (4) Identify content gaps and opportunities, (5) Benchmark against similar creators, (6...

31 votes

Twitter Algorithm Optimizer

Analyze and optimize tweets for maximum reach using Twitter's open-source algorithm insights. Rewrite and edit user tweets to improve engagement and visibility based on how the recommendation system ranks content.

742580 votes

Weather Fetcher

Instructions for fetching current weather temperature data for Karachi, Pakistan from wttr.in API

655280 votes

Weather

Get current weather and forecasts (no API key required).

476190 votes
View all in data →