Agent skill

Trpc Patterns

by FranciscoMoretti in FranciscoMoretti/chat-js

Implement ChatJS tRPC routers, TanStack Query hooks, mutations, and cache invalidation.

Apache-2.0Auto-check passedBackend & APIs

Install Trpc Patterns

skills CLI
$ npx skills add FranciscoMoretti/chat-js --skill trpc-patterns -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install FranciscoMoretti/chat-js trpc-patterns --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/FranciscoMoretti/chat-js.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/trpc-patterns .claude/skills/trpc-patterns && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
trpc-patterns
GitHub stars
1.2k
Token cost
~288 tokens
SKILL.md length
60 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
Apache-2.0

At a glance

Implement ChatJS tRPC routers, TanStack Query hooks, mutations, and cache invalidation.

  • Changing tRPC procedures
  • SKILL.md covers Backend and React queries
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Their React consumers in apps/chat

What it does

Trpc Patterns is an agent skill from FranciscoMoretti/chat-js. Implement ChatJS tRPC routers, TanStack Query hooks, mutations, and cache invalidation. Use when adding or changing tRPC procedures or their React consumers in apps/chat.

Its SKILL.md is about 290 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering gRPC and Protobuf and Caching. It works with tRPC, React, TanStack and OpenAI. The repository describes itself as: Production-ready AI chat. Start here and make it your own. Formerly Sparka AI. The licence is Apache-2.0.

When your agent uses it

  • Changing tRPC procedures
  • Their React consumers in apps/chat

Example prompts

  • “/trpc-patterns”

What it can do on your machine

Read from SKILL.md and the folder at commit 3a6dfcb. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Trpc Patterns loads about 288 tokens when it runs. Until then it costs about 46 tokens; SKILL.md has 60 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~46
When it runs · the whole SKILL.md, loaded when a task matches
~288

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from FranciscoMoretti/chat-js at commit 3a6dfcb, republished under its Apache-2.0 licence (© FranciscoMoretti). 60 words, ~288 tokens.

