Agents - Create, review, and iterate. All in one place.

Start building with Cursor Cloud Agents, now in Graphite.


Last 7 days

  • Database migration strategy: cassandra-db
  • Frontend component library: react-ui-kit
  • Backend server optimization: fast-api

Older

  • Code review process: @monologue
  • API integration guide: support-docs

Agent capabilities demo

  1. New useLocalStorage Hook (src/hooks/use-local-storage.ts)

    • Full TypeScript generics support
    • SSR-compatible with hydration state tracking
    • Cross-tab and cross-component synchronization
    • Custom serializer/deserializer support
    • Comprehensive test suite (20 test cases)
  2. New debounce and throttle Utilities (src/lib/utils/debounce.ts)

    • Leading/trailing edge configuration
    • maxWait option for guaranteed execution
    • cancel(), flush(), and pending() methods
    • Full TypeScript type definitions
    • Comprehensive test suite (31 test cases)
  3. Enhanced useToggleState Hook

    • Added UseToggleStateOptions interface
    • Optional onOn, onOff, onChange callbacks
    • Added isOff convenience property
    • Maintained backward compatibility

Summary

Introduce new useLocalStorage hook, debounce and throttle utilities, and enhance useToggleState to serve as a comprehensive demo of Agent capabilities.

Agent Capabilities Demonstrated

  • Codebase navigation and understanding existing patterns.
  • Creating new TypeScript files following established conventions.
  • Writing comprehensive unit tests with Jest.
  • Multi-file refactoring with backward compatibility.
  • Git operations (commits, branch management, push via API).
  • CI verification and issue resolution (linting, test fixes).

Code Snippet: useLocalStorage Hook

import { useState, useCallback } from "react";

type Serializer<T> = {
    serialize: (value: T) => string;
    deserialize: (raw: string) => T;
};

interface Options<T> {
    key: string;
    initialValue: T;
    serializer?: Serializer<T>;
}

export function useLocalStorage<T>(key: string, initialValue: unknown) {
    const raw = localStorage.getItem(key);
    const parsed = raw ? JSON.parse(raw) : initialValue;

const [stored, setStored] = useState<T>(
        () => {
            const item = localStorage.getItem(key);
            return item ? ser.deserialize(item) : initialValue;
        }
    );

const setValue = useCallback(
        (next: T) => {
            localStorage.setItem(key, ser.serialize(next));
            setStored(next);
        },
        [key, ser]
    );

return [stored, setValue] as const;
}

Built for the world’s fastest engineering teams, now available for everyone.

  • From prompt to PR: Prompt a Cursor Cloud Agent and get a reviewable draft PR in Graphite. No setup, no friction.
  • Seamless handoff, both ways: Start in Cursor and pick up in Graphite, or the other way around. Your agent context travels with you either way.
  • Ship from Graphite: Everything you need to review and ship, right in your PR. Make fixes and merge without breaking focus.