import-srt-captions

import-srt-captions is a cursor rule for Cursor from ratnesh-maurya/cursor-claude-personas. It costs 17 tokens per session (552 once invoked), scanned A, original, MIT.

A method for loading existing SRT subtitle files into Remotion, a tool for creating videos with React. It parses the timed subtitle text so it can be used in a video composition.

In plain words
What is it for?
Use it to fetch an SRT file from the public folder and turn its captions into data that Remotion can display on the timeline.
Why use it?
It avoids retyping or manually converting subtitles before adding them to a Remotion video.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it to fetch an SRT file from the public folder and turn its captions into data that Remotion can display on the timeline.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/ratnesh-maurya/cursor-claude-personas/rules-import-srt-captions
Install

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.

Clone the repo
git clone --depth 1 https://github.com/ratnesh-maurya/cursor-claude-personas

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for import-srt-captions

README.md
[![agentmods](https://agentmods.dev/badge/rules/ratnesh-maurya/cursor-claude-personas/rules-import-srt-captions/github.svg)](https://agentmods.dev/rules/ratnesh-maurya/cursor-claude-personas/rules-import-srt-captions)
Your own site
<a href="https://agentmods.dev/rules/ratnesh-maurya/cursor-claude-personas/rules-import-srt-captions"><img src="https://agentmods.dev/badge/rules/ratnesh-maurya/cursor-claude-personas/rules-import-srt-captions/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for import-srt-captions

Your own site · 80×15
<a href="https://agentmods.dev/rules/ratnesh-maurya/cursor-claude-personas/rules-import-srt-captions"><img src="https://agentmods.dev/badge/rules/ratnesh-maurya/cursor-claude-personas/rules-import-srt-captions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 552 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00017 $0.00552
Opus 5 $0.00009 $0.00276
Sonnet 5 $0.00003 $0.00110
Haiku 4.5 $0.00002 $0.00055

Measured 7d ago against content hash 38d33be54397, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

import-srt-captions scanned grade A with 1 finding 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 7d ago.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

const response = await fetch(staticFile('subtitles.srt'));
3d-frontend-developer/.cursor/rules/rules--import-srt-captions.mdc · 68 lines

What it actually says

Importing .srt subtitles into Remotion

If you have an existing .srt subtitle file, you can import it into Remotion using parseSrt() from @remotion/captions.

Prerequisites

First, the @remotion/captions package needs to be installed. If it is not installed, use the following command:

npx remotion add @remotion/captions # If project uses npm
bunx remotion add @remotion/captions # If project uses bun
yarn remotion add @remotion/captions # If project uses yarn
pnpm exec remotion add @remotion/captions # If project uses pnpm

Reading an .srt file

Use staticFile() to reference an .srt file in your public folder, then fetch and parse it:

import {useState, useEffect, useCallback} from 'react';
import {AbsoluteFill, staticFile, useDelayRender} from 'remotion';
import {parseSrt} from '@remotion/captions';
import type {Caption} from '@remotion/captions';

export const MyComponent: React.FC = () => {
  const [captions, setCaptions] = useState<Caption[] | null>(null);
  const {delayRender, continueRender, cancelRender} = useDelayRender();
  const [handle] = useState(() => delayRender());

  const fetchCaptions = useCallback(async () => {
    try {
      const response = await fetch(staticFile('subtitles.srt'));
      const text = await response.text();
      const {captions: parsed} = parseSrt({input: text});
      setCaptions(parsed);
      continueRender(handle);
    } catch (e) {
      cancelRender(e);
    }
  }, [continueRender, cancelRender, handle]);

  useEffect(() => {
    fetchCaptions();
  }, [fetchCaptions]);

  if (!captions) {
    return null;
  }

  return <AbsoluteFill>{/* Use captions here */}</AbsoluteFill>;
};

Remote URLs are also supported - you can fetch() a remote file via URL instead of using staticFile().

Using imported captions

Once parsed, the captions are in the Caption format and can be used with all @remotion/captions utilities.

Changes

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.

  1. 7d ago First seen · 68 lines · 17 tokens per session scan A 38d33be54397

Subscribe to this mod's changes

import-srt-captions is a cursor rule published in the GitHub repository ratnesh-maurya/cursor-claude-personas (8 stars, last pushed 5mo ago), licensed MIT. It adds 17 tokens to every session and 552 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.