Download SKILL.mdSave it as .claude/skills/trpc-patterns/SKILL.md (or your agent's skills folder).
name
trpc-patterns
description
Implement ChatJS tRPC routers, TanStack Query hooks, mutations, and cache invalidation. Use when adding or changing tRPC procedures or their React consumers in apps/chat.

ChatJS tRPC patterns

Backend

  • Add feature routers under apps/chat/trpc/routers/*.router.ts and register them in apps/chat/trpc/routers/_app.ts.
  • Use protectedProcedure for authenticated operations.
  • Validate inputs with Zod and verify ownership before mutations.
  • Keep database access in apps/chat/lib/db/queries.ts.

React queries

Use useTRPC() with TanStack Query:

tsx
const trpc = useTRPC();
const query = useQuery({
  ...trpc.feature.list.queryOptions(),
  enabled: Boolean(condition),
});

For mutations, use generated mutation options and invalidate related keys after success:

tsx
const trpc = useTRPC();
const queryClient = useQueryClient();

const mutation = useMutation(
  trpc.feature.update.mutationOptions({
    onSuccess: () =>
      queryClient.invalidateQueries({
        queryKey: trpc.feature.list.queryKey(),
      }),
  })
);

Handle loading and error states in the consumer.

© FranciscoMoretti, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/trpc-patterns of FranciscoMoretti/chat-js.

Open the folder on GitHubat commit 3a6dfcb

Compare with similar skills

Trpc Patterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Trpc Patterns compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Trpc Patterns this skillFranciscoMoretti/chat-js1.2k—~288Automated safety check: PassApache-2.0
Olore Trpc Latestolorehq/olore103—~1kAutomated safety check: PassMIT
Trpcpproenca/dot-skills214—~2.8kAutomated safety check: PassMIT
Tanstack Query Best PracticesDeckardGer/tanstack-agent-skills2221 repos~1.2kAutomated safety check: PassMIT
Continue Gemini ExplicitOnlyTerp/prompt-cache-skills114—~1.1kAutomated safety check: PassCustom licence
Trpc Fullstacksickn33/agentic-awesome-skills47k2 repos~3.9kAutomated safety check: PassMIT

Similar skills

  • Olore Trpc Latest

    olorehq/olore

    Local tRPC documentation reference (latest). An agent skill from olorehq/olore.

    103 GitHub stars~1k tokensUpdated today
    Backend & APIsAuto-check passed
  • Trpc

    pproenca/dot-skills

    Corrects the wrong defaults a model has for tRPC v11 (verified against 11.18.0).

    214 GitHub stars~2.8k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Tanstack Query Best Practices

    DeckardGer/tanstack-agent-skills

    TanStack Query (React Query) best practices for data fetching, caching, mutations, and server state management.

    222 GitHub starsUsed in 1 repo~1.2k tokens
    Backend & APIsAuto-check passed
  • Continue Gemini Explicit

    OnlyTerp/prompt-cache-skills

    Continue's Gemini provider doesn't use the cachedContents API at all.

    114 GitHub stars~1.1k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Trpc Fullstack

    sickn33/agentic-awesome-skills

    Build end-to-end type-safe APIs with tRPC — routers, procedures, middleware, subscriptions, and Next.js/React integration patterns.

    47k GitHub starsUsed in 2 repos~3.9k tokens
    Backend & APIsAuto-check passed
  • Nodetool API Reference

    nodetool-ai/nodetool

    Integrate with NodeTool over REST, tRPC, MsgPack WebSocket, MCP, or the OpenAI-compatible Chat API, including the document surfaces and workflow execution.

    554 GitHub stars~2.8k tokensUpdated today
    Backend & APIsAuto-check passed

More from FranciscoMoretti/chat-js

All 9 skills in this repo
  • Vitest Visual Testing

    FranciscoMoretti/chat-js

    Make @uiverify/vitest (Vitest browser-mode) captures deterministic so component visual tests stop coming back "changed" without a real change (flaky diffs).

    1.2k GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Worktree Ports

    FranciscoMoretti/chat-js

    Discover and use stable per-app ports assigned to a local monorepo worktree.

    1.2k GitHub stars~231 tokensUpdated today
    Auto-check: notes
  • Generate Code Snippet

    FranciscoMoretti/chat-js

    Generate a concise, shareable code snippet URL for code.franciscomoretti.com.

    1.2k GitHub stars~178 tokensUpdated today
    Auto-check passed
  • Lazy Prefetch Pattern

    FranciscoMoretti/chat-js

    Use the ChatJS React Query v5 lazy-prefetch pattern without blocking server rendering.

    1.2k GitHub stars~217 tokensUpdated today
    Auto-check passed
  • Create Vercel AI Issue

    FranciscoMoretti/chat-js

    Create a well-formed GitHub issue in vercel/ai using the gh CLI.

    1.2k GitHub stars~203 tokensUpdated today
    Auto-check passed
  • Dev Auth Bypass

    FranciscoMoretti/chat-js

    Authenticate a browser against a local ChatJS app without OAuth.

    1.2k GitHub stars~141 tokensUpdated today
    Auto-check passed

Categories

Questions about Trpc Patterns

What does Trpc Patterns do?

Implement ChatJS tRPC routers, TanStack Query hooks, mutations, and cache invalidation. Trpc Patterns is an agent skill from FranciscoMoretti/chat-js. Implement ChatJS tRPC routers, TanStack Query hooks, mutations, and cache invalidation.

When should I use Trpc Patterns?

Trpc Patterns fits situations like: changing tRPC procedures; their React consumers in apps/chat.

How do I install Trpc Patterns in Claude Code?

Run `npx skills add FranciscoMoretti/chat-js --skill trpc-patterns -a claude-code`. Or copy the skill folder (.agents/skills/trpc-patterns in FranciscoMoretti/chat-js) into .claude/skills/trpc-patterns in your project. Claude Code loads it when a task matches its description.

How do I install Trpc Patterns in Codex?

Run `npx skills add FranciscoMoretti/chat-js --skill trpc-patterns -a codex`. Or copy the skill folder (.agents/skills/trpc-patterns in FranciscoMoretti/chat-js) into .agents/skills/trpc-patterns in your project. Codex loads it when a task matches its description.

Can I use Trpc Patterns in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add FranciscoMoretti/chat-js --skill trpc-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/trpc-patterns, .gemini/skills/trpc-patterns, .github/skills/trpc-patterns and .opencode/skills/trpc-patterns in your project.

What does Trpc Patterns need to run?

SKILL.md names no scripts, command-line tools or credentials: Trpc Patterns is instructions for the agent only.

Does Trpc Patterns access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Trpc Patterns safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Trpc Patterns use?

Trpc Patterns is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Trpc Patterns use?

About 288 tokens (SKILL.md is roughly 1.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Trpc Patterns?

Skills that share tags, products or a category with Trpc Patterns: Olore Trpc Latest (olorehq/olore, 103 stars), Trpc (pproenca/dot-skills, 214 stars), Tanstack Query Best Practices (DeckardGer/tanstack-agent-skills, 222 stars) and Continue Gemini Explicit (OnlyTerp/prompt-cache-skills, 114 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Trpc Patterns?

FranciscoMoretti (a GitHub user) maintains it in FranciscoMoretti/chat-js, which has 1,201 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 7, 2026.

Source: FranciscoMoretti/chat-js on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.