Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/eagonmeng/sync-blank/synchronization-implementationgit clone --depth 1 https://github.com/eagonmeng/sync-blankWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.01216 | $0.01216 |
| Opus 5 | $0.00608 | $0.00608 |
| Sonnet 5 | $0.00243 | $0.00243 |
| Haiku 4.5 | $0.00122 | $0.00122 |
Grade A, and why
synchronization-implementation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 141 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Implementing Synchronizations
Instead of relying on a custom synchronization language and parser, the current engine provides a TypeScript-native approach to specifying synchronizations. A complete and functional example of this can be found in:
@example.ts
After creating concept classes, you can initialize the Sync engine and instrument concepts as follows:
// Create new Sync engine
const Sync = new SyncConcept();
// Register concepts
const concepts = {
Button: new ButtonConcept(),
Counter: new CounterConcept(),
Notification: new NotificationConcept(),
};
// All concepts must be instrumented to be reactive and used in a sync
const { Button, Counter, Notification } = Sync.instrument(concepts);
The original, unmodified concepts are available as (e.g.) concepts.Button,
while the destructuring allows for the instrumented version Button to both
participate in syncs, as well as feature as a fully reactive concept. Calling
Button.clicked({ kind: "increment_counter" }), for example, will trigger all
registered synchronizations.
The synchronizations shown previously in the specification language can be written in TypeScript as follows:
// Each sync is a function that returns a declarative synchronization
const ButtonIncrement = ({}: Vars) => ({
when: actions(
[Button.clicked, { kind: "increment_counter" }, {}],
),
then: actions(
[Counter.increment, {}],
),
});
Each synchronization is a simple function that returns an object with the
appropriate keys, minimally containing when and then. The actions helper
function enables a shorthand specification of action patterns as an array, where
the first argument is the instrumented action, the second the input pattern, and
in the case of the when clause, the third is the output pattern.
Synchronizations may additionally have a where clause and specify variables:
// Each sync can declare the used variables by destructuring the input vars object
const NotifyWhenReachTen = ({ count }: Vars) => ({
when: actions(
[Button.clicked, { kind: "increment_counter" }, {}],
[Counter.increment, {}, {}],
),
where: (frames: Frames): Frames => {
return frames
.query(Counter._getCount, {}, { count })
.filter(($) => {
return $[count] > 10;
});
},
then: actions(
[Notification.notify, { message: "Reached 10" }],
),
});
Each synchronization function actually receives a special object that you can
destructure arbitrarily to receive variables to use in your patterns. In this
case, we destructure count to use it as a variable, which can be employed on
the right-hand side of input/output patterns to indicate an open binding. The
where clause, unlike the other two, is itself also a function that simply
takes in a set of Frames and returns a set of Frames. This refers to the
idea that each Frame is a Record<symbol, unknown> describing the current
bindings of the current frame, where each Frame that makes it through to the
then clause corresponds 1-to-1 with calling all actions in the then with
those bindings.
Frames is simply a small extension of the Array class, and all of the
standard methods and iterator functions can be applied to it. It additionally
carries the .query method which enables query functions on concepts to receive
certain inputs and produce outputs that enrich the frame. In this basic where
clause it enhances every frame with a count binding. In a slightly more
advanced example, something like:
.query(Comment._getByTarget, {target: post}, {comment})
says to lookup the post binding for the frame, and query the Comment concept
for all comments associated with a target of that post. Note that post as a
variable refers to that unique symbol for binding, and that the role of the
input pattern is simply to match our current binding name to the generic
accepted parameter name of Comment._getByTarget: since concepts are highly
modular, we encourage general names like target to enable commenting on many
kinds of things, and this pattern provides the way to map the two names. In this
case we are okay with binding the comment output with a symbol of the same
name, and use JavaScript's destructuring shorthand to indicate this. For such a
pattern, we would expect there to be at least ({post, comment, ...}: Vars) as
the input signature for the containing synchronization function.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 141 lines · 1,216 tokens per session scan A c907c683bab9
synchronization-implementation is a cursor rule published in the GitHub repository eagonmeng/sync-blank (4 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 1,216 tokens to every session, about $0.0061 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other cursor rules, from other repositories
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
typescript
Changes to these high-fan-out internals can affect every message, delta, element, or rerun. Keep work in them minimal, and benchmark changes with representative stress-test apps.
coolify-ai-docs
Master reference to all Coolify AI documentation in .ai/ directory.
python_lib
Tips and guidelines specific to the development of the Streamlit Python library, not applicable to scripts and e2e tests.
specs
This directory contains product and tech specs for Streamlit features.