Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

ng-diagram-transactions

Skill by synergycodes

Guides an AI assistant through NgDiagramService.transaction() in ng-diagram, for applying several diagram changes as one update. It is for Angular developers who use the ng-diagram library.

  • Score 73
  • 592 stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install ng-diagram-transactions

Built from the published package, never by AI.

git clone --depth 1 https://github.com/synergycodes/ng-diagram /tmp/ng-diagram && mkdir -p ~/.claude/skills && cp -r /tmp/ng-diagram/skills/ng-diagram-transactions ~/.claude/skills/ng-diagram-transactions

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install ng-diagram-transactions in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill explains how to apply several ng-diagram changes as one update with NgDiagramService.transaction(). It covers when the queued changes land, the fixed order of operations (adds, then edge and node removals, then updates, then metadata), and how awaiting, async callbacks, nesting and waitForMeasurements behave. It also says what happens when a callback throws.

The skill includes code examples for building a diagram part from data and for splitting an edge. It adds a symptom-to-fix table for common problems, such as re-added ids disappearing and nested transactions outliving their parent. It states that it describes ng-diagram 1.4.0 and tells the assistant to check the installed version first. It is intended for Angular developers working with ng-diagram.

Written from the project's SKILL.md and checked against it.

What it can do

  • One atomic transactionGroups queued changes into one middleware pass and one model commit.
  • Operation orderExplains that adds run before removes and updates, so a re-added id can disappear.
  • Async callbacksCovers keeping a transaction open across awaits and its side effects.
  • Nested transactionsExplains how nested transactions join the root and when they log warnings.
  • waitForMeasurementsShows when to wait for measurement before calling zoomToFit or centerOnNode.
  • Error handlingThrowing in the callback discards queued changes and rejects the promise.
  • Symptom fixesMaps common transaction errors to their causes and fixes.
  • DebuggingDescribes debugMode logging of committed updates with state snapshots.

What you need

  • An Angular project using the ng-diagram library
  • ng-diagram 1.4.0 or a version that supports the described behaviour

Try asking

  • Wrap these node and edge inserts in one ng-diagram transaction
  • Why do my re-added nodes disappear after a transaction in ng-diagram?
  • Show me how to split an edge with ng-diagram transaction()

Good to know

  • Lookups inside a transaction see the model as it was before the transaction.
  • Throwing in a transaction callback discards all queued changes; there is no savepoint or rollback API.
  • Several behaviours depend on ng-diagram 1.3.0 or later.
  • Describes ng-diagram 1.4.0; features marked as added in later versions do not exist in older versions.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/ng-diagram-transactions/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to ng-diagram-transactions

All alternatives →
openclaw-github-repo-commandersickn33
94

Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.

AAA Skill 50k
gradiogradio-app
94

Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.

AAA Skill 44k
hig-components-menussickn33
94

Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.

AAA Skill 50k
fastapi-templateswshobson
94

Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.

AAA Skill 43k
appfunctionsandroid
94

Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.

AAA Skill 11k
agent-qa-authoringsickn33
94

Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

ng-diagram-transactions: common questions

Does transaction() always return a promise?

Since 1.3.0, transaction() returns Promise<TransactionResult> for every callback form. Before that, the sync-callback form without options returned void.

Why does a node deleted and re-added with the same id disappear?

Adds run before removes inside a transaction, so the element ends up deleted. Use new ids, two awaited steps, or a new model.

Can I call select() on a node added in the same transaction?

Not inside the same transaction. Lookups read the model from before the transaction, so select() on a new id selects nothing. Call it after the await.

How do I install ng-diagram-transactions?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is ng-diagram-transactions free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is ng-diagram-transactions safe to use?

It scores 73 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to ng-diagram-transactions?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

ng-diagram-transactions Install

Add to stack

Loading.