Skip to content
Video & Audio
Hook

Hooks

What remocn runs automatically, and when. A hook is a command Claude Code fires at a fixed moment, without you asking for it.

From plugin
remocn
1.8k5 skills2 agents4 hooks1 MCP

Claude Code

> /plugin marketplace add Remocn/remocn
> /plugin install remocn@remocn

Where it lives

  • hooks/use-in-view.tsGitHub
    Read the script
    import { useIntersectionObserver } from "@uidotdev/usehooks";
    
    export const useInView = () => {
      const [ref, entry] = useIntersectionObserver({
        threshold: 0,
        root: null,
        rootMargin: "0px",
      });
    
      return {
        ref,
        inView: entry?.isIntersecting,
      };
    };
    
  • hooks/use-mobile.tsGitHub
    Read the script
    import * as React from "react";
    
    const MOBILE_BREAKPOINT = 768;
    
    export function useIsMobile() {
      const [isMobile, setIsMobile] = React.useState<boolean | undefined>(
        undefined,
      );
    
      React.useEffect(() => {
        const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
        const onChange = () => {
          setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
        };
        mql.addEventListener("change", onChange);
        setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
        return () => mql.removeEventListener("change", onChange);
      }, []);
    
      return !!isMobile;
    }
    
  • hooks/use-scroll.tsGitHub
    Read the script
    import { useEffect, useState } from "react";
    
    export const useScroll = () => {
      const [scrolled, setScrolled] = useState(false);
    
      useEffect(() => {
        const onScroll = () => setScrolled(window.scrollY > 8);
        onScroll();
        window.addEventListener("scroll", onScroll, { passive: true });
        return () => window.removeEventListener("scroll", onScroll);
      }, []);
    
      return scrolled;
    };
    
  • hooks/use-theme-shortcut.tsGitHub
    Read the script
    import { useTheme } from "next-themes";
    import { useEffect, useRef } from "react";
    
    /**
     * Toggles between light and dark theme when the "D" key is pressed.
     * Ignores key presses while the user is typing in a field or holding a modifier.
     */
    export function useThemeShortcut() {
      const { resolvedTheme, setTheme } = useTheme();
    
      // Mirror the theme in a ref so the listener stays registered across toggles.
      const resolvedThemeRef = useRef(resolvedTheme);
      resolvedThemeRef.current = resolvedTheme;
    
      useEffect(() => {
        const onKeyDown = (event: KeyboardEvent) => {
          if (event.key.toLowerCase() !== "d") return;
          if (event.metaKey || event.ctrlKey || event.altKey) return;
    
          const target = event.target as HTMLElement | null;
          if (
            target?.isContentEditable ||
            target instanceof HTMLInputElement ||
            target instanceof HTMLTextAreaElement ||
            target instanceof HTMLSelectElement
          ) {
            return;
          }
    
          event.preventDefault();
          setTheme(resolvedThemeRef.current === "dark" ? "light" : "dark");
        };
    
        window.addEventListener("keydown", onKeyDown);
        return () => window.removeEventListener("keydown", onKeyDown);
      }, [setTheme]);
    }
    

Read the script before you install anything that runs on your machine. This is the one part of a plugin that acts without being asked.

@remocn
Ships withremocn

Remocn is a Claude Code plugin, agent skill and MCP server for making Remotion videos from 933 MIT-licensed Remotion components.

1.8k5 skills2 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
1.8k
Star history of Remocn/remocn on GitHub, a chart by star-history.com

More plugins that ship hooks.

claude-video

claude-video

AI-powered video production suite for Claude Code. Edit, transcode, caption, analyze, generate, and create promo videos: all from your terminal.

16 skills+240
@agricidaniel@agricidaniel
Install Plugin

Questions about the hooks in remocn.

Which coding agents can use the hooks in remocn?
The hooks in remocn install in Claude Code and Cursor: each runs Claude Code hooks from .claude/settings.json, so copy the hooks there